···6666require('mini.deps').setup()
67676868-- Define config table to be able to pass data between scripts
6969+-- It is a global variable which can be use both as `_G.Config` and `Config`
6970_G.Config = {}
70717172-- Define custom autocommand group and helper to create an autocommand.
···7778-- - `:h nvim_create_augroup()`
7879-- - `:h nvim_create_autocmd()`
7980local gr = vim.api.nvim_create_augroup('custom-config', {})
8080-_G.Config.new_autocmd = function(event, pattern, callback, desc)
8181+Config.new_autocmd = function(event, pattern, callback, desc)
8182 local opts = { group = gr, pattern = pattern, callback = callback, desc = desc }
8283 vim.api.nvim_create_autocmd(event, opts)
8384end
84858586-- Some plugins and 'mini.nvim' modules only need setup during startup if Neovim
8687-- is started like `nvim -- path/to/file`, otherwise delaying setup is fine
8787-_G.Config.now_if_args = vim.fn.argc(-1) > 0 and MiniDeps.now or MiniDeps.later
8888+Config.now_if_args = vim.fn.argc(-1) > 0 and MiniDeps.now or MiniDeps.later
888989909091
+47-47
.config/nvim/plugin/10_options.lua
···1616-- reading. Consider preserving this or remove `-- stylua` lines to autoformat.
17171818-- General ====================================================================
1919-vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
1919+vim.g.mapleader = ' ' -- Use `<Space>` as <Leader> key
20202121-vim.o.mouse = 'a' -- Enable mouse
2121+vim.o.mouse = 'a' -- Enable mouse
2222-- vim.o.mousescroll = 'ver:25,hor:6' -- Customize mouse scroll
2323-vim.o.switchbuf = 'usetab' -- Use already opened buffers when switching
2424-vim.o.undofile = true -- Enable persistent undo
2323+vim.o.switchbuf = 'usetab' -- Use already opened buffers when switching
2424+vim.o.undofile = true -- Enable persistent undo
25252626-vim.o.shada = "'100,<50,s10,:1000,/100,@100,h" -- Limit ShaDa file (for startup)
2626+vim.o.shada = "'100,<50,s10,:1000,/100,@100,h" -- Limit ShaDa file (for startup)
27272828-- Enable all filetype plugins and syntax (if not enabled, for better startup)
2929vim.cmd('filetype plugin indent on')
3030if vim.fn.exists('syntax_on') ~= 1 then vim.cmd('syntax enable') end
31313232-- UI =========================================================================
3333-vim.o.breakindent = true -- Indent wrapped lines to match line start
3434-vim.o.breakindentopt = 'list:-1' -- Add padding for lists (if 'wrap' is set)
3535-vim.o.colorcolumn = '+1' -- Draw column on the right of maximum width
3636-vim.o.cursorline = true -- Enable current line highlighting
3737-vim.o.linebreak = true -- Wrap lines at 'breakat' (if 'wrap' is set)
3838-vim.o.list = true -- Show helpful text indicators
3939-vim.o.number = true -- Show line numbers
3333+vim.o.breakindent = true -- Indent wrapped lines to match line start
3434+vim.o.breakindentopt = 'list:-1' -- Add padding for lists (if 'wrap' is set)
3535+vim.o.colorcolumn = '+1' -- Draw column on the right of maximum width
3636+vim.o.cursorline = true -- Enable current line highlighting
3737+vim.o.linebreak = true -- Wrap lines at 'breakat' (if 'wrap' is set)
3838+vim.o.list = true -- Show helpful text indicators
3939+vim.o.number = true -- Show line numbers
4040vim.wo.relativenumber = true
4141-vim.o.pumheight = 10 -- Make popup menu smaller
4242-vim.o.ruler = false -- Don't show cursor coordinates
4343-vim.o.shortmess = 'CFOSWaco' -- Disable some built-in completion messages
4444-vim.o.showmode = false -- Don't show mode in command line
4545-vim.o.signcolumn = 'yes' -- Always show signcolumn (less flicker)
4646-vim.o.splitbelow = true -- Horizontal splits will be below
4747-vim.o.splitkeep = 'screen' -- Reduce scroll during window split
4848-vim.o.splitright = true -- Vertical splits will be to the right
4949-vim.o.winborder = 'single' -- Use border in floating windows
5050-vim.o.wrap = false -- Don't visually wrap lines (toggle with \w)
4141+vim.o.pumheight = 10 -- Make popup menu smaller
4242+vim.o.ruler = false -- Don't show cursor coordinates
4343+vim.o.shortmess = 'CFOSWaco' -- Disable some built-in completion messages
4444+vim.o.showmode = false -- Don't show mode in command line
4545+vim.o.signcolumn = 'yes' -- Always show signcolumn (less flicker)
4646+vim.o.splitbelow = true -- Horizontal splits will be below
4747+vim.o.splitkeep = 'screen' -- Reduce scroll during window split
4848+vim.o.splitright = true -- Vertical splits will be to the right
4949+vim.o.winborder = 'single' -- Use border in floating windows
5050+vim.o.wrap = false -- Don't visually wrap lines (toggle with \w)
51515252-vim.o.cursorlineopt = 'screenline,number' -- Show cursor line per screen line
5252+vim.o.cursorlineopt = 'screenline,number' -- Show cursor line per screen line
53535454-- Special UI symbols. More is set via 'mini.basics' later.
5555-vim.o.fillchars = 'eob: ,fold:╌'
5656-vim.o.listchars = 'extends:…,nbsp:␣,precedes:…,tab:> '
5555+vim.o.fillchars = 'eob: ,fold:╌'
5656+vim.o.listchars = 'extends:…,nbsp:␣,precedes:…,tab:> '
57575858-- Folds (see `:h fold-commands`, `:h zM`, `:h zR`, `:h zA`, `:h zj`)
5959-vim.o.foldlevel = 10 -- Fold nothing by default; set to 0 or 1 to fold
6060-vim.o.foldmethod = 'indent' -- Fold based on indent level
6161-vim.o.foldnestmax = 10 -- Limit number of fold levels
6262-vim.o.foldtext = '' -- Show text under fold with its highlighting
5959+vim.o.foldlevel = 10 -- Fold nothing by default; set to 0 or 1 to fold
6060+vim.o.foldmethod = 'indent' -- Fold based on indent level
6161+vim.o.foldnestmax = 10 -- Limit number of fold levels
6262+vim.o.foldtext = '' -- Show text under fold with its highlighting
63636464-- Editing ====================================================================
6565-vim.o.autoindent = true -- Use auto indent
6666-vim.o.expandtab = true -- Convert tabs to spaces
6767-vim.o.formatoptions = 'rqnl1j'-- Improve comment editing
6868-vim.o.ignorecase = true -- Ignore case during search
6969-vim.o.incsearch = true -- Show search matches while typing
7070-vim.o.infercase = true -- Infer case in built-in completion
7171-vim.o.shiftwidth = 2 -- Use this number of spaces for indentation
7272-vim.o.smartcase = true -- Respect case if search pattern has upper case
7373-vim.o.smartindent = true -- Make indenting smart
7474-vim.o.spelloptions = 'camel' -- Treat camelCase word parts as separate words
7575-vim.o.tabstop = 2 -- Show tab as this number of spaces
7676-vim.o.virtualedit = 'block' -- Allow going past end of line in blockwise mode
6565+vim.o.autoindent = true -- Use auto indent
6666+vim.o.expandtab = true -- Convert tabs to spaces
6767+vim.o.formatoptions = 'rqnl1j' -- Improve comment editing
6868+vim.o.ignorecase = true -- Ignore case during search
6969+vim.o.incsearch = true -- Show search matches while typing
7070+vim.o.infercase = true -- Infer case in built-in completion
7171+vim.o.shiftwidth = 2 -- Use this number of spaces for indentation
7272+vim.o.smartcase = true -- Respect case if search pattern has upper case
7373+vim.o.smartindent = true -- Make indenting smart
7474+vim.o.spelloptions = 'camel' -- Treat camelCase word parts as separate words
7575+vim.o.tabstop = 2 -- Show tab as this number of spaces
7676+vim.o.virtualedit = 'block' -- Allow going past end of line in blockwise mode
77777878-vim.o.iskeyword = '@,48-57,_,192-255,-' -- Treat dash as `word` textobject part
7878+vim.o.iskeyword = '@,48-57,_,192-255,-' -- Treat dash as `word` textobject part
79798080-- Pattern for a start of numbered list (used in `gw`). This reads as
8181-- "Start of list item is: at least one special character (digit, -, +, *)
8282-- possibly followed by punctuation (. or `)`) followed by at least one space".
8383-vim.o.formatlistpat = [[^\s*[0-9\-\+\*]\+[\.\)]*\s\+]]
8383+vim.o.formatlistpat = [[^\s*[0-9\-\+\*]\+[\.\)]*\s\+]]
84848585-- Built-in completion
8686-vim.o.complete = '.,w,b,kspell' -- Use less sources
8787-vim.o.completeopt = 'menuone,noselect,fuzzy,nosort' -- Use custom behavior
8686+vim.o.complete = '.,w,b,kspell' -- Use less sources
8787+vim.o.completeopt = 'menuone,noselect,fuzzy,nosort' -- Use custom behavior
88888989-- Autocommands ===============================================================
90909191-- Don't auto-wrap comments and don't insert comment leader after hitting 'o'.
9292-- Do on `FileType` to always override these changes from filetype plugins.
9393-local f = function() vim.cmd('setlocal formatoptions-=c formatoptions-=o') end
9494-_G.Config.new_autocmd('FileType', nil, f, "Proper 'formatoptions'")
9393+local f = function() vim.cmd('setlocal formatoptions-=c formatoptions-=o') end
9494+Config.new_autocmd('FileType', nil, f, "Proper 'formatoptions'")
95959696-- There are other autocommands created by 'mini.basics'. See 'plugin/30_mini.lua'.
9797
+1-1
.config/nvim/plugin/20_keymaps.lua
···4949-- Create a global table with information about Leader groups in certain modes.
5050-- This is used to provide 'mini.clue' with extra clues.
5151-- Add an entry if you create a new group.
5252-_G.Config.leader_group_clues = {
5252+Config.leader_group_clues = {
5353 { mode = 'n', keys = '<Leader>b', desc = '+Buffer' },
5454 { mode = 'n', keys = '<Leader>e', desc = '+Explore/Edit' },
5555 { mode = 'n', keys = '<Leader>f', desc = '+Find' },
+132-128
.config/nvim/plugin/30_mini.lua
···2525-- Sometimes is needed only if Neovim is started as `nvim -- path/to/file`.
2626-- - Everything else is delayed until the first draw with `later()`.
2727local now, later = MiniDeps.now, MiniDeps.later
2828-local now_if_args = _G.Config.now_if_args
2828+local now_if_args = Config.now_if_args
29293030-- Step one ===================================================================
3131-- Enable 'miniwinter' color scheme. It comes with 'mini.nvim' and uses 'mini.hues'.
···8888 later(MiniIcons.tweak_lsp_kind)
8989end)
90909191--- Miscellaneous small but useful functions. Example usage:
9292--- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
9393--- - `<Leader>or` - resize window to its "editable width"
9494--- - `:lua put_text(vim.lsp.get_clients())` - put output of a function below
9595--- cursor in current buffer. Useful for a detailed exploration.
9696--- - `:lua put(MiniMisc.stat_summary(MiniMisc.bench_time(f, 100)))` - run
9797--- function `f` 100 times and report statistical summary of execution times
9898---
9999--- Uses `now()` for `setup_xxx()` to work when started like `nvim -- path/to/file`
100100-now_if_args(function()
101101- -- Makes `:h MiniMisc.put()` and `:h MiniMisc.put_text()` public
102102- require('mini.misc').setup()
103103-104104- -- Change current working directory based on the current file path. It
105105- -- searches up the file tree until the first root marker ('.git' or 'Makefile')
106106- -- and sets their parent directory as a current directory.
107107- -- This is helpful when simultaneously dealing with files from several projects.
108108- MiniMisc.setup_auto_root()
109109-110110- -- Restore latest cursor position on file open
111111- MiniMisc.setup_restore_cursor()
112112-113113- -- Synchronize terminal emulator background with Neovim's background to remove
114114- -- possibly different color padding around Neovim instance
115115- MiniMisc.setup_termbg_sync()
116116-end)
1179111892-- Notifications provider. Shows all kinds of notifications in the upper right
11993-- corner (by default). Example usage:
···159133-- Buffers are ordered as they were created. Navigate with `[b` and `]b`.
160134now(function() require('mini.tabline').setup() end)
161135136136+137137+-- Step one or two ============================================================
138138+-- Load now if Neovim is started like `nvim -- path/to/file`, otherwise - later.
139139+-- This ensures a correct behavior for files opened during startup.
140140+141141+-- Completion and signature help. Implements async "two stage" autocompletion:
142142+-- - Based on attached LSP servers that support completion.
143143+-- - Fallback (based on built-in keyword completion) if there is no LSP candidates.
144144+--
145145+-- Example usage in Insert mode with attached LSP:
146146+-- - Start typing text that should be recognized by LSP (like variable name).
147147+-- - After 100ms a popup menu with candidates appears.
148148+-- - Press `<Tab>` / `<S-Tab>` to navigate down/up the list. These are set up
149149+-- in 'mini.keymap'. You can also use `<C-n>` / `<C-p>`.
150150+-- - During navigation there is an info window to the right showing extra info
151151+-- that the LSP server can provide about the candidate. It appears after the
152152+-- candidate stays selected for 100ms. Use `<C-f>` / `<C-b>` to scroll it.
153153+-- - Navigating to an entry also changes buffer text. If you are happy with it,
154154+-- keep typing after it. To discard completion completely, press `<C-e>`.
155155+-- - After pressing special trigger(s), usually `(`, a window appears that shows
156156+-- the signature of the current function/method. It gets updated as you type
157157+-- showing the currently active parameter.
158158+--
159159+-- Example usage in Insert mode without an attached LSP or in places not
160160+-- supported by the LSP (like comments):
161161+-- - Start typing a word that is present in current or opened buffers.
162162+-- - After 100ms popup menu with candidates appears.
163163+-- - Navigate with `<Tab>` / `<S-Tab>` or `<C-n>` / `<C-p>`. This also updates
164164+-- buffer text. If happy with choice, keep typing. Stop with `<C-e>`.
165165+--
166166+-- It also works with snippet candidates provided by LSP server. Best experience
167167+-- when paired with 'mini.snippets' (which is set up in this file).
168168+now_if_args(function()
169169+ -- Customize post-processing of LSP responses for a better user experience.
170170+ -- Don't show 'Text' suggestions (usually noisy) and show snippets last.
171171+ local process_items_opts = { kind_priority = { Text = -1, Snippet = 99 } }
172172+ local process_items = function(items, base)
173173+ return MiniCompletion.default_process_items(items, base, process_items_opts)
174174+ end
175175+ require('mini.completion').setup({
176176+ lsp_completion = {
177177+ -- Without this config autocompletion is set up through `:h 'completefunc'`.
178178+ -- Although not needed, setting up through `:h 'omnifunc'` is cleaner
179179+ -- (sets up only when needed) and makes it possible to use `<C-u>`.
180180+ source_func = 'omnifunc',
181181+ auto_setup = false,
182182+ process_items = process_items,
183183+ },
184184+ })
185185+186186+ -- Set 'omnifunc' for LSP completion only when needed.
187187+ local on_attach = function(ev)
188188+ vim.bo[ev.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp'
189189+ end
190190+ Config.new_autocmd('LspAttach', nil, on_attach, "Set 'omnifunc'")
191191+192192+ -- Advertise to servers that Neovim now supports certain set of completion and
193193+ -- signature features through 'mini.completion'.
194194+ vim.lsp.config('*', { capabilities = MiniCompletion.get_lsp_capabilities() })
195195+end)
196196+197197+-- Navigate and manipulate file system
198198+--
199199+-- Navigation is done using column view (Miller columns) to display nested
200200+-- directories, they are displayed in floating windows in top left corner.
201201+--
202202+-- Manipulate files and directories by editing text as regular buffers.
203203+--
204204+-- Example usage:
205205+-- - `<Leader>ed` - open current working directory
206206+-- - `<Leader>ef` - open directory of current file (needs to be present on disk)
207207+--
208208+-- Basic navigation:
209209+-- - `l` - go in entry at cursor: navigate into directory or open file
210210+-- - `h` - go out of focused directory
211211+-- - Navigate window as any regular buffer
212212+-- - Press `g?` inside explorer to see more mappings
213213+--
214214+-- Basic manipulation:
215215+-- - After any following action, press `=` in Normal mode to synchronize, read
216216+-- carefully about actions, press `y` or `<CR>` to confirm
217217+-- - New entry: press `o` and type its name; end with `/` to create directory
218218+-- - Rename: press `C` and type new name
219219+-- - Delete: type `dd`
220220+-- - Move/copy: type `dd`/`yy`, navigate to target directory, press `p`
221221+--
222222+-- See also:
223223+-- - `:h MiniFiles-navigation` - more details about how to navigate
224224+-- - `:h MiniFiles-manipulation` - more details about how to manipulate
225225+-- - `:h MiniFiles-examples` - examples of common setups
226226+now_if_args(function()
227227+ -- Enable directory/file preview
228228+ require('mini.files').setup({ windows = { preview = true } })
229229+230230+ -- Add common bookmarks for every explorer. Example usage inside explorer:
231231+ -- - `'c` to navigate into your config directory
232232+ -- - `g?` to see available bookmarks
233233+ local add_marks = function()
234234+ MiniFiles.set_bookmark('c', vim.fn.stdpath('config'), { desc = 'Config' })
235235+ local minideps_plugins = vim.fn.stdpath('data') .. '/site/pack/deps/opt'
236236+ MiniFiles.set_bookmark('p', minideps_plugins, { desc = 'Plugins' })
237237+ MiniFiles.set_bookmark('w', vim.fn.getcwd, { desc = 'Working directory' })
238238+ end
239239+ Config.new_autocmd('User', 'MiniFilesExplorerOpen', add_marks, 'Add bookmarks')
240240+end)
241241+242242+-- Miscellaneous small but useful functions. Example usage:
243243+-- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
244244+-- - `<Leader>or` - resize window to its "editable width"
245245+-- - `:lua put_text(vim.lsp.get_clients())` - put output of a function below
246246+-- cursor in current buffer. Useful for a detailed exploration.
247247+-- - `:lua put(MiniMisc.stat_summary(MiniMisc.bench_time(f, 100)))` - run
248248+-- function `f` 100 times and report statistical summary of execution times
249249+now_if_args(function()
250250+ -- Makes `:h MiniMisc.put()` and `:h MiniMisc.put_text()` public
251251+ require('mini.misc').setup()
252252+253253+ -- Change current working directory based on the current file path. It
254254+ -- searches up the file tree until the first root marker ('.git' or 'Makefile')
255255+ -- and sets their parent directory as a current directory.
256256+ -- This is helpful when simultaneously dealing with files from several projects.
257257+ MiniMisc.setup_auto_root()
258258+259259+ -- Restore latest cursor position on file open
260260+ MiniMisc.setup_restore_cursor()
261261+262262+ -- Synchronize terminal emulator background with Neovim's background to remove
263263+ -- possibly different color padding around Neovim instance
264264+ MiniMisc.setup_termbg_sync()
265265+end)
266266+162267-- Step two ===================================================================
163268164269-- Extra 'mini.nvim' functionality.
···338443-- still enabled as it provides more customization opportunities.
339444later(function() require('mini.comment').setup() end)
340445341341--- Completion and signature help. Implements async "two stage" autocompletion:
342342--- - Based on attached LSP servers that support completion.
343343--- - Fallback (based on built-in keyword completion) if there is no LSP candidates.
344344---
345345--- Example usage in Insert mode with attached LSP:
346346--- - Start typing text that should be recognized by LSP (like variable name).
347347--- - After 100ms a popup menu with candidates appears.
348348--- - Press `<Tab>` / `<S-Tab>` to navigate down/up the list. These are set up
349349--- in 'mini.keymap'. You can also use `<C-n>` / `<C-p>`.
350350--- - During navigation there is an info window to the right showing extra info
351351--- that the LSP server can provide about the candidate. It appears after the
352352--- candidate stays selected for 100ms. Use `<C-f>` / `<C-b>` to scroll it.
353353--- - Navigating to an entry also changes buffer text. If you are happy with it,
354354--- keep typing after it. To discard completion completely, press `<C-e>`.
355355--- - After pressing special trigger(s), usually `(`, a window appears that shows
356356--- the signature of the current function/method. It gets updated as you type
357357--- showing the currently active parameter.
358358---
359359--- Example usage in Insert mode without an attached LSP or in places not
360360--- supported by the LSP (like comments):
361361--- - Start typing a word that is present in current or opened buffers.
362362--- - After 100ms popup menu with candidates appears.
363363--- - Navigate with `<Tab>` / `<S-Tab>` or `<C-n>` / `<C-p>`. This also updates
364364--- buffer text. If happy with choice, keep typing. Stop with `<C-e>`.
365365---
366366--- It also works with snippet candidates provided by LSP server. Best experience
367367--- when paired with 'mini.snippets' (which is set up in this file).
368368-later(function()
369369- -- Customize post-processing of LSP responses for a better user experience.
370370- -- Don't show 'Text' suggestions (usually noisy) and show snippets last.
371371- local process_items_opts = { kind_priority = { Text = -1, Snippet = 99 } }
372372- local process_items = function(items, base)
373373- return MiniCompletion.default_process_items(items, base, process_items_opts)
374374- end
375375- require('mini.completion').setup({
376376- lsp_completion = {
377377- -- Without this config autocompletion is set up through `:h 'completefunc'`.
378378- -- Although not needed, setting up through `:h 'omnifunc'` is cleaner
379379- -- (sets up only when needed) and makes it possible to use `<C-u>`.
380380- source_func = 'omnifunc',
381381- auto_setup = false,
382382- process_items = process_items,
383383- },
384384- })
385385-386386- -- Set 'omnifunc' for LSP completion only when needed.
387387- local on_attach = function(ev)
388388- vim.bo[ev.buf].omnifunc = 'v:lua.MiniCompletion.completefunc_lsp'
389389- end
390390- _G.Config.new_autocmd('LspAttach', nil, on_attach, "Set 'omnifunc'")
391391-392392- -- Advertise to servers that Neovim now supports certain set of completion and
393393- -- signature features through 'mini.completion'.
394394- vim.lsp.config('*', { capabilities = MiniCompletion.get_lsp_capabilities() })
395395-end)
396396-397446-- Autohighlight word under cursor with a customizable delay.
398447-- Word boundaries are defined based on `:h 'iskeyword'` option.
399448--
···416465-- - `:h MiniDiff-diff-summary` - available summary information
417466-- - `:h MiniDiff.gen_source` - available built-in sources
418467later(function() require('mini.diff').setup() end)
419419-420420--- Navigate and manipulate file system
421421---
422422--- Navigation is done using column view (Miller columns) to display nested
423423--- directories, they are displayed in floating windows in top left corner.
424424---
425425--- Manipulate files and directories by editing text as regular buffers.
426426---
427427--- Example usage:
428428--- - `<Leader>ed` - open current working directory
429429--- - `<Leader>ef` - open directory of current file (needs to be present on disk)
430430---
431431--- Basic navigation:
432432--- - `l` - go in entry at cursor: navigate into directory or open file
433433--- - `h` - go out of focused directory
434434--- - Navigate window as any regular buffer
435435--- - Press `g?` inside explorer to see more mappings
436436---
437437--- Basic manipulation:
438438--- - After any following action, press `=` in Normal mode to synchronize, read
439439--- carefully about actions, press `y` or `<CR>` to confirm
440440--- - New entry: press `o` and type its name; end with `/` to create directory
441441--- - Rename: press `C` and type new name
442442--- - Delete: type `dd`
443443--- - Move/copy: type `dd`/`yy`, navigate to target directory, press `p`
444444---
445445--- See also:
446446--- - `:h MiniFiles-navigation` - more details about how to navigate
447447--- - `:h MiniFiles-manipulation` - more details about how to manipulate
448448--- - `:h MiniFiles-examples` - examples of common setups
449449-later(function()
450450- -- Enable directory/file preview
451451- require('mini.files').setup({ windows = { preview = true } })
452452-453453- -- Add common bookmarks for every explorer. Example usage inside explorer:
454454- -- - `'c` to navigate into your config directory
455455- -- - `g?` to see available bookmarks
456456- local add_marks = function()
457457- MiniFiles.set_bookmark('c', vim.fn.stdpath('config'), { desc = 'Config' })
458458- local minideps_plugins = vim.fn.stdpath('data') .. '/site/pack/deps/opt'
459459- MiniFiles.set_bookmark('p', minideps_plugins, { desc = 'Plugins' })
460460- MiniFiles.set_bookmark('w', vim.fn.getcwd, { desc = 'Working directory' })
461461- end
462462- _G.Config.new_autocmd('User', 'MiniFilesExplorerOpen', add_marks, 'Add bookmarks')
463463-end)
464468465469-- Git integration for more straightforward Git actions based on Neovim's state.
466470-- It is not meant as a fully featured Git client, only to provide helpers that
+6-9
.config/nvim/plugin/40_plugins.lua
···10101111-- Make concise helpers for installing/adding plugins in two stages
1212local add, later = MiniDeps.add, MiniDeps.later
1313-local now_if_args = _G.Config.now_if_args
1313+local now_if_args = Config.now_if_args
14141515-- Tree-sitter ================================================================
1616···4141 -- Update tree-sitter parser after plugin is updated
4242 hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
4343 })
4444- add({
4545- source = 'nvim-treesitter/nvim-treesitter-textobjects',
4646- -- Use `main` branch since `master` branch is frozen, yet still default
4747- -- It is needed for compatibility with 'nvim-treesitter' `main` branch
4848- checkout = 'main',
4949- })
4444+ add('nvim-treesitter/nvim-treesitter-textobjects')
50455146 -- Define languages which will have parsers installed and auto enabled
4747+ -- After changing this, restart Neovim once to install necessary parsers. Wait
4848+ -- for the installation to finish before opening a file for added language(s).
5249 local languages = {
5350 -- These are already pre-installed with Neovim. Used as an example.
5451 'lua',
···6461 -- To see available languages:
6562 -- - Execute `:=require('nvim-treesitter').get_available()`
6663 -- - Visit 'SUPPORTED_LANGUAGES.md' file at
6767- -- https://github.com/nvim-treesitter/nvim-treesitter/blob/main
6464+ -- https://github.com/nvim-treesitter/nvim-treesitter
6865 }
6966 local isnt_installed = function(lang)
7067 return #vim.api.nvim_get_runtime_file('parser/' .. lang .. '.*', false) == 0
···8077 end
8178 end
8279 local ts_start = function(ev) vim.treesitter.start(ev.buf) end
8383- _G.Config.new_autocmd('FileType', filetypes, ts_start, 'Start tree-sitter')
8080+ Config.new_autocmd('FileType', filetypes, ts_start, 'Start tree-sitter')
8481end)
85828683-- Language servers ===========================================================