@@ -184,14 +184,14 @@ vim.g.neominimap = {
184184 -- Path to the log file
185185 log_path = vim .fn .stdpath (" data" ) .. " /neominimap.log" , --- @type string
186186
187- -- Minimap will not be created for buffers of these types
187+ -- Minimaps will not be created for buffers of these filetypes
188188 --- @type string[]
189189 exclude_filetypes = {
190190 " help" ,
191191 " bigfile" , -- For Snacks.nvim
192192 },
193193
194- -- Minimap will not be created for buffers of these types
194+ -- Minimaps will not be created for buffers of these buftypes
195195 --- @type string[]
196196 exclude_buftypes = {
197197 " nofile" ,
@@ -201,38 +201,42 @@ vim.g.neominimap = {
201201 " prompt" ,
202202 },
203203
204- -- When false is returned , the minimap will not be created for this buffer
204+ -- When this function returns false , the minimap will not be created for this buffer.
205205 --- @type fun ( bufnr : integer ): boolean
206206 buf_filter = function ()
207207 return true
208208 end ,
209209
210- -- When false is returned , the minimap will not be created for this window
210+ -- When this function returns false , the minimap will not be created for this window.
211211 --- @type fun ( winid : integer ): boolean
212212 win_filter = function ()
213213 return true
214214 end ,
215215
216- -- When false is returned , the minimap will not be created for this tab
216+ -- When this function returns false , the minimap will not be created for this tab.
217217 --- @type fun ( tabid : integer ): boolean
218218 tab_filter = function ()
219219 return true
220220 end ,
221221
222-
223222 -- How many columns a dot should span
224223 x_multiplier = 4 , --- @type integer
225224
226225 -- How many rows a dot should span
227226 y_multiplier = 1 , --- @type integer
228227
228+ buffer = {
229+ -- When true, the minimap will be recreated when you delete the buffer.
230+ -- When false, the minimap will be disabled for the current buffer when you delete the minimap buffer.
231+ persist = true , --- @type boolean
232+ },
233+
234+
229235 --- @alias Neominimap.Config.LayoutType " split" | " float"
230236
231237 --- Either `split` or `float`
232- --- When layout is set to `float`,
233- --- the minimap will be created in floating windows attached to all suitable windows
234- --- When layout is set to `split`,
235- --- the minimap will be created in one split window
238+ --- When layout is set to `float`, minimaps will be created in floating windows attached to all suitable windows.
239+ --- When layout is set to `split`, the minimap will be created in one split window per tab.
236240 layout = " float" , --- @type Neominimap.Config.LayoutType
237241
238242 --- Used when `layout` is set to `split`
@@ -242,17 +246,15 @@ vim.g.neominimap = {
242246 -- Always fix the width of the split window
243247 fix_width = false , --- @type boolean
244248
245- -- split mode:
246- -- left is an alias for topleft - leftmost vertical split, full height
247- -- right is an alias for botright - rightmost vertical split, full height
248- -- aboveleft - left split in current window
249- -- rightbelow - right split in current window
250- --- @alias Neominimap.Config.SplitDirection " left" | " right" |
251- --- "topleft" | "botright" | "aboveleft" | "rightbelow"
249+ --- @alias Neominimap.Config.SplitDirection " left" | " right" | " topleft" | " botright" | " aboveleft" | " rightbelow"
252250 direction = " right" , --- @type Neominimap.Config.SplitDirection
253251
254- --- Automatically close the split window when it is the last window
252+ --- Automatically close the split window when it is the last window.
255253 close_if_last_window = false , --- @type boolean
254+
255+ --- When true, the split window will be recreated when you close it.
256+ --- When false, the minimap will be disabled for the current tab when you close the minimap window.
257+ persist = true , --- @type boolean
256258 },
257259
258260 --- Used when `layout` is set to `float`
@@ -274,20 +276,23 @@ vim.g.neominimap = {
274276 --- Accepts all usual border style options (e.g., "single", "double")
275277 --- @type string | string[] | [string , string][]
276278 window_border = " single" ,
279+
280+ -- When true, the floating window will be recreated when you close it.
281+ -- When false, the minimap will be disabled for the current tab when you close the minimap window.
282+ persist = true , --- @type boolean
277283 },
278284
279- -- For performance issue, when text changed,
280- -- minimap is refreshed after a certain delay
285+ -- For performance, when text changes, the minimap is refreshed after a certain delay.
281286 -- Set the delay in milliseconds
282287 delay = 200 , --- @type integer
283288
284289 -- Sync the cursor position with the minimap
285290 sync_cursor = true , --- @type boolean
286291
287292 click = {
288- -- Enable mouse click on minimap
293+ -- Enable mouse click on the minimap
289294 enabled = false , --- @type boolean
290- -- Automatically switch focus to minimap when clicked
295+ -- Automatically switch focus to the minimap when clicked
291296 auto_switch_focus = true , --- @type boolean
292297 },
293298
@@ -352,18 +357,18 @@ vim.g.neominimap = {
352357 },
353358
354359 fold = {
355- -- Considering fold when rendering minimap
360+ -- Consider folds when rendering the minimap
356361 enabled = true , --- @type boolean
357362 },
358363
359- --- Overrite the default winopt
364+ --- Override the default window options
360365 --- @param opt vim.wo
361- --- @param winid integer the window id of the source window , NOT minimap window
366+ --- @param winid integer the window id of the source window , NOT the minimap window
362367 winopt = function (opt , winid ) end ,
363368
364- --- Overrite the default bufopt
369+ --- Override the default buffer options
365370 --- @param opt vim.bo
366- --- @param bufnr integer the buffer id of the source buffer , NOT minimap buffer
371+ --- @param bufnr integer the buffer id of the source buffer , NOT the minimap buffer
367372 bufopt = function (opt , bufnr ) end ,
368373
369374 --- @type Neominimap.Map.Handler[]
@@ -660,18 +665,18 @@ neominimap components:
660665``` lua
661666local neominimap = require (" neominimap.statusline" )
662667local minimap_extension = {
663- sections = {
664- lualine_c = {
665- neominimap .fullname ,
666- },
667- lualine_z = {
668- neominimap .position ,
669- " progress" ,
668+ sections = {
669+ lualine_c = {
670+ neominimap .fullname ,
671+ },
672+ lualine_z = {
673+ neominimap .position ,
674+ " progress" ,
675+ },
670676 },
671- },
672- filetypes = { " neominimap" },
677+ filetypes = { " neominimap" },
673678}
674- require (' lualine' ).setup { extensions = { minimap_extension } }
679+ require (" lualine" ).setup ( { extensions = { minimap_extension } })
675680```
676681
677682### Using the Default Lualine Extension
@@ -680,7 +685,7 @@ Alternatively, you can use the default settings provided by the plugin:
680685
681686``` lua
682687local minimap_extension = require (" neominimap.statusline" ).lualine_default
683- require (' lualine' ).setup { extensions = { minimap_extension } }
688+ require (" lualine" ).setup ( { extensions = { minimap_extension } })
684689```
685690
686691The default Lualine extension provided by the plugin is structured as follows:
0 commit comments