From 027c3e7a78838a9db23124fb642783fc6466df64 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 05:20:51 +0000 Subject: [PATCH 001/103] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 4 ++-- docs/extras/coding/blink.md | 2 +- docs/extras/lang/python.md | 42 +++++++++++++++++++++++++++++++++++++ docs/keymaps.md | 7 +++++++ 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index ef34ffca14..da15718aa6 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -218,7 +218,7 @@ opts = function(_, opts) LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then - local status = require("copilot.api").status.data.status + local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" end end) @@ -243,7 +243,7 @@ end LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then - local status = require("copilot.api").status.data.status + local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" end end) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index e454846ca0..cd2553f501 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -195,7 +195,7 @@ opts = { if not opts.keymap[""] then if opts.keymap.preset == "super-tab" then -- super-tab opts.keymap[""] = { - require("blink.cmp.keymap.presets")["super-tab"][""][1], + require("blink.cmp.keymap.presets").get("super-tab")[""][1], LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", } diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 987e02032a..e14dfa310d 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -251,6 +251,48 @@ opts = {} +## [venv-selector.nvim](https://github.com/linux-cultist/venv-selector.nvim) + + + + + +```lua +opts = { + settings = { + options = { + notify_user_on_venv_activation = true, + }, + }, +} +``` + + + + + + +```lua +{ + "linux-cultist/venv-selector.nvim", + cmd = "VenvSelect", + opts = { + settings = { + options = { + notify_user_on_venv_activation = true, + }, + }, + }, + -- Call config for Python files and load the cached venv automatically + ft = "python", + keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, +} +``` + + + + + ## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ diff --git a/docs/keymaps.md b/docs/keymaps.md index 856383e340..12bb0ae0dd 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -581,6 +581,13 @@ Part of [lazyvim.plugins.extras.lang.python](/extras/lang/python) | <leader>dPc | Debug Class | **n** | | <leader>dPt | Debug Method | **n** | +## [venv-selector.nvim](https://github.com/linux-cultist/venv-selector.nvim.git) +Part of [lazyvim.plugins.extras.lang.python](/extras/lang/python) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>cv | Select VirtualEnv | **n** | + ## [vim-dadbod-ui](https://github.com/kristijanhusak/vim-dadbod-ui.git) Part of [lazyvim.plugins.extras.lang.sql](/extras/lang/sql) From d33c13aeb692ad1316fb604ac52a78df43920e73 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:01:51 +0200 Subject: [PATCH 002/103] docs: update required Neovim version --- docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 635138e8bd..88e938e78b 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -24,7 +24,7 @@ to make it easy to customize and extend your config. ## ⚡️ Requirements -- Neovim >= **0.9.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a [Nerd Font](https://www.nerdfonts.com/)(v3.0 or greater) **_(optional, but needed to display some icons)_** - [lazygit](https://github.com/jesseduffield/lazygit) **_(optional)_** From fc7d5578d2e17c4ad610c14bb0f42e3f9560a69b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 09:24:26 +0000 Subject: [PATCH 003/103] chore(build): auto-generate docs --- docs/configuration/general.md | 24 +++---------- docs/extras/editor/navic.md | 2 +- docs/extras/lang/rust.md | 1 - docs/extras/lang/svelte.md | 10 ------ docs/extras/lang/typescript.md | 8 ++--- docs/extras/lang/yaml.md | 20 ----------- docs/plugins/colorscheme.md | 6 ++-- docs/plugins/lsp.md | 64 +++++++++++++--------------------- 8 files changed, 37 insertions(+), 98 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index fad5a15210..43ad2e4426 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -120,7 +120,10 @@ opt.fillchars = { diff = "╱", eob = " ", } +opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" opt.foldlevel = 99 +opt.foldmethod = "expr" +opt.foldtext = "" opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj opt.grepformat = "%f:%l:%c:%m" @@ -147,6 +150,7 @@ opt.sidescrolloff = 8 -- Columns of context opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically +opt.smoothscroll = true opt.spelllang = { "en" } opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" @@ -163,16 +167,6 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode opt.winminwidth = 5 -- Minimum window width opt.wrap = false -- Disable line wrap -if vim.fn.has("nvim-0.10") == 1 then - opt.smoothscroll = true - opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" - opt.foldmethod = "expr" - opt.foldtext = "" -else - opt.foldmethod = "indent" - opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" -end - -- Fix markdown indentation settings vim.g.markdown_recommended_style = 0 @@ -409,16 +403,6 @@ map("n", "]", "tabnext", { desc = "Next Tab" }) map("n", "d", "tabclose", { desc = "Close Tab" }) map("n", "[", "tabprevious", { desc = "Previous Tab" }) --- native snippets. only needed on < 0.11, as 0.11 creates these by default -if vim.fn.has("nvim-0.11") == 0 then - map("s", "", function() - return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, { expr = true, desc = "Jump Next" }) - map({ "i", "s" }, "", function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, { expr = true, desc = "Jump Previous" }) -end - ``` diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index dbaa5c90aa..772bc80e0c 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -52,7 +52,7 @@ end init = function() vim.g.navic_silence = true LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/documentSymbol") then + if client:supports_method("textDocument/documentSymbol") then require("nvim-navic").attach(client, buffer) end end) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index b41afadb46..31349c95ce 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -180,7 +180,6 @@ opts = { ```lua { "mrcjkb/rustaceanvim", - version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false, ft = { "rust" }, opts = { server = { diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index 6fa6e4333d..a9d491129f 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -67,11 +67,6 @@ opts = { desc = "Organize Imports", }, }, - capabilities = { - workspace = { - didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, - }, - }, }, }, } @@ -95,11 +90,6 @@ opts = { desc = "Organize Imports", }, }, - capabilities = { - workspace = { - didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, - }, - }, }, }, }, diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index ed1e86a7c1..f37fc9e86d 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -148,14 +148,14 @@ opts = { local action, uri, range = unpack(command.arguments) local function move(newf) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = command.command, arguments = { action, uri, range, newf }, }) end local fname = vim.uri_to_fname(uri) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = "typescript.tsserverRequest", arguments = { "getMoveToRefactoringFileSuggestions", @@ -329,14 +329,14 @@ opts = { local action, uri, range = unpack(command.arguments) local function move(newf) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = command.command, arguments = { action, uri, range, newf }, }) end local fname = vim.uri_to_fname(uri) - client.request("workspace/executeCommand", { + client:request("workspace/executeCommand", { command = "typescript.tsserverRequest", arguments = { "getMoveToRefactoringFileSuggestions", diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 4187fe9b2b..31b56141d5 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -97,16 +97,6 @@ opts = { }, }, }, - setup = { - yamlls = function() - -- Neovim < 0.10 does not have dynamic registration for formatting - if vim.fn.has("nvim-0.10") == 0 then - LazyVim.lsp.on_attach(function(client, _) - client.server_capabilities.documentFormattingProvider = true - end, "yamlls") - end - end, - }, } ``` @@ -158,16 +148,6 @@ opts = { }, }, }, - setup = { - yamlls = function() - -- Neovim < 0.10 does not have dynamic registration for formatting - if vim.fn.has("nvim-0.10") == 0 then - LazyVim.lsp.on_attach(function(client, _) - client.server_capabilities.documentFormattingProvider = true - end, "yamlls") - end - end, - }, }, } ``` diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index 52f5b30b8a..ae7751596f 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -160,7 +160,7 @@ opts = { optional = true, opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() end end, }, @@ -181,7 +181,7 @@ opts = { ```lua opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() end end ``` @@ -197,7 +197,7 @@ end optional = true, opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() end end, } diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index b0a1c1544d..e796429c03 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -275,53 +275,39 @@ end LazyVim.lsp.setup() LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) - -- diagnostics signs - if vim.fn.has("nvim-0.10.0") == 0 then - if type(opts.diagnostics.signs) ~= "boolean" then - for severity, icon in pairs(opts.diagnostics.signs.text) do - local name = vim.diagnostic.severity[severity]:lower():gsub("^%l", string.upper) - name = "DiagnosticSign" .. name - vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) + -- inlay hints + if opts.inlay_hints.enabled then + LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) + if + vim.api.nvim_buf_is_valid(buffer) + and vim.bo[buffer].buftype == "" + and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype) + then + vim.lsp.inlay_hint.enable(true, { bufnr = buffer }) end - end + end) end - if vim.fn.has("nvim-0.10") == 1 then - -- inlay hints - if opts.inlay_hints.enabled then - LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) - if - vim.api.nvim_buf_is_valid(buffer) - and vim.bo[buffer].buftype == "" - and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype) - then - vim.lsp.inlay_hint.enable(true, { bufnr = buffer }) - end - end) - end - - -- code lens - if opts.codelens.enabled and vim.lsp.codelens then - LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) - vim.lsp.codelens.refresh() - vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { - buffer = buffer, - callback = vim.lsp.codelens.refresh, - }) - end) - end + -- code lens + if opts.codelens.enabled and vim.lsp.codelens then + LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) + vim.lsp.codelens.refresh() + vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { + buffer = buffer, + callback = vim.lsp.codelens.refresh, + }) + end) end if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then - opts.diagnostics.virtual_text.prefix = vim.fn.has("nvim-0.10.0") == 0 and "●" - or function(diagnostic) - local icons = LazyVim.config.icons.diagnostics - for d, icon in pairs(icons) do - if diagnostic.severity == vim.diagnostic.severity[d:upper()] then - return icon - end + opts.diagnostics.virtual_text.prefix = function(diagnostic) + local icons = LazyVim.config.icons.diagnostics + for d, icon in pairs(icons) do + if diagnostic.severity == vim.diagnostic.severity[d:upper()] then + return icon end end + end end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) From 0037f9957572ac4aed1b0d283f82ce589adb417e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 10:22:41 +0000 Subject: [PATCH 004/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 54 ++++++++++++++++ docs/extras/coding/mini-comment.md | 4 +- docs/extras/coding/mini-snippets.md | 8 +-- docs/extras/coding/mini-surround.md | 4 +- docs/extras/editor/harpoon2.md | 2 +- docs/extras/editor/leap.md | 4 +- docs/extras/editor/mini-diff.md | 6 +- docs/extras/editor/mini-files.md | 4 +- docs/extras/editor/mini-move.md | 4 +- docs/extras/editor/snacks_picker.md | 4 +- docs/extras/lang/go.md | 4 +- docs/extras/lang/java.md | 14 ++--- docs/extras/lang/php.md | 10 ++- docs/extras/lang/rust.md | 10 +-- docs/extras/lang/typescript.md | 4 +- docs/extras/ui/mini-animate.md | 4 +- docs/extras/ui/mini-indentscope.md | 4 +- docs/extras/ui/mini-starter.md | 6 +- docs/extras/ui/smear-cursor.md | 6 +- docs/extras/util/chezmoi.md | 4 +- docs/extras/util/mini-hipatterns.md | 4 +- docs/extras/util/project.md | 4 +- docs/keymaps.md | 12 ++-- docs/news.md | 12 ++++ docs/plugins/coding.md | 8 +-- docs/plugins/lsp.md | 98 +++++++++-------------------- docs/plugins/ui.md | 4 +- 27 files changed, 161 insertions(+), 141 deletions(-) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index 08f795a644..e0a7c39cc5 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -166,4 +166,58 @@ end +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + Blink integration + + + + + + +```lua +opts = { + sources = { + providers = { + path = { + -- Path sources triggered by "/" interfere with CopilotChat commands + enabled = function() + return vim.bo.filetype ~= "copilot-chat" + end, + }, + }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + sources = { + providers = { + path = { + -- Path sources triggered by "/" interfere with CopilotChat commands + enabled = function() + return vim.bo.filetype ~= "copilot-chat" + end, + }, + }, + }, + }, +} +``` + + + + + diff --git a/docs/extras/coding/mini-comment.md b/docs/extras/coding/mini-comment.md index 5cba4fd597..1affa0afeb 100644 --- a/docs/extras/coding/mini-comment.md +++ b/docs/extras/coding/mini-comment.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.comment](https://github.com/echasnovski/mini.comment) +## [mini.comment](https://github.com/nvim-mini/mini.comment) @@ -40,7 +40,7 @@ opts = { ```lua { - "echasnovski/mini.comment", + "nvim-mini/mini.comment", event = "VeryLazy", opts = { options = { diff --git a/docs/extras/coding/mini-snippets.md b/docs/extras/coding/mini-snippets.md index 9209ef4747..1dedddda55 100644 --- a/docs/extras/coding/mini-snippets.md +++ b/docs/extras/coding/mini-snippets.md @@ -17,14 +17,14 @@ Additional options for this extra can be configured in your [lua/config/options. vim.g.lazyvim_mini_snippets_in_completion = true -- NOTE: Please also read: --- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand +-- https://github.com/nvim-mini/mini.nvim/blob/main/readmes/mini-snippets.md#expand -- :h MiniSnippets-session -- Example override for your own config: --[[ return { { -"echasnovski/mini.snippets", +"nvim-mini/mini.snippets", opts = function(_, opts) -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() -- This provides a sensible quickstart, integrating with friendly-snippets @@ -58,7 +58,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.snippets](https://github.com/echasnovski/mini.snippets) +## [mini.snippets](https://github.com/nvim-mini/mini.snippets) @@ -102,7 +102,7 @@ end ```lua { - "echasnovski/mini.snippets", + "nvim-mini/mini.snippets", event = "InsertEnter", -- don't depend on other plugins to load... dependencies = "rafamadriz/friendly-snippets", opts = function() diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index 46900ec0af..de7f962d36 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.surround](https://github.com/echasnovski/mini.surround) +## [mini.surround](https://github.com/nvim-mini/mini.surround) @@ -44,7 +44,7 @@ opts = { ```lua { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/docs/extras/editor/harpoon2.md b/docs/extras/editor/harpoon2.md index b31891b85a..6f751e77c2 100644 --- a/docs/extras/editor/harpoon2.md +++ b/docs/extras/editor/harpoon2.md @@ -70,7 +70,7 @@ opts = { }, } - for i = 1, 5 do + for i = 1, 9 do table.insert(keys, { "" .. i, function() diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index ef2b4f0bd4..f4fbd8542b 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -121,7 +121,7 @@ opts = nil -## [mini.surround](https://github.com/echasnovski/mini.surround) _(optional)_ +## [mini.surround](https://github.com/nvim-mini/mini.surround) _(optional)_ rename surround mappings from gs to gz to prevent conflict with leap @@ -151,7 +151,7 @@ opts = { ```lua { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", optional = true, opts = { mappings = { diff --git a/docs/extras/editor/mini-diff.md b/docs/extras/editor/mini-diff.md index 2234cf2370..68ed550696 100644 --- a/docs/extras/editor/mini-diff.md +++ b/docs/extras/editor/mini-diff.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.diff](https://github.com/echasnovski/mini.diff) +## [mini.diff](https://github.com/nvim-mini/mini.diff) setup mini.diff @@ -46,7 +46,7 @@ opts = { ```lua { - "echasnovski/mini.diff", + "nvim-mini/mini.diff", event = "VeryLazy", keys = { { @@ -74,7 +74,7 @@ opts = { -## [mini.diff](https://github.com/echasnovski/mini.diff) +## [mini.diff](https://github.com/nvim-mini/mini.diff) diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 6cb36a3217..cc8aa5f9f3 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.files](https://github.com/echasnovski/mini.files) +## [mini.files](https://github.com/nvim-mini/mini.files) @@ -45,7 +45,7 @@ opts = { ```lua { - "echasnovski/mini.files", + "nvim-mini/mini.files", opts = { windows = { preview = true, diff --git a/docs/extras/editor/mini-move.md b/docs/extras/editor/mini-move.md index 83736f80db..e9038ffb60 100644 --- a/docs/extras/editor/mini-move.md +++ b/docs/extras/editor/mini-move.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.move](https://github.com/echasnovski/mini.move) +## [mini.move](https://github.com/nvim-mini/mini.move) @@ -34,7 +34,7 @@ opts = {} ```lua { - "echasnovski/mini.move", + "nvim-mini/mini.move", event = "VeryLazy", opts = {}, } diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 19de86b1f3..3e1c49a344 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -464,7 +464,7 @@ end -## [mini.starter](https://github.com/echasnovski/mini.starter) _(optional)_ +## [mini.starter](https://github.com/nvim-mini/mini.starter) _(optional)_ @@ -490,7 +490,7 @@ end ```lua { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index ed6cebc295..42d6754343 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -321,7 +321,7 @@ opts = nil -## [mini.icons](https://github.com/echasnovski/mini.icons) +## [mini.icons](https://github.com/nvim-mini/mini.icons) Filetype icons @@ -348,7 +348,7 @@ opts = { ```lua { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 46d273559f..d2c9788a92 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -135,8 +135,7 @@ opts = { opts = function() local cmd = { vim.fn.exepath("jdtls") } if LazyVim.has("mason.nvim") then - local mason_registry = require("mason-registry") - local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" + local lombok_jar = vim.fn.expand("$MASON/share/jdtls/lombok.jar") table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { @@ -207,8 +206,7 @@ end opts = function() local cmd = { vim.fn.exepath("jdtls") } if LazyVim.has("mason.nvim") then - local mason_registry = require("mason-registry") - local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" + local lombok_jar = vim.fn.expand("$MASON/share/jdtls/lombok.jar") table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { @@ -271,17 +269,13 @@ end if LazyVim.has("mason.nvim") then local mason_registry = require("mason-registry") if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then - local java_dbg_pkg = mason_registry.get_package("java-debug-adapter") - local java_dbg_path = java_dbg_pkg:get_install_path() local jar_patterns = { - java_dbg_path .. "/extension/server/com.microsoft.java.debug.plugin-*.jar", + vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*.jar"), } -- java-test also depends on java-debug-adapter. if opts.test and mason_registry.is_installed("java-test") then - local java_test_pkg = mason_registry.get_package("java-test") - local java_test_path = java_test_pkg:get_install_path() vim.list_extend(jar_patterns, { - java_test_path .. "/extension/server/*.jar", + vim.fn.expand("$MASON/share/java-test/*.jar"), }) end for _, jar_pattern in ipairs(jar_patterns) do diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index cf776ee750..03d36ab268 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -148,11 +148,10 @@ opts = { ```lua opts = function() local dap = require("dap") - local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() dap.adapters.php = { type = "executable", - command = "node", - args = { path .. "/extension/out/phpDebug.js" }, + command = "php-debug-adapter", + args = {}, } end ``` @@ -168,11 +167,10 @@ end optional = true, opts = function() local dap = require("dap") - local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() dap.adapters.php = { type = "executable", - command = "node", - args = { path .. "/extension/out/phpDebug.js" }, + command = "php-debug-adapter", + args = {}, } end, } diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 31349c95ce..589654b997 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -234,13 +234,9 @@ opts = { }, config = function(_, opts) if LazyVim.has("mason.nvim") then - local package_path = require("mason-registry").get_package("codelldb"):get_install_path() - local codelldb = package_path .. "/extension/adapter/codelldb" - local library_path = package_path .. "/extension/lldb/lib/liblldb.dylib" - local uname = io.popen("uname"):read("*l") - if uname == "Linux" then - library_path = package_path .. "/extension/lldb/lib/liblldb.so" - end + local codelldb = vim.fn.exepath("codelldb") + local codelldb_lib_ext = io.popen("uname"):read("*l") == "Linux" and ".so" or ".dylib" + local library_path = vim.fn.expand("$MASON/opt/lldb/lib/liblldb" .. codelldb_lib_ext) opts.dap = { adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), } diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index f37fc9e86d..d09706fe62 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -418,7 +418,7 @@ end -## [mini.icons](https://github.com/echasnovski/mini.icons) +## [mini.icons](https://github.com/nvim-mini/mini.icons) Filetype icons @@ -450,7 +450,7 @@ opts = { ```lua { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index a000366efe..71e3753aaf 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -50,7 +50,7 @@ opts = { -## [mini.animate](https://github.com/echasnovski/mini.animate) +## [mini.animate](https://github.com/nvim-mini/mini.animate) setup animate @@ -116,7 +116,7 @@ end ```lua { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", event = "VeryLazy", cond = vim.g.neovide == nil, opts = function(_, opts) diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index c4ba22b34a..f8810aec93 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.indentscope](https://github.com/echasnovski/mini.indentscope) +## [mini.indentscope](https://github.com/nvim-mini/mini.indentscope) Active indent guide and indent text objects. When you're browsing code, this highlights the current level of indentation, and animates @@ -43,7 +43,7 @@ opts = { ```lua { - "echasnovski/mini.indentscope", + "nvim-mini/mini.indentscope", version = false, -- wait till new 0.7.0 release to put it back on semver event = "LazyFile", opts = { diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index f0a6937964..5fe94a2461 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -43,7 +43,7 @@ opts = { dashboard = { enabled = false } } -## [mini.starter](https://github.com/echasnovski/mini.starter) +## [mini.starter](https://github.com/nvim-mini/mini.starter) enable mini.starter @@ -99,7 +99,7 @@ end ```lua { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", version = false, -- wait till new 0.7.0 release to put it back on semver event = "VimEnter", opts = function() @@ -161,7 +161,7 @@ end local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) local pad_footer = string.rep(" ", 8) starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms" - -- INFO: based on @echasnovski's recommendation (thanks a lot!!!) + -- INFO: based on @nvim-mini's recommendation (thanks a lot!!!) if vim.bo[ev.buf].filetype == "ministarter" then pcall(starter.refresh) end diff --git a/docs/extras/ui/smear-cursor.md b/docs/extras/ui/smear-cursor.md index 40e1759cbe..bfb003bbf4 100644 --- a/docs/extras/ui/smear-cursor.md +++ b/docs/extras/ui/smear-cursor.md @@ -47,7 +47,7 @@ opts = { specs = { -- disable mini.animate cursor { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", optional = true, opts = { cursor = { enable = false }, @@ -61,7 +61,7 @@ opts = { -## [mini.animate](https://github.com/echasnovski/mini.animate) _(optional)_ +## [mini.animate](https://github.com/nvim-mini/mini.animate) _(optional)_ disable mini.animate cursor @@ -83,7 +83,7 @@ opts = { ```lua { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", optional = true, opts = { cursor = { enable = false }, diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index 56779856e5..8946d000b6 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -116,7 +116,7 @@ opts = { -## [mini.icons](https://github.com/echasnovski/mini.icons) +## [mini.icons](https://github.com/nvim-mini/mini.icons) Filetype icons @@ -150,7 +150,7 @@ opts = { ```lua { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" }, diff --git a/docs/extras/util/mini-hipatterns.md b/docs/extras/util/mini-hipatterns.md index 2ec0cdf417..a58f74acba 100644 --- a/docs/extras/util/mini-hipatterns.md +++ b/docs/extras/util/mini-hipatterns.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.hipatterns](https://github.com/echasnovski/mini.hipatterns) +## [mini.hipatterns](https://github.com/nvim-mini/mini.hipatterns) @@ -74,7 +74,7 @@ end ```lua { - "echasnovski/mini.hipatterns", + "nvim-mini/mini.hipatterns", recommended = true, desc = "Highlight colors in your code. Also includes Tailwind CSS support.", event = "LazyFile", diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 42d0a86ac6..24f4d56ec2 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -158,7 +158,7 @@ end -## [mini.starter](https://github.com/echasnovski/mini.starter) _(optional)_ +## [mini.starter](https://github.com/nvim-mini/mini.starter) _(optional)_ @@ -184,7 +184,7 @@ end ```lua { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/docs/keymaps.md b/docs/keymaps.md index 12bb0ae0dd..87ff91bbe5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -304,7 +304,7 @@ Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | -## [mini.surround](https://github.com/echasnovski/mini.surround.git) +## [mini.surround](https://github.com/nvim-mini/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) | Key | Description | Mode | @@ -413,6 +413,10 @@ Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) | <leader>3 | Harpoon to File 3 | **n** | | <leader>4 | Harpoon to File 4 | **n** | | <leader>5 | Harpoon to File 5 | **n** | +| <leader>6 | Harpoon to File 6 | **n** | +| <leader>7 | Harpoon to File 7 | **n** | +| <leader>8 | Harpoon to File 8 | **n** | +| <leader>9 | Harpoon to File 9 | **n** | | <leader>h | Harpoon Quick Menu | **n** | | <leader>H | Harpoon File | **n** | @@ -433,21 +437,21 @@ Part of [lazyvim.plugins.extras.editor.leap](/extras/editor/leap) | s | Leap Forward to | **n**, **o**, **x** | | S | Leap Backward to | **n**, **o**, **x** | -## [mini.surround](https://github.com/echasnovski/mini.surround.git) +## [mini.surround](https://github.com/nvim-mini/mini.surround.git) Part of [lazyvim.plugins.extras.editor.leap](/extras/editor/leap) | Key | Description | Mode | | --- | --- | --- | | gz | +surround | **n** | -## [mini.diff](https://github.com/echasnovski/mini.diff.git) +## [mini.diff](https://github.com/nvim-mini/mini.diff.git) Part of [lazyvim.plugins.extras.editor.mini-diff](/extras/editor/mini-diff) | Key | Description | Mode | | --- | --- | --- | | <leader>go | Toggle mini.diff overlay | **n** | -## [mini.files](https://github.com/echasnovski/mini.files.git) +## [mini.files](https://github.com/nvim-mini/mini.files.git) Part of [lazyvim.plugins.extras.editor.mini-files](/extras/editor/mini-files) | Key | Description | Mode | diff --git a/docs/news.md b/docs/news.md index 67c8a75205..9fdc23657b 100644 --- a/docs/news.md +++ b/docs/news.md @@ -4,6 +4,18 @@ sidebar_position: 2 # 📰 What's new? +## 15.x + +**Neovim** `>= 0.11.0` includes a lot of changes to the underlying LSP implementation. + +Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support for older versions. + +### Changes + +- removed compatibility code for Neovim `< 0.11` +- updated all LSP code to use the new LSP implementation +- migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` + ## 14.x Big new release with a lot of changes and improvements! diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 8f6e3400cc..358dba09a6 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -5,7 +5,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mini.pairs](https://github.com/echasnovski/mini.pairs) +## [mini.pairs](https://github.com/nvim-mini/mini.pairs) auto pairs @@ -36,7 +36,7 @@ opts = { ```lua { - "echasnovski/mini.pairs", + "nvim-mini/mini.pairs", event = "VeryLazy", opts = { modes = { insert = true, command = true, terminal = false }, @@ -90,7 +90,7 @@ opts = {} -## [mini.ai](https://github.com/echasnovski/mini.ai) +## [mini.ai](https://github.com/nvim-mini/mini.ai) Better text-objects @@ -132,7 +132,7 @@ end ```lua { - "echasnovski/mini.ai", + "nvim-mini/mini.ai", event = "VeryLazy", opts = function() local ai = require("mini.ai") diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index e796429c03..7eed1ea35d 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -152,7 +152,7 @@ end ```lua { "neovim/nvim-lspconfig", - event = "LazyFile", + event = { "BufReadPre", "BufNewFile", "BufWritePre" }, dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -324,31 +324,35 @@ end opts.capabilities or {} ) - local function setup(server) + -- get all the servers that are available through mason-lspconfig + local have_mason, mlsp = pcall(require, "mason-lspconfig") + local all_mslp_servers = {} + all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + + local exclude_automatic_enable = {} ---@type string[] + + local function configure(server) local server_opts = vim.tbl_deep_extend("force", { capabilities = vim.deepcopy(capabilities), }, servers[server] or {}) - if server_opts.enabled == false then - return - end if opts.setup[server] then if opts.setup[server](server, server_opts) then - return + return true end elseif opts.setup["*"] then if opts.setup["*"](server, server_opts) then - return + return true end end - require("lspconfig")[server].setup(server_opts) - end + vim.lsp.config(server, server_opts) - -- get all the servers that are available through mason-lspconfig - local have_mason, mlsp = pcall(require, "mason-lspconfig") - local all_mslp_servers = {} - if have_mason then - all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings.server").lspconfig_to_package) + -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig + if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then + vim.lsp.enable(server) + return true + end + return false end local ensure_installed = {} ---@type string[] @@ -357,24 +361,31 @@ end server_opts = server_opts == true and {} or server_opts if server_opts.enabled ~= false then -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then - setup(server) + if configure(server) then + exclude_automatic_enable[#exclude_automatic_enable + 1] = server else ensure_installed[#ensure_installed + 1] = server end + else + exclude_automatic_enable[#exclude_automatic_enable + 1] = server end end end if have_mason then - mlsp.setup({ + local setup_config = { ensure_installed = vim.tbl_deep_extend( "force", ensure_installed, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} ), - handlers = { setup }, - }) + } + + setup_config.automatic_enable = { + exclude = exclude_automatic_enable, + } + + mlsp.setup(setup_config) end if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then @@ -511,53 +522,4 @@ opts = { -## [mason.nvim](https://github.com/mason-org/mason.nvim) - - pin to v1 for now - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "mason-org/mason.nvim", version = "^1.0.0" } -``` - - - - - -## [mason-lspconfig.nvim](https://github.com/mason-org/mason-lspconfig.nvim) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "mason-org/mason-lspconfig.nvim", version = "^1.0.0" } -``` - - - - - diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 31650b4ea5..fe0e4436ce 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -486,7 +486,7 @@ opts = { -## [mini.icons](https://github.com/echasnovski/mini.icons) +## [mini.icons](https://github.com/nvim-mini/mini.icons) icons @@ -514,7 +514,7 @@ opts = { ```lua { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", lazy = true, opts = { file = { From a36423dbd970617a81b1201d7dcb2e107e4cbe1a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 15:22:37 +0000 Subject: [PATCH 005/103] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 66 +++++++++----- docs/extras/lang/ruby.md | 4 +- docs/extras/ui/treesitter-main.md | 146 ++++++++++++++++++++++++++++++ docs/keymaps.md | 18 ++++ docs/news.md | 11 +-- docs/plugins/lsp.md | 74 +++++++-------- 6 files changed, 241 insertions(+), 78 deletions(-) create mode 100644 docs/extras/ui/treesitter-main.md diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 71bbaa8579..ce23541b07 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -139,18 +139,27 @@ opts = { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")( - fname - ) or require("lspconfig.util").find_git_ancestor(fname) + root_dir = function(bufnr, ondir) + local root_directory = function(fname) + return require("lspconfig.util").root_pattern( + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja" + )(fname) or require("lspconfig.util").root_pattern( + "compile_commands.json", + "compile_flags.txt" + )(fname) or require("lspconfig.util").find_git_ancestor(fname) + end + if type(bufnr) == "string" then + return root_directory(bufnr) + else + local fname = vim.api.nvim_buf_get_name(bufnr) + ondir(root_directory(fname)) + end end, capabilities = { offsetEncoding = { "utf-16" }, @@ -196,18 +205,27 @@ opts = { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern("compile_commands.json", "compile_flags.txt")( - fname - ) or require("lspconfig.util").find_git_ancestor(fname) + root_dir = function(bufnr, ondir) + local root_directory = function(fname) + return require("lspconfig.util").root_pattern( + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja" + )(fname) or require("lspconfig.util").root_pattern( + "compile_commands.json", + "compile_flags.txt" + )(fname) or require("lspconfig.util").find_git_ancestor(fname) + end + if type(bufnr) == "string" then + return root_directory(bufnr) + else + local fname = vim.api.nvim_buf_get_name(bufnr) + ondir(root_directory(fname)) + end end, capabilities = { offsetEncoding = { "utf-16" }, diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index 89e3b56022..f70d5bfd49 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -62,7 +62,6 @@ opts = { ensure_installed = { "ruby" } } ```lua opts = { - ---@type lspconfig.options servers = { ruby_lsp = { enabled = lsp == "ruby_lsp", @@ -91,9 +90,8 @@ opts = { ```lua { "neovim/nvim-lspconfig", - ---@class PluginLspOpts + ---@type PluginLspOpts opts = { - ---@type lspconfig.options servers = { ruby_lsp = { enabled = lsp == "ruby_lsp", diff --git a/docs/extras/ui/treesitter-main.md b/docs/extras/ui/treesitter-main.md new file mode 100644 index 0000000000..f609613411 --- /dev/null +++ b/docs/extras/ui/treesitter-main.md @@ -0,0 +1,146 @@ +# `Treesitter-main` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + version = false, -- last release is way too old and doesn't work on Windows + branch = "main", + build = ":TSUpdate", + lazy = true, + cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, + init = function() end, + ---@param opts TSConfig + config = function(_, opts) + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return + end + if type(opts.ensure_installed) ~= "table" then + error("opts.ensure_installed must be a table") + end + + local TS = require("nvim-treesitter") + TS.setup(opts) + + local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) + local installed = TS.get_installed("parsers") + local install = vim.tbl_filter(function(lang) + return not vim.tbl_contains(installed, lang) + end, needed) + + if #install > 0 then + TS.install(install, { summary = true }) + end + + -- backwards compatibility with the old treesitter config for indent + if vim.tbl_get(opts, "indent", "enable") then + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end + + -- backwards compatibility with the old treesitter config for highlight + if vim.tbl_get(opts, "highlight", "enable") then + vim.api.nvim_create_autocmd("FileType", { + callback = function() + pcall(vim.treesitter.start) + end, + }) + end + end, +} +``` + + + + + +## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", + event = "VeryLazy", + opts = {}, + keys = function() + local moves = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + } + local ret = {} ---@type LazyKeysSpec[] + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + ret[#ret + 1] = { + key, + function() + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, + desc = desc, + mode = { "n", "x", "o" }, + silent = true, + } + end + end + return ret + end, + config = function(_, opts) + require("nvim-treesitter-textobjects").setup(opts) + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 87ff91bbe5..92119126dc 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -637,6 +637,24 @@ Part of [lazyvim.plugins.extras.ui.edgy](/extras/ui/edgy) | <leader>ue | Edgy Toggle | **n** | | <leader>uE | Edgy Select Window | **n** | +## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git) +Part of [lazyvim.plugins.extras.ui.treesitter-main](/extras/ui/treesitter-main) + +| Key | Description | Mode | +| --- | --- | --- | +| [a | Prev Parameter Start | **n**, **o**, **x** | +| [A | Prev Parameter End | **n**, **o**, **x** | +| [c | Prev Class Start | **n**, **o**, **x** | +| [C | Prev Class End | **n**, **o**, **x** | +| [f | Prev Function Start | **n**, **o**, **x** | +| [F | Prev Function End | **n**, **o**, **x** | +| ]a | Next Parameter Start | **n**, **o**, **x** | +| ]A | Next Parameter End | **n**, **o**, **x** | +| ]c | Next Class Start | **n**, **o**, **x** | +| ]C | Next Class End | **n**, **o**, **x** | +| ]f | Next Function Start | **n**, **o**, **x** | +| ]F | Next Function End | **n**, **o**, **x** | + ## [chezmoi.nvim](https://github.com/xvzc/chezmoi.nvim.git) Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) diff --git a/docs/news.md b/docs/news.md index 9fdc23657b..7b5228579c 100644 --- a/docs/news.md +++ b/docs/news.md @@ -15,6 +15,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support fo - removed compatibility code for Neovim `< 0.11` - updated all LSP code to use the new LSP implementation - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` +- added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` + - after enabling, you will get errors. Update with `:Lazy` and restart Neovim ## 14.x @@ -126,7 +128,6 @@ vim.g.snacks_animate = false ## 11.x - **Keymaps:** - - `gB` to open the current repo in the browser - `gco` and `gcO` to add a comment below or above the current line - `wm` to toggle window maximize @@ -139,7 +140,6 @@ vim.g.snacks_animate = false It's a great plugin that enhances the native text objects. - `:LazyExtras` now has multiple new sections: - - **Enabled**: extras that are currently enabled - **Recommended Languages**: language extras recommended for the current buffer / directory - **Recommended Plugins**: extras that are recommended for most users @@ -177,7 +177,6 @@ Additionally, some core plugins have been moved to extras. ``` - plugins moved to extras: - - `mini.surround` - `mini.indentscope` scopes are now also highlighted with `indent-blankline` - `nvim-treesitter-context` @@ -195,7 +194,6 @@ Additionally, some core plugins have been moved to extras. You can find the updated docs [here](https://github.com/folke/trouble.nvim/tree/dev) - The **lazygit** integration now configures: - - the theme based on the colorscheme - nerd font icons (v3) - editor preset is set to `nvim-remote` for better interop with Neovim @@ -236,9 +234,7 @@ Additionally, some core plugins have been moved to extras. - New `:LazyExtras` command for managing **LazyVim** extras - Improved **formatting**: - - **LazyVim** can now work with multiple formatters. Types: - - **primary**: only one primary formatter can be active at a time. _(conform, none-ls, LSP)_ - **secondary**: multiple secondary formatters can be active _(eslint, ...)_ @@ -257,18 +253,15 @@ Additionally, some core plugins have been moved to extras. ``` - `none-ls.nvim` is no longer installed by default - - `conform.nvim` is now the default formatter - `nvim-lint` is now the default linter - If you want to keep using `none-ls.nvim`, you can enable the **lsp.none-ls** extra - `dashboard.nvim` is the new default dashboard plugin - - If you want to keep using `alpha.nvim`, you can enable the **ui.alpha** extra - Improved **root detection**: - - New `:LazyRoot` command that shows info about the root dir detection - Configurable with `vim.g.root_spec` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 7eed1ea35d..47699d8454 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -93,7 +93,7 @@ opts = function() timeout_ms = nil, }, -- LSP Server Settings - ---@type lspconfig.options + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -129,7 +129,7 @@ opts = function() }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig - ---@type table + ---@type table setup = { -- example to setup with typescript.nvim -- tsserver = function(_, opts) @@ -213,7 +213,7 @@ end timeout_ms = nil, }, -- LSP Server Settings - ---@type lspconfig.options + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -249,7 +249,7 @@ end }, -- you can do any additional lsp server setup here -- return true if you don't want this server to be setup with lspconfig - ---@type table + ---@type table setup = { -- example to setup with typescript.nvim -- tsserver = function(_, opts) @@ -299,6 +299,7 @@ end end) end + -- diagnostics if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then opts.diagnostics.virtual_text.prefix = function(diagnostic) local icons = LazyVim.config.icons.diagnostics @@ -307,48 +308,42 @@ end return icon end end + return "●" end end - vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) - local servers = opts.servers - local has_cmp, cmp_nvim_lsp = pcall(require, "cmp_nvim_lsp") - local has_blink, blink = pcall(require, "blink.cmp") local capabilities = vim.tbl_deep_extend( "force", {}, vim.lsp.protocol.make_client_capabilities(), - has_cmp and cmp_nvim_lsp.default_capabilities() or {}, - has_blink and blink.get_lsp_capabilities() or {}, + LazyVim.has("nvim-cmp") and require("cmp_nvim_lsp").default_capabilities() or {}, + LazyVim.has("blink.nvim") and require("blink.cmp").get_lsp_capabilities() or {}, opts.capabilities or {} ) -- get all the servers that are available through mason-lspconfig - local have_mason, mlsp = pcall(require, "mason-lspconfig") - local all_mslp_servers = {} - all_mslp_servers = vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + local have_mason = LazyVim.has("mason-lspconfig.nvim") + local mason_all = have_mason + and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) + or {} --[[ @as string[] ]] local exclude_automatic_enable = {} ---@type string[] local function configure(server) local server_opts = vim.tbl_deep_extend("force", { capabilities = vim.deepcopy(capabilities), - }, servers[server] or {}) + }, opts.servers[server] or {}) - if opts.setup[server] then - if opts.setup[server](server, server_opts) then - return true - end - elseif opts.setup["*"] then - if opts.setup["*"](server, server_opts) then - return true - end + local setup = opts.setup[server] or opts.setup["*"] + if setup and setup(server, server_opts) then + return true -- lsp will be setup by the setup function end + vim.lsp.config(server, server_opts) -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(all_mslp_servers, server) then + if server_opts.mason == false or not vim.tbl_contains(mason_all, server) then vim.lsp.enable(server) return true end @@ -356,36 +351,31 @@ end end local ensure_installed = {} ---@type string[] - for server, server_opts in pairs(servers) do - if server_opts then - server_opts = server_opts == true and {} or server_opts - if server_opts.enabled ~= false then - -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if configure(server) then - exclude_automatic_enable[#exclude_automatic_enable + 1] = server - else - ensure_installed[#ensure_installed + 1] = server - end - else + for server, server_opts in pairs(opts.servers) do + server_opts = server_opts == true and {} or server_opts or false + if server_opts and server_opts.enabled ~= false then + -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig + if configure(server) then exclude_automatic_enable[#exclude_automatic_enable + 1] = server + else + ensure_installed[#ensure_installed + 1] = server end + else + exclude_automatic_enable[#exclude_automatic_enable + 1] = server end end if have_mason then - local setup_config = { + require("mason-lspconfig").setup({ ensure_installed = vim.tbl_deep_extend( "force", ensure_installed, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} ), - } - - setup_config.automatic_enable = { - exclude = exclude_automatic_enable, - } - - mlsp.setup(setup_config) + automatic_enable = { + exclude = exclude_automatic_enable, + }, + }) end if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then From 0d2f1a3a815bcfd0dcd84af9fe0710c6f679062d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 19:16:07 +0000 Subject: [PATCH 006/103] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 76 +++++++++++++------------------ docs/extras/lang/java.md | 10 +--- docs/extras/lang/ocaml.md | 40 ++++++++-------- docs/extras/lang/r.md | 12 +---- docs/extras/lang/tailwind.md | 6 +-- docs/extras/ui/treesitter-main.md | 8 +++- docs/plugins/lsp.md | 29 ++++++++---- 7 files changed, 81 insertions(+), 100 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index ce23541b07..7524bae379 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -139,28 +139,22 @@ opts = { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(bufnr, ondir) - local root_directory = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern( - "compile_commands.json", - "compile_flags.txt" - )(fname) or require("lspconfig.util").find_git_ancestor(fname) - end - if type(bufnr) == "string" then - return root_directory(bufnr) - else - local fname = vim.api.nvim_buf_get_name(bufnr) - ondir(root_directory(fname)) - end - end, + root_markers = { + ".clangd", + ".clang-tidy", + ".clang-format", + "compile_commands.json", + "compile_flags.txt", + "configure.ac", -- AutoTools + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja", + ".git", + }, capabilities = { offsetEncoding = { "utf-16" }, }, @@ -205,28 +199,22 @@ opts = { keys = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, - root_dir = function(bufnr, ondir) - local root_directory = function(fname) - return require("lspconfig.util").root_pattern( - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" - )(fname) or require("lspconfig.util").root_pattern( - "compile_commands.json", - "compile_flags.txt" - )(fname) or require("lspconfig.util").find_git_ancestor(fname) - end - if type(bufnr) == "string" then - return root_directory(bufnr) - else - local fname = vim.api.nvim_buf_get_name(bufnr) - ondir(root_directory(fname)) - end - end, + root_markers = { + ".clangd", + ".clang-tidy", + ".clang-format", + "compile_commands.json", + "compile_flags.txt", + "configure.ac", -- AutoTools + "Makefile", + "configure.ac", + "configure.in", + "config.h.in", + "meson.build", + "meson_options.txt", + "build.ninja", + ".git", + }, capabilities = { offsetEncoding = { "utf-16" }, }, diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index d2c9788a92..1bfcbfb8b1 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -139,9 +139,6 @@ opts = function() table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - -- How to find the root dir for a given filename. The default comes from - -- lspconfig which provides a function specifically for java projects. - root_dir = LazyVim.lsp.get_raw_config("jdtls").default_config.root_dir, -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -210,9 +207,6 @@ end table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - -- How to find the root dir for a given filename. The default comes from - -- lspconfig which provides a function specifically for java projects. - root_dir = LazyVim.lsp.get_raw_config("jdtls").default_config.root_dir, -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -286,12 +280,10 @@ end end end local function attach_jdtls() - local fname = vim.api.nvim_buf_get_name(0) - -- Configuration can be augmented and overridden by opts.jdtls local config = extend_or_override({ cmd = opts.full_cmd(opts), - root_dir = opts.root_dir(fname), + root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), init_options = { bundles = bundles, }, diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index bb410d4219..c4a7bbdfce 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -69,17 +69,15 @@ opts = { "reason", "dune", }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml" - )(fname) - end, + root_markers = { + "*.opam", + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + "*.ml", + }, }, }, } @@ -104,17 +102,15 @@ opts = { "reason", "dune", }, - root_dir = function(fname) - return require("lspconfig.util").root_pattern( - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml" - )(fname) - end, + root_markers = { + "*.opam", + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + "*.ml", + }, }, }, }, diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index c2b15db096..3db28e27a8 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -172,11 +172,7 @@ opts = { ensure_installed = { "r", "rnoweb" } } opts = { servers = { r_language_server = { - root_dir = function(fname) - return require("lspconfig.util").root_pattern("DESCRIPTION", "NAMESPACE", ".Rbuildignore")(fname) - or require("lspconfig.util").find_git_ancestor(fname) - or vim.loop.os_homedir() - end, + root_markers = { "DESCRIPTION", "NAMESPACE", ".Rbuildignore" }, }, }, } @@ -193,11 +189,7 @@ opts = { opts = { servers = { r_language_server = { - root_dir = function(fname) - return require("lspconfig.util").root_pattern("DESCRIPTION", "NAMESPACE", ".Rbuildignore")(fname) - or require("lspconfig.util").find_git_ancestor(fname) - or vim.loop.os_homedir() - end, + root_markers = { "DESCRIPTION", "NAMESPACE", ".Rbuildignore" }, }, }, }, diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 5868f4b0f0..24de525c55 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -37,11 +37,10 @@ opts = { }, setup = { tailwindcss = function(_, opts) - local tw = LazyVim.lsp.get_raw_config("tailwindcss") opts.filetypes = opts.filetypes or {} -- Add default filetypes - vim.list_extend(opts.filetypes, tw.default_config.filetypes) + vim.list_extend(opts.filetypes, vim.lsp.config.tailwindcss.filetypes) -- Remove excluded filetypes --- @param ft string @@ -88,11 +87,10 @@ opts = { }, setup = { tailwindcss = function(_, opts) - local tw = LazyVim.lsp.get_raw_config("tailwindcss") opts.filetypes = opts.filetypes or {} -- Add default filetypes - vim.list_extend(opts.filetypes, tw.default_config.filetypes) + vim.list_extend(opts.filetypes, vim.lsp.config.tailwindcss.filetypes) -- Remove excluded filetypes --- @param ft string diff --git a/docs/extras/ui/treesitter-main.md b/docs/extras/ui/treesitter-main.md index f609613411..d222d301c6 100644 --- a/docs/extras/ui/treesitter-main.md +++ b/docs/extras/ui/treesitter-main.md @@ -62,6 +62,7 @@ opts = {} if #install > 0 then TS.install(install, { summary = true }) + vim.list_extend(installed, install) end -- backwards compatibility with the old treesitter config for indent @@ -72,8 +73,11 @@ opts = {} -- backwards compatibility with the old treesitter config for highlight if vim.tbl_get(opts, "highlight", "enable") then vim.api.nvim_create_autocmd("FileType", { - callback = function() - pcall(vim.treesitter.start) + callback = function(ev) + local lang = vim.treesitter.language.get_lang(ev.match) + if vim.tbl_contains(installed, lang) then + pcall(vim.treesitter.start) + end end, }) end diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 47699d8454..3b12e0d3aa 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -378,15 +378,26 @@ end }) end - if LazyVim.lsp.is_enabled("denols") and LazyVim.lsp.is_enabled("vtsls") then - local is_deno = require("lspconfig.util").root_pattern("deno.json", "deno.jsonc") - LazyVim.lsp.disable("vtsls", is_deno) - LazyVim.lsp.disable("denols", function(root_dir, config) - if not is_deno(root_dir) then - config.settings.deno.enable = false - end - return false - end) + if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then + ---@param server string + local resolve = function(server) + local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir + vim.lsp.config(server, { + root_dir = function(bufnr, on_dir) + local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil + if is_deno == (server == "denols") then + if root_dir then + return root_dir(bufnr, on_dir) + elseif type(markers) == "table" then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end + end, + }) + end + resolve("denols") + resolve("vtsls") end end, } From eb58c02fbdbbb2fc62953d3d73e0774708c6757b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 20:22:19 +0000 Subject: [PATCH 007/103] chore(build): auto-generate docs --- docs/extras/lang/json.md | 4 ++-- docs/extras/lang/yaml.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/extras/lang/json.md b/docs/extras/lang/json.md index d8b5647780..d46b14e072 100644 --- a/docs/extras/lang/json.md +++ b/docs/extras/lang/json.md @@ -91,7 +91,7 @@ opts = { servers = { jsonls = { -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.json.schemas = new_config.settings.json.schemas or {} vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas()) end, @@ -121,7 +121,7 @@ opts = { servers = { jsonls = { -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.json.schemas = new_config.settings.json.schemas or {} vim.list_extend(new_config.settings.json.schemas, require("schemastore").json.schemas()) end, diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 31b56141d5..042ee19fb0 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -71,7 +71,7 @@ opts = { }, }, -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.yaml.schemas = vim.tbl_deep_extend( "force", new_config.settings.yaml.schemas or {}, @@ -122,7 +122,7 @@ opts = { }, }, -- lazy-load schemastore when needed - on_new_config = function(new_config) + before_init = function(_, new_config) new_config.settings.yaml.schemas = vim.tbl_deep_extend( "force", new_config.settings.yaml.schemas or {}, From 1f423de53f79bd448709de2e7fa235dd20ae7c80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Sep 2025 07:20:43 +0000 Subject: [PATCH 008/103] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 46 +++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index cd2553f501..21728ed019 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -41,6 +41,7 @@ opts = { return LazyVim.cmp.expand(snippet) end, }, + appearance = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp @@ -50,6 +51,7 @@ opts = { -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", }, + completion = { accept = { -- experimental auto-brackets support @@ -82,7 +84,20 @@ opts = { }, cmdline = { - enabled = false, + enabled = true, + keymap = { + preset = "cmdline", + -- [""] = { "show", "accept" }, + -- [""] = { "accept_and_enter", "fallback" }, + }, + completion = { + menu = { + auto_show = function(ctx) + return vim.fn.getcmdtype() == ":" + end, + }, + ghost_text = { enabled = true }, + }, }, keymap = { @@ -117,7 +132,7 @@ opts = { version = not vim.g.lazyvim_blink_main and "*", }, }, - event = "InsertEnter", + event = { "InsertEnter", "CmdlineEnter" }, ---@module 'blink.cmp' ---@type blink.cmp.Config @@ -127,6 +142,7 @@ opts = { return LazyVim.cmp.expand(snippet) end, }, + appearance = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp @@ -136,6 +152,7 @@ opts = { -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", }, + completion = { accept = { -- experimental auto-brackets support @@ -168,7 +185,20 @@ opts = { }, cmdline = { - enabled = false, + enabled = true, + keymap = { + preset = "cmdline", + -- [""] = { "show", "accept" }, + -- [""] = { "accept_and_enter", "fallback" }, + }, + completion = { + menu = { + auto_show = function(ctx) + return vim.fn.getcmdtype() == ":" + end, + }, + ghost_text = { enabled = true }, + }, }, keymap = { @@ -327,8 +357,9 @@ end ```lua opts = { sources = { - -- add lazydev to your completion providers - default = { "lazydev" }, + per_filetype = { + lua = { inherit_defaults = true, "lazydev" }, + }, providers = { lazydev = { name = "LazyDev", @@ -350,8 +381,9 @@ opts = { "saghen/blink.cmp", opts = { sources = { - -- add lazydev to your completion providers - default = { "lazydev" }, + per_filetype = { + lua = { inherit_defaults = true, "lazydev" }, + }, providers = { lazydev = { name = "LazyDev", From 90616bdcf68524877dde8b6f4eb5248b3714562d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Sep 2025 10:21:37 +0000 Subject: [PATCH 009/103] chore(build): auto-generate docs --- docs/extras/lang/haskell.md | 50 +++++++++++++++---------------- docs/extras/lang/java.md | 6 +++- docs/extras/lang/ocaml.md | 30 ++++++++----------- docs/extras/ui/treesitter-main.md | 18 ++++++----- 4 files changed, 52 insertions(+), 52 deletions(-) diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 277062b2d7..878e90a3da 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -231,7 +231,7 @@ opts = {} "luc-tielen/telescope_hoogle", ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, dependencies = { - { "nvim-telescope/telescope.nvim" }, + { "nvim-telescope/telescope.nvim", optional = true }, }, config = function() local ok, telescope = pcall(require, "telescope") @@ -288,7 +288,7 @@ opts = { -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ @@ -311,29 +311,6 @@ opts = nil -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "nvim-telescope/telescope.nvim" } -``` - - - - - ## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ @@ -404,4 +381,27 @@ opts = { +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "nvim-telescope/telescope.nvim", optional = true } +``` + + + + + diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 1bfcbfb8b1..fe44b53b5d 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -139,6 +139,7 @@ opts = function() table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { + root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -207,6 +208,7 @@ end table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { + root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -280,10 +282,12 @@ end end end local function attach_jdtls() + local fname = vim.api.nvim_buf_get_name(0) + -- Configuration can be augmented and overridden by opts.jdtls local config = extend_or_override({ cmd = opts.full_cmd(opts), - root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), + root_dir = opts.root_dir(fname), init_options = { bundles = bundles, }, diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index c4a7bbdfce..15aea82b9c 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -69,15 +69,12 @@ opts = { "reason", "dune", }, - root_markers = { - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml", - }, + root_dir = function(bufnr, on_dir) + local util = require("lspconfig.util") + local fname = vim.api.nvim_buf_get_name(bufnr) + --stylua: ignore + on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) + end, }, }, } @@ -102,15 +99,12 @@ opts = { "reason", "dune", }, - root_markers = { - "*.opam", - "esy.json", - "package.json", - ".git", - "dune-project", - "dune-workspace", - "*.ml", - }, + root_dir = function(bufnr, on_dir) + local util = require("lspconfig.util") + local fname = vim.api.nvim_buf_get_name(bufnr) + --stylua: ignore + on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) + end, }, }, }, diff --git a/docs/extras/ui/treesitter-main.md b/docs/extras/ui/treesitter-main.md index d222d301c6..eaaf739ec9 100644 --- a/docs/extras/ui/treesitter-main.md +++ b/docs/extras/ui/treesitter-main.md @@ -65,19 +65,21 @@ opts = {} vim.list_extend(installed, install) end - -- backwards compatibility with the old treesitter config for indent - if vim.tbl_get(opts, "indent", "enable") then - vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - - -- backwards compatibility with the old treesitter config for highlight - if vim.tbl_get(opts, "highlight", "enable") then + -- backwards compatibility with the old treesitter config for highlight and indent + local highlight, indent = vim.tbl_get(opts, "highlight", "enable"), vim.tbl_get(opts, "indent", "enable") + if highlight or indent then vim.api.nvim_create_autocmd("FileType", { callback = function(ev) local lang = vim.treesitter.language.get_lang(ev.match) - if vim.tbl_contains(installed, lang) then + if not vim.tbl_contains(installed, lang) then + return + end + if highlight then pcall(vim.treesitter.start) end + if indent then + vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end end, }) end From 35951d10ec6496c7cbeb0b5bd7027964c2833472 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Sep 2025 11:16:57 +0000 Subject: [PATCH 010/103] chore(build): auto-generate docs --- docs/extras/editor/refactoring.md | 35 +++++++++++++++++++------------ docs/keymaps.md | 17 +++++++-------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index 04454a21d4..1ba0f7415a 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -64,34 +64,39 @@ opts = { "nvim-treesitter/nvim-treesitter", }, keys = { - { "r", "", desc = "+refactor", mode = { "n", "v" } }, + { "r", "", desc = "+refactor", mode = { "n", "x" } }, { "rs", pick, - mode = "v", + mode = { "n", "x" }, desc = "Refactor", }, { "ri", function() - require("refactoring").refactor("Inline Variable") + return require("refactoring").refactor("Inline Variable") end, - mode = { "n", "v" }, + mode = { "n", "x" }, desc = "Inline Variable", + expr = true, }, { "rb", function() - require("refactoring").refactor("Extract Block") + return require("refactoring").refactor("Extract Block") end, + mode = { "n", "x" }, desc = "Extract Block", + expr = true, }, { "rf", function() - require("refactoring").refactor("Extract Block To File") + return require("refactoring").refactor("Extract Block To File") end, + mode = { "n", "x" }, desc = "Extract Block To File", + expr = true, }, { "rP", @@ -105,6 +110,7 @@ opts = { function() require("refactoring").debug.print_var({ normal = true }) end, + mode = { "n", "x" }, desc = "Debug Print Variable", }, { @@ -117,33 +123,36 @@ opts = { { "rf", function() - require("refactoring").refactor("Extract Function") + return require("refactoring").refactor("Extract Function") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Function", + expr = true, }, { "rF", function() - require("refactoring").refactor("Extract Function To File") + return require("refactoring").refactor("Extract Function To File") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Function To File", + expr = true, }, { "rx", function() - require("refactoring").refactor("Extract Variable") + return require("refactoring").refactor("Extract Variable") end, - mode = "v", + mode = { "n", "x" }, desc = "Extract Variable", + expr = true, }, { "rp", function() require("refactoring").debug.print_var() end, - mode = "v", + mode = { "n", "x" }, desc = "Debug Print Variable", }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 92119126dc..2679ba72a5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -484,17 +484,16 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | Key | Description | Mode | | --- | --- | --- | -| <leader>r | +refactor | **n**, **v** | -| <leader>rb | Extract Block | **n** | +| <leader>r | +refactor | **n**, **x** | +| <leader>rb | Extract Block | **n**, **x** | | <leader>rc | Debug Cleanup | **n** | -| <leader>rf | Extract Block To File | **n** | -| <leader>rf | Extract Function | **v** | -| <leader>rF | Extract Function To File | **v** | -| <leader>ri | Inline Variable | **n**, **v** | -| <leader>rp | Debug Print Variable | **n**, **v** | +| <leader>rf | Extract Function | **n**, **x** | +| <leader>rF | Extract Function To File | **n**, **x** | +| <leader>ri | Inline Variable | **n**, **x** | +| <leader>rp | Debug Print Variable | **n**, **x** | | <leader>rP | Debug Print | **n** | -| <leader>rs | Refactor | **v** | -| <leader>rx | Extract Variable | **v** | +| <leader>rs | Refactor | **n**, **x** | +| <leader>rx | Extract Variable | **n**, **x** | ## [snacks.nvim](https://github.com/folke/snacks.nvim.git) Part of [lazyvim.plugins.extras.editor.snacks_explorer](/extras/editor/snacks_explorer) From 4140f9abe8b2b4b2644fe0543b887acdd54fb01c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Sep 2025 14:20:53 +0000 Subject: [PATCH 011/103] chore(build): auto-generate docs --- docs/extras/coding/nvim-cmp.md | 6 ++++++ docs/plugins/lsp.md | 19 ++++++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/extras/coding/nvim-cmp.md b/docs/extras/coding/nvim-cmp.md index 0a335e9fa4..0c25b2ab09 100644 --- a/docs/extras/coding/nvim-cmp.md +++ b/docs/extras/coding/nvim-cmp.md @@ -28,6 +28,9 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() + -- Register nvim-cmp lsp capabilities + vim.lsp.config("*", { capabilities = require("cmp_nvim_lsp").default_capabilities() }) + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") local defaults = require("cmp.config.default")() @@ -119,6 +122,9 @@ end -- } -- ``` opts = function() + -- Register nvim-cmp lsp capabilities + vim.lsp.config("*", { capabilities = require("cmp_nvim_lsp").default_capabilities() }) + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") local defaults = require("cmp.config.default")() diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 3b12e0d3aa..f7f2cd953c 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -93,7 +93,7 @@ opts = function() timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -213,7 +213,7 @@ end timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -313,14 +313,9 @@ end end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) - local capabilities = vim.tbl_deep_extend( - "force", - {}, - vim.lsp.protocol.make_client_capabilities(), - LazyVim.has("nvim-cmp") and require("cmp_nvim_lsp").default_capabilities() or {}, - LazyVim.has("blink.nvim") and require("blink.cmp").get_lsp_capabilities() or {}, - opts.capabilities or {} - ) + if opts.capabilities then + vim.lsp.config("*", { capabilities = opts.capabilities }) + end -- get all the servers that are available through mason-lspconfig local have_mason = LazyVim.has("mason-lspconfig.nvim") @@ -331,9 +326,7 @@ end local exclude_automatic_enable = {} ---@type string[] local function configure(server) - local server_opts = vim.tbl_deep_extend("force", { - capabilities = vim.deepcopy(capabilities), - }, opts.servers[server] or {}) + local server_opts = opts.servers[server] or {} local setup = opts.setup[server] or opts.setup["*"] if setup and setup(server, server_opts) then From c74a301af8836f39a26aee596a084f68fe1b403d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Sep 2025 16:26:41 +0000 Subject: [PATCH 012/103] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 4 ++-- docs/extras/coding/blink.md | 14 ++++---------- docs/extras/editor/fzf.md | 4 ++-- docs/extras/linting/eslint.md | 4 ++-- 4 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index da15718aa6..a6a4faccde 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -216,7 +216,7 @@ opts = function(_, opts) opts.sections.lualine_x, 2, LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() - local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} + local clients = package.loaded["copilot"] and vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" @@ -241,7 +241,7 @@ end opts.sections.lualine_x, 2, LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() - local clients = package.loaded["copilot"] and LazyVim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} + local clients = package.loaded["copilot"] and vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) or {} if #clients > 0 then local status = require("copilot.status").data.status return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 21728ed019..9a8b01c20d 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -85,12 +85,9 @@ opts = { cmdline = { enabled = true, - keymap = { - preset = "cmdline", - -- [""] = { "show", "accept" }, - -- [""] = { "accept_and_enter", "fallback" }, - }, + keymap = { preset = "cmdline" }, completion = { + list = { selection = { preselect = false } }, menu = { auto_show = function(ctx) return vim.fn.getcmdtype() == ":" @@ -186,12 +183,9 @@ opts = { cmdline = { enabled = true, - keymap = { - preset = "cmdline", - -- [""] = { "show", "accept" }, - -- [""] = { "accept_and_enter", "fallback" }, - }, + keymap = { preset = "cmdline" }, completion = { + list = { selection = { preselect = false } }, menu = { auto_show = function(ctx) return vim.fn.getcmdtype() == ":" diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 21fb14c0c2..cf2db117a0 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -113,7 +113,7 @@ opts = function(_, opts) -- height is number of items minus 15 lines for the preview, with a max of 80% screen height height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, width = 0.5, - preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", vertical = "down:15,border-top", hidden = "hidden", @@ -258,7 +258,7 @@ end -- height is number of items minus 15 lines for the preview, with a max of 80% screen height height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, width = 0.5, - preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", vertical = "down:15,border-top", hidden = "hidden", diff --git a/docs/extras/linting/eslint.md b/docs/extras/linting/eslint.md index 8b8b636a79..02f12881e3 100644 --- a/docs/extras/linting/eslint.md +++ b/docs/extras/linting/eslint.md @@ -51,7 +51,7 @@ opts = { end local function get_client(buf) - return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] + return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] end local formatter = LazyVim.lsp.formatter({ @@ -113,7 +113,7 @@ opts = { end local function get_client(buf) - return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] + return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] end local formatter = LazyVim.lsp.formatter({ From 9d6aff184182db825476ffb6f19b0e0ec1d0081b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:02:30 +0200 Subject: [PATCH 013/103] docs: bump Neovim requirement to 0.11.2 --- docs/intro.md | 2 +- docs/keymaps.md | 5 +++++ docs/news.md | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/intro.md b/docs/intro.md index 88e938e78b..8f8a13becb 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -24,7 +24,7 @@ to make it easy to customize and extend your config. ## ⚡️ Requirements -- Neovim >= **0.11.0** (needs to be built with **LuaJIT**) +- Neovim >= **0.11.2** (needs to be built with **LuaJIT**) - Git >= **2.19.0** (for partial clones support) - a [Nerd Font](https://www.nerdfonts.com/)(v3.0 or greater) **_(optional, but needed to display some icons)_** - [lazygit](https://github.com/jesseduffield/lazygit) **_(optional)_** diff --git a/docs/keymaps.md b/docs/keymaps.md index 2679ba72a5..ed39c1da57 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -82,6 +82,11 @@ possible keymaps starting with ``. | <leader>dpp | Toggle Profiler | **n** | | <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | +| <leader>gg | Lazygit (Root Dir) | **n** | +| <leader>gG | Lazygit (cwd) | **n** | +| <leader>gf | Git Current File History | **n** | +| <leader>gl | Git Log | **n** | +| <leader>gL | Git Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | | <leader>gY | Git Browse (copy) | **n**, **x** | diff --git a/docs/news.md b/docs/news.md index 7b5228579c..0f5c121bfd 100644 --- a/docs/news.md +++ b/docs/news.md @@ -6,13 +6,13 @@ sidebar_position: 2 ## 15.x -**Neovim** `>= 0.11.0` includes a lot of changes to the underlying LSP implementation. +**Neovim** `>= 0.11.2` includes a lot of changes to the underlying LSP implementation. -Going forward, **LazyVim** requires **Neovim** `>= 0.11.0`, and drops support for older versions. +Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support for older versions. ### Changes -- removed compatibility code for Neovim `< 0.11` +- removed compatibility code for Neovim `< 0.11.2` - updated all LSP code to use the new LSP implementation - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` From 6a803c02a08925987bee35bf38bf4c37701e85db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 05:02:58 +0000 Subject: [PATCH 014/103] chore(build): auto-generate docs --- docs/keymaps.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index ed39c1da57..2679ba72a5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -82,11 +82,6 @@ possible keymaps starting with ``. | <leader>dpp | Toggle Profiler | **n** | | <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | -| <leader>gg | Lazygit (Root Dir) | **n** | -| <leader>gG | Lazygit (cwd) | **n** | -| <leader>gf | Git Current File History | **n** | -| <leader>gl | Git Log | **n** | -| <leader>gL | Git Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | | <leader>gY | Git Browse (copy) | **n**, **x** | From c5b33e4244963e74a71224d6a287404aa81ef919 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 05:19:43 +0000 Subject: [PATCH 015/103] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/extras/linting/eslint.md | 48 ++--------------------------------- docs/news.md | 3 ++- docs/plugins/lsp.md | 10 +++----- 4 files changed, 9 insertions(+), 54 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 43ad2e4426..b45358097a 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -105,7 +105,7 @@ local opt = vim.opt opt.autowrite = true -- Enable auto write -- only set clipboard if not in ssh, to make sure the OSC 52 --- integration works automatically. Requires Neovim >= 0.10.0 +-- integration works automatically. opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard opt.completeopt = "menu,menuone,noselect" opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions diff --git a/docs/extras/linting/eslint.md b/docs/extras/linting/eslint.md index 02f12881e3..62a997c722 100644 --- a/docs/extras/linting/eslint.md +++ b/docs/extras/linting/eslint.md @@ -34,7 +34,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - ---@type lspconfig.options + ---@type table servers = { eslint = { settings = { @@ -50,10 +50,6 @@ opts = { return end - local function get_client(buf) - return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] - end - local formatter = LazyVim.lsp.formatter({ name = "eslint: lsp", primary = false, @@ -61,24 +57,6 @@ opts = { filter = "eslint", }) - -- Use EslintFixAll on Neovim < 0.10.0 - if not pcall(require, "vim.lsp._dynamic") then - formatter.name = "eslint: EslintFixAll" - formatter.sources = function(buf) - local client = get_client(buf) - return client and { "eslint" } or {} - end - formatter.format = function(buf) - local client = get_client(buf) - if client then - local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) }) - if #diag > 0 then - vim.cmd("EslintFixAll") - end - end - end - end - -- register the formatter with LazyVim LazyVim.format.register(formatter) end, @@ -96,7 +74,7 @@ opts = { "neovim/nvim-lspconfig", -- other settings removed for brevity opts = { - ---@type lspconfig.options + ---@type table servers = { eslint = { settings = { @@ -112,10 +90,6 @@ opts = { return end - local function get_client(buf) - return vim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] - end - local formatter = LazyVim.lsp.formatter({ name = "eslint: lsp", primary = false, @@ -123,24 +97,6 @@ opts = { filter = "eslint", }) - -- Use EslintFixAll on Neovim < 0.10.0 - if not pcall(require, "vim.lsp._dynamic") then - formatter.name = "eslint: EslintFixAll" - formatter.sources = function(buf) - local client = get_client(buf) - return client and { "eslint" } or {} - end - formatter.format = function(buf) - local client = get_client(buf) - if client then - local diag = vim.diagnostic.get(buf, { namespace = vim.lsp.diagnostic.get_namespace(client.id) }) - if #diag > 0 then - vim.cmd("EslintFixAll") - end - end - end - end - -- register the formatter with LazyVim LazyVim.format.register(formatter) end, diff --git a/docs/news.md b/docs/news.md index 0f5c121bfd..1da38b5327 100644 --- a/docs/news.md +++ b/docs/news.md @@ -13,10 +13,11 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo ### Changes - removed compatibility code for Neovim `< 0.11.2` -- updated all LSP code to use the new LSP implementation +- cconfigure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` - after enabling, you will get errors. Update with `:Lazy` and restart Neovim +- enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions ## 14.x diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index f7f2cd953c..8f6dc3ab72 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -50,7 +50,6 @@ opts = function() source = "if_many", prefix = "●", -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported -- prefix = "icons", }, severity_sort = true, @@ -63,14 +62,14 @@ opts = function() }, }, }, - -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP inlay hints on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { enabled = true, exclude = { "vue" }, -- filetypes for which you don't want to enable inlay hints }, - -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP code lenses on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the code lenses. codelens = { @@ -170,7 +169,6 @@ end source = "if_many", prefix = "●", -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported -- prefix = "icons", }, severity_sort = true, @@ -183,14 +181,14 @@ end }, }, }, - -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP inlay hints on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { enabled = true, exclude = { "vue" }, -- filetypes for which you don't want to enable inlay hints }, - -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 + -- Enable this to enable the builtin LSP code lenses on Neovim. -- Be aware that you also will need to properly configure your LSP server to -- provide the code lenses. codelens = { From 053f90ddb5a495a7349dc222578b77f9c9555e9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 06:31:33 +0000 Subject: [PATCH 016/103] chore(build): auto-generate docs --- docs/extras/lang/vue.md | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index f6c04d50c9..1ffe66ff65 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -59,13 +59,7 @@ opts = { ensure_installed = { "vue", "css" } } ```lua opts = { servers = { - volar = { - init_options = { - vue = { - hybridMode = true, - }, - }, - }, + vue_ls = {}, vtsls = {}, }, } @@ -81,13 +75,7 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - volar = { - init_options = { - vue = { - hybridMode = true, - }, - }, - }, + vue_ls = {}, vtsls = {}, }, }, From 20de223a02cc7ce069bbd010007d2432b32bb102 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:46:43 +0200 Subject: [PATCH 017/103] fix: fixed build docs --- scripts/build_docs.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index 8a39d8232c..1ea67eb249 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -41,7 +41,8 @@ local function main() -- require("lazy.core.cache").reset() vim.opt.rtp:append(".") - vim.cmd([[TSUpdateSync lua]]) + require("nvim-treesitter").update({ "lua" }):wait(300000) -- max. 5 minutes + -- vim.cmd([[TSUpdateSync lua]]) print("Building docs") From 9b213387ccf13f602ca98b364b66458a645063c6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:48:51 +0200 Subject: [PATCH 018/103] fix: treesitter main --- scripts/build_docs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index 1ea67eb249..307d911d50 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -20,7 +20,7 @@ local plugins = { { "LazyVim/LazyVim", import = "lazyvim.plugins", dev = true, version = false }, { "LazyVim/LazyVim", dev = true, version = false }, { "folke/lazy.nvim", version = false }, - { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, + { "nvim-treesitter/nvim-treesitter", branc = "main", opts = { ensure_installed = {} } }, } local function main() From ba3d6bade301f08d730e95a8f2a1ccd99cdf07fe Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:54:44 +0200 Subject: [PATCH 019/103] fix: build docs --- scripts/build_docs.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index 307d911d50..f7ae8f3737 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -41,8 +41,7 @@ local function main() -- require("lazy.core.cache").reset() vim.opt.rtp:append(".") - require("nvim-treesitter").update({ "lua" }):wait(300000) -- max. 5 minutes - -- vim.cmd([[TSUpdateSync lua]]) + require("nvim-treesitter.install").update({ "lua" }):wait(300000) -- max. 5 minutes print("Building docs") From 5a0f0d74e8b1174ef173e29fd3dfb3dbbf268fcd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:56:07 +0200 Subject: [PATCH 020/103] fix --- scripts/build_docs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index f7ae8f3737..ed2c518f11 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -41,7 +41,7 @@ local function main() -- require("lazy.core.cache").reset() vim.opt.rtp:append(".") - require("nvim-treesitter.install").update({ "lua" }):wait(300000) -- max. 5 minutes + require("nvim-treesitter").update({ "lua" }):wait(300000) -- max. 5 minutes print("Building docs") From 978afbb348eb9271dd1ca5deef3899a5ea404c8e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:56:33 +0200 Subject: [PATCH 021/103] fix: typo --- scripts/build_docs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index ed2c518f11..e057bce41b 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -20,7 +20,7 @@ local plugins = { { "LazyVim/LazyVim", import = "lazyvim.plugins", dev = true, version = false }, { "LazyVim/LazyVim", dev = true, version = false }, { "folke/lazy.nvim", version = false }, - { "nvim-treesitter/nvim-treesitter", branc = "main", opts = { ensure_installed = {} } }, + { "nvim-treesitter/nvim-treesitter", branch = "main", opts = { ensure_installed = {} } }, } local function main() From 18aa6a45a05cacca3305aa427bd0af5f8b5280c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 08:56:50 +0000 Subject: [PATCH 022/103] chore(build): auto-generate docs --- docs/configuration/general.md | 3 +- docs/extras/ui/treesitter-main.md | 152 --------------------- docs/keymaps.md | 35 ++--- docs/news.md | 9 +- docs/plugins/editor.md | 24 +++- docs/plugins/lsp.md | 20 +++ docs/plugins/treesitter.md | 210 +++++++++++++----------------- 7 files changed, 146 insertions(+), 307 deletions(-) delete mode 100644 docs/extras/ui/treesitter-main.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index b45358097a..07268ef1fe 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -120,7 +120,7 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" +opt.foldexpr = "v:lua.LazyVim.ui.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" @@ -130,6 +130,7 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute +opt.indentexpr = "v:lua.LazyVim.ui.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points diff --git a/docs/extras/ui/treesitter-main.md b/docs/extras/ui/treesitter-main.md deleted file mode 100644 index eaaf739ec9..0000000000 --- a/docs/extras/ui/treesitter-main.md +++ /dev/null @@ -1,152 +0,0 @@ -# `Treesitter-main` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -Below you can find a list of included plugins and their default settings. - -:::caution -You don't need to copy the default settings to your config. -They are only shown here for reference. -::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - branch = "main", - build = ":TSUpdate", - lazy = true, - cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, - init = function() end, - ---@param opts TSConfig - config = function(_, opts) - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") - return - end - if type(opts.ensure_installed) ~= "table" then - error("opts.ensure_installed must be a table") - end - - local TS = require("nvim-treesitter") - TS.setup(opts) - - local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) - local installed = TS.get_installed("parsers") - local install = vim.tbl_filter(function(lang) - return not vim.tbl_contains(installed, lang) - end, needed) - - if #install > 0 then - TS.install(install, { summary = true }) - vim.list_extend(installed, install) - end - - -- backwards compatibility with the old treesitter config for highlight and indent - local highlight, indent = vim.tbl_get(opts, "highlight", "enable"), vim.tbl_get(opts, "indent", "enable") - if highlight or indent then - vim.api.nvim_create_autocmd("FileType", { - callback = function(ev) - local lang = vim.treesitter.language.get_lang(ev.match) - if not vim.tbl_contains(installed, lang) then - return - end - if highlight then - pcall(vim.treesitter.start) - end - if indent then - vim.bo[ev.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - end, - }) - end - end, -} -``` - - - - - -## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter-textobjects", - branch = "main", - event = "VeryLazy", - opts = {}, - keys = function() - local moves = { - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - } - local ret = {} ---@type LazyKeysSpec[] - for method, keymaps in pairs(moves) do - for key, query in pairs(keymaps) do - local desc = query:gsub("@", ""):gsub("%..*", "") - desc = desc:sub(1, 1):upper() .. desc:sub(2) - desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc - desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") - ret[#ret + 1] = { - key, - function() - require("nvim-treesitter-textobjects.move")[method](query, "textobjects") - end, - desc = desc, - mode = { "n", "x", "o" }, - silent = true, - } - end - end - return ret - end, - config = function(_, opts) - require("nvim-treesitter-textobjects").setup(opts) - end, -} -``` - - - - - - diff --git a/docs/keymaps.md b/docs/keymaps.md index 2679ba72a5..4aabd90732 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -162,6 +162,7 @@ possible keymaps starting with ``. | R | Treesitter Search | **o**, **x** | | s | Flash | **n**, **o**, **x** | | S | Flash Treesitter | **n**, **o**, **x** | +| <c-space> | Treesitter Incremental Selection | **n**, **o**, **x** | ## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim.git) @@ -189,12 +190,22 @@ possible keymaps starting with ``. | <leader>snt | Noice Picker (Telescope/FzfLua) | **n** | | <S-Enter> | Redirect Cmdline | **c** | -## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git) +## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git) | Key | Description | Mode | | --- | --- | --- | -| <bs> | Decrement Selection | **x** | -| <c-space> | Increment Selection | **n** | +| [a | Prev Parameter Start | **n**, **o**, **x** | +| [A | Prev Parameter End | **n**, **o**, **x** | +| [c | Prev Class Start | **n**, **o**, **x** | +| [C | Prev Class End | **n**, **o**, **x** | +| [f | Prev Function Start | **n**, **o**, **x** | +| [F | Prev Function End | **n**, **o**, **x** | +| ]a | Next Parameter Start | **n**, **o**, **x** | +| ]A | Next Parameter End | **n**, **o**, **x** | +| ]c | Next Class Start | **n**, **o**, **x** | +| ]C | Next Class End | **n**, **o**, **x** | +| ]f | Next Function Start | **n**, **o**, **x** | +| ]F | Next Function End | **n**, **o**, **x** | ## [persistence.nvim](https://github.com/folke/persistence.nvim.git) @@ -636,24 +647,6 @@ Part of [lazyvim.plugins.extras.ui.edgy](/extras/ui/edgy) | <leader>ue | Edgy Toggle | **n** | | <leader>uE | Edgy Select Window | **n** | -## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git) -Part of [lazyvim.plugins.extras.ui.treesitter-main](/extras/ui/treesitter-main) - -| Key | Description | Mode | -| --- | --- | --- | -| [a | Prev Parameter Start | **n**, **o**, **x** | -| [A | Prev Parameter End | **n**, **o**, **x** | -| [c | Prev Class Start | **n**, **o**, **x** | -| [C | Prev Class End | **n**, **o**, **x** | -| [f | Prev Function Start | **n**, **o**, **x** | -| [F | Prev Function End | **n**, **o**, **x** | -| ]a | Next Parameter Start | **n**, **o**, **x** | -| ]A | Next Parameter End | **n**, **o**, **x** | -| ]c | Next Class Start | **n**, **o**, **x** | -| ]C | Next Class End | **n**, **o**, **x** | -| ]f | Next Function Start | **n**, **o**, **x** | -| ]F | Next Function End | **n**, **o**, **x** | - ## [chezmoi.nvim](https://github.com/xvzc/chezmoi.nvim.git) Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) diff --git a/docs/news.md b/docs/news.md index 1da38b5327..feec7aef4c 100644 --- a/docs/news.md +++ b/docs/news.md @@ -13,11 +13,14 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo ### Changes - removed compatibility code for Neovim `< 0.11.2` -- cconfigure **LSP** with the native `vim.lsp.config` +- configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` -- added new `treesitter-main` extra to test the new `main` branch of `nvim-treesitter` - - after enabling, you will get errors. Update with `:Lazy` and restart Neovim +- migrated to [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter/tree/main) **main** branch + - with the new version, the `tree-sitter` cli is **required** to install parsers + - best to run `:checkhealth nvim-treesitter` after updating +- replace `nvim-treesitter` incremental selection with `flash.nvim`, since it is no longer supported - enabled [blink.cmp](https://github.com/saghen/blink.cmp) **cmdline** completions +- use **LSP** based folding when available (disable with `nvim-lspconfig.folds.enabled = false`) ## 14.x diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 44e7c9b22c..983a7dbbed 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -27,7 +27,7 @@ opts = { headerMaxWidth = 80 } { "MagicDuck/grug-far.nvim", opts = { headerMaxWidth = 80 }, - cmd = "GrugFar", + cmd = { "GrugFar", "GrugFarWithin" }, keys = { { "sr", @@ -86,6 +86,16 @@ opts = {} { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + -- Simulate nvim-treesitter incremental selection + { "", mode = { "n", "o", "x" }, + function() + require("flash").treesitter({ + actions = { + [""] = "next", + [""] = "prev" + } + }) + end, desc = "Treesitter Incremental Selection" }, }, } ``` @@ -120,8 +130,8 @@ opts = { { "gh", group = "hunks" }, { "q", group = "quit/session" }, { "s", group = "search" }, - { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, + { "u", group = "ui" }, + { "x", group = "diagnostics/quickfix" }, { "[", group = "prev" }, { "]", group = "next" }, { "g", group = "goto" }, @@ -174,8 +184,8 @@ opts = { { "gh", group = "hunks" }, { "q", group = "quit/session" }, { "s", group = "search" }, - { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, + { "u", group = "ui" }, + { "x", group = "diagnostics/quickfix" }, { "[", group = "prev" }, { "]", group = "next" }, { "g", group = "goto" }, @@ -264,7 +274,7 @@ opts = { local gs = package.loaded.gitsigns local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) + vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc, silent = true }) end -- stylua: ignore start @@ -328,7 +338,7 @@ opts = { local gs = package.loaded.gitsigns local function map(mode, l, r, desc) - vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc }) + vim.keymap.set(mode, l, r, { buffer = buffer, desc = desc, silent = true }) end -- stylua: ignore start diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 8f6dc3ab72..eaf00cad7c 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -75,6 +75,12 @@ opts = function() codelens = { enabled = false, }, + -- Enable this to enable the builtin LSP folding on Neovim. + -- Be aware that you also will need to properly configure your LSP server to + -- provide the folds. + folds = { + enabled = true, + }, -- add any global capabilities here capabilities = { workspace = { @@ -194,6 +200,12 @@ end codelens = { enabled = false, }, + -- Enable this to enable the builtin LSP folding on Neovim. + -- Be aware that you also will need to properly configure your LSP server to + -- provide the folds. + folds = { + enabled = true, + }, -- add any global capabilities here capabilities = { workspace = { @@ -286,6 +298,14 @@ end end) end + -- folds + if opts.folds.enabled then + LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) + local win = vim.api.nvim_get_current_win() + vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" + end) + end + -- code lens if opts.codelens.enabled and vim.lsp.codelens then LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 32d65ccc9b..555361ef8c 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -5,42 +5,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [which-key.nvim](https://github.com/folke/which-key.nvim) - - - - - -```lua -opts = { - spec = { - { "", desc = "Decrement Selection", mode = "x" }, - { "", desc = "Increment Selection", mode = { "x", "n" } }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - opts = { - spec = { - { "", desc = "Decrement Selection", mode = "x" }, - { "", desc = "Increment Selection", mode = { "x", "n" } }, - }, - }, -} -``` - - - - - ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) Treesitter is a new parser generator tool that we can @@ -54,8 +18,6 @@ opts = { ```lua opts = { - highlight = { enable = true }, - indent = { enable = true }, ensure_installed = { "bash", "c", @@ -82,24 +44,6 @@ opts = { "xml", "yaml", }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - }, - }, } ``` @@ -111,30 +55,21 @@ opts = { ```lua { "nvim-treesitter/nvim-treesitter", + branch = "main", version = false, -- last release is way too old and doesn't work on Windows - build = ":TSUpdate", - event = { "LazyFile", "VeryLazy" }, - lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline - init = function(plugin) - -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early - -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which - -- no longer trigger the **nvim-treesitter** module to be loaded in time. - -- Luckily, the only things that those plugins need are the custom queries, which we make available - -- during startup. - require("lazy.core.loader").add_to_rtp(plugin) - require("nvim-treesitter.query_predicates") + build = function() + local TS = require("nvim-treesitter") + if not TS.get_installed then + LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") + return + end + vim.cmd.TSUpdate() end, - cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, - keys = { - { "", desc = "Increment Selection" }, - { "", desc = "Decrement Selection", mode = "x" }, - }, + lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline + event = { "LazyFile", "VeryLazy" }, + cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, - ---@type TSConfig - ---@diagnostic disable-next-line: missing-fields opts = { - highlight = { enable = true }, - indent = { enable = true }, ensure_installed = { "bash", "c", @@ -161,31 +96,48 @@ opts = { "xml", "yaml", }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "", - node_incremental = "", - scope_incremental = false, - node_decremental = "", - }, - }, - textobjects = { - move = { - enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - }, - }, }, + ---@param plugin LazyPlugin ---@param opts TSConfig - config = function(_, opts) - if type(opts.ensure_installed) == "table" then - opts.ensure_installed = LazyVim.dedup(opts.ensure_installed) + config = function(plugin, opts) + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error({ + "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", + "Run `:checkhealth nvim-treesitter` for more information.", + }) + return + end + if type(opts.ensure_installed) ~= "table" then + LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") + end + + local TS = require("nvim-treesitter") + if not TS.get_installed then + LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + return + end + TS.setup(opts) + + local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) + LazyVim.ui.installed = TS.get_installed("parsers") + + local install = vim.tbl_filter(function(lang) + return not LazyVim.ui.have(lang) + end, needed) + + if #install > 0 then + TS.install(install, { summary = true }):await(function() + LazyVim.ui.installed = TS.get_installed("parsers") + end) end - require("nvim-treesitter.configs").setup(opts) + + vim.api.nvim_create_autocmd("FileType", { + callback = function(ev) + if LazyVim.ui.have(ev.match) then + pcall(vim.treesitter.start) + end + end, + }) end, } ``` @@ -212,35 +164,47 @@ opts = {} ```lua { "nvim-treesitter/nvim-treesitter-textobjects", + branch = "main", event = "VeryLazy", - enabled = true, - config = function() - -- If treesitter is already loaded, we need to run config again for textobjects - if LazyVim.is_loaded("nvim-treesitter") then - local opts = LazyVim.opts("nvim-treesitter") - require("nvim-treesitter.configs").setup({ textobjects = opts.textobjects }) - end - - -- When in diff mode, we want to use the default - -- vim text objects c & C instead of the treesitter ones. - local move = require("nvim-treesitter.textobjects.move") ---@type table - local configs = require("nvim-treesitter.configs") - for name, fn in pairs(move) do - if name:find("goto") == 1 then - move[name] = function(q, ...) - if vim.wo.diff then - local config = configs.get_module("textobjects.move")[name] ---@type table - for key, query in pairs(config or {}) do - if q == query and key:find("[%]%[][cC]") then - vim.cmd("normal! " .. key) - return - end + opts = {}, + keys = function() + local moves = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + } + local ret = {} ---@type LazyKeysSpec[] + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + ret[#ret + 1] = { + key, + function() + -- don't use treesitter if in diff mode and the key is one of the c/C keys + if vim.wo.diff and key:find("[cC]") then + return vim.cmd("normal! " .. key) end - end - return fn(q, ...) - end + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, + desc = desc, + mode = { "n", "x", "o" }, + silent = true, + } end end + return ret + end, + config = function(_, opts) + local TS = require("nvim-treesitter-textobjects") + if not TS.setup then + LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + return + end + TS.setup(opts) end, } ``` From 978784b4e2831a8a28f634d1f61c1edc0b35c088 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 09:21:43 +0000 Subject: [PATCH 023/103] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 6 ------ docs/extras/ui/edgy.md | 2 +- docs/extras/ui/mini-animate.md | 3 ++- docs/plugins/coding.md | 16 +++++++++++++--- docs/plugins/linting.md | 4 ++++ docs/plugins/ui.md | 3 ++- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 7524bae379..442ef4d901 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -140,9 +140,6 @@ opts = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { - ".clangd", - ".clang-tidy", - ".clang-format", "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools @@ -200,9 +197,6 @@ opts = { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { - ".clangd", - ".clang-tidy", - ".clang-format", "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 17414e16c2..fb0674244b 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -19,7 +19,7 @@ import TabItem from '@theme/TabItem'; ## [edgy.nvim](https://github.com/folke/edgy.nvim) - edgy + Create and display predefined window layouts. diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 71e3753aaf..023f0174b9 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -52,7 +52,8 @@ opts = { ## [mini.animate](https://github.com/nvim-mini/mini.animate) - setup animate + Animates many common Neovim actions, like scrolling, + moving the cursor, and resizing windows. diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 358dba09a6..d9fd2ab346 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -7,7 +7,9 @@ import TabItem from '@theme/TabItem'; ## [mini.pairs](https://github.com/nvim-mini/mini.pairs) - auto pairs + Auto pairs + Automatically inserts a matching closing character + when you type an opening character like `"`, `[`, or `(`. @@ -62,7 +64,9 @@ opts = { ## [ts-comments.nvim](https://github.com/folke/ts-comments.nvim) - comments + Improves comment syntax, lets Neovim handle multiple + types of comments for a single language, and relaxes rules + for uncommenting. @@ -92,7 +96,9 @@ opts = {} ## [mini.ai](https://github.com/nvim-mini/mini.ai) - Better text-objects + Extends the a & i text objects, this adds the ability to select + arguments, function calls, text within quotes and brackets, and to + repeat those selections to select an outer text object. @@ -174,6 +180,10 @@ end ## [lazydev.nvim](https://github.com/folke/lazydev.nvim) + Configures LuaLS to support auto-completion and type checking + while editing your Neovim configuration. + + diff --git a/docs/plugins/linting.md b/docs/plugins/linting.md index b0bfc8ece5..11392c5c6e 100644 --- a/docs/plugins/linting.md +++ b/docs/plugins/linting.md @@ -7,6 +7,10 @@ import TabItem from '@theme/TabItem'; ## [nvim-lint](https://github.com/mfussenegger/nvim-lint) + Asynchronously calls language-specific linter tools and reports + their results via the `vim.diagnostic` module. + + diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index fe0e4436ce..6eedca753c 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -121,7 +121,8 @@ opts = { ## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - statusline + Displays a fancy status line with git status, + LSP diagnostics, filetype information, and more. From e45dde8415180ad9d72e9272559723cf8d2fe04a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 14:19:41 +0000 Subject: [PATCH 024/103] chore(build): auto-generate docs --- docs/configuration/general.md | 4 ++-- docs/plugins/treesitter.md | 43 +++++++++++++++++------------------ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 07268ef1fe..9c47dbe553 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -120,7 +120,7 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.LazyVim.ui.foldexpr()" -- treesitter folds +opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" @@ -130,7 +130,7 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute -opt.indentexpr = "v:lua.LazyVim.ui.indentexpr()" -- treesitter indents +opt.indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 555361ef8c..3fa2892c2f 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -18,6 +18,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { + -- LazyVim config for treesitter ensure_installed = { "bash", "c", @@ -69,7 +70,9 @@ opts = { event = { "LazyFile", "VeryLazy" }, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, + ---@class lazyvim.TSConfig: TSConfig opts = { + -- LazyVim config for treesitter ensure_installed = { "bash", "c", @@ -97,43 +100,39 @@ opts = { "yaml", }, }, - ---@param plugin LazyPlugin - ---@param opts TSConfig - config = function(plugin, opts) - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error({ + ---@param opts lazyvim.TSConfig + config = function(_, opts) + local TS = require("nvim-treesitter") + + -- some quick sanity checks + if not TS.get_installed then + return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") + elseif vim.fn.executable("tree-sitter") == 0 then + return LazyVim.error({ "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", "Run `:checkhealth nvim-treesitter` for more information.", }) - return - end - if type(opts.ensure_installed) ~= "table" then - LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") + elseif type(opts.ensure_installed) ~= "table" then + return LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") end - local TS = require("nvim-treesitter") - if not TS.get_installed then - LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") - return - end + -- setup treesitter TS.setup(opts) - local needed = LazyVim.dedup(opts.ensure_installed --[[@as string[] ]]) - LazyVim.ui.installed = TS.get_installed("parsers") - + -- install missing parsers local install = vim.tbl_filter(function(lang) - return not LazyVim.ui.have(lang) - end, needed) - + return not LazyVim.treesitter.have(lang) + end, opts.ensure_installed or {}) if #install > 0 then TS.install(install, { summary = true }):await(function() - LazyVim.ui.installed = TS.get_installed("parsers") + LazyVim.treesitter.get_installed(true) -- refresh the installed langs end) end + -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { callback = function(ev) - if LazyVim.ui.have(ev.match) then + if LazyVim.treesitter.have(ev.match) then pcall(vim.treesitter.start) end end, From af4be7b0b9faf47a1c5a08a342d76ddb7e127024 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 15:21:38 +0000 Subject: [PATCH 025/103] chore(build): auto-generate docs --- docs/extras/lang/python.md | 12 ++++-------- docs/plugins/treesitter.md | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index e14dfa310d..181e096d38 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -259,10 +259,8 @@ opts = {} ```lua opts = { - settings = { - options = { - notify_user_on_venv_activation = true, - }, + options = { + notify_user_on_venv_activation = true, }, } ``` @@ -277,10 +275,8 @@ opts = { "linux-cultist/venv-selector.nvim", cmd = "VenvSelect", opts = { - settings = { - options = { - notify_user_on_venv_activation = true, - }, + options = { + notify_user_on_venv_activation = true, }, }, -- Call config for Python files and load the cached venv automatically diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 3fa2892c2f..d06267aaea 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -64,7 +64,7 @@ opts = { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end - vim.cmd.TSUpdate() + TS.update(nil, { summary = true }) end, lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline event = { "LazyFile", "VeryLazy" }, From 28d4da476ff9c31dbb45873690736872836432b3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 21:17:53 +0000 Subject: [PATCH 026/103] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/plugins/treesitter.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 9c47dbe553..4e429fd642 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -124,7 +124,7 @@ opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 opt.foldmethod = "expr" opt.foldtext = "" -opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" +opt.formatexpr = "v:lua.LazyVim.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index d06267aaea..82b4c31c5e 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -131,9 +131,18 @@ opts = { -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), callback = function(ev) if LazyVim.treesitter.have(ev.match) then pcall(vim.treesitter.start) + + -- check if ftplugins changed foldexpr/indentexpr + for _, option in ipairs({ "foldexpr", "indentexpr" }) do + local expr = "v:lua.LazyVim.treesitter." .. option .. "()" + if vim.opt_global[option]:get() == expr then + vim.opt_local[option] = expr + end + end end end, }) From 275934155c2baae417dbe8dcd7d26d5cb2ad5f6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Sep 2025 22:17:09 +0000 Subject: [PATCH 027/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 82b4c31c5e..0b37b771c0 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -119,6 +119,8 @@ opts = { -- setup treesitter TS.setup(opts) + LazyVim.treesitter.get_installed(true) -- initialize the installed langs + -- install missing parsers local install = vim.tbl_filter(function(lang) return not LazyVim.treesitter.have(lang) From c942d50bf20d419e632cc23e405cc1a6b7e4abf9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Sep 2025 08:26:59 +0000 Subject: [PATCH 028/103] chore(build): auto-generate docs --- docs/configuration/general.md | 6 ++--- docs/plugins/lsp.md | 1 + docs/plugins/treesitter.md | 47 +++++++++++++++++++++-------------- 3 files changed, 32 insertions(+), 22 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 4e429fd642..400eecc89d 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -120,9 +120,8 @@ opt.fillchars = { diff = "╱", eob = " ", } -opt.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" -- treesitter folds opt.foldlevel = 99 -opt.foldmethod = "expr" +opt.foldmethod = "indent" opt.foldtext = "" opt.formatexpr = "v:lua.LazyVim.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj @@ -130,7 +129,6 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute -opt.indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" -- treesitter indents opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points @@ -156,7 +154,7 @@ opt.spelllang = { "en" } opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current -opt.statuscolumn = [[%!v:lua.require'snacks.statuscolumn'.get()]] +opt.statuscolumn = [[%!v:lua.LazyVim.statuscolumn()]] opt.tabstop = 2 -- Number of spaces tabs count for opt.termguicolors = true -- True color support opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index eaf00cad7c..3a88790d76 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -303,6 +303,7 @@ end LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) local win = vim.api.nvim_get_current_win() vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" + vim.wo[win][0].foldmethod = "expr" end) end diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 0b37b771c0..ae6e2f929b 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -19,6 +19,9 @@ import TabItem from '@theme/TabItem'; ```lua opts = { -- LazyVim config for treesitter + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, ensure_installed = { "bash", "c", @@ -64,7 +67,9 @@ opts = { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end - TS.update(nil, { summary = true }) + LazyVim.treesitter.ensure_treesitter_cli(function() + TS.update(nil, { summary = true }) + end) end, lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline event = { "LazyFile", "VeryLazy" }, @@ -73,6 +78,9 @@ opts = { ---@class lazyvim.TSConfig: TSConfig opts = { -- LazyVim config for treesitter + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, ensure_installed = { "bash", "c", @@ -107,18 +115,12 @@ opts = { -- some quick sanity checks if not TS.get_installed then return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") - elseif vim.fn.executable("tree-sitter") == 0 then - return LazyVim.error({ - "**treesitter-main** requires the `tree-sitter` CLI executable to be installed.", - "Run `:checkhealth nvim-treesitter` for more information.", - }) elseif type(opts.ensure_installed) ~= "table" then return LazyVim.error("`nvim-treesitter` opts.ensure_installed must be a table") end -- setup treesitter TS.setup(opts) - LazyVim.treesitter.get_installed(true) -- initialize the installed langs -- install missing parsers @@ -126,25 +128,34 @@ opts = { return not LazyVim.treesitter.have(lang) end, opts.ensure_installed or {}) if #install > 0 then - TS.install(install, { summary = true }):await(function() - LazyVim.treesitter.get_installed(true) -- refresh the installed langs + LazyVim.treesitter.ensure_treesitter_cli(function() + TS.install(install, { summary = true }):await(function() + LazyVim.treesitter.get_installed(true) -- refresh the installed langs + end) end) end - -- treesitter highlighting vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), callback = function(ev) - if LazyVim.treesitter.have(ev.match) then + if not LazyVim.treesitter.have(ev.match) then + return + end + + -- highlighting + if vim.tbl_get(opts, "highlight", "enable") ~= false then pcall(vim.treesitter.start) + end - -- check if ftplugins changed foldexpr/indentexpr - for _, option in ipairs({ "foldexpr", "indentexpr" }) do - local expr = "v:lua.LazyVim.treesitter." .. option .. "()" - if vim.opt_global[option]:get() == expr then - vim.opt_local[option] = expr - end - end + -- indents + if vim.tbl_get(opts, "indent", "enable") ~= false then + vim.bo[ev.buf].indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" + end + + -- folds + if vim.tbl_get(opts, "folds", "enable") ~= false then + vim.wo.foldmethod = "expr" + vim.wo.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" end end, }) From 65a2d528fbff22e1c26d779d39926fd8c6d6c534 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Sep 2025 11:16:45 +0000 Subject: [PATCH 029/103] chore(build): auto-generate docs --- docs/extras/lang/java.md | 8 ++++++-- docs/extras/lang/ocaml.md | 38 ++++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index fe44b53b5d..55568633b4 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -139,7 +139,9 @@ opts = function() table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), + root_dir = function(path) + return vim.fs.root(path, vim.lsp.config.jdtls.root_markers) + end, -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -208,7 +210,9 @@ end table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - root_dir = require("lspconfig.util").root_pattern(vim.lsp.config.jdtls.root_markers), + root_dir = function(path) + return vim.fs.root(path, vim.lsp.config.jdtls.root_markers) + end, -- How to find the project name for a given root dir. project_name = function(root_dir) diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index 15aea82b9c..4174ad4412 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -69,12 +69,19 @@ opts = { "reason", "dune", }, - root_dir = function(bufnr, on_dir) - local util = require("lspconfig.util") - local fname = vim.api.nvim_buf_get_name(bufnr) - --stylua: ignore - on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) - end, + root_markers = { + function(name) + return name:match(".*%.opam$") + end, + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + function(name) + return name:match(".*%.ml$") + end, + }, }, }, } @@ -99,12 +106,19 @@ opts = { "reason", "dune", }, - root_dir = function(bufnr, on_dir) - local util = require("lspconfig.util") - local fname = vim.api.nvim_buf_get_name(bufnr) - --stylua: ignore - on_dir(util.root_pattern("*.opam", "esy.json", "package.json", ".git", "dune-project", "dune-workspace", "*.ml")( fname)) - end, + root_markers = { + function(name) + return name:match(".*%.opam$") + end, + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + function(name) + return name:match(".*%.ml$") + end, + }, }, }, }, From c226b496eee08d115114b9ebb96320b95d375f99 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Sep 2025 12:42:14 +0000 Subject: [PATCH 030/103] chore(build): auto-generate docs --- docs/plugins/lsp.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 3a88790d76..4bc6aef9ad 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -157,7 +157,7 @@ end ```lua { "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile", "BufWritePre" }, + event = "LazyFile", dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -273,7 +273,7 @@ end return ret end, ---@param opts PluginLspOpts - config = function(_, opts) + config = vim.schedule_wrap(function(_, opts) -- setup autoformat LazyVim.format.register(LazyVim.lsp.formatter()) @@ -411,7 +411,7 @@ end resolve("denols") resolve("vtsls") end - end, + end), } ``` From 603743a78d4742e760526c9cf93079ff67bb891e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Sep 2025 20:23:04 +0000 Subject: [PATCH 031/103] chore(build): auto-generate docs --- docs/plugins/lsp.md | 6 +++--- docs/plugins/treesitter.md | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 4bc6aef9ad..6cc999eff4 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -301,9 +301,9 @@ end -- folds if opts.folds.enabled then LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) - local win = vim.api.nvim_get_current_win() - vim.wo[win][0].foldexpr = "v:lua.vim.lsp.foldexpr()" - vim.wo[win][0].foldmethod = "expr" + if LazyVim.set_default("foldmethod", "expr") then + LazyVim.set_default("foldexpr", "v:lua.vim.lsp.foldexpr()") + end end) end diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index ae6e2f929b..1fb3c6a6bc 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -149,13 +149,14 @@ opts = { -- indents if vim.tbl_get(opts, "indent", "enable") ~= false then - vim.bo[ev.buf].indentexpr = "v:lua.LazyVim.treesitter.indentexpr()" + LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()") end -- folds if vim.tbl_get(opts, "folds", "enable") ~= false then - vim.wo.foldmethod = "expr" - vim.wo.foldexpr = "v:lua.LazyVim.treesitter.foldexpr()" + if LazyVim.set_default("foldmethod", "expr") then + LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()") + end end end, }) From 2ba4bd259b860ba01f5e16e4492b29ef0c99fc42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Sep 2025 06:31:08 +0000 Subject: [PATCH 032/103] chore(build): auto-generate docs --- docs/plugins/lsp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 6cc999eff4..4101d57776 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -390,7 +390,7 @@ end }) end - if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then + if vim.lsp.is_enabled and vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then ---@param server string local resolve = function(server) local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir From a08cd37158335d3d0edda8270cec5c6a5212def9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Sep 2025 07:19:57 +0000 Subject: [PATCH 033/103] chore(build): auto-generate docs --- docs/extras/lang/clojure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index f70bbc9fb6..c8d2afadf6 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -71,7 +71,7 @@ opts = nil -## [nvim-treesitter-sexp](https://github.com/PaterJason/nvim-treesitter-sexp) +## [nvim-paredit](https://github.com/julienvincent/nvim-paredit) Add s-exp mappings @@ -90,7 +90,7 @@ opts = {} ```lua -{ "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" } +{ "julienvincent/nvim-paredit", opts = {}, event = "LazyFile" } ``` From c9e07ec0018757649e9effe734ff2257585a783d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Sep 2025 10:22:22 +0000 Subject: [PATCH 034/103] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 246b6db7c3..3344e6a59d 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -51,6 +51,8 @@ opts = { function() if LazyVim.pick.picker.name == "telescope" then require("telescope").extensions.yank_history.yank_history({}) + elseif LazyVim.pick.picker.name == "snacks" then + Snacks.picker.yanky() else vim.cmd([[YankyRingHistory]]) end From ef3097330be3dbdbae7e3366f3a6171cefc3433c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Sep 2025 18:28:53 +0000 Subject: [PATCH 035/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 1fb3c6a6bc..0bdf3bac18 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -148,12 +148,12 @@ opts = { end -- indents - if vim.tbl_get(opts, "indent", "enable") ~= false then + if vim.tbl_get(opts, "indent", "enable") ~= false and LazyVim.treesitter.have(ev.match, "indents") then LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()") end -- folds - if vim.tbl_get(opts, "folds", "enable") ~= false then + if vim.tbl_get(opts, "folds", "enable") ~= false and LazyVim.treesitter.have(ev.match, "folds") then if LazyVim.set_default("foldmethod", "expr") then LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()") end From 77b8b5b59ddde44ea158346989c028dccabf5b0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Sep 2025 12:39:03 +0000 Subject: [PATCH 036/103] chore(build): auto-generate docs --- docs/extras/lang/clojure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index c8d2afadf6..ad7350c28a 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -225,7 +225,7 @@ opts = {} ```lua opts = function(_, opts) if type(opts.sources) == "table" then - vim.list_extend(opts.sources, { name = "clojure" }) + vim.list_extend(opts.sources, { name = "conjure" }) end end ``` @@ -244,7 +244,7 @@ end }, opts = function(_, opts) if type(opts.sources) == "table" then - vim.list_extend(opts.sources, { name = "clojure" }) + vim.list_extend(opts.sources, { name = "conjure" }) end end, } From 35987ee231bcc0a4a013da6afe18e8f033d69ef9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Sep 2025 14:16:41 +0000 Subject: [PATCH 037/103] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index cf2db117a0..bccd92f3ea 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -111,7 +111,7 @@ opts = function(_, opts) winopts = { layout = "vertical", -- height is number of items minus 15 lines for the preview, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, + height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 4) + 0.5) + 16, width = 0.5, preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", @@ -126,7 +126,7 @@ opts = function(_, opts) winopts = { width = 0.5, -- height is number of items, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5), + height = math.floor(math.min(vim.o.lines * 0.8, #items + 4) + 0.5), }, }) end, @@ -256,7 +256,7 @@ end winopts = { layout = "vertical", -- height is number of items minus 15 lines for the preview, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 2) + 0.5) + 16, + height = math.floor(math.min(vim.o.lines * 0.8 - 16, #items + 4) + 0.5) + 16, width = 0.5, preview = not vim.tbl_isempty(vim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { layout = "vertical", @@ -271,7 +271,7 @@ end winopts = { width = 0.5, -- height is number of items, with a max of 80% screen height - height = math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5), + height = math.floor(math.min(vim.o.lines * 0.8, #items + 4) + 0.5), }, }) end, From ea9fb5f9c972f7c0d74af2ade748b6d56f33eefc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 09:18:31 +0000 Subject: [PATCH 038/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 0bdf3bac18..53cae03fae 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -112,6 +112,21 @@ opts = { config = function(_, opts) local TS = require("nvim-treesitter") + setmetatable(require("nvim-treesitter.install"), { + __newindex = function(_, k) + if k == "compilers" then + vim.schedule(function() + LazyVim.error({ + "Setting custom compilers for `nvim-treesitter` is no longer supported.", + "", + "For more info, see:", + "- [compilers](https://docs.rs/cc/latest/cc/#compile-time-requirements)", + }) + end) + end + end, + }) + -- some quick sanity checks if not TS.get_installed then return LazyVim.error("Please use `:Lazy` and update `nvim-treesitter`") From 7b533f317c59c353b036edd8f796bf52a877b0cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 10:18:54 +0000 Subject: [PATCH 039/103] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 44 ++++++++++++++++++++++++++++++++++ docs/plugins/lsp.md | 22 ----------------- 2 files changed, 44 insertions(+), 22 deletions(-) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index d09706fe62..755dff1beb 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -142,6 +142,28 @@ opts = { return true end, vtsls = function(_, opts) + if vim.lsp.config.denols and vim.lsp.config.vtsls then + ---@param server string + local resolve = function(server) + local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir + vim.lsp.config(server, { + root_dir = function(bufnr, on_dir) + local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil + if is_deno == (server == "denols") then + if root_dir then + return root_dir(bufnr, on_dir) + elseif type(markers) == "table" then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end + end, + }) + end + resolve("denols") + resolve("vtsls") + end + LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range @@ -323,6 +345,28 @@ opts = { return true end, vtsls = function(_, opts) + if vim.lsp.config.denols and vim.lsp.config.vtsls then + ---@param server string + local resolve = function(server) + local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir + vim.lsp.config(server, { + root_dir = function(bufnr, on_dir) + local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil + if is_deno == (server == "denols") then + if root_dir then + return root_dir(bufnr, on_dir) + elseif type(markers) == "table" then + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end + end, + }) + end + resolve("denols") + resolve("vtsls") + end + LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 4101d57776..bbc81fedc4 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -389,28 +389,6 @@ end }, }) end - - if vim.lsp.is_enabled and vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then - ---@param server string - local resolve = function(server) - local markers, root_dir = vim.lsp.config[server].root_markers, vim.lsp.config[server].root_dir - vim.lsp.config(server, { - root_dir = function(bufnr, on_dir) - local is_deno = vim.fs.root(bufnr, { "deno.json", "deno.jsonc" }) ~= nil - if is_deno == (server == "denols") then - if root_dir then - return root_dir(bufnr, on_dir) - elseif type(markers) == "table" then - local root = vim.fs.root(bufnr, markers) - return root and on_dir(root) - end - end - end, - }) - end - resolve("denols") - resolve("vtsls") - end end), } ``` From ebf25f5d2f1c924959af71b156712fd921766bab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 11:14:47 +0000 Subject: [PATCH 040/103] chore(build): auto-generate docs --- docs/plugins/lsp.md | 53 +++++++++++++++++---------------------------- 1 file changed, 20 insertions(+), 33 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index bbc81fedc4..2140482379 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -98,7 +98,8 @@ opts = function() timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -223,7 +224,8 @@ end timeout_ms = nil, }, -- LSP Server Settings - ---@type table + ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} + ---@type table servers = { lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -342,51 +344,36 @@ end and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) or {} --[[ @as string[] ]] - local exclude_automatic_enable = {} ---@type string[] - + ---@return boolean? exclude automatic setup local function configure(server) - local server_opts = opts.servers[server] or {} + local sopts = opts.servers[server] + sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]] + if sopts.enabled == false then + return true + end local setup = opts.setup[server] or opts.setup["*"] - if setup and setup(server, server_opts) then - return true -- lsp will be setup by the setup function + if setup and setup(server, sopts) then + return true -- lsp will be configured and enabled by the setup function end - vim.lsp.config(server, server_opts) + vim.lsp.config(server, sopts) -- configure the server -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if server_opts.mason == false or not vim.tbl_contains(mason_all, server) then + if sopts.mason == false or not vim.tbl_contains(mason_all, server) then vim.lsp.enable(server) return true end - return false - end - - local ensure_installed = {} ---@type string[] - for server, server_opts in pairs(opts.servers) do - server_opts = server_opts == true and {} or server_opts or false - if server_opts and server_opts.enabled ~= false then - -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig - if configure(server) then - exclude_automatic_enable[#exclude_automatic_enable + 1] = server - else - ensure_installed[#ensure_installed + 1] = server - end - else - exclude_automatic_enable[#exclude_automatic_enable + 1] = server - end end + local servers = vim.tbl_keys(opts.servers) + local exclude = vim.tbl_filter(configure, servers) if have_mason then require("mason-lspconfig").setup({ - ensure_installed = vim.tbl_deep_extend( - "force", - ensure_installed, - LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} - ), - automatic_enable = { - exclude = exclude_automatic_enable, - }, + ensure_installed = vim.tbl_filter(function(server) + return not vim.tbl_contains(exclude, server) + end, vim.list_extend(servers, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {})), + automatic_enable = { exclude = exclude }, }) end end), From 01bb9b627822d1e4e03e392686d6b957d4838633 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 13:23:02 +0000 Subject: [PATCH 041/103] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index a6a4faccde..0e233af0fa 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -178,7 +178,7 @@ opts = {} -## [blink-cmp-copilot](https://github.com/giuxtaposition/blink-cmp-copilot) +## [blink-copilot](https://github.com/fang2hou/blink-copilot) @@ -194,7 +194,7 @@ opts = nil ```lua -{ "giuxtaposition/blink-cmp-copilot" } +{ "fang2hou/blink-copilot" } ``` @@ -367,8 +367,7 @@ opts = { providers = { copilot = { name = "copilot", - module = "blink-cmp-copilot", - kind = "Copilot", + module = "blink-copilot", score_offset = 100, async = true, }, @@ -386,15 +385,14 @@ opts = { { "saghen/blink.cmp", optional = true, - dependencies = { "giuxtaposition/blink-cmp-copilot" }, + dependencies = { "fang2hou/blink-copilot" }, opts = { sources = { default = { "copilot" }, providers = { copilot = { name = "copilot", - module = "blink-cmp-copilot", - kind = "Copilot", + module = "blink-copilot", score_offset = 100, async = true, }, From 760e88b1bf22e4f40b91189038333eed922f3d55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Sep 2025 14:16:34 +0000 Subject: [PATCH 042/103] chore(build): auto-generate docs --- docs/configuration/general.md | 6 +++--- docs/keymaps.md | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 400eecc89d..fe40d21fbb 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -355,12 +355,12 @@ end if vim.fn.executable("lazygit") == 1 then map("n", "gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) - map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) - map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) - map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) end +map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) +map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) +map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" }) map({"n", "x" }, "gY", function() Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 4aabd90732..80479ed165 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -82,7 +82,10 @@ possible keymaps starting with ``. | <leader>dpp | Toggle Profiler | **n** | | <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | +| <leader>gL | Git Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | +| <leader>gf | Git Current File History | **n** | +| <leader>gl | Git Log | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | | <leader>gY | Git Browse (copy) | **n**, **x** | | <leader>qq | Quit All | **n** | From 7a4d337529ac31d0abbb85c61524b8e242972336 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Sep 2025 12:44:34 +0000 Subject: [PATCH 043/103] chore(build): auto-generate docs --- docs/extras/lang/java.md | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 55568633b4..e48f00b1cf 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -88,11 +88,6 @@ opts = { servers = { jdtls = {}, }, - setup = { - jdtls = function() - return true -- avoid duplicate servers - end, - }, } ``` @@ -109,11 +104,6 @@ opts = { servers = { jdtls = {}, }, - setup = { - jdtls = function() - return true -- avoid duplicate servers - end, - }, }, } ``` @@ -269,19 +259,10 @@ end if LazyVim.has("mason.nvim") then local mason_registry = require("mason-registry") if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then - local jar_patterns = { - vim.fn.expand("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*.jar"), - } + bundles = vim.fn.glob("$MASON/share/java-debug-adapter/com.microsoft.java.debug.plugin-*jar", false, true) -- java-test also depends on java-debug-adapter. if opts.test and mason_registry.is_installed("java-test") then - vim.list_extend(jar_patterns, { - vim.fn.expand("$MASON/share/java-test/*.jar"), - }) - end - for _, jar_pattern in ipairs(jar_patterns) do - for _, bundle in ipairs(vim.split(vim.fn.glob(jar_pattern), "\n")) do - table.insert(bundles, bundle) - end + vim.list_extend(bundles, vim.fn.glob("$MASON/share/java-test/*.jar", false, true)) end end end From 3fcf7582d7f6bbe1a074e1cb3e936af9f5cb72f0 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:08:41 +0300 Subject: [PATCH 044/103] fix(docs): add `tree-sitter-cli` and update link to main branch requirements (#160) --- docs/intro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 8f8a13becb..aaa19e8bc9 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -28,7 +28,7 @@ to make it easy to customize and extend your config. - Git >= **2.19.0** (for partial clones support) - a [Nerd Font](https://www.nerdfonts.com/)(v3.0 or greater) **_(optional, but needed to display some icons)_** - [lazygit](https://github.com/jesseduffield/lazygit) **_(optional)_** -- a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements) +- **tree-sitter-cli** and a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter/tree/main?tab=readme-ov-file#requirements) - **curl** for [blink.cmp](https://github.com/Saghen/blink.cmp) **(completion engine)** - for [fzf-lua](https://github.com/ibhagwan/fzf-lua) **_(optional)_** - **fzf**: [fzf](https://github.com/junegunn/fzf) **(v0.25.1 or greater)** From 30c46d12ba20057d846093afba68e37582f233e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Sep 2025 11:17:04 +0000 Subject: [PATCH 045/103] chore(build): auto-generate docs --- docs/extras/lang/java.md | 10 ++++++++++ docs/plugins/lsp.md | 31 +++++++++++++++---------------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index e48f00b1cf..9d4f003081 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -88,6 +88,11 @@ opts = { servers = { jdtls = {}, }, + setup = { + jdtls = function() + return true -- avoid duplicate servers + end, + }, } ``` @@ -104,6 +109,11 @@ opts = { servers = { jdtls = {}, }, + setup = { + jdtls = function() + return true -- avoid duplicate servers + end, + }, }, } ``` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 2140482379..3965d5ab36 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -343,37 +343,36 @@ end local mason_all = have_mason and vim.tbl_keys(require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package) or {} --[[ @as string[] ]] + local mason_exclude = {} ---@type string[] ---@return boolean? exclude automatic setup local function configure(server) local sopts = opts.servers[server] sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]] + if sopts.enabled == false then - return true + mason_exclude[#mason_exclude + 1] = server + return end + local use_mason = sopts.mason ~= false and vim.tbl_contains(mason_all, server) local setup = opts.setup[server] or opts.setup["*"] if setup and setup(server, sopts) then - return true -- lsp will be configured and enabled by the setup function - end - - vim.lsp.config(server, sopts) -- configure the server - - -- manually enable if mason=false or if this is a server that cannot be installed with mason-lspconfig - if sopts.mason == false or not vim.tbl_contains(mason_all, server) then - vim.lsp.enable(server) - return true + mason_exclude[#mason_exclude + 1] = server + else + vim.lsp.config(server, sopts) -- configure the server + if not use_mason then + vim.lsp.enable(server) + end end + return use_mason end - local servers = vim.tbl_keys(opts.servers) - local exclude = vim.tbl_filter(configure, servers) + local install = vim.tbl_filter(configure, vim.tbl_keys(opts.servers)) if have_mason then require("mason-lspconfig").setup({ - ensure_installed = vim.tbl_filter(function(server) - return not vim.tbl_contains(exclude, server) - end, vim.list_extend(servers, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {})), - automatic_enable = { exclude = exclude }, + ensure_installed = vim.list_extend(install, LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}), + automatic_enable = { exclude = mason_exclude }, }) end end), From 19b8d761452c572bc293d9562863ec5837ba401e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Sep 2025 06:31:54 +0000 Subject: [PATCH 046/103] chore(build): auto-generate docs --- docs/keymaps.md | 17 -------- docs/plugins/treesitter.md | 88 ++++++++++++++++++++++++-------------- 2 files changed, 55 insertions(+), 50 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index 80479ed165..e198a843e1 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -193,23 +193,6 @@ possible keymaps starting with ``. | <leader>snt | Noice Picker (Telescope/FzfLua) | **n** | | <S-Enter> | Redirect Cmdline | **c** | -## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects.git) - -| Key | Description | Mode | -| --- | --- | --- | -| [a | Prev Parameter Start | **n**, **o**, **x** | -| [A | Prev Parameter End | **n**, **o**, **x** | -| [c | Prev Class Start | **n**, **o**, **x** | -| [C | Prev Class End | **n**, **o**, **x** | -| [f | Prev Function Start | **n**, **o**, **x** | -| [F | Prev Function End | **n**, **o**, **x** | -| ]a | Next Parameter Start | **n**, **o**, **x** | -| ]A | Next Parameter End | **n**, **o**, **x** | -| ]c | Next Class Start | **n**, **o**, **x** | -| ]C | Next Class End | **n**, **o**, **x** | -| ]f | Next Function Start | **n**, **o**, **x** | -| ]F | Next Function End | **n**, **o**, **x** | - ## [persistence.nvim](https://github.com/folke/persistence.nvim.git) | Key | Description | Mode | diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 53cae03fae..e45f07850a 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -190,7 +190,19 @@ opts = { ```lua -opts = {} +opts = { + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + -- LazyVim extention to create buffer-local keymaps + keys = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + }, + }, +} ``` @@ -203,38 +215,19 @@ opts = {} "nvim-treesitter/nvim-treesitter-textobjects", branch = "main", event = "VeryLazy", - opts = {}, - keys = function() - local moves = { - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, - } - local ret = {} ---@type LazyKeysSpec[] - for method, keymaps in pairs(moves) do - for key, query in pairs(keymaps) do - local desc = query:gsub("@", ""):gsub("%..*", "") - desc = desc:sub(1, 1):upper() .. desc:sub(2) - desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc - desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") - ret[#ret + 1] = { - key, - function() - -- don't use treesitter if in diff mode and the key is one of the c/C keys - if vim.wo.diff and key:find("[cC]") then - return vim.cmd("normal! " .. key) - end - require("nvim-treesitter-textobjects.move")[method](query, "textobjects") - end, - desc = desc, - mode = { "n", "x", "o" }, - silent = true, - } - end - end - return ret - end, + opts = { + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + -- LazyVim extention to create buffer-local keymaps + keys = { + goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" }, + goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" }, + goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer", ["[a"] = "@parameter.inner" }, + goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" }, + }, + }, + }, config = function(_, opts) local TS = require("nvim-treesitter-textobjects") if not TS.setup then @@ -242,6 +235,35 @@ opts = {} return end TS.setup(opts) + + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("lazyvim_treesitter_textobjects", { clear = true }), + callback = function(ev) + if not (vim.tbl_get(opts, "move", "enable") and LazyVim.treesitter.have(ev.match, "textobjects")) then + return + end + ---@type table> + local moves = vim.tbl_get(opts, "move", "keys") or {} + + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + if not (vim.wo.diff and key:find("[cC]")) then + vim.keymap.set({ "n", "x", "o" }, key, function() + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, { + buffer = ev.buf, + desc = desc, + silent = true, + }) + end + end + end + end, + }) end, } ``` From d854f4581650a388cf70dce3ddb0bd68263d620c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Sep 2025 09:22:34 +0000 Subject: [PATCH 047/103] chore(build): auto-generate docs --- docs/extras/ai/codeium.md | 73 ---------- docs/extras/ai/copilot-native.md | 155 +++++++++++++++++++++ docs/extras/ai/copilot.md | 225 ------------------------------- docs/extras/ai/supermaven.md | 158 ---------------------- 4 files changed, 155 insertions(+), 456 deletions(-) create mode 100644 docs/extras/ai/copilot-native.md diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index 460634bc36..18ad5612c9 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -160,29 +160,6 @@ opts = nil -## [blink.compat](https://github.com/saghen/blink.compat) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -"saghen/blink.compat" -``` - - - - - ## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ codeium cmp source @@ -258,54 +235,4 @@ end -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - - - - -```lua -opts = { - sources = { - compat = { "codeium" }, - providers = { - codeium = { - kind = "Codeium", - score_offset = 100, - async = true, - }, - }, - }, -} -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - dependencies = { "codeium.nvim", "saghen/blink.compat" }, - opts = { - sources = { - compat = { "codeium" }, - providers = { - codeium = { - kind = "Codeium", - score_offset = 100, - async = true, - }, - }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md new file mode 100644 index 0000000000..096a586d71 --- /dev/null +++ b/docs/extras/ai/copilot-native.md @@ -0,0 +1,155 @@ +# `Copilot-native` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +### Options + +Additional options for this extra can be configured in your [lua/config/options.lua](/configuration/general#options) file: + +```lua title="lua/config/options.lua" +-- Native inline completions don't support being shown as regular completions +vim.g.ai_cmp = false +``` + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + copilot-language-server + + + + + + +```lua +opts = { + servers = { + copilot = { + handlers = { + didChangeStatus = function(err, res, ctx) + if err then + return + end + status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" + if res.status == "Error" then + LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") + end + end, + }, + }, + }, + setup = { + copilot = function() + vim.lsp.inline_completion.enable() + LazyVim.cmp.actions.ai_accept = function() + return vim.lsp.inline_completion.get() + end + end, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + copilot = { + handlers = { + didChangeStatus = function(err, res, ctx) + if err then + return + end + status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" + if res.status == "Error" then + LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") + end + end, + }, + }, + }, + setup = { + copilot = function() + vim.lsp.inline_completion.enable() + LazyVim.cmp.actions.ai_accept = function() + return vim.lsp.inline_completion.get() + end + end, + }, + }, +} +``` + + + + + +## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ + + lualine + + + + + + +```lua +opts = function(_, opts) + table.insert( + opts.sections.lualine_x, + 2, + LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local clients = vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) + return #clients > 0 and status[clients[1].id] or nil + end) + ) +end +``` + + + + + + +```lua +{ + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + table.insert( + opts.sections.lualine_x, + 2, + LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local clients = vim.lsp.get_clients({ name = "copilot", bufnr = 0 }) + return #clients > 0 and status[clients[1].id] or nil + end) + ) + end, +} +``` + + + + + + diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 0e233af0fa..5ba17c6e6e 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -126,81 +126,6 @@ end -## [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) - - this will only be evaluated if nvim-cmp is enabled - - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "zbirenbaum/copilot-cmp", - opts = {}, - config = function(_, opts) - local copilot_cmp = require("copilot_cmp") - copilot_cmp.setup(opts) - -- attach cmp source whenever copilot attaches - -- fixes lazy-loading issues with the copilot cmp source - LazyVim.lsp.on_attach(function() - copilot_cmp._on_insert_enter({}) - end, "copilot") - end, - specs = { - { - "hrsh7th/nvim-cmp", - optional = true, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, - }, - }, -} -``` - - - - - -## [blink-copilot](https://github.com/fang2hou/blink-copilot) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "fang2hou/blink-copilot" } -``` - - - - - ## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ lualine @@ -256,154 +181,4 @@ end -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ - - copilot cmp source - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - optional = true, - dependencies = { -- this will only be evaluated if nvim-cmp is enabled - { - "zbirenbaum/copilot-cmp", - opts = {}, - config = function(_, opts) - local copilot_cmp = require("copilot_cmp") - copilot_cmp.setup(opts) - -- attach cmp source whenever copilot attaches - -- fixes lazy-loading issues with the copilot cmp source - LazyVim.lsp.on_attach(function() - copilot_cmp._on_insert_enter({}) - end, "copilot") - end, - specs = { - { - "hrsh7th/nvim-cmp", - optional = true, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, - }, - }, - }, - }, -} -``` - - - - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - optional = true, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, -} -``` - - - - - -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - - - - -```lua -opts = { - sources = { - default = { "copilot" }, - providers = { - copilot = { - name = "copilot", - module = "blink-copilot", - score_offset = 100, - async = true, - }, - }, - }, -} -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - dependencies = { "fang2hou/blink-copilot" }, - opts = { - sources = { - default = { "copilot" }, - providers = { - copilot = { - name = "copilot", - module = "blink-copilot", - score_offset = 100, - async = true, - }, - }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 14fc8b9d12..d609f68140 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -159,29 +159,6 @@ opts = nil -## [blink.compat](https://github.com/saghen/blink.compat) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -"saghen/blink.compat" -``` - - - - - ## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ cmp integration @@ -229,139 +206,4 @@ end -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - - - - -```lua -opts = { - sources = { - compat = { "supermaven" }, - providers = { - supermaven = { - kind = "Supermaven", - score_offset = 100, - async = true, - }, - }, - }, -} -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - dependencies = { "supermaven-nvim", "saghen/blink.compat" }, - opts = { - sources = { - compat = { "supermaven" }, - providers = { - supermaven = { - kind = "Supermaven", - score_offset = 100, - async = true, - }, - }, - }, - }, -} -``` - - - - - -## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven")) -end -``` - - - - - - -```lua -{ - "nvim-lualine/lualine.nvim", - optional = true, - event = "VeryLazy", - opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven")) - end, -} -``` - - - - - -## [noice.nvim](https://github.com/folke/noice.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - vim.list_extend(opts.routes, { - { - filter = { - event = "msg_show", - any = { - { find = "Starting Supermaven" }, - { find = "Supermaven Free Tier" }, - }, - }, - skip = true, - }, - }) -end -``` - - - - - - -```lua -{ - "folke/noice.nvim", - optional = true, - opts = function(_, opts) - vim.list_extend(opts.routes, { - { - filter = { - event = "msg_show", - any = { - { find = "Starting Supermaven" }, - { find = "Supermaven Free Tier" }, - }, - }, - skip = true, - }, - }) - end, -} -``` - - - - - From 01f14e8536d35eb81bdc3aaa52a745b51e97c2ec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Sep 2025 11:18:01 +0000 Subject: [PATCH 048/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-native.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index 096a586d71..cc817b92dd 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -50,6 +50,21 @@ opts = { end end, }, + -- stylua: ignore + keys = { + { + "", + function() vim.lsp.inline_completion.select({ count = 1 }) end, + desc = "Next Copilot Suggestion", + mode = { "i", "n" }, + }, + { + "", + function() vim.lsp.inline_completion.select({ count = -1 }) end, + desc = "Next Copilot Suggestion", + mode = { "i", "n" }, + }, + }, }, }, setup = { @@ -85,6 +100,21 @@ opts = { end end, }, + -- stylua: ignore + keys = { + { + "", + function() vim.lsp.inline_completion.select({ count = 1 }) end, + desc = "Next Copilot Suggestion", + mode = { "i", "n" }, + }, + { + "", + function() vim.lsp.inline_completion.select({ count = -1 }) end, + desc = "Next Copilot Suggestion", + mode = { "i", "n" }, + }, + }, }, }, setup = { From 3579fa1fbc6dd95e3bbaa7a0c5529196a0d82fa6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 25 Sep 2025 13:30:54 +0000 Subject: [PATCH 049/103] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/ai/copilot-native.md | 73 +++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index fe40d21fbb..e10c823d57 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -241,6 +241,7 @@ map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) map({ "i", "n", "s" }, "", function() vim.cmd("noh") LazyVim.cmp.actions.snippet_stop() + LazyVim.cmp.actions.ai_stop() return "" end, { expr = true, desc = "Escape and Clear hlsearch" }) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index cc817b92dd..ea7d7a7999 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -14,6 +14,9 @@ Additional options for this extra can be configured in your [lua/config/options. ```lua title="lua/config/options.lua" -- Native inline completions don't support being shown as regular completions vim.g.ai_cmp = false + +-- Set to `true` in your `options.lua` to enable experimental support for Next Edit Suggestions +vim.g.copilot_nes = false ``` Below you can find a list of included plugins and their default settings. @@ -70,8 +73,41 @@ opts = { setup = { copilot = function() vim.lsp.inline_completion.enable() + + -- Only trigger NES updates: + -- * when leaving insert mode + -- * when text is changed (in normal mode) + -- * when accepting a next edit suggestion + local nes_update = Snacks.util.debounce(function() + return vim.g.copilot_nes and require("copilot-lsp.nes").request_nes("copilot") + end, { ms = 100 }) + + vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { + group = vim.api.nvim_create_augroup("lazyvim.copilot-native.complete", { clear = true }), + callback = nes_update, + }) + + -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - return vim.lsp.inline_completion.get() + if vim.b.nes_state then + local nes = require("copilot-lsp.nes") + + -- Try to jump to the start of the suggestion edit. + if nes.walk_cursor_start_edit() then + return true + end + + -- apply the pending suggestion and jump to the end of the edit. + if nes.apply_pending_nes() then + nes.walk_cursor_end_edit() + nes_update() -- trigger new nes update after accept + return true + end + end + if vim.lsp.inline_completion.get() then + -- nes_update() -- ensure nes update is triggered after inline completion + return true + end end end, }, @@ -120,8 +156,41 @@ opts = { setup = { copilot = function() vim.lsp.inline_completion.enable() + + -- Only trigger NES updates: + -- * when leaving insert mode + -- * when text is changed (in normal mode) + -- * when accepting a next edit suggestion + local nes_update = Snacks.util.debounce(function() + return vim.g.copilot_nes and require("copilot-lsp.nes").request_nes("copilot") + end, { ms = 100 }) + + vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { + group = vim.api.nvim_create_augroup("lazyvim.copilot-native.complete", { clear = true }), + callback = nes_update, + }) + + -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - return vim.lsp.inline_completion.get() + if vim.b.nes_state then + local nes = require("copilot-lsp.nes") + + -- Try to jump to the start of the suggestion edit. + if nes.walk_cursor_start_edit() then + return true + end + + -- apply the pending suggestion and jump to the end of the edit. + if nes.apply_pending_nes() then + nes.walk_cursor_end_edit() + nes_update() -- trigger new nes update after accept + return true + end + end + if vim.lsp.inline_completion.get() then + -- nes_update() -- ensure nes update is triggered after inline completion + return true + end end end, }, From 602c8009d3d9f9875d19896e977f65518fd0543c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Sep 2025 05:19:37 +0000 Subject: [PATCH 050/103] chore(build): auto-generate docs --- docs/plugins/colorscheme.md | 46 +++++++++++++++---------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index ae7751596f..4edf96b084 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -63,6 +63,14 @@ opts = { style = "moon" } ```lua opts = { + lsp_styles = { + underlines = { + errors = { "undercurl" }, + hints = { "undercurl" }, + warnings = { "undercurl" }, + information = { "undercurl" }, + }, + }, integrations = { aerial = true, alpha = true, @@ -78,26 +86,14 @@ opts = { leap = true, lsp_trouble = true, mason = true, - markdown = true, mini = true, - native_lsp = { - enabled = true, - underlines = { - errors = { "undercurl" }, - hints = { "undercurl" }, - warnings = { "undercurl" }, - information = { "undercurl" }, - }, - }, navic = { enabled = true, custom_bg = "lualine" }, neotest = true, neotree = true, noice = true, notify = true, - semantic_tokens = true, snacks = true, telescope = true, - treesitter = true, treesitter_context = true, which_key = true, }, @@ -115,6 +111,14 @@ opts = { lazy = true, name = "catppuccin", opts = { + lsp_styles = { + underlines = { + errors = { "undercurl" }, + hints = { "undercurl" }, + warnings = { "undercurl" }, + information = { "undercurl" }, + }, + }, integrations = { aerial = true, alpha = true, @@ -130,26 +134,14 @@ opts = { leap = true, lsp_trouble = true, mason = true, - markdown = true, mini = true, - native_lsp = { - enabled = true, - underlines = { - errors = { "undercurl" }, - hints = { "undercurl" }, - warnings = { "undercurl" }, - information = { "undercurl" }, - }, - }, navic = { enabled = true, custom_bg = "lualine" }, neotest = true, neotree = true, noice = true, notify = true, - semantic_tokens = true, snacks = true, telescope = true, - treesitter = true, treesitter_context = true, which_key = true, }, @@ -160,7 +152,7 @@ opts = { optional = true, opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() + opts.highlights = require("catppuccin.special.bufferline").get_theme() end end, }, @@ -181,7 +173,7 @@ opts = { ```lua opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() + opts.highlights = require("catppuccin.special.bufferline").get_theme() end end ``` @@ -197,7 +189,7 @@ end optional = true, opts = function(_, opts) if (vim.g.colors_name or ""):find("catppuccin") then - opts.highlights = require("catppuccin.groups.integrations.bufferline").get_theme() + opts.highlights = require("catppuccin.special.bufferline").get_theme() end end, } From c260a07026a330e010aa19fc9c66cdbcd09d9568 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Sep 2025 10:21:58 +0000 Subject: [PATCH 051/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-native.md | 59 -------------------------------- 1 file changed, 59 deletions(-) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index ea7d7a7999..18a49e2b44 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -14,9 +14,6 @@ Additional options for this extra can be configured in your [lua/config/options. ```lua title="lua/config/options.lua" -- Native inline completions don't support being shown as regular completions vim.g.ai_cmp = false - --- Set to `true` in your `options.lua` to enable experimental support for Next Edit Suggestions -vim.g.copilot_nes = false ``` Below you can find a list of included plugins and their default settings. @@ -74,36 +71,8 @@ opts = { copilot = function() vim.lsp.inline_completion.enable() - -- Only trigger NES updates: - -- * when leaving insert mode - -- * when text is changed (in normal mode) - -- * when accepting a next edit suggestion - local nes_update = Snacks.util.debounce(function() - return vim.g.copilot_nes and require("copilot-lsp.nes").request_nes("copilot") - end, { ms = 100 }) - - vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { - group = vim.api.nvim_create_augroup("lazyvim.copilot-native.complete", { clear = true }), - callback = nes_update, - }) - -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - if vim.b.nes_state then - local nes = require("copilot-lsp.nes") - - -- Try to jump to the start of the suggestion edit. - if nes.walk_cursor_start_edit() then - return true - end - - -- apply the pending suggestion and jump to the end of the edit. - if nes.apply_pending_nes() then - nes.walk_cursor_end_edit() - nes_update() -- trigger new nes update after accept - return true - end - end if vim.lsp.inline_completion.get() then -- nes_update() -- ensure nes update is triggered after inline completion return true @@ -157,36 +126,8 @@ opts = { copilot = function() vim.lsp.inline_completion.enable() - -- Only trigger NES updates: - -- * when leaving insert mode - -- * when text is changed (in normal mode) - -- * when accepting a next edit suggestion - local nes_update = Snacks.util.debounce(function() - return vim.g.copilot_nes and require("copilot-lsp.nes").request_nes("copilot") - end, { ms = 100 }) - - vim.api.nvim_create_autocmd({ "InsertLeave", "TextChanged" }, { - group = vim.api.nvim_create_augroup("lazyvim.copilot-native.complete", { clear = true }), - callback = nes_update, - }) - -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - if vim.b.nes_state then - local nes = require("copilot-lsp.nes") - - -- Try to jump to the start of the suggestion edit. - if nes.walk_cursor_start_edit() then - return true - end - - -- apply the pending suggestion and jump to the end of the edit. - if nes.apply_pending_nes() then - nes.walk_cursor_end_edit() - nes_update() -- trigger new nes update after accept - return true - end - end if vim.lsp.inline_completion.get() then -- nes_update() -- ensure nes update is triggered after inline completion return true From 305a2dbc7849480fc7e5358071849e1df9f3755b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 26 Sep 2025 14:18:48 +0000 Subject: [PATCH 052/103] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/extras/ai/copilot-native.md | 72 ++++++++++++++++++-------------- docs/extras/ai/copilot.md | 39 +++++++++++++++++ docs/extras/coding/blink.md | 4 +- docs/extras/coding/nvim-cmp.md | 4 +- 5 files changed, 83 insertions(+), 37 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index e10c823d57..fe40d21fbb 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -241,7 +241,6 @@ map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) map({ "i", "n", "s" }, "", function() vim.cmd("noh") LazyVim.cmp.actions.snippet_stop() - LazyVim.cmp.actions.ai_stop() return "" end, { expr = true, desc = "Escape and Clear hlsearch" }) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index 18a49e2b44..bd6b58b7dc 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -39,17 +39,6 @@ import TabItem from '@theme/TabItem'; opts = { servers = { copilot = { - handlers = { - didChangeStatus = function(err, res, ctx) - if err then - return - end - status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" - if res.status == "Error" then - LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") - end - end, - }, -- stylua: ignore keys = { { @@ -70,13 +59,25 @@ opts = { setup = { copilot = function() vim.lsp.inline_completion.enable() - -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - if vim.lsp.inline_completion.get() then - -- nes_update() -- ensure nes update is triggered after inline completion - return true - end + return vim.lsp.inline_completion.get() + end + + if not LazyVim.has_extra("ai.sidekick") then + vim.lsp.config("copilot", { + handlers = { + didChangeStatus = function(err, res, ctx) + if err then + return + end + status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" + if res.status == "Error" then + LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") + end + end, + }, + }) end end, }, @@ -94,17 +95,6 @@ opts = { opts = { servers = { copilot = { - handlers = { - didChangeStatus = function(err, res, ctx) - if err then - return - end - status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" - if res.status == "Error" then - LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") - end - end, - }, -- stylua: ignore keys = { { @@ -125,13 +115,25 @@ opts = { setup = { copilot = function() vim.lsp.inline_completion.enable() - -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() - if vim.lsp.inline_completion.get() then - -- nes_update() -- ensure nes update is triggered after inline completion - return true - end + return vim.lsp.inline_completion.get() + end + + if not LazyVim.has_extra("ai.sidekick") then + vim.lsp.config("copilot", { + handlers = { + didChangeStatus = function(err, res, ctx) + if err then + return + end + status[ctx.client_id] = res.kind ~= "Normal" and "error" or res.busy and "pending" or "ok" + if res.status == "Error" then + LazyVim.error("Please use `:LspCopilotSignIn` to sign in to Copilot") + end + end, + }, + }) end end, }, @@ -154,6 +156,9 @@ opts = { ```lua opts = function(_, opts) + if LazyVim.has_extra("ai.sidekick") then + return + end table.insert( opts.sections.lualine_x, 2, @@ -176,6 +181,9 @@ end optional = true, event = "VeryLazy", opts = function(_, opts) + if LazyVim.has_extra("ai.sidekick") then + return + end table.insert( opts.sections.lualine_x, 2, diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 5ba17c6e6e..5a1b5a4376 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -81,6 +81,45 @@ opts = { +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + copilot-language-server + + + + + + +```lua +opts = { + servers = { + -- copilot.lua only works with its own copilot lsp server + copilot = { enabled = false }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + -- copilot.lua only works with its own copilot lsp server + copilot = { enabled = false }, + }, + }, +} +``` + + + + + ## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) add ai_accept action diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 9a8b01c20d..bab81cecbb 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -220,12 +220,12 @@ opts = { if opts.keymap.preset == "super-tab" then -- super-tab opts.keymap[""] = { require("blink.cmp.keymap.presets").get("super-tab")[""][1], - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }), "fallback", } else -- other presets opts.keymap[""] = { - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }), "fallback", } end diff --git a/docs/extras/coding/nvim-cmp.md b/docs/extras/coding/nvim-cmp.md index 0c25b2ab09..162e0be8da 100644 --- a/docs/extras/coding/nvim-cmp.md +++ b/docs/extras/coding/nvim-cmp.md @@ -55,7 +55,7 @@ opts = function() fallback() end, [""] = function(fallback) - return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + return LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }, fallback)() end, }), sources = cmp.config.sources({ @@ -149,7 +149,7 @@ end fallback() end, [""] = function(fallback) - return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + return LazyVim.cmp.map({ "snippet_forward", "ai_nes", "ai_accept" }, fallback)() end, }), sources = cmp.config.sources({ From 52d87a79bac24fd465bd4641f554f7746556bab1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Sep 2025 17:15:21 +0000 Subject: [PATCH 053/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 156 +++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 docs/extras/ai/sidekick.md diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md new file mode 100644 index 0000000000..51c5c6ff6a --- /dev/null +++ b/docs/extras/ai/sidekick.md @@ -0,0 +1,156 @@ +# `Sidekick` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + copilot-language-server + + + + + + +```lua +opts = { + servers = { + copilot = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + copilot = {}, + }, + }, +} +``` + + + + + +## [sidekick.nvim](https://github.com/folke/sidekick.nvim) + + + + + +```lua +opts = function() + -- Accept inline suggestions or next edits + LazyVim.cmp.actions.ai_nes = function() + local Nes = require("sidekick.nes") + if Nes.have() and (Nes.jump() or Nes.apply()) then + return true + end + end +end +``` + + + + + + +```lua +{ + "folke/sidekick.nvim", + opts = function() + -- Accept inline suggestions or next edits + LazyVim.cmp.actions.ai_nes = function() + local Nes = require("sidekick.nes") + if Nes.have() and (Nes.jump() or Nes.apply()) then + return true + end + end + end, + keys = { + -- nes is also useful in normal mode + { "", LazyVim.cmp.map({ "ai_nes" }, ""), mode = { "n" }, expr = true }, + }, +} +``` + + + + + +## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ + + lualine + + + + + + +```lua +opts = function(_, opts) + table.insert( + opts.sections.lualine_x, + 2, + LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local status = require("sidekick.status").get() + if status then + return status.kind == "Error" and "error" or status.busy and "pending" or "ok" + end + end) + ) +end +``` + + + + + + +```lua +{ + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + table.insert( + opts.sections.lualine_x, + 2, + LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local status = require("sidekick.status").get() + if status then + return status.kind == "Error" and "error" or status.busy and "pending" or "ok" + end + end) + ) + end, +} +``` + + + + + + From 0e255a2a6c23feb7523f47dec73003cbb88d11c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 27 Sep 2025 18:26:31 +0000 Subject: [PATCH 054/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 56 ++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 51c5c6ff6a..5484a90fa4 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -111,16 +111,26 @@ end ```lua opts = function(_, opts) - table.insert( - opts.sections.lualine_x, - 2, - LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local icons = { + Error = { " ", "DiagnosticError" }, + Inactive = { " ", "MsgArea" }, + Warning = { " ", "DiagnosticWarn" }, + Normal = { LazyVim.config.icons.kinds.Copilot, "Special" }, + } + table.insert(opts.sections.lualine_x, 2, { + function() local status = require("sidekick.status").get() - if status then - return status.kind == "Error" and "error" or status.busy and "pending" or "ok" - end - end) - ) + return status and vim.tbl_get(icons, status.kind, 1) + end, + cond = function() + return require("sidekick.status").get() ~= nil + end, + color = function() + local status = require("sidekick.status").get() + local hl = status and (status.busy and "DiagnosticWarn" or vim.tbl_get(icons, status.kind, 2)) + return { fg = Snacks.util.color(hl) } + end, + }) end ``` @@ -135,16 +145,26 @@ end optional = true, event = "VeryLazy", opts = function(_, opts) - table.insert( - opts.sections.lualine_x, - 2, - LazyVim.lualine.status(LazyVim.config.icons.kinds.Copilot, function() + local icons = { + Error = { " ", "DiagnosticError" }, + Inactive = { " ", "MsgArea" }, + Warning = { " ", "DiagnosticWarn" }, + Normal = { LazyVim.config.icons.kinds.Copilot, "Special" }, + } + table.insert(opts.sections.lualine_x, 2, { + function() + local status = require("sidekick.status").get() + return status and vim.tbl_get(icons, status.kind, 1) + end, + cond = function() + return require("sidekick.status").get() ~= nil + end, + color = function() local status = require("sidekick.status").get() - if status then - return status.kind == "Error" and "error" or status.busy and "pending" or "ok" - end - end) - ) + local hl = status and (status.busy and "DiagnosticWarn" or vim.tbl_get(icons, status.kind, 2)) + return { fg = Snacks.util.color(hl) } + end, + }) end, } ``` From f6df30128250a6ba54711e75766870293a182165 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Sep 2025 21:17:21 +0000 Subject: [PATCH 055/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 33 +++++++++++++++++++++++++++++++++ docs/keymaps.md | 11 +++++++++++ 2 files changed, 44 insertions(+) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 5484a90fa4..21d3f88db1 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -92,6 +92,39 @@ end keys = { -- nes is also useful in normal mode { "", LazyVim.cmp.map({ "ai_nes" }, ""), mode = { "n" }, expr = true }, + { "a", "", desc = "+ai", mode = { "n", "v" } }, + { + "aa", + function() + require("sidekick.cli").toggle() + end, + mode = { "n" }, + desc = "Sidekick Toggle", + }, + { + "as", + function() + require("sidekick.cli").select_tool() + end, + mode = { "n" }, + desc = "Sidekick Select Tool", + }, + { + "", + function() + require("sidekick.cli").focus() + end, + mode = { "n", "x", "i", "t" }, + desc = "Sidekick Switch Focus", + }, + { + "ap", + function() + require("sidekick.cli").select_prompt() + end, + desc = "Sidekick Ask Prompt", + mode = { "n", "v" }, + }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index e198a843e1..a403e5c6f2 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -301,6 +301,17 @@ Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | +## [sidekick.nvim](https://github.com/folke/sidekick.nvim.git) +Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>a | +ai | **n**, **v** | +| <leader>aa | Sidekick Toggle | **n** | +| <leader>ap | Sidekick Ask Prompt | **n**, **v** | +| <leader>as | Sidekick Select Tool | **n** | +| <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | + ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) From e8c167379492180621df57243b3f79863c953afa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 29 Sep 2025 22:17:00 +0000 Subject: [PATCH 056/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 4 ++-- docs/keymaps.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 21d3f88db1..8597e83499 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -102,12 +102,12 @@ end desc = "Sidekick Toggle", }, { - "as", + "an", function() require("sidekick.cli").select_tool() end, mode = { "n" }, - desc = "Sidekick Select Tool", + desc = "Sidekick New Tool", }, { "", diff --git a/docs/keymaps.md b/docs/keymaps.md index a403e5c6f2..ab3b5c7546 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -308,8 +308,8 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Sidekick Toggle | **n** | +| <leader>an | Sidekick New Tool | **n** | | <leader>ap | Sidekick Ask Prompt | **n**, **v** | -| <leader>as | Sidekick Select Tool | **n** | | <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) From 4a957839e7a94013a41254d085078cfc704d0ab7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Sep 2025 05:19:56 +0000 Subject: [PATCH 057/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-native.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index bd6b58b7dc..df4b61ece3 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -50,7 +50,7 @@ opts = { { "", function() vim.lsp.inline_completion.select({ count = -1 }) end, - desc = "Next Copilot Suggestion", + desc = "Prev Copilot Suggestion", mode = { "i", "n" }, }, }, @@ -106,7 +106,7 @@ opts = { { "", function() vim.lsp.inline_completion.select({ count = -1 }) end, - desc = "Next Copilot Suggestion", + desc = "Prev Copilot Suggestion", mode = { "i", "n" }, }, }, From d292895c2d1910517ed6d26e71cb4d176f9a389c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 30 Sep 2025 16:27:03 +0000 Subject: [PATCH 058/103] chore(build): auto-generate docs --- docs/plugins/lsp.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 3965d5ab36..2bc56ff488 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -101,6 +101,7 @@ opts = function() ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} ---@type table servers = { + stylua = { enabled = false }, lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason -- Use this to add any additional keymaps @@ -227,6 +228,7 @@ end ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} ---@type table servers = { + stylua = { enabled = false }, lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason -- Use this to add any additional keymaps From 729892834d70db57d0fc3e4dea73488e6c0a5698 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 Oct 2025 17:18:03 +0000 Subject: [PATCH 059/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-native.md | 8 ++++++-- docs/extras/ai/sidekick.md | 10 +++++----- docs/keymaps.md | 4 ++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/extras/ai/copilot-native.md b/docs/extras/ai/copilot-native.md index df4b61ece3..45bf519e40 100644 --- a/docs/extras/ai/copilot-native.md +++ b/docs/extras/ai/copilot-native.md @@ -58,7 +58,9 @@ opts = { }, setup = { copilot = function() - vim.lsp.inline_completion.enable() + vim.schedule(function() + vim.lsp.inline_completion.enable() + end) -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() return vim.lsp.inline_completion.get() @@ -114,7 +116,9 @@ opts = { }, setup = { copilot = function() - vim.lsp.inline_completion.enable() + vim.schedule(function() + vim.lsp.inline_completion.enable() + end) -- Accept inline suggestions or next edits LazyVim.cmp.actions.ai_accept = function() return vim.lsp.inline_completion.get() diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 8597e83499..55cad69a1e 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -102,12 +102,12 @@ end desc = "Sidekick Toggle", }, { - "an", + "as", function() - require("sidekick.cli").select_tool() + require("sidekick.cli").select() end, mode = { "n" }, - desc = "Sidekick New Tool", + desc = "Sidekick Select", }, { "", @@ -120,9 +120,9 @@ end { "ap", function() - require("sidekick.cli").select_prompt() + require("sidekick.cli").prompt() end, - desc = "Sidekick Ask Prompt", + desc = "Sidekick Prompt", mode = { "n", "v" }, }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index ab3b5c7546..0bff3dfe17 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -308,8 +308,8 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Sidekick Toggle | **n** | -| <leader>an | Sidekick New Tool | **n** | -| <leader>ap | Sidekick Ask Prompt | **n**, **v** | +| <leader>ap | Sidekick Prompt | **n**, **v** | +| <leader>as | Sidekick Select | **n** | | <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) From f14f9fe3b2e304204611b01864d406cd5c389baa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 1 Oct 2025 20:23:12 +0000 Subject: [PATCH 060/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 36 +++++++++++++++++------------------- docs/keymaps.md | 7 ++++--- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 55cad69a1e..327d97809e 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -89,42 +89,40 @@ end end end end, + -- stylua: ignore keys = { -- nes is also useful in normal mode { "", LazyVim.cmp.map({ "ai_nes" }, ""), mode = { "n" }, expr = true }, { "a", "", desc = "+ai", mode = { "n", "v" } }, { "aa", - function() - require("sidekick.cli").toggle() - end, - mode = { "n" }, - desc = "Sidekick Toggle", + function() require("sidekick.cli").toggle() end, + desc = "Sidekick Toggle CLI", }, { "as", - function() - require("sidekick.cli").select() - end, + function() require("sidekick.cli").select() end, mode = { "n" }, - desc = "Sidekick Select", + desc = "Sidekick Select CLI", }, { - "", - function() - require("sidekick.cli").focus() - end, - mode = { "n", "x", "i", "t" }, - desc = "Sidekick Switch Focus", + "as", + function() require("sidekick.cli").send() end, + mode = { "v" }, + desc = "Sidekick Send Visual Selection", }, { "ap", - function() - require("sidekick.cli").prompt() - end, - desc = "Sidekick Prompt", + function() require("sidekick.cli").prompt() end, + desc = "Sidekick Select Prompt", mode = { "n", "v" }, }, + { + "", + function() require("sidekick.cli").focus() end, + mode = { "n", "x", "i", "t" }, + desc = "Sidekick Switch Focus", + }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 0bff3dfe17..df25606ab9 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -307,9 +307,10 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | Key | Description | Mode | | --- | --- | --- | | <leader>a | +ai | **n**, **v** | -| <leader>aa | Sidekick Toggle | **n** | -| <leader>ap | Sidekick Prompt | **n**, **v** | -| <leader>as | Sidekick Select | **n** | +| <leader>aa | Sidekick Toggle CLI | **n** | +| <leader>ap | Sidekick Select Prompt | **n**, **v** | +| <leader>as | Sidekick Select CLI | **n** | +| <leader>as | Sidekick Send Visual Selection | **v** | | <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) From 57752e06efca15c4c972bf971cc15d04a856cc01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Oct 2025 17:16:04 +0000 Subject: [PATCH 061/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 27 ++++++++++++++++++++------- docs/keymaps.md | 8 +++++--- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 327d97809e..c9869155eb 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -102,20 +102,27 @@ end { "as", function() require("sidekick.cli").select() end, - mode = { "n" }, - desc = "Sidekick Select CLI", + -- Or to select only installed tools: + -- require("sidekick.cli").select({ filter = { installed = true } }) + desc = "Select CLI", }, { - "as", - function() require("sidekick.cli").send() end, - mode = { "v" }, - desc = "Sidekick Send Visual Selection", + "at", + function() require("sidekick.cli").send({ msg = "{this}" }) end, + mode = { "x", "n" }, + desc = "Send This", + }, + { + "av", + function() require("sidekick.cli").send({ msg = "{selection}" }) end, + mode = { "x" }, + desc = "Send Visual Selection", }, { "ap", function() require("sidekick.cli").prompt() end, + mode = { "n", "x" }, desc = "Sidekick Select Prompt", - mode = { "n", "v" }, }, { "", @@ -123,6 +130,12 @@ end mode = { "n", "x", "i", "t" }, desc = "Sidekick Switch Focus", }, + -- Example of a keybinding to open Claude directly + { + "ac", + function() require("sidekick.cli").toggle({ name = "claude", focus = true }) end, + desc = "Sidekick Claude Toggle", + }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index df25606ab9..bb07c785a4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -308,9 +308,11 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Sidekick Toggle CLI | **n** | -| <leader>ap | Sidekick Select Prompt | **n**, **v** | -| <leader>as | Sidekick Select CLI | **n** | -| <leader>as | Sidekick Send Visual Selection | **v** | +| <leader>ac | Sidekick Claude Toggle | **n** | +| <leader>ap | Sidekick Select Prompt | **n**, **x** | +| <leader>as | Select CLI | **n** | +| <leader>at | Send This | **n**, **x** | +| <leader>av | Send Visual Selection | **x** | | <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) From a6c70ddc7cc7dbc4c7fe97b946d2defb243c24f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 2 Oct 2025 19:15:42 +0000 Subject: [PATCH 062/103] chore(build): auto-generate docs --- docs/configuration/general.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index fe40d21fbb..746491e86a 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -312,10 +312,12 @@ end, { desc = "Format" }) -- diagnostic local diagnostic_goto = function(next, severity) - local go = next and vim.diagnostic.goto_next or vim.diagnostic.goto_prev - severity = severity and vim.diagnostic.severity[severity] or nil return function() - go({ severity = severity }) + vim.diagnostic.jump({ + count = (next and 1 or -1) * vim.v.count1, + severity = severity and vim.diagnostic.severity[severity] or nil, + float = true, + }) end end map("n", "cd", vim.diagnostic.open_float, { desc = "Line Diagnostics" }) From f20407cf04e1dbc2e597887da93d970ede91d211 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Oct 2025 22:19:21 +0000 Subject: [PATCH 063/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 23 +++++++++++------------ docs/keymaps.md | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index c9869155eb..2b0184f7ea 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -94,6 +94,12 @@ end -- nes is also useful in normal mode { "", LazyVim.cmp.map({ "ai_nes" }, ""), mode = { "n" }, expr = true }, { "a", "", desc = "+ai", mode = { "n", "v" } }, + { + "", + function() require("sidekick.cli").toggle() end, + desc = "Sidekick Toggle", + mode = { "n", "t", "i", "x" }, + }, { "aa", function() require("sidekick.cli").toggle() end, @@ -112,6 +118,11 @@ end mode = { "x", "n" }, desc = "Send This", }, + { + "af", + function() require("sidekick.cli").send({ msg = "{file}" }) end, + desc = "Send File", + }, { "av", function() require("sidekick.cli").send({ msg = "{selection}" }) end, @@ -124,18 +135,6 @@ end mode = { "n", "x" }, desc = "Sidekick Select Prompt", }, - { - "", - function() require("sidekick.cli").focus() end, - mode = { "n", "x", "i", "t" }, - desc = "Sidekick Switch Focus", - }, - -- Example of a keybinding to open Claude directly - { - "ac", - function() require("sidekick.cli").toggle({ name = "claude", focus = true }) end, - desc = "Sidekick Claude Toggle", - }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index bb07c785a4..fe09902a90 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -308,12 +308,12 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Sidekick Toggle CLI | **n** | -| <leader>ac | Sidekick Claude Toggle | **n** | +| <leader>af | Send File | **n** | | <leader>ap | Sidekick Select Prompt | **n**, **x** | | <leader>as | Select CLI | **n** | | <leader>at | Send This | **n**, **x** | | <leader>av | Send Visual Selection | **x** | -| <c-.> | Sidekick Switch Focus | **n**, **i**, **t**, **x** | +| <c-.> | Sidekick Toggle | **n**, **i**, **t**, **x** | ## [mini.surround](https://github.com/nvim-mini/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) From 21ac812f54bb93aeb8ec1009cf997ad3e836beea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Oct 2025 09:22:57 +0000 Subject: [PATCH 064/103] chore(build): auto-generate docs --- docs/configuration/index.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 45e8d55d8e..a7309f9f6f 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -67,7 +67,6 @@ return { neovim = false, }, -- icons used by other plugins - -- stylua: ignore icons = { misc = { dots = "󰇘", From 56558b6691cf9d3459701ce5f9d95ea758e9fafd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Oct 2025 12:44:43 +0000 Subject: [PATCH 065/103] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 18e76211f9..0eb0b66deb 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -194,17 +194,8 @@ opts = { require("render-markdown").setup(opts) Snacks.toggle({ name = "Render Markdown", - get = function() - return require("render-markdown.state").enabled - end, - set = function(enabled) - local m = require("render-markdown") - if enabled then - m.enable() - else - m.disable() - end - end, + get = require("render-markdown").get, + set = require("render-markdown").set, }):map("um") end, } From acebd6763b80453fb50ade42c1e94e7a7901d6ef Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Oct 2025 16:28:37 +0000 Subject: [PATCH 066/103] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index bab81cecbb..35ae2d4afe 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -85,7 +85,11 @@ opts = { cmdline = { enabled = true, - keymap = { preset = "cmdline" }, + keymap = { + preset = "cmdline", + [""] = false, + [""] = false, + }, completion = { list = { selection = { preselect = false } }, menu = { @@ -183,7 +187,11 @@ opts = { cmdline = { enabled = true, - keymap = { preset = "cmdline" }, + keymap = { + preset = "cmdline", + [""] = false, + [""] = false, + }, completion = { list = { selection = { preselect = false } }, menu = { From d7354034e6795262d24d57053d79bac67b800fb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 9 Oct 2025 20:23:37 +0000 Subject: [PATCH 067/103] chore(build): auto-generate docs --- docs/configuration/general.md | 8 ++------ docs/keymaps.md | 3 +-- docs/plugins/util.md | 4 ++++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 746491e86a..c53f3e9a58 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -381,12 +381,8 @@ map("n", "L", function() LazyVim.news.changelog() end, { desc = "LazyVim -- floating terminal map("n", "fT", function() Snacks.terminal() end, { desc = "Terminal (cwd)" }) map("n", "ft", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" }) -map("n", "", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" }) -map("n", "", function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" }) - --- Terminal Mappings -map("t", "", "close", { desc = "Hide Terminal" }) -map("t", "", "close", { desc = "which_key_ignore" }) +map({"n","t"}, "",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "Terminal (Root Dir)" }) +map({"n","t"}, "",function() Snacks.terminal(nil, { cwd = LazyVim.root() }) end, { desc = "which_key_ignore" }) -- windows map("n", "-", "s", { desc = "Split Window Below", remap = true }) diff --git a/docs/keymaps.md b/docs/keymaps.md index fe09902a90..2962d1d114 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -94,9 +94,8 @@ possible keymaps starting with ``. | <leader>L | LazyVim Changelog | **n** | | <leader>fT | Terminal (cwd) | **n** | | <leader>ft | Terminal (Root Dir) | **n** | -| <c-/> | Terminal (Root Dir) | **n** | +| <c-/> | Terminal (Root Dir) | **n**, **t** | | <c-_> | which_key_ignore | **n**, **t** | -| <C-/> | Hide Terminal | **t** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | | <leader>wd | Delete Window | **n** | diff --git a/docs/plugins/util.md b/docs/plugins/util.md index bf1079c175..8e207d5118 100644 --- a/docs/plugins/util.md +++ b/docs/plugins/util.md @@ -25,6 +25,8 @@ opts = { nav_j = { "", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" }, nav_k = { "", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" }, nav_l = { "", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" }, + hide_slash = { "", "hide", desc = "Hide Terminal", mode = { "t", "n" } }, + hide_underscore = { "", "hide", desc = "which_key_ignore", mode = { "t", "n" } }, }, }, }, @@ -49,6 +51,8 @@ opts = { nav_j = { "", term_nav("j"), desc = "Go to Lower Window", expr = true, mode = "t" }, nav_k = { "", term_nav("k"), desc = "Go to Upper Window", expr = true, mode = "t" }, nav_l = { "", term_nav("l"), desc = "Go to Right Window", expr = true, mode = "t" }, + hide_slash = { "", "hide", desc = "Hide Terminal", mode = { "t", "n" } }, + hide_underscore = { "", "hide", desc = "which_key_ignore", mode = { "t", "n" } }, }, }, }, From fa63ad985e6058fa56fc51f934ac89884b9118d3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 9 Oct 2025 23:32:52 +0200 Subject: [PATCH 068/103] fix(install): use fedora docker --- docs/installation.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 466c2b7991..253464b3e6 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -88,8 +88,9 @@ with [PowerShell](https://github.com/PowerShell/PowerShell) ```sh -docker run -w /root -it --rm alpine:edge sh -uelic ' - apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update +docker run -w /root -it --rm fedora:latest sh -uelic ' + dnf copr enable -y dejan/lazygit + dnf install -y git lazygit fd-find curl ripgrep tree-sitter-cli neovim git clone https://github.com/LazyVim/starter ~/.config/nvim cd ~/.config/nvim nvim From 6abb78009a4e493d321c37da099600fa03671f31 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Oct 2025 05:20:36 +0000 Subject: [PATCH 069/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index e45f07850a..59bd888543 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -19,9 +19,9 @@ import TabItem from '@theme/TabItem'; ```lua opts = { -- LazyVim config for treesitter - indent = { enable = true }, - highlight = { enable = true }, - folds = { enable = true }, + indent = { enable = true }, ---@type lazyvim.TSFeat + highlight = { enable = true }, ---@type lazyvim.TSFeat + folds = { enable = true }, ---@type lazyvim.TSFeat ensure_installed = { "bash", "c", @@ -75,12 +75,13 @@ opts = { event = { "LazyFile", "VeryLazy" }, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, + ---@alias lazyvim.TSFeat { enable?: boolean, disable?: string[] } ---@class lazyvim.TSConfig: TSConfig opts = { -- LazyVim config for treesitter - indent = { enable = true }, - highlight = { enable = true }, - folds = { enable = true }, + indent = { enable = true }, ---@type lazyvim.TSFeat + highlight = { enable = true }, ---@type lazyvim.TSFeat + folds = { enable = true }, ---@type lazyvim.TSFeat ensure_installed = { "bash", "c", @@ -153,22 +154,32 @@ opts = { vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("lazyvim_treesitter", { clear = true }), callback = function(ev) - if not LazyVim.treesitter.have(ev.match) then + local ft, lang = ev.match, vim.treesitter.language.get_lang(ev.match) + if not LazyVim.treesitter.have(ft) then return end + ---@param feat string + ---@param query string + local function enabled(feat, query) + local f = opts[feat] or {} ---@type lazyvim.TSFeat + return f.enable ~= false + and not vim.tbl_contains(f.disable or {}, lang) + and LazyVim.treesitter.have(ft, query) + end + -- highlighting - if vim.tbl_get(opts, "highlight", "enable") ~= false then + if enabled("highlight", "highlights") then pcall(vim.treesitter.start) end -- indents - if vim.tbl_get(opts, "indent", "enable") ~= false and LazyVim.treesitter.have(ev.match, "indents") then + if enabled("indent", "indents") then LazyVim.set_default("indentexpr", "v:lua.LazyVim.treesitter.indentexpr()") end -- folds - if vim.tbl_get(opts, "folds", "enable") ~= false and LazyVim.treesitter.have(ev.match, "folds") then + if enabled("folds", "folds") then if LazyVim.set_default("foldmethod", "expr") then LazyVim.set_default("foldexpr", "v:lua.LazyVim.treesitter.foldexpr()") end From bd103d8460e6483085ddc5caf02afa8da4fb6f7e Mon Sep 17 00:00:00 2001 From: Cristian Leonte Date: Fri, 10 Oct 2025 16:44:47 +0300 Subject: [PATCH 070/103] docs: added Ghostty terminal to requirements section (#163) --- docs/intro.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/intro.md b/docs/intro.md index aaa19e8bc9..fe77ec4658 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -39,6 +39,7 @@ to make it easy to customize and extend your config. - [wezterm](https://github.com/wez/wezterm) **_(Linux, Macos & Windows)_** - [alacritty](https://github.com/alacritty/alacritty) **_(Linux, Macos & Windows)_** - [iterm2](https://iterm2.com/) **_(Macos)_** + - [ghostty](https://ghostty.org/) **_(Linux, Macos & Windows)_** ## 🎓 Learn From 2af6803d6528abd4670013577a28fc74de37808c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Oct 2025 19:16:37 +0000 Subject: [PATCH 071/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 59bd888543..3a4d7afe18 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -164,7 +164,7 @@ opts = { local function enabled(feat, query) local f = opts[feat] or {} ---@type lazyvim.TSFeat return f.enable ~= false - and not vim.tbl_contains(f.disable or {}, lang) + and not (type(f.disable) == "table" and vim.tbl_contains(f.disable, lang)) and LazyVim.treesitter.have(ft, query) end From b7352e3c1387656d6e87248f3a7534049f10fe2e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Oct 2025 22:18:24 +0000 Subject: [PATCH 072/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 5 +++++ docs/keymaps.md | 1 + 2 files changed, 6 insertions(+) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 2b0184f7ea..d33c597536 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -112,6 +112,11 @@ end -- require("sidekick.cli").select({ filter = { installed = true } }) desc = "Select CLI", }, + { + "ad", + function() require("sidekick.cli").close() end, + desc = "Detach a CLI Session", + }, { "at", function() require("sidekick.cli").send({ msg = "{this}" }) end, diff --git a/docs/keymaps.md b/docs/keymaps.md index 2962d1d114..f25615371d 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -307,6 +307,7 @@ Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Sidekick Toggle CLI | **n** | +| <leader>ad | Detach a CLI Session | **n** | | <leader>af | Send File | **n** | | <leader>ap | Sidekick Select Prompt | **n**, **x** | | <leader>as | Select CLI | **n** | From cb133e26721de802d867f3470787aca3ac2b60fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 11 Oct 2025 06:27:53 +0000 Subject: [PATCH 073/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index d33c597536..71a137fa6e 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -27,11 +27,13 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { - servers = { - copilot = {}, - }, -} +opts = function(_, opts) + local sk = LazyVim.opts("sidekick.nvim") ---@type sidekick.Config|{} + if vim.tbl_get(sk, "nes", "enabled") ~= false then + opts.servers = opts.servers or {} + opts.servers.copilot = opts.servers.copilot or {} + end +end ``` @@ -42,11 +44,13 @@ opts = { ```lua { "neovim/nvim-lspconfig", - opts = { - servers = { - copilot = {}, - }, - }, + opts = function(_, opts) + local sk = LazyVim.opts("sidekick.nvim") ---@type sidekick.Config|{} + if vim.tbl_get(sk, "nes", "enabled") ~= false then + opts.servers = opts.servers or {} + opts.servers.copilot = opts.servers.copilot or {} + end + end, } ``` From b010c107d83cfb7be9015b5d939fff6d54748b13 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 Oct 2025 12:38:47 +0000 Subject: [PATCH 074/103] chore(build): auto-generate docs --- docs/extras/lang/ansible.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index f1aaab7d1d..d892f6c118 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -95,13 +95,14 @@ opts = nil ```lua { "mfussenegger/nvim-ansible", - ft = {}, + ft = { "yaml" }, keys = { { "ta", function() require("ansible").run() end, + ft = "yaml.ansible", desc = "Ansible Run Playbook/Role", silent = true, }, From 1e0d34605f65a8fe1834cfe5e1419d10fd1831f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Oct 2025 12:47:54 +0000 Subject: [PATCH 075/103] chore(build): auto-generate docs --- docs/extras/lang/gleam.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/extras/lang/gleam.md b/docs/extras/lang/gleam.md index 284f93f68b..ed1b62cb5f 100644 --- a/docs/extras/lang/gleam.md +++ b/docs/extras/lang/gleam.md @@ -77,4 +77,39 @@ opts = { +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + gleam = { "gleam" }, + }, +} +``` + + + + + + +```lua +{ + "conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + gleam = { "gleam" }, + }, + }, +} +``` + + + + + From c6f97bd58374850846e48df95ff62d1708a27078 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Oct 2025 07:21:52 +0000 Subject: [PATCH 076/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 3a4d7afe18..81cb58cf15 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -67,7 +67,7 @@ opts = { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end - LazyVim.treesitter.ensure_treesitter_cli(function() + LazyVim.treesitter.build(function() TS.update(nil, { summary = true }) end) end, @@ -113,6 +113,16 @@ opts = { config = function(_, opts) local TS = require("nvim-treesitter") + -- On Windows, use `gcc` if `cl` is not available, and `gcc` is. + if + not vim.env.CC + and vim.fn.has("win32") == 1 + and vim.fn.executable("cl") == 0 + and vim.fn.executable("gcc") == 1 + then + vim.env.CC = "gcc" + end + setmetatable(require("nvim-treesitter.install"), { __newindex = function(_, k) if k == "compilers" then @@ -144,7 +154,7 @@ opts = { return not LazyVim.treesitter.have(lang) end, opts.ensure_installed or {}) if #install > 0 then - LazyVim.treesitter.ensure_treesitter_cli(function() + LazyVim.treesitter.build(function() TS.install(install, { summary = true }):await(function() LazyVim.treesitter.get_installed(true) -- refresh the installed langs end) From 139a6e405880760ec5586c8d6cad1ae1c398f842 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Oct 2025 18:32:16 +0000 Subject: [PATCH 077/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 81cb58cf15..c8950f0402 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -113,16 +113,6 @@ opts = { config = function(_, opts) local TS = require("nvim-treesitter") - -- On Windows, use `gcc` if `cl` is not available, and `gcc` is. - if - not vim.env.CC - and vim.fn.has("win32") == 1 - and vim.fn.executable("cl") == 0 - and vim.fn.executable("gcc") == 1 - then - vim.env.CC = "gcc" - end - setmetatable(require("nvim-treesitter.install"), { __newindex = function(_, k) if k == "compilers" then From 34f56750f3ac946b06b9621605d634b840e266c0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Oct 2025 18:28:17 +0000 Subject: [PATCH 078/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 71a137fa6e..ebb4790eca 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -225,4 +225,67 @@ end +## [snacks.nvim](https://github.com/folke/snacks.nvim) _(optional)_ + + + + + +```lua +opts = { + picker = { + actions = { + sidekick_send = function(...) + return require("sidekick.cli.snacks").send(...) + end, + }, + win = { + input = { + keys = { + [""] = { + "sidekick_send", + mode = { "n", "i" }, + }, + }, + }, + }, + }, +} +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + optional = true, + opts = { + picker = { + actions = { + sidekick_send = function(...) + return require("sidekick.cli.snacks").send(...) + end, + }, + win = { + input = { + keys = { + [""] = { + "sidekick_send", + mode = { "n", "i" }, + }, + }, + }, + }, + }, + }, +} +``` + + + + + From 3afb2fa4675d3a3b37c8f0cbd6d2bb0a722ef56a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 Oct 2025 05:19:05 +0000 Subject: [PATCH 079/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index c8950f0402..aea9f2ff5a 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -67,6 +67,8 @@ opts = { LazyVim.error("Please restart Neovim and run `:TSUpdate` to use the `nvim-treesitter` **main** branch.") return end + -- make sure we're using the latest treesitter util + package.loaded["lazyvim.util.treesitter"] = nil LazyVim.treesitter.build(function() TS.update(nil, { summary = true }) end) From 2fb44d157ed4253ce882914473232db20eb79163 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 Oct 2025 14:17:14 +0000 Subject: [PATCH 080/103] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 53 +++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index aea9f2ff5a..29899e26f3 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -73,7 +73,6 @@ opts = { TS.update(nil, { summary = true }) end) end, - lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline event = { "LazyFile", "VeryLazy" }, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, opts_extend = { "ensure_installed" }, @@ -249,34 +248,40 @@ opts = { end TS.setup(opts) + local function attach(buf) + local ft = vim.bo[buf].filetype + if not (vim.tbl_get(opts, "move", "enable") and LazyVim.treesitter.have(ft, "textobjects")) then + return + end + ---@type table> + local moves = vim.tbl_get(opts, "move", "keys") or {} + + for method, keymaps in pairs(moves) do + for key, query in pairs(keymaps) do + local desc = query:gsub("@", ""):gsub("%..*", "") + desc = desc:sub(1, 1):upper() .. desc:sub(2) + desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc + desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") + if not (vim.wo.diff and key:find("[cC]")) then + vim.keymap.set({ "n", "x", "o" }, key, function() + require("nvim-treesitter-textobjects.move")[method](query, "textobjects") + end, { + buffer = buf, + desc = desc, + silent = true, + }) + end + end + end + end + vim.api.nvim_create_autocmd("FileType", { group = vim.api.nvim_create_augroup("lazyvim_treesitter_textobjects", { clear = true }), callback = function(ev) - if not (vim.tbl_get(opts, "move", "enable") and LazyVim.treesitter.have(ev.match, "textobjects")) then - return - end - ---@type table> - local moves = vim.tbl_get(opts, "move", "keys") or {} - - for method, keymaps in pairs(moves) do - for key, query in pairs(keymaps) do - local desc = query:gsub("@", ""):gsub("%..*", "") - desc = desc:sub(1, 1):upper() .. desc:sub(2) - desc = (key:sub(1, 1) == "[" and "Prev " or "Next ") .. desc - desc = desc .. (key:sub(2, 2) == key:sub(2, 2):upper() and " End" or " Start") - if not (vim.wo.diff and key:find("[cC]")) then - vim.keymap.set({ "n", "x", "o" }, key, function() - require("nvim-treesitter-textobjects.move")[method](query, "textobjects") - end, { - buffer = ev.buf, - desc = desc, - silent = true, - }) - end - end - end + attach(ev.buf) end, }) + vim.tbl_map(attach, vim.api.nvim_list_bufs()) end, } ``` From be0c78ffe2bfc2d75f17da1f26654590a594ecca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Oct 2025 06:30:19 +0000 Subject: [PATCH 081/103] chore(build): auto-generate docs --- docs/extras/ui/mini-animate.md | 44 ++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 023f0174b9..4712be29b2 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -79,15 +79,19 @@ opts = function(_, opts) end, }) - Snacks.toggle({ - name = "Mini Animate", - get = function() - return not vim.g.minianimate_disable - end, - set = function(state) - vim.g.minianimate_disable = not state - end, - }):map("ua") + -- schedule setting the mapping to override the default mapping from `keymaps.lua` + -- seems `keymaps.lua` is the last event to execute on `VeryLazy` and it overwrites it + vim.schedule(function() + Snacks.toggle({ + name = "Mini Animate", + get = function() + return not vim.g.minianimate_disable + end, + set = function(state) + vim.g.minianimate_disable = not state + end, + }):map("ua") + end) local animate = require("mini.animate") return vim.tbl_deep_extend("force", opts, { @@ -138,15 +142,19 @@ end end, }) - Snacks.toggle({ - name = "Mini Animate", - get = function() - return not vim.g.minianimate_disable - end, - set = function(state) - vim.g.minianimate_disable = not state - end, - }):map("ua") + -- schedule setting the mapping to override the default mapping from `keymaps.lua` + -- seems `keymaps.lua` is the last event to execute on `VeryLazy` and it overwrites it + vim.schedule(function() + Snacks.toggle({ + name = "Mini Animate", + get = function() + return not vim.g.minianimate_disable + end, + set = function(state) + vim.g.minianimate_disable = not state + end, + }):map("ua") + end) local animate = require("mini.animate") return vim.tbl_deep_extend("force", opts, { From 21e1531da6a2836270b2e7627aa5f6a58af794dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Oct 2025 10:19:40 +0000 Subject: [PATCH 082/103] chore(build): auto-generate docs --- docs/extras/util/rest.md | 1 + docs/keymaps.md | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md index 1db866b989..fb8b9821d8 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -41,6 +41,7 @@ opts = {} { "Rb", "lua require('kulala').scratchpad()", desc = "Open scratchpad", ft = "http" }, { "Rc", "lua require('kulala').copy()", desc = "Copy as cURL", ft = "http" }, { "RC", "lua require('kulala').from_curl()", desc = "Paste from curl", ft = "http" }, + { "Re", "lua require('kulala').set_selected_env()", desc = "Set environment", ft = "http" }, { "Rg", "lua require('kulala').download_graphql_schema()", diff --git a/docs/keymaps.md b/docs/keymaps.md index f25615371d..5dda2c789b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -707,6 +707,7 @@ Part of [lazyvim.plugins.extras.util.rest](/extras/util/rest) | <leader>Rb | Open scratchpad | **n** | | <leader>Rc | Copy as cURL | **n** | | <leader>RC | Paste from curl | **n** | +| <leader>Re | Set environment | **n** | | <leader>Rg | Download GraphQL schema | **n** | | <leader>Ri | Inspect current request | **n** | | <leader>Rn | Jump to next request | **n** | From 281a9840d16fa40ce53f1eb9233d94dfe9308eaf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Oct 2025 11:15:21 +0000 Subject: [PATCH 083/103] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 14 ++++++++++---- docs/extras/coding/blink.md | 8 ++------ docs/extras/coding/mini-snippets.md | 2 +- docs/extras/lang/clangd.md | 4 ++-- docs/extras/lang/java.md | 4 +++- docs/extras/lang/omnisharp.md | 26 +++++++------------------- docs/extras/lang/python.md | 12 ++---------- docs/extras/lang/rust.md | 20 ++++++++------------ docs/extras/lang/tex.md | 4 ++-- docs/extras/lang/typescript.md | 6 ++++-- docs/extras/test/core.md | 1 + docs/extras/ui/mini-indentscope.md | 3 ++- docs/extras/util/rest.md | 6 +++--- docs/keymaps.md | 1 + 14 files changed, 48 insertions(+), 63 deletions(-) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index e0a7c39cc5..2a427ed5a2 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -29,8 +29,11 @@ opts = function() user = user:sub(1, 1):upper() .. user:sub(2) return { auto_insert_mode = true, - question_header = " " .. user .. " ", - answer_header = " Copilot ", + headers = { + user = " " .. user .. " ", + assistant = " Copilot ", + tool = "󰊳 Tool ", + }, window = { width = 0.4, }, @@ -53,8 +56,11 @@ end user = user:sub(1, 1):upper() .. user:sub(2) return { auto_insert_mode = true, - question_header = " " .. user .. " ", - answer_header = " Copilot ", + headers = { + user = " " .. user .. " ", + assistant = " Copilot ", + tool = "󰊳 Tool ", + }, window = { width = 0.4, }, diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 35ae2d4afe..bdef1f15eb 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -37,9 +37,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { snippets = { - expand = function(snippet, _) - return LazyVim.cmp.expand(snippet) - end, + preset = "default", }, appearance = { @@ -139,9 +137,7 @@ opts = { ---@type blink.cmp.Config opts = { snippets = { - expand = function(snippet, _) - return LazyVim.cmp.expand(snippet) - end, + preset = "default", }, appearance = { diff --git a/docs/extras/coding/mini-snippets.md b/docs/extras/coding/mini-snippets.md index 1dedddda55..5a5c70d48b 100644 --- a/docs/extras/coding/mini-snippets.md +++ b/docs/extras/coding/mini-snippets.md @@ -13,7 +13,7 @@ Additional options for this extra can be configured in your [lua/config/options. ```lua title="lua/config/options.lua" -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows --- Motivation: Less clutter in completion windows and a more direct usage of snippits +-- Motivation: Less clutter in completion windows and a more direct usage of snippets vim.g.lazyvim_mini_snippets_in_completion = true -- NOTE: Please also read: diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 442ef4d901..65014a9ce8 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -137,7 +137,7 @@ opts = { -- Ensure mason installs the server clangd = { keys = { - { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, + { "ch", "LspClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { "compile_commands.json", @@ -194,7 +194,7 @@ opts = { -- Ensure mason installs the server clangd = { keys = { - { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, + { "ch", "LspClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { "compile_commands.json", diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 9d4f003081..9722fb554f 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -288,7 +288,9 @@ end }, settings = opts.settings, -- enable CMP capabilities - capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil, + capabilities = LazyVim.has("blink.cmp") and require("blink.cmp").get_lsp_capabilities() or LazyVim.has( + "cmp-nvim-lsp" + ) and require("cmp_nvim_lsp").default_capabilities() or nil, }, opts.jdtls) -- Existing server will be reused if the root_dir matches. diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index a136c3de28..0b733866d5 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -166,7 +166,7 @@ opts = { -## [neotest-dotnet](https://github.com/Issafalcon/neotest-dotnet) +## [neotest-vstest](https://github.com/Nsidorenco/neotest-vstest) @@ -183,7 +183,7 @@ opts = nil ```lua { - "Issafalcon/neotest-dotnet", + "Nsidorenco/neotest-vstest", } ``` @@ -237,12 +237,6 @@ opts = { formatters_by_ft = { cs = { "csharpier" }, }, - formatters = { - csharpier = { - command = "dotnet-csharpier", - args = { "--write-stdout" }, - }, - }, } ``` @@ -259,12 +253,6 @@ opts = { formatters_by_ft = { cs = { "csharpier" }, }, - formatters = { - csharpier = { - command = "dotnet-csharpier", - args = { "--write-stdout" }, - }, - }, }, } ``` @@ -365,8 +353,8 @@ end ```lua opts = { adapters = { - ["neotest-dotnet"] = { - -- Here we can set options for neotest-dotnet + ["neotest-vstest"] = { + -- Here we can set options for neotest-vstest }, }, } @@ -382,12 +370,12 @@ opts = { "nvim-neotest/neotest", optional = true, dependencies = { - "Issafalcon/neotest-dotnet", + "Nsidorenco/neotest-vstest", }, opts = { adapters = { - ["neotest-dotnet"] = { - -- Here we can set options for neotest-dotnet + ["neotest-vstest"] = { + -- Here we can set options for neotest-vstest }, }, }, diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 181e096d38..293afdf995 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -238,11 +238,7 @@ opts = {} { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - if vim.fn.has("win32") == 1 then - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/pythonw.exe")) - else - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) - end + require("dap-python").setup("debugpy-adapter") end, } ``` @@ -362,11 +358,7 @@ opts = nil { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - if vim.fn.has("win32") == 1 then - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/pythonw.exe")) - else - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) - end + require("dap-python").setup("debugpy-adapter") end, }, } diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 589654b997..aad3506764 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -147,16 +147,12 @@ opts = { }, procMacro = { enable = true, - ignored = { - ["async-trait"] = { "async_trait" }, - ["napi-derive"] = { "napi" }, - ["async-recursion"] = { "async_recursion" }, - }, }, files = { - excludeDirs = { + exclude = { ".direnv", ".git", + ".jj", ".github", ".gitlab", "bin", @@ -165,6 +161,8 @@ opts = { "venv", ".venv", }, + -- Avoid Roots Scanned hanging, see https://github.com/rust-lang/rust-analyzer/issues/12613#issuecomment-2096386344 + watcher = "client", }, }, }, @@ -209,16 +207,12 @@ opts = { }, procMacro = { enable = true, - ignored = { - ["async-trait"] = { "async_trait" }, - ["napi-derive"] = { "napi" }, - ["async-recursion"] = { "async_recursion" }, - }, }, files = { - excludeDirs = { + exclude = { ".direnv", ".git", + ".jj", ".github", ".gitlab", "bin", @@ -227,6 +221,8 @@ opts = { "venv", ".venv", }, + -- Avoid Roots Scanned hanging, see https://github.com/rust-lang/rust-analyzer/issues/12613#issuecomment-2096386344 + watcher = "client", }, }, }, diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index cdf44203aa..76a406b459 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -30,7 +30,7 @@ import TabItem from '@theme/TabItem'; opts = function(_, opts) opts.highlight = opts.highlight or {} if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "bibtex" }) + vim.list_extend(opts.ensure_installed, { "bibtex", "latex" }) end if type(opts.highlight.disable) == "table" then vim.list_extend(opts.highlight.disable, { "latex" }) @@ -51,7 +51,7 @@ end opts = function(_, opts) opts.highlight = opts.highlight or {} if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "bibtex" }) + vim.list_extend(opts.ensure_installed, { "bibtex", "latex" }) end if type(opts.highlight.disable) == "table" then vim.list_extend(opts.highlight.disable, { "latex" }) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 755dff1beb..41f97bf66f 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -80,7 +80,8 @@ opts = { { "gD", function() - local params = vim.lsp.util.make_position_params() + local win = vim.api.nvim_get_current_win() + local params = vim.lsp.util.make_position_params(win, "utf-16") LazyVim.lsp.execute({ command = "typescript.goToSourceDefinition", arguments = { params.textDocument.uri, params.position }, @@ -283,7 +284,8 @@ opts = { { "gD", function() - local params = vim.lsp.util.make_position_params() + local win = vim.api.nvim_get_current_win() + local params = vim.lsp.util.make_position_params(win, "utf-16") LazyVim.lsp.execute({ command = "typescript.goToSourceDefinition", arguments = { params.textDocument.uri, params.position }, diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 7c3f060cbb..ab6e7c9847 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -176,6 +176,7 @@ opts = { -- stylua: ignore keys = { {"t", "", desc = "+test"}, + { "ta", function() require("neotest").run.attach() end, desc = "Attach to Test (Neotest)" }, { "tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" }, { "tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files (Neotest)" }, { "tr", function() require("neotest").run.run() end, desc = "Run Nearest (Neotest)" }, diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index f8810aec93..084917e5f9 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -63,6 +63,7 @@ opts = { "mason", "neo-tree", "notify", + "sidekick_terminal", "snacks_dashboard", "snacks_notif", "snacks_terminal", @@ -128,7 +129,7 @@ opts = { ## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) _(optional)_ - disable inent-blankline scope when mini-indentscope is enabled + disable indent-blankline scope when mini-indentscope is enabled diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md index fb8b9821d8..b828adc996 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -37,8 +37,8 @@ opts = {} "mistweaverco/kulala.nvim", ft = "http", keys = { - { "R", "", desc = "+Rest", ft = "http" }, - { "Rb", "lua require('kulala').scratchpad()", desc = "Open scratchpad", ft = "http" }, + { "R", "", desc = "+Rest" }, + { "Rb", "lua require('kulala').scratchpad()", desc = "Open scratchpad" }, { "Rc", "lua require('kulala').copy()", desc = "Copy as cURL", ft = "http" }, { "RC", "lua require('kulala').from_curl()", desc = "Paste from curl", ft = "http" }, { "Re", "lua require('kulala').set_selected_env()", desc = "Set environment", ft = "http" }, @@ -52,7 +52,7 @@ opts = {} { "Rn", "lua require('kulala').jump_next()", desc = "Jump to next request", ft = "http" }, { "Rp", "lua require('kulala').jump_prev()", desc = "Jump to previous request", ft = "http" }, { "Rq", "lua require('kulala').close()", desc = "Close window", ft = "http" }, - { "Rr", "lua require('kulala').replay()", desc = "Replay the last request", ft = "http" }, + { "Rr", "lua require('kulala').replay()", desc = "Replay the last request" }, { "Rs", "lua require('kulala').run()", desc = "Send the request", ft = "http" }, { "RS", "lua require('kulala').show_stats()", desc = "Show stats", ft = "http" }, { "Rt", "lua require('kulala').toggle_view()", desc = "Toggle headers/body", ft = "http" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 5dda2c789b..1a3ff6085d 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -622,6 +622,7 @@ Part of [lazyvim.plugins.extras.test.core](/extras/test/core) | Key | Description | Mode | | --- | --- | --- | | <leader>t | +test | **n** | +| <leader>ta | Attach to Test (Neotest) | **n** | | <leader>tl | Run Last (Neotest) | **n** | | <leader>to | Show Output (Neotest) | **n** | | <leader>tO | Toggle Output Panel (Neotest) | **n** | From 193c35f13ac24652511c2fce3079742d592db893 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Oct 2025 21:17:33 +0000 Subject: [PATCH 084/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index ebb4790eca..9deb6f8836 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -183,6 +183,19 @@ opts = function(_, opts) return { fg = Snacks.util.color(hl) } end, }) + + table.insert(opts.sections.lualine_x, 2, { + function() + local status = require("sidekick.status").cli() + return " " .. (#status > 1 and #status or "") + end, + cond = function() + return #require("sidekick.status").cli() > 0 + end, + color = function() + return { fg = Snacks.util.color("Special") } + end, + }) end ``` @@ -217,6 +230,19 @@ end return { fg = Snacks.util.color(hl) } end, }) + + table.insert(opts.sections.lualine_x, 2, { + function() + local status = require("sidekick.status").cli() + return " " .. (#status > 1 and #status or "") + end, + cond = function() + return #require("sidekick.status").cli() > 0 + end, + color = function() + return { fg = Snacks.util.color("Special") } + end, + }) end, } ``` @@ -236,7 +262,7 @@ opts = { picker = { actions = { sidekick_send = function(...) - return require("sidekick.cli.snacks").send(...) + return require("sidekick.cli.picker.snacks").send(...) end, }, win = { @@ -266,7 +292,7 @@ opts = { picker = { actions = { sidekick_send = function(...) - return require("sidekick.cli.snacks").send(...) + return require("sidekick.cli.picker.snacks").send(...) end, }, win = { From d1cfb4df486acbe635bbf6014b2d7ff69a7c79bf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 05:21:50 +0000 Subject: [PATCH 085/103] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 11 +++++--- docs/extras/editor/telescope.md | 10 ++++--- docs/extras/lang/nix.md | 35 ++++++++++++++++++++++++ docs/extras/lang/typescript.md | 48 +++++++++++++++++++++++++++++++++ 4 files changed, 98 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index bccd92f3ea..2701c35766 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -354,6 +354,7 @@ end { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { "fB", "FzfLua buffers", desc = "Buffers (all)" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, @@ -362,15 +363,19 @@ end { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, -- git { "gc", "FzfLua git_commits", desc = "Commits" }, + { "gd", "FzfLua git_diff", desc = "Git Diff (hunks)" }, + { "gl", "FzfLua git_commits", desc = "Commits" }, { "gs", "FzfLua git_status", desc = "Status" }, + { "gS", "FzfLua git_stash", desc = "Git Stash" }, -- search { 's"', "FzfLua registers", desc = "Registers" }, + { 's/', "FzfLua search_history", desc = "Search History" }, { "sa", "FzfLua autocmds", desc = "Auto Commands" }, - { "sb", "FzfLua grep_curbuf", desc = "Buffer" }, + { "sb", "FzfLua lines", desc = "Buffer Lines" }, { "sc", "FzfLua command_history", desc = "Command History" }, { "sC", "FzfLua commands", desc = "Commands" }, - { "sd", "FzfLua diagnostics_document", desc = "Document Diagnostics" }, - { "sD", "FzfLua diagnostics_workspace", desc = "Workspace Diagnostics" }, + { "sd", "FzfLua diagnostics_workspace", desc = "Diagnostics" }, + { "sD", "FzfLua diagnostics_document", desc = "Buffer Diagnostics" }, { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, { "sh", "FzfLua help_tags", desc = "Help Pages" }, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index a8f06c8a7f..f68f4a6b62 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -163,6 +163,7 @@ end "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", desc = "Buffers", }, + { "fB", "Telescope buffers", desc = "Buffers (all)" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, @@ -171,15 +172,18 @@ end { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, -- git { "gc", "Telescope git_commits", desc = "Commits" }, + { "gl", "Telescope git_commits", desc = "Commits" }, { "gs", "Telescope git_status", desc = "Status" }, + { "gS", "Telescope git_stash", desc = "Git Stash" }, -- search { 's"', "Telescope registers", desc = "Registers" }, + { 's/', "Telescope search_history", desc = "Search History" }, { "sa", "Telescope autocommands", desc = "Auto Commands" }, - { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, + { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer Lines" }, { "sc", "Telescope command_history", desc = "Command History" }, { "sC", "Telescope commands", desc = "Commands" }, - { "sd", "Telescope diagnostics bufnr=0", desc = "Document Diagnostics" }, - { "sD", "Telescope diagnostics", desc = "Workspace Diagnostics" }, + { "sd", "Telescope diagnostics", desc = "Diagnostics" }, + { "sD", "Telescope diagnostics bufnr=0", desc = "Buffer Diagnostics" }, { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, { "sh", "Telescope help_tags", desc = "Help Pages" }, diff --git a/docs/extras/lang/nix.md b/docs/extras/lang/nix.md index a4087d1307..672c4053d5 100644 --- a/docs/extras/lang/nix.md +++ b/docs/extras/lang/nix.md @@ -112,4 +112,39 @@ opts = { +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + + + + +```lua +opts = { + linters_by_ft = { + nix = { "statix" }, + }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + nix = { "statix" }, + }, + }, +} +``` + + + + + diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 41f97bf66f..b829df4299 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -563,6 +563,10 @@ opts = function() for _, language in ipairs(js_filetypes) do if not dap.configurations[language] then + local runtimeExecutable = nil + if language:find("typescript") then + runtimeExecutable = vim.fn.executable("tsx") == 1 and "tsx" or "ts-node" + end dap.configurations[language] = { { type = "pwa-node", @@ -570,6 +574,16 @@ opts = function() name = "Launch file", program = "${file}", cwd = "${workspaceFolder}", + sourceMaps = true, + runtimeExecutable = runtimeExecutable, + skipFiles = { + "/**", + "node_modules/**", + }, + resolveSourceMapLocations = { + "${workspaceFolder}/**", + "!**/node_modules/**", + }, }, { type = "pwa-node", @@ -577,6 +591,16 @@ opts = function() name = "Attach", processId = require("dap.utils").pick_process, cwd = "${workspaceFolder}", + sourceMaps = true, + runtimeExecutable = runtimeExecutable, + skipFiles = { + "/**", + "node_modules/**", + }, + resolveSourceMapLocations = { + "${workspaceFolder}/**", + "!**/node_modules/**", + }, }, } end @@ -641,6 +665,10 @@ end for _, language in ipairs(js_filetypes) do if not dap.configurations[language] then + local runtimeExecutable = nil + if language:find("typescript") then + runtimeExecutable = vim.fn.executable("tsx") == 1 and "tsx" or "ts-node" + end dap.configurations[language] = { { type = "pwa-node", @@ -648,6 +676,16 @@ end name = "Launch file", program = "${file}", cwd = "${workspaceFolder}", + sourceMaps = true, + runtimeExecutable = runtimeExecutable, + skipFiles = { + "/**", + "node_modules/**", + }, + resolveSourceMapLocations = { + "${workspaceFolder}/**", + "!**/node_modules/**", + }, }, { type = "pwa-node", @@ -655,6 +693,16 @@ end name = "Attach", processId = require("dap.utils").pick_process, cwd = "${workspaceFolder}", + sourceMaps = true, + runtimeExecutable = runtimeExecutable, + skipFiles = { + "/**", + "node_modules/**", + }, + resolveSourceMapLocations = { + "${workspaceFolder}/**", + "!**/node_modules/**", + }, }, } end From c4f781ec98b62e48860b742a8875104058b75e92 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 06:33:30 +0000 Subject: [PATCH 086/103] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 2 +- docs/extras/editor/telescope.md | 2 +- docs/extras/lang/omnisharp.md | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 2701c35766..a1ff980565 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -369,7 +369,7 @@ end { "gS", "FzfLua git_stash", desc = "Git Stash" }, -- search { 's"', "FzfLua registers", desc = "Registers" }, - { 's/', "FzfLua search_history", desc = "Search History" }, + { "s/", "FzfLua search_history", desc = "Search History" }, { "sa", "FzfLua autocmds", desc = "Auto Commands" }, { "sb", "FzfLua lines", desc = "Buffer Lines" }, { "sc", "FzfLua command_history", desc = "Command History" }, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index f68f4a6b62..6bb435ecc7 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -177,7 +177,7 @@ end { "gS", "Telescope git_stash", desc = "Git Stash" }, -- search { 's"', "Telescope registers", desc = "Registers" }, - { 's/', "Telescope search_history", desc = "Search History" }, + { "s/", "Telescope search_history", desc = "Search History" }, { "sa", "Telescope autocommands", desc = "Auto Commands" }, { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer Lines" }, { "sc", "Telescope command_history", desc = "Command History" }, diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index 0b733866d5..188485c486 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -47,7 +47,7 @@ opts = nil ```lua -opts = { ensure_installed = { "c_sharp" } } +opts = { ensure_installed = { "c_sharp", "fsharp" } } ``` @@ -58,7 +58,7 @@ opts = { ensure_installed = { "c_sharp" } } ```lua { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "c_sharp" } }, + opts = { ensure_installed = { "c_sharp", "fsharp" } }, } ``` @@ -73,7 +73,7 @@ opts = { ensure_installed = { "c_sharp" } } ```lua -opts = { ensure_installed = { "csharpier", "netcoredbg" } } +opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fantomas" } } ``` @@ -84,7 +84,7 @@ opts = { ensure_installed = { "csharpier", "netcoredbg" } } ```lua { "mason-org/mason.nvim", - opts = { ensure_installed = { "csharpier", "netcoredbg" } }, + opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fantomas" } }, } ``` @@ -202,6 +202,7 @@ opts = function(_, opts) local nls = require("null-ls") opts.sources = opts.sources or {} table.insert(opts.sources, nls.builtins.formatting.csharpier) + table.insert(opts.sources, nls.builtins.formatting.fantomas) end ``` @@ -218,6 +219,7 @@ end local nls = require("null-ls") opts.sources = opts.sources or {} table.insert(opts.sources, nls.builtins.formatting.csharpier) + table.insert(opts.sources, nls.builtins.formatting.fantomas) end, } ``` @@ -236,6 +238,7 @@ end opts = { formatters_by_ft = { cs = { "csharpier" }, + fsharp = { "fantomas" }, }, } ``` @@ -252,6 +255,7 @@ opts = { opts = { formatters_by_ft = { cs = { "csharpier" }, + fsharp = { "fantomas" }, }, }, } From 366606c0a7bf5a65b9570bf61ab89469fe83d9e4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 07:21:48 +0000 Subject: [PATCH 087/103] chore(build): auto-generate docs --- docs/configuration/general.md | 6 +- docs/extras/ai/copilot-chat.md | 10 +- docs/extras/coding/mini-surround.md | 2 +- docs/extras/dap/core.md | 2 +- docs/extras/editor/dial.md | 4 +- docs/extras/editor/fzf.md | 4 +- docs/extras/editor/telescope.md | 4 +- docs/extras/lang/clojure.md | 4 +- docs/extras/lang/{omnisharp.md => dotnet.md} | 8 +- docs/extras/lang/java.md | 2 +- docs/extras/lang/r.md | 8 +- docs/extras/lang/scala.md | 203 +++++++++---------- docs/extras/util/project.md | 24 +-- docs/keymaps.md | 37 ++-- docs/plugins/editor.md | 14 +- docs/plugins/formatting.md | 2 +- 16 files changed, 163 insertions(+), 171 deletions(-) rename docs/extras/lang/{omnisharp.md => dotnet.md} (97%) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index c53f3e9a58..162408e155 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -273,8 +273,8 @@ map({ "i", "x", "n", "s" }, "", "w", { desc = "Save File" }) map("n", "K", "norm! K", { desc = "Keywordprg" }) -- better indenting -map("v", "<", "", ">gv") +map("x", "<", "", ">gv") -- commenting map("n", "gco", "oVcxnormal gccfxa", { desc = "Add Comment Below" }) @@ -306,7 +306,7 @@ map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" }) map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" }) -- formatting -map({ "n", "v" }, "cf", function() +map({ "n", "x" }, "cf", function() LazyVim.format({ force = true }) end, { desc = "Format" }) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index 2a427ed5a2..8239b0135e 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -68,14 +68,14 @@ end end, keys = { { "", "", ft = "copilot-chat", desc = "Submit Prompt", remap = true }, - { "a", "", desc = "+ai", mode = { "n", "v" } }, + { "a", "", desc = "+ai", mode = { "n", "x" } }, { "aa", function() return require("CopilotChat").toggle() end, desc = "Toggle (CopilotChat)", - mode = { "n", "v" }, + mode = { "n", "x" }, }, { "ax", @@ -83,7 +83,7 @@ end return require("CopilotChat").reset() end, desc = "Clear (CopilotChat)", - mode = { "n", "v" }, + mode = { "n", "x" }, }, { "aq", @@ -97,7 +97,7 @@ end end) end, desc = "Quick Chat (CopilotChat)", - mode = { "n", "v" }, + mode = { "n", "x" }, }, { "ap", @@ -105,7 +105,7 @@ end require("CopilotChat").select_prompt() end, desc = "Prompt Actions (CopilotChat)", - mode = { "n", "v" }, + mode = { "n", "x" }, }, }, config = function(_, opts) diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index de7f962d36..18936e944b 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -49,7 +49,7 @@ opts = { -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") local mappings = { - { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } }, + { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "x" } }, { opts.mappings.delete, desc = "Delete Surrounding" }, { opts.mappings.find, desc = "Find Right Surrounding" }, { opts.mappings.find_left, desc = "Find Left Surrounding" }, diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index edb040628e..b3a46c7e6f 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -182,7 +182,7 @@ opts = {} -- stylua: ignore keys = { { "du", function() require("dapui").toggle({ }) end, desc = "Dap UI" }, - { "de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} }, + { "de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "x"} }, }, opts = {}, config = function(_, opts) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 5e852ea13b..0cbf7d4c33 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -183,8 +183,8 @@ end keys = { { "", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} }, { "", function() return M.dial(false) end, expr = true, desc = "Decrement", mode = {"n", "v"} }, - { "g", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "v"} }, - { "g", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "v"} }, + { "g", function() return M.dial(true, true) end, expr = true, desc = "Increment", mode = {"n", "x"} }, + { "g", function() return M.dial(false, true) end, expr = true, desc = "Decrement", mode = {"n", "x"} }, }, opts = function() local augend = require("dial.augend") diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index a1ff980565..a9a3d54590 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -389,8 +389,8 @@ end { "sq", "FzfLua quickfix", desc = "Quickfix List" }, { "sw", LazyVim.pick("grep_cword"), desc = "Word (Root Dir)" }, { "sW", LazyVim.pick("grep_cword", { root = false }), desc = "Word (cwd)" }, - { "sw", LazyVim.pick("grep_visual"), mode = "v", desc = "Selection (Root Dir)" }, - { "sW", LazyVim.pick("grep_visual", { root = false }), mode = "v", desc = "Selection (cwd)" }, + { "sw", LazyVim.pick("grep_visual"), mode = "x", desc = "Selection (Root Dir)" }, + { "sW", LazyVim.pick("grep_visual", { root = false }), mode = "x", desc = "Selection (cwd)" }, { "uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" }, { "ss", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 6bb435ecc7..256a1155dc 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -198,8 +198,8 @@ end { "sq", "Telescope quickfix", desc = "Quickfix List" }, { "sw", LazyVim.pick("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" }, { "sW", LazyVim.pick("grep_string", { root = false, word_match = "-w" }), desc = "Word (cwd)" }, - { "sw", LazyVim.pick("grep_string"), mode = "v", desc = "Selection (Root Dir)" }, - { "sW", LazyVim.pick("grep_string", { root = false }), mode = "v", desc = "Selection (cwd)" }, + { "sw", LazyVim.pick("grep_string"), mode = "x", desc = "Selection (Root Dir)" }, + { "sW", LazyVim.pick("grep_string", { root = false }), mode = "x", desc = "Selection (cwd)" }, { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, { "ss", diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index ad7350c28a..d29859fc10 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -187,13 +187,13 @@ opts = {} end vim.keymap.set( - { "n", "v" }, + { "n", "x" }, "[c", "call search('^; -\\+$', 'bw')", { silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." } ) vim.keymap.set( - { "n", "v" }, + { "n", "x" }, "]c", "call search('^; -\\+$', 'w')", { silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." } diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/dotnet.md similarity index 97% rename from docs/extras/lang/omnisharp.md rename to docs/extras/lang/dotnet.md index 188485c486..912637076f 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/dotnet.md @@ -1,4 +1,4 @@ -# `Omnisharp` +# `Dotnet` @@ -73,7 +73,7 @@ opts = { ensure_installed = { "c_sharp", "fsharp" } } ```lua -opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fantomas" } } +opts = { ensure_installed = { "csharpier", "netcoredbg", "fantomas" } } ``` @@ -84,7 +84,7 @@ opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fant ```lua { "mason-org/mason.nvim", - opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fantomas" } }, + opts = { ensure_installed = { "csharpier", "netcoredbg", "fantomas" } }, } ``` @@ -101,6 +101,7 @@ opts = { ensure_installed = { "csharpier", "netcoredbg", "fsautocomplete", "fant ```lua opts = { servers = { + fsautocomplete = {}, omnisharp = { handlers = { ["textDocument/definition"] = function(...) @@ -136,6 +137,7 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { + fsautocomplete = {}, omnisharp = { handlers = { ["textDocument/definition"] = function(...) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 9722fb554f..b0bd8966df 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -328,7 +328,7 @@ end }) wk.add({ { - mode = "v", + mode = "x", buffer = args.buf, { "cx", group = "extract" }, { diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 3db28e27a8..ac20fae443 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -33,12 +33,12 @@ opts = { -- of files supported by R.nvim. This is an -- opportunity to create mappings local to buffers. vim.keymap.set("n", "", "RDSendLine", { buffer = true }) - vim.keymap.set("v", "", "RSendSelection", { buffer = true }) + vim.keymap.set("x", "", "RSendSelection", { buffer = true }) local wk = require("which-key") wk.add({ buffer = true, - mode = { "n", "v" }, + mode = { "n", "x" }, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, @@ -77,12 +77,12 @@ opts = { -- of files supported by R.nvim. This is an -- opportunity to create mappings local to buffers. vim.keymap.set("n", "", "RDSendLine", { buffer = true }) - vim.keymap.set("v", "", "RSendSelection", { buffer = true }) + vim.keymap.set("x", "", "RSendSelection", { buffer = true }) local wk = require("which-key") wk.add({ buffer = true, - mode = { "n", "v" }, + mode = { "n", "x" }, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index 31e2d77085..7c7a4ff731 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -50,7 +50,32 @@ opts = { ensure_installed = { "scala" } } ```lua -opts = {} +opts = function() + local metals_config = require("metals").bare_config() + + metals_config.init_options.statusBarProvider = "off" + + metals_config.settings = { + verboseCompilation = true, + showImplicitArguments = true, + showImplicitConversionsAndClasses = true, + showInferredType = true, + superMethodLensesEnabled = true, + excludedPackages = { + "akka.actor.typed.javadsl", + "org.apache.pekko.actor.typed.javadsl", + "com.github.swagger.akka.javadsl", + }, + testUserInterface = "Test Explorer", + } + + metals_config.on_attach = function(client, bufnr) + -- your on_attach function + require("metals").setup_dap() + end + + return metals_config +end ``` @@ -61,8 +86,69 @@ opts = {} ```lua { "scalameta/nvim-metals", - ft = { "scala", "sbt" }, - config = function() end, + dependencies = { + "nvim-lua/plenary.nvim", + }, + keys = { + { + "me", + function() + require("telescope").extensions.metals.commands() + end, + desc = "Metals commands", + }, + { + "mc", + function() + require("metals").compile_cascade() + end, + desc = "Metals compile cascade", + }, + { + "mh", + function() + require("metals").hover_worksheet() + end, + desc = "Metals hover worksheet", + }, + }, + ft = { "scala", "sbt", "java" }, + opts = function() + local metals_config = require("metals").bare_config() + + metals_config.init_options.statusBarProvider = "off" + + metals_config.settings = { + verboseCompilation = true, + showImplicitArguments = true, + showImplicitConversionsAndClasses = true, + showInferredType = true, + superMethodLensesEnabled = true, + excludedPackages = { + "akka.actor.typed.javadsl", + "org.apache.pekko.actor.typed.javadsl", + "com.github.swagger.akka.javadsl", + }, + testUserInterface = "Test Explorer", + } + + metals_config.on_attach = function(client, bufnr) + -- your on_attach function + require("metals").setup_dap() + end + + return metals_config + end, + config = function(self, metals_config) + local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true }) + vim.api.nvim_create_autocmd("FileType", { + pattern = self.ft, + callback = function() + require("metals").initialize_or_attach(metals_config) + end, + group = nvim_metals_group, + }) + end, } ``` @@ -70,66 +156,14 @@ opts = {} -## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) +## [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) ```lua -opts = { - servers = { - metals = { - keys = { - { - "me", - function() - require("telescope").extensions.metals.commands() - end, - desc = "Metals commands", - }, - { - "mc", - function() - require("metals").compile_cascade() - end, - desc = "Metals compile cascade", - }, - { - "mh", - function() - require("metals").hover_worksheet() - end, - desc = "Metals hover worksheet", - }, - }, - init_options = { - statusBarProvider = "off", - }, - settings = { - showImplicitArguments = true, - excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, - }, - }, - }, - setup = { - metals = function(_, opts) - local metals = require("metals") - local metals_config = vim.tbl_deep_extend("force", metals.bare_config(), opts) - metals_config.on_attach = LazyVim.has("nvim-dap") and metals.setup_dap or nil - - local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true }) - vim.api.nvim_create_autocmd("FileType", { - pattern = { "scala", "sbt" }, - callback = function() - metals.initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - return true - end, - }, -} +opts = nil ``` @@ -139,60 +173,7 @@ opts = { ```lua { - "neovim/nvim-lspconfig", - opts = { - servers = { - metals = { - keys = { - { - "me", - function() - require("telescope").extensions.metals.commands() - end, - desc = "Metals commands", - }, - { - "mc", - function() - require("metals").compile_cascade() - end, - desc = "Metals compile cascade", - }, - { - "mh", - function() - require("metals").hover_worksheet() - end, - desc = "Metals hover worksheet", - }, - }, - init_options = { - statusBarProvider = "off", - }, - settings = { - showImplicitArguments = true, - excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, - }, - }, - }, - setup = { - metals = function(_, opts) - local metals = require("metals") - local metals_config = vim.tbl_deep_extend("force", metals.bare_config(), opts) - metals_config.on_attach = LazyVim.has("nvim-dap") and metals.setup_dap or nil - - local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true }) - vim.api.nvim_create_autocmd("FileType", { - pattern = { "scala", "sbt" }, - callback = function() - metals.initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - return true - end, - }, - }, + "nvim-lua/plenary.nvim", } ``` diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 24f4d56ec2..4514dd451d 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -129,7 +129,7 @@ opts = nil ```lua opts = function(_, dashboard) - local button = dashboard.button("p", " " .. " Projects", pick) + local button = dashboard.button("P", " " .. " Projects (util.project)", pick) button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" table.insert(dashboard.section.buttons.val, 4, button) @@ -146,7 +146,7 @@ end "goolord/alpha-nvim", optional = true, opts = function(_, dashboard) - local button = dashboard.button("p", " " .. " Projects", pick) + local button = dashboard.button("P", " " .. " Projects (util.project)", pick) button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" table.insert(dashboard.section.buttons.val, 4, button) @@ -168,7 +168,7 @@ end opts = function(_, opts) local items = { { - name = "Projects", + name = "Projects (util.project)", action = pick, section = string.rep(" ", 22) .. "Telescope", }, @@ -189,7 +189,7 @@ end opts = function(_, opts) local items = { { - name = "Projects", + name = "Projects (util.project)", action = pick, section = string.rep(" ", 22) .. "Telescope", }, @@ -216,9 +216,9 @@ opts = function(_, opts) end local projects = { action = pick, - desc = " Projects", + desc = " Projects (util.project)", icon = " ", - key = "p", + key = "P", } projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) @@ -243,9 +243,9 @@ end end local projects = { action = pick, - desc = " Projects", + desc = " Projects (util.project)", icon = " ", - key = "p", + key = "P", } projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) @@ -270,9 +270,9 @@ end opts = function(_, opts) table.insert(opts.dashboard.preset.keys, 3, { action = pick, - desc = "Projects", + desc = "Projects (util.project)", icon = " ", - key = "p", + key = "P", }) end ``` @@ -289,9 +289,9 @@ end opts = function(_, opts) table.insert(opts.dashboard.preset.keys, 3, { action = pick, - desc = "Projects", + desc = "Projects (util.project)", icon = " ", - key = "p", + key = "P", }) end, } diff --git a/docs/keymaps.md b/docs/keymaps.md index 1a3ff6085d..b3fcca52f4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -56,7 +56,7 @@ possible keymaps starting with ``. | <leader>xq | Quickfix List | **n** | | [q | Previous Quickfix | **n** | | ]q | Next Quickfix | **n** | -| <leader>cf | Format | **n**, **v** | +| <leader>cf | Format | **n**, **x** | | <leader>cd | Line Diagnostics | **n** | | ]d | Next Diagnostic | **n** | | [d | Prev Diagnostic | **n** | @@ -123,8 +123,8 @@ possible keymaps starting with ``. | K | Hover | **n** | | gK | Signature Help | **n** | | <c-k> | Signature Help | **i** | -| <leader>ca | Code Action | **n**, **v** | -| <leader>cc | Run Codelens | **n**, **v** | +| <leader>ca | Code Action | **n**, **x** | +| <leader>cc | Run Codelens | **n**, **x** | | <leader>cC | Refresh & Display Codelens | **n** | | <leader>cR | Rename File | **n** | | <leader>cr | Rename | **n** | @@ -153,7 +153,7 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | -| <leader>cF | Format Injected Langs | **n**, **v** | +| <leader>cF | Format Injected Langs | **n**, **x** | ## [flash.nvim](https://github.com/folke/flash.nvim.git) @@ -170,7 +170,7 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | -| <leader>sr | Search and Replace | **n**, **v** | +| <leader>sr | Search and Replace | **n**, **x** | ## [mason.nvim](https://github.com/mason-org/mason.nvim.git) @@ -294,11 +294,11 @@ Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) | Key | Description | Mode | | --- | --- | --- | | <c-s> | Submit Prompt | **n** | -| <leader>a | +ai | **n**, **v** | -| <leader>aa | Toggle (CopilotChat) | **n**, **v** | -| <leader>ap | Prompt Actions (CopilotChat) | **n**, **v** | -| <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | -| <leader>ax | Clear (CopilotChat) | **n**, **v** | +| <leader>a | +ai | **n**, **x** | +| <leader>aa | Toggle (CopilotChat) | **n**, **x** | +| <leader>ap | Prompt Actions (CopilotChat) | **n**, **x** | +| <leader>aq | Quick Chat (CopilotChat) | **n**, **x** | +| <leader>ax | Clear (CopilotChat) | **n**, **x** | ## [sidekick.nvim](https://github.com/folke/sidekick.nvim.git) Part of [lazyvim.plugins.extras.ai.sidekick](/extras/ai/sidekick) @@ -320,7 +320,7 @@ Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surrou | Key | Description | Mode | | --- | --- | --- | -| gsa | Add Surrounding | **n**, **v** | +| gsa | Add Surrounding | **n**, **x** | | gsd | Delete Surrounding | **n** | | gsf | Find Right Surrounding | **n** | | gsF | Find Left Surrounding | **n** | @@ -387,7 +387,7 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | Key | Description | Mode | | --- | --- | --- | -| <leader>de | Eval | **n**, **v** | +| <leader>de | Eval | **n**, **x** | | <leader>du | Dap UI | **n** | ## [aerial.nvim](https://github.com/stevearc/aerial.nvim.git) @@ -411,8 +411,8 @@ Part of [lazyvim.plugins.extras.editor.dial](/extras/editor/dial) | --- | --- | --- | | <C-a> | Increment | **n**, **v** | | <C-x> | Decrement | **n**, **v** | -| g<C-a> | Increment | **n**, **v** | -| g<C-x> | Decrement | **n**, **v** | +| g<C-a> | Increment | **n**, **x** | +| g<C-x> | Decrement | **n**, **x** | ## [harpoon](https://github.com/ThePrimeagen/harpoon.git) Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) @@ -602,6 +602,15 @@ Part of [lazyvim.plugins.extras.lang.python](/extras/lang/python) | --- | --- | --- | | <leader>cv | Select VirtualEnv | **n** | +## [nvim-metals](https://github.com/scalameta/nvim-metals.git) +Part of [lazyvim.plugins.extras.lang.scala](/extras/lang/scala) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>mc | Metals compile cascade | **n** | +| <leader>me | Metals commands | **n** | +| <leader>mh | Metals hover worksheet | **n** | + ## [vim-dadbod-ui](https://github.com/kristijanhusak/vim-dadbod-ui.git) Part of [lazyvim.plugins.extras.lang.sql](/extras/lang/sql) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 983a7dbbed..06235c04da 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -41,7 +41,7 @@ opts = { headerMaxWidth = 80 } }, }) end, - mode = { "n", "v" }, + mode = { "n", "x" }, desc = "Search and Replace", }, }, @@ -120,7 +120,7 @@ opts = { defaults = {}, spec = { { - mode = { "n", "v" }, + mode = { "n", "x" }, { "", group = "tabs" }, { "c", group = "code" }, { "d", group = "debug" }, @@ -174,7 +174,7 @@ opts = { defaults = {}, spec = { { - mode = { "n", "v" }, + mode = { "n", "x" }, { "", group = "tabs" }, { "c", group = "code" }, { "d", group = "debug" }, @@ -294,8 +294,8 @@ opts = { end, "Prev Hunk") map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk") map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk") - map({ "n", "v" }, "ghs", ":Gitsigns stage_hunk", "Stage Hunk") - map({ "n", "v" }, "ghr", ":Gitsigns reset_hunk", "Reset Hunk") + map({ "n", "x" }, "ghs", ":Gitsigns stage_hunk", "Stage Hunk") + map({ "n", "x" }, "ghr", ":Gitsigns reset_hunk", "Reset Hunk") map("n", "ghS", gs.stage_buffer, "Stage Buffer") map("n", "ghu", gs.undo_stage_hunk, "Undo Stage Hunk") map("n", "ghR", gs.reset_buffer, "Reset Buffer") @@ -358,8 +358,8 @@ opts = { end, "Prev Hunk") map("n", "]H", function() gs.nav_hunk("last") end, "Last Hunk") map("n", "[H", function() gs.nav_hunk("first") end, "First Hunk") - map({ "n", "v" }, "ghs", ":Gitsigns stage_hunk", "Stage Hunk") - map({ "n", "v" }, "ghr", ":Gitsigns reset_hunk", "Reset Hunk") + map({ "n", "x" }, "ghs", ":Gitsigns stage_hunk", "Stage Hunk") + map({ "n", "x" }, "ghr", ":Gitsigns reset_hunk", "Reset Hunk") map("n", "ghS", gs.stage_buffer, "Stage Buffer") map("n", "ghu", gs.undo_stage_hunk, "Undo Stage Hunk") map("n", "ghR", gs.reset_buffer, "Reset Buffer") diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index 928917c4f5..37ccf3e1de 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -87,7 +87,7 @@ end function() require("conform").format({ formatters = { "injected" }, timeout_ms = 3000 }) end, - mode = { "n", "v" }, + mode = { "n", "x" }, desc = "Format Injected Langs", }, }, From 7c6cbe407f29a397ba8747ceadb7881a278fad59 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 08:29:25 +0000 Subject: [PATCH 088/103] chore(build): auto-generate docs --- docs/extras/lang/haskell.md | 178 +++++++++++++++++++----- docs/extras/lang/julia.md | 267 ++++++++++++++++++++++++++++++++++++ docs/extras/lang/twig.md | 227 ++++++++++++++++++++++++++++++ docs/extras/lang/typst.md | 236 +++++++++++++++++++++++++++++++ docs/extras/util/gh.md | 114 +++++++++++++++ docs/keymaps.md | 62 +++++++++ 6 files changed, 1046 insertions(+), 38 deletions(-) create mode 100644 docs/extras/lang/julia.md create mode 100644 docs/extras/lang/twig.md create mode 100644 docs/extras/lang/typst.md create mode 100644 docs/extras/util/gh.md diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 878e90a3da..1c78c7d4e8 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -53,7 +53,7 @@ opts = { ensure_installed = { "haskell" } } ```lua -opts = {} +opts = nil ``` @@ -64,17 +64,40 @@ opts = {} ```lua { "mrcjkb/haskell-tools.nvim", - version = "^3", + version = false, ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, - dependencies = { - { "nvim-telescope/telescope.nvim", optional = true }, + keys = { + { + "e", + "HlsEvalAll", + ft = "haskell", + desc = "Evaluate All", + }, + { + "h", + function() + require("haskell-tools").hoogle.hoogle_signature() + end, + ft = "haskell", + desc = "Hoogle Signature", + }, + { + "r", + function() + require("haskell-tools").repl.toggle() + end, + ft = "haskell", + desc = "REPL (Package)", + }, + { + "R", + function() + require("haskell-tools").repl.toggle(vim.api.nvim_buf_get_name(0)) + end, + ft = "haskell", + desc = "REPL (Buffer)", + }, }, - config = function() - local ok, telescope = pcall(require, "telescope") - if ok then - telescope.load_extension("ht") - end - end, } ``` @@ -218,7 +241,11 @@ opts = nil ```lua -opts = {} +opts = function() + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("ht") + end) +end ``` @@ -230,15 +257,19 @@ opts = {} { "luc-tielen/telescope_hoogle", ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, - dependencies = { - { "nvim-telescope/telescope.nvim", optional = true }, - }, - config = function() - local ok, telescope = pcall(require, "telescope") - if ok then - telescope.load_extension("hoogle") - end + opts = function() + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("ht") + end) end, + keys = { + { + "H", + "Telescope hoogle", + ft = "haskell", + desc = "Hoogle", + }, + }, } ``` @@ -288,7 +319,7 @@ opts = { -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ +## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ @@ -304,21 +335,34 @@ opts = nil ```lua -{ "nvim-telescope/telescope.nvim", optional = true } +{ + "mfussenegger/nvim-dap", + optional = true, + dependencies = { + { + "mason-org/mason.nvim", + opts = { ensure_installed = { "haskell-debug-adapter" } }, + }, + }, +} ``` -## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ ```lua -opts = nil +opts = { + adapters = { + ["neotest-haskell"] = {}, + }, +} ``` @@ -328,12 +372,59 @@ opts = nil ```lua { - "mfussenegger/nvim-dap", + "nvim-neotest/neotest", optional = true, dependencies = { + { "mrcjkb/neotest-haskell" }, + }, + opts = { + adapters = { + ["neotest-haskell"] = {}, + }, + }, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + optional = true, + specs = { { - "mason-org/mason.nvim", - opts = { ensure_installed = { "haskell-debug-adapter" } }, + "luc-tielen/telescope_hoogle", + ft = { "haskell", "lhaskell", "cabal", "cabalproject" }, + opts = function() + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("ht") + end) + end, + keys = { + { + "H", + "Telescope hoogle", + ft = "haskell", + desc = "Hoogle", + }, + }, }, }, } @@ -343,7 +434,7 @@ opts = nil -## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ @@ -351,8 +442,9 @@ opts = nil ```lua opts = { - adapters = { - ["neotest-haskell"] = {}, + formatters_by_ft = { + haskell = { "fourmolu" }, + cabal = { "cabal_fmt" }, }, } ``` @@ -364,14 +456,12 @@ opts = { ```lua { - "nvim-neotest/neotest", + "stevearc/conform.nvim", optional = true, - dependencies = { - { "mrcjkb/neotest-haskell" }, - }, opts = { - adapters = { - ["neotest-haskell"] = {}, + formatters_by_ft = { + haskell = { "fourmolu" }, + cabal = { "cabal_fmt" }, }, }, } @@ -381,14 +471,18 @@ opts = { -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ ```lua -opts = nil +opts = { + linters_by_ft = { + haskell = { "hlint" }, + }, +} ``` @@ -397,7 +491,15 @@ opts = nil ```lua -{ "nvim-telescope/telescope.nvim", optional = true } +{ + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + haskell = { "hlint" }, + }, + }, +} ``` diff --git a/docs/extras/lang/julia.md b/docs/extras/lang/julia.md new file mode 100644 index 0000000000..90f979cbb6 --- /dev/null +++ b/docs/extras/lang/julia.md @@ -0,0 +1,267 @@ +# `Julia` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { ensure_installed = { "julia" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "julia" } }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + julials = { + settings = { + -- use the same default settings as the Julia VS Code extension + julia = { + completionmode = "qualify", + lint = { missingrefs = "none" }, + }, + }, + }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + julials = { + settings = { + -- use the same default settings as the Julia VS Code extension + julia = { + completionmode = "qualify", + lint = { missingrefs = "none" }, + }, + }, + }, + }, + }, +} +``` + + + + + +## [cmp-latex-symbols](https://github.com/kdheepak/cmp-latex-symbols) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "kdheepak/cmp-latex-symbols" } +``` + + + + + +## [cmp-latex-symbols](https://github.com/kdheepak/cmp-latex-symbols) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "kdheepak/cmp-latex-symbols", "saghen/blink.compat" } +``` + + + + + +## [blink.compat](https://github.com/saghen/blink.compat) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"saghen/blink.compat" +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + cmp integration + + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources, { + name = "latex_symbols", + option = { + strategy = 0, -- mixed + }, + }) +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { "kdheepak/cmp-latex-symbols" }, + opts = function(_, opts) + table.insert(opts.sources, { + name = "latex_symbols", + option = { + strategy = 0, -- mixed + }, + }) + end, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp integration + + + + + + +```lua +opts = { + sources = { + compat = { "latex_symbols" }, + providers = { + latex_symbols = { + kind = "LatexSymbols", + async = true, + opts = { + strategy = 0, -- mixed + }, + }, + }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + dependencies = { "kdheepak/cmp-latex-symbols", "saghen/blink.compat" }, + opts = { + sources = { + compat = { "latex_symbols" }, + providers = { + latex_symbols = { + kind = "LatexSymbols", + async = true, + opts = { + strategy = 0, -- mixed + }, + }, + }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/twig.md b/docs/extras/lang/twig.md new file mode 100644 index 0000000000..854a121198 --- /dev/null +++ b/docs/extras/lang/twig.md @@ -0,0 +1,227 @@ +# `Twig` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { ensure_installed = { "twig" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "twig" } }, +} +``` + + + + + +## [mason.nvim](https://github.com/mason-org/mason.nvim) + + + + + +```lua +opts = { + ensure_installed = { + "twigcs", + "twig-cs-fixer", + }, +} +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "twigcs", + "twig-cs-fixer", + }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + twiggy_language_server = { + enabled = true, + }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + twiggy_language_server = { + enabled = true, + }, + }, + }, +} +``` + + + + + +## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.diagnostics.twigcs) + -- Twig-CS-Fixer builtin not available in none-ls +end +``` + + + + + + +```lua +{ + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.diagnostics.twigcs) + -- Twig-CS-Fixer builtin not available in none-ls + end, +} +``` + + + + + +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + + + + +```lua +opts = { + linters_by_ft = { + twig = { "twigcs" }, + }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + twig = { "twigcs" }, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + twig = { "twig-cs-fixer" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + twig = { "twig-cs-fixer" }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/typst.md b/docs/extras/lang/typst.md new file mode 100644 index 0000000000..a0e8e54b0b --- /dev/null +++ b/docs/extras/lang/typst.md @@ -0,0 +1,236 @@ +# `Typst` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { + ensure_installed = { "typst" }, +} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "typst" }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + tinymist = { + keys = { + { + "cP", + function() + local buf_name = vim.api.nvim_buf_get_name(0) + local file_name = vim.fn.fnamemodify(buf_name, ":t") + LazyVim.lsp.execute({ + command = "tinymist.pinMain", + arguments = { buf_name }, + }) + LazyVim.info("Tinymist: Pinned " .. file_name) + end, + desc = "Pin main file", + }, + }, + single_file_support = true, -- Fixes LSP attachment in non-Git directories + settings = { + formatterMode = "typstyle", + }, + }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + tinymist = { + keys = { + { + "cP", + function() + local buf_name = vim.api.nvim_buf_get_name(0) + local file_name = vim.fn.fnamemodify(buf_name, ":t") + LazyVim.lsp.execute({ + command = "tinymist.pinMain", + arguments = { buf_name }, + }) + LazyVim.info("Tinymist: Pinned " .. file_name) + end, + desc = "Pin main file", + }, + }, + single_file_support = true, -- Fixes LSP attachment in non-Git directories + settings = { + formatterMode = "typstyle", + }, + }, + }, + }, +} +``` + + + + + +## [typst-preview.nvim](https://github.com/chomosuke/typst-preview.nvim) + + + + + +```lua +opts = { + dependencies_bin = { + tinymist = "tinymist", + }, +} +``` + + + + + + +```lua +{ + "chomosuke/typst-preview.nvim", + cmd = { "TypstPreview", "TypstPreviewToggle", "TypstPreviewUpdate" }, + keys = { + { + "cp", + ft = "typst", + "TypstPreviewToggle", + desc = "Toggle Typst Preview", + }, + }, + opts = { + dependencies_bin = { + tinymist = "tinymist", + }, + }, +} +``` + + + + + +## [ts-comments.nvim](https://github.com/folke/ts-comments.nvim) + + + + + +```lua +opts = { + lang = { + typst = { "// %s", "/* %s */" }, + }, +} +``` + + + + + + +```lua +{ + "folke/ts-comments.nvim", + opts = { + lang = { + typst = { "// %s", "/* %s */" }, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + typst = { "typstyle", lsp_format = "prefer" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + typst = { "typstyle", lsp_format = "prefer" }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/util/gh.md b/docs/extras/util/gh.md new file mode 100644 index 0000000000..71c5469ed1 --- /dev/null +++ b/docs/extras/util/gh.md @@ -0,0 +1,114 @@ +# `Gh` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +### Includes the following extras + +- [lang.git](/extras/lang/git) + +## [litee.nvim](https://github.com/ldelossa/litee.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "ldelossa/litee.nvim", lazy = true } +``` + + + + + +## [gh.nvim](https://github.com/ldelossa/gh.nvim) + + gh.nvim + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "ldelossa/gh.nvim", + opts = {}, + config = function(_, opts) + require("litee.lib").setup() + require("litee.gh").setup(opts) + end, + keys = { + { "G", "", desc = "+Github" }, + { "Gc", "", desc = "+Commits" }, + { "Gcc", "GHCloseCommit", desc = "Close" }, + { "Gce", "GHExpandCommit", desc = "Expand" }, + { "Gco", "GHOpenToCommit", desc = "Open To" }, + { "Gcp", "GHPopOutCommit", desc = "Pop Out" }, + { "Gcz", "GHCollapseCommit", desc = "Collapse" }, + { "Gi", "", desc = "+Issues" }, + { "Gip", "GHPreviewIssue", desc = "Preview" }, + { "Gio", "GHOpenIssue", desc = "Open" }, + { "Gl", "", desc = "+Litee" }, + { "Glt", "LTPanel", desc = "Toggle Panel" }, + { "Gp", "", desc = "+Pull Request" }, + { "Gpc", "GHClosePR", desc = "Close" }, + { "Gpd", "GHPRDetails", desc = "Details" }, + { "Gpe", "GHExpandPR", desc = "Expand" }, + { "Gpo", "GHOpenPR", desc = "Open" }, + { "Gpp", "GHPopOutPR", desc = "PopOut" }, + { "Gpr", "GHRefreshPR", desc = "Refresh" }, + { "Gpt", "GHOpenToPR", desc = "Open To" }, + { "Gpz", "GHCollapsePR", desc = "Collapse" }, + { "Gr", "", desc = "+Review" }, + { "Grb", "GHStartReview", desc = "Begin" }, + { "Grc", "GHCloseReview", desc = "Close" }, + { "Grd", "GHDeleteReview", desc = "Delete" }, + { "Gre", "GHExpandReview", desc = "Expand" }, + { "Grs", "GHSubmitReview", desc = "Submit" }, + { "Grz", "GHCollapseReview", desc = "Collapse" }, + { "Gt", "", desc = "+Threads" }, + { "Gtc", "GHCreateThread", desc = "Create" }, + { "Gtn", "GHNextThread", desc = "Next" }, + { "Gtt", "GHToggleThread", desc = "Toggle" }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index b3fcca52f4..597284a196 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -580,6 +580,23 @@ Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) | --- | --- | --- | | <leader>ta | Ansible Run Playbook/Role | **n** | +## [haskell-tools.nvim](https://github.com/mrcjkb/haskell-tools.nvim.git) +Part of [lazyvim.plugins.extras.lang.haskell](/extras/lang/haskell) + +| Key | Description | Mode | +| --- | --- | --- | +| <localleader>e | Evaluate All | **n** | +| <localleader>h | Hoogle Signature | **n** | +| <localleader>r | REPL (Package) | **n** | +| <localleader>R | REPL (Buffer) | **n** | + +## [telescope_hoogle](https://github.com/luc-tielen/telescope_hoogle.git) +Part of [lazyvim.plugins.extras.lang.haskell](/extras/lang/haskell) + +| Key | Description | Mode | +| --- | --- | --- | +| <localleader>H | Hoogle | **n** | + ## [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim.git) Part of [lazyvim.plugins.extras.lang.markdown](/extras/lang/markdown) @@ -625,6 +642,13 @@ Part of [lazyvim.plugins.extras.lang.tex](/extras/lang/tex) | --- | --- | --- | | <localLeader>l | +vimtex | **n** | +## [typst-preview.nvim](https://github.com/chomosuke/typst-preview.nvim.git) +Part of [lazyvim.plugins.extras.lang.typst](/extras/lang/typst) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>cp | Toggle Typst Preview | **n** | + ## [neotest](https://github.com/nvim-neotest/neotest.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) @@ -664,6 +688,44 @@ Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) | --- | --- | --- | | <leader>sz | Chezmoi | **n** | +## [gh.nvim](https://github.com/ldelossa/gh.nvim.git) +Part of [lazyvim.plugins.extras.util.gh](/extras/util/gh) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>G | +Github | **n** | +| <leader>Gc | +Commits | **n** | +| <leader>Gcc | Close | **n** | +| <leader>Gce | Expand | **n** | +| <leader>Gco | Open To | **n** | +| <leader>Gcp | Pop Out | **n** | +| <leader>Gcz | Collapse | **n** | +| <leader>Gi | +Issues | **n** | +| <leader>Gio | Open | **n** | +| <leader>Gip | Preview | **n** | +| <leader>Gl | +Litee | **n** | +| <leader>Glt | Toggle Panel | **n** | +| <leader>Gp | +Pull Request | **n** | +| <leader>Gpc | Close | **n** | +| <leader>Gpd | Details | **n** | +| <leader>Gpe | Expand | **n** | +| <leader>Gpo | Open | **n** | +| <leader>Gpp | PopOut | **n** | +| <leader>Gpr | Refresh | **n** | +| <leader>Gpt | Open To | **n** | +| <leader>Gpz | Collapse | **n** | +| <leader>Gr | +Review | **n** | +| <leader>Grb | Begin | **n** | +| <leader>Grc | Close | **n** | +| <leader>Grd | Delete | **n** | +| <leader>Gre | Expand | **n** | +| <leader>Grs | Submit | **n** | +| <leader>Grz | Collapse | **n** | +| <leader>Gt | +Threads | **n** | +| <leader>Gtc | Create | **n** | +| <leader>Gtn | Next | **n** | +| <leader>Gtt | Toggle | **n** | + ## [mason.nvim](https://github.com/mason-org/mason.nvim.git) Part of [lazyvim.plugins.extras.util.gitui](/extras/util/gitui) From 0fb285993c8ac7bca54e1898743eb5a5af033213 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 09:25:23 +0000 Subject: [PATCH 089/103] chore(build): auto-generate docs --- docs/extras/ai/avante.md | 262 +++++++++++++++++++++++++++++++++++ docs/extras/lang/go.md | 70 ++++++++++ docs/extras/lang/helm.md | 26 +--- docs/extras/lang/solidity.md | 136 ++++++++++++++++++ docs/extras/lang/tailwind.md | 50 ++++--- docs/extras/lang/twig.md | 2 +- docs/keymaps.md | 7 + 7 files changed, 506 insertions(+), 47 deletions(-) create mode 100644 docs/extras/ai/avante.md create mode 100644 docs/extras/lang/solidity.md diff --git a/docs/extras/ai/avante.md b/docs/extras/ai/avante.md new file mode 100644 index 0000000000..7537e60f75 --- /dev/null +++ b/docs/extras/ai/avante.md @@ -0,0 +1,262 @@ +# `Avante` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nui.nvim](https://github.com/MunifTanjim/nui.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "MunifTanjim/nui.nvim", lazy = true } +``` + + + + + +## [avante.nvim](https://github.com/yetone/avante.nvim) + + + + + +```lua +opts = { + provider = "copilot", + selection = { + hint_display = "none", + }, +} +``` + + + + + + +```lua +{ + "yetone/avante.nvim", + build = vim.fn.has("win32") ~= 0 and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" + or "make", + event = "VeryLazy", + opts = { + provider = "copilot", + selection = { + hint_display = "none", + }, + }, + cmd = { + "AvanteAsk", + "AvanteBuild", + "AvanteChat", + "AvanteClear", + "AvanteEdit", + "AvanteFocus", + "AvanteHistory", + "AvanteModels", + "AvanteRefresh", + "AvanteShowRepoMap", + "AvanteStop", + "AvanteSwitchProvider", + "AvanteToggle", + }, + keys = { + { "n", "aa", "AvanteAsk", desc = "Ask Avante" }, + { "n", "ac", "AvanteChat", desc = "Chat with Avante" }, + { "n", "ae", "AvanteEdit", desc = "Edit Avante" }, + { "n", "af", "AvanteFocus", desc = "Focus Avante" }, + { "n", "ah", "AvanteHistory", desc = "Avante History" }, + { "n", "am", "AvanteModels", desc = "Select Avante Model" }, + { "n", "an", "AvanteChatNew", desc = "New Avante Chat" }, + { "n", "ap", "AvanteSwitchProvider", desc = "Switch Avante Provider" }, + { "n", "ar", "AvanteRefresh", desc = "Refresh Avante" }, + { "n", "as", "AvanteStop", desc = "Stop Avante" }, + { "n", "at", "AvanteToggle", desc = "Toggle Avante" }, + }, +} +``` + + + + + +## [blink-cmp-avante](https://github.com/Kaiser-Yang/blink-cmp-avante) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "Kaiser-Yang/blink-cmp-avante" } +``` + + + + + +## [img-clip.nvim](https://github.com/HakonHarnes/img-clip.nvim) _(optional)_ + + support for image pasting + + + + + + +```lua +opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, +} +``` + + + + + + +```lua +{ + "HakonHarnes/img-clip.nvim", + event = "VeryLazy", + optional = true, + opts = { + -- recommended settings + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + -- required for Windows users + use_absolute_path = true, + }, + }, +} +``` + + + + + +## [render-markdown.nvim](https://github.com/MeanderingProgrammer/render-markdown.nvim) _(optional)_ + + Make sure to set this up properly if you have lazy=true + + + + + + +```lua +opts = { + file_types = { "markdown", "Avante" }, +} +``` + + + + + + +```lua +{ + "MeanderingProgrammer/render-markdown.nvim", + optional = true, + opts = { + file_types = { "markdown", "Avante" }, + }, + ft = { "markdown", "Avante" }, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp source for avante.nvim + + + + + + +```lua +opts = { + sources = { + default = { "avante" }, + providers = { avante = { module = "blink-cmp-avante", name = "Avante" } }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + specs = { "Kaiser-Yang/blink-cmp-avante" }, + opts = { + sources = { + default = { "avante" }, + providers = { avante = { module = "blink-cmp-avante", name = "Avante" } }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 42d6754343..1eaeb8b754 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -250,6 +250,32 @@ opts = { ensure_installed = { "gomodifytags", "impl" } } +```lua +opts = { ensure_installed = { "golangci-lint" } } +``` + + + + + + +```lua +{ + "mason-org/mason.nvim", + opts = { ensure_installed = { "golangci-lint" } }, +} +``` + + + + + +## [mason.nvim](https://github.com/mason-org/mason.nvim) + + + + + ```lua opts = { ensure_installed = { "delve" } } ``` @@ -413,6 +439,50 @@ end +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + Add linting + + + + + + +```lua +opts = { + linters_by_ft = { + go = { "golangcilint" }, + }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + dependencies = { + { + "mason-org/mason.nvim", + opts = { ensure_installed = { "golangci-lint" } }, + }, + }, + opts = { + linters_by_ft = { + go = { "golangcilint" }, + }, + }, +} +``` + + + + + ## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index 507ebfe7eb..f9bf6312cf 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [vim-helm](https://github.com/towolf/vim-helm) +## [helm-ls.nvim](https://github.com/qvalentin/helm-ls.nvim) @@ -33,7 +33,7 @@ opts = nil ```lua -{ "towolf/vim-helm", ft = "helm" } +{ "qvalentin/helm-ls.nvim", ft = "helm" } ``` @@ -77,17 +77,6 @@ opts = { servers = { helm_ls = {}, }, - setup = { - yamlls = function() - LazyVim.lsp.on_attach(function(client, buffer) - if vim.bo[buffer].filetype == "helm" then - vim.schedule(function() - vim.cmd("LspStop ++force yamlls") - end) - end - end, "yamlls") - end, - }, } ``` @@ -103,17 +92,6 @@ opts = { servers = { helm_ls = {}, }, - setup = { - yamlls = function() - LazyVim.lsp.on_attach(function(client, buffer) - if vim.bo[buffer].filetype == "helm" then - vim.schedule(function() - vim.cmd("LspStop ++force yamlls") - end) - end - end, "yamlls") - end, - }, }, } ``` diff --git a/docs/extras/lang/solidity.md b/docs/extras/lang/solidity.md new file mode 100644 index 0000000000..bb09929153 --- /dev/null +++ b/docs/extras/lang/solidity.md @@ -0,0 +1,136 @@ +# `Solidity` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + Add Solidity & related to treesitter + + + + + + +```lua +opts = { ensure_installed = { "solidity" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "solidity" } }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Correctly setup lspconfig for Solidity + + + + + + +```lua +opts = { + servers = { + solidity_ls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + solidity_ls = {}, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + Formatter for Solidity + + + + + + +```lua +opts = { + formatters_by_ft = { + solidity = { "forge_fmt" }, + }, + formatters = { + forge_fmt = { + command = "forge", + args = { "fmt" }, + }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + solidity = { "forge_fmt" }, + }, + formatters = { + forge_fmt = { + command = "forge", + args = { "fmt" }, + }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 24de525c55..c5217b7ecb 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -33,6 +33,20 @@ opts = { filetypes_include = {}, -- to fully override the default_config, change the below -- filetypes = {} + + -- additional settings for the server, e.g: + -- tailwindCSS = { includeLanguages = { someLang = "html" } } + -- can be addeded to the settings table and will be merged with + -- this defaults for Phoenix projects + settings = { + tailwindCSS = { + includeLanguages = { + elixir = "html-eex", + eelixir = "html-eex", + heex = "html-eex", + }, + }, + }, }, }, setup = { @@ -48,17 +62,6 @@ opts = { return not vim.tbl_contains(opts.filetypes_exclude or {}, ft) end, opts.filetypes) - -- Additional settings for Phoenix projects - opts.settings = { - tailwindCSS = { - includeLanguages = { - elixir = "html-eex", - eelixir = "html-eex", - heex = "html-eex", - }, - }, - } - -- Add additional filetypes vim.list_extend(opts.filetypes, opts.filetypes_include or {}) end, @@ -83,6 +86,20 @@ opts = { filetypes_include = {}, -- to fully override the default_config, change the below -- filetypes = {} + + -- additional settings for the server, e.g: + -- tailwindCSS = { includeLanguages = { someLang = "html" } } + -- can be addeded to the settings table and will be merged with + -- this defaults for Phoenix projects + settings = { + tailwindCSS = { + includeLanguages = { + elixir = "html-eex", + eelixir = "html-eex", + heex = "html-eex", + }, + }, + }, }, }, setup = { @@ -98,17 +115,6 @@ opts = { return not vim.tbl_contains(opts.filetypes_exclude or {}, ft) end, opts.filetypes) - -- Additional settings for Phoenix projects - opts.settings = { - tailwindCSS = { - includeLanguages = { - elixir = "html-eex", - eelixir = "html-eex", - heex = "html-eex", - }, - }, - } - -- Add additional filetypes vim.list_extend(opts.filetypes, opts.filetypes_include or {}) end, diff --git a/docs/extras/lang/twig.md b/docs/extras/lang/twig.md index 854a121198..13f7bf05ad 100644 --- a/docs/extras/lang/twig.md +++ b/docs/extras/lang/twig.md @@ -65,7 +65,7 @@ opts = { ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "twigcs", diff --git a/docs/keymaps.md b/docs/keymaps.md index 597284a196..40db9dc484 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -288,6 +288,13 @@ possible keymaps starting with ``. | <c-w><space> | Window Hydra Mode (which-key) | **n** | | <leader>? | Buffer Keymaps (which-key) | **n** | +## [avante.nvim](https://github.com/yetone/avante.nvim.git) +Part of [lazyvim.plugins.extras.ai.avante](/extras/ai/avante) + +| Key | Description | Mode | +| --- | --- | --- | +| n | Toggle Avante | **n** | + ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) From 889cc9e62b03d557b4d65b04de6fcba860e0d98b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 10:24:14 +0000 Subject: [PATCH 090/103] chore(build): auto-generate docs --- docs/extras/lang/dart.md | 187 ++++++++++++++++++++++++++++++++++++++ docs/extras/lang/ember.md | 116 +++++++++++++++++++++++ docs/extras/lang/java.md | 10 ++ docs/extras/lang/php.md | 122 +++++++++++++++++++++++++ 4 files changed, 435 insertions(+) create mode 100644 docs/extras/lang/dart.md create mode 100644 docs/extras/lang/ember.md diff --git a/docs/extras/lang/dart.md b/docs/extras/lang/dart.md new file mode 100644 index 0000000000..c45da0bc3c --- /dev/null +++ b/docs/extras/lang/dart.md @@ -0,0 +1,187 @@ +# `Dart` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + dartls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + dartls = {}, + }, + }, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { ensure_installed = { "dart" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "dart" } }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) + + + + + +```lua +opts = { + formatters = { + dart_format = { + args = { "format", "--line-length", "120" }, + }, + }, + formatters_by_ft = { + dart = { "dart_format" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + opts = { + formatters = { + dart_format = { + args = { "format", "--line-length", "120" }, + }, + }, + formatters_by_ft = { + dart = { "dart_format" }, + }, + }, +} +``` + + + + + +## [neotest-dart](https://github.com/sidlatau/neotest-dart) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "sidlatau/neotest-dart", +} +``` + + + + + +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = { + adapters = { + ["neotest-dart"] = {}, + }, +} +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + dependencies = { + "sidlatau/neotest-dart", + }, + opts = { + adapters = { + ["neotest-dart"] = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/ember.md b/docs/extras/lang/ember.md new file mode 100644 index 0000000000..3b17d7cf0b --- /dev/null +++ b/docs/extras/lang/ember.md @@ -0,0 +1,116 @@ +# `Ember` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { ensure_installed = { "css", "glimmer", "glimmer_javascript", "glimmer_typescript" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "css", "glimmer", "glimmer_javascript", "glimmer_typescript" } }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + ember = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + ember = {}, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) + + + + + +```lua +opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.glimmer = { "prettier" } + end +end +``` + + + + + + +```lua +{ + "conform.nvim", + opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.glimmer = { "prettier" } + end + end, +} +``` + + + + + + diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index b0bd8966df..29272f7d97 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -276,6 +276,16 @@ end end end end + + -- Allow users to add custom bundles through opts.init_options.bundles and opts.jdtls.init_options.bundles + if opts.init_options and opts.init_options.bundles then + vim.list_extend(bundles, opts.init_options.bundles) + end + if opts.jdtls and opts.jdtls.init_options and opts.jdtls.init_options.bundles then + vim.list_extend(bundles, opts.jdtls.init_options.bundles) + opts.jdtls.init_options.bundles = nil + end + local function attach_jdtls() local fname = vim.api.nvim_buf_get_name(0) diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 03d36ab268..075a37f7bd 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -139,6 +139,83 @@ opts = { +## [neotest-pest](https://github.com/V13Axel/neotest-pest) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "V13Axel/neotest-pest", + "olimorris/neotest-phpunit", +} +``` + + + + + +## [neotest-phpunit](https://github.com/olimorris/neotest-phpunit) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"olimorris/neotest-phpunit" +``` + + + + + +## [neotest-pest](https://github.com/V13Axel/neotest-pest) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "neotest-pest", + ["neotest-phpunit"] = { + root_ignore_files = { "tests/Pest.php" }, + }, +} +``` + + + + + ## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ @@ -287,4 +364,49 @@ opts = { +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = { + adapters = { + "neotest-pest", + ["neotest-phpunit"] = { + root_ignore_files = { "tests/Pest.php" }, + }, + }, +} +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + dependencies = { + "V13Axel/neotest-pest", + "olimorris/neotest-phpunit", + }, + opts = { + adapters = { + "neotest-pest", + ["neotest-phpunit"] = { + root_ignore_files = { "tests/Pest.php" }, + }, + }, + }, +} +``` + + + + + From c94c0a5aaaa6d60eec4922d1f08d4bb2b5800fd4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 11:18:44 +0000 Subject: [PATCH 091/103] chore(build): auto-generate docs --- docs/extras/lang/java.md | 10 --- docs/extras/lang/typescript.md | 135 +++++++++++++++++++++------------ 2 files changed, 87 insertions(+), 58 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 29272f7d97..b0bd8966df 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -276,16 +276,6 @@ end end end end - - -- Allow users to add custom bundles through opts.init_options.bundles and opts.jdtls.init_options.bundles - if opts.init_options and opts.init_options.bundles then - vim.list_extend(bundles, opts.init_options.bundles) - end - if opts.jdtls and opts.jdtls.init_options and opts.jdtls.init_options.bundles then - vim.list_extend(bundles, opts.jdtls.init_options.bundles) - opts.jdtls.init_options.bundles = nil - end - local function attach_jdtls() local fname = vim.api.nvim_buf_get_name(0) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index b829df4299..4cb656c1dd 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -526,31 +526,34 @@ opts = { ```lua opts = function() local dap = require("dap") - if not dap.adapters["pwa-node"] then - require("dap").adapters["pwa-node"] = { - type = "server", - host = "localhost", - port = "${port}", - executable = { - command = "node", - -- 💀 Make sure to update this path to point to your installation - args = { - LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"), - "${port}", + + for _, adapterType in ipairs({ "node", "chrome", "msedge" }) do + local pwaType = "pwa-" .. adapterType + + if not dap.adapters[pwaType] then + dap.adapters[pwaType] = { + type = "server", + host = "localhost", + port = "${port}", + executable = { + command = "js-debug-adapter", + args = { "${port}" }, }, - }, - } - end - if not dap.adapters["node"] then - dap.adapters["node"] = function(cb, config) - if config.type == "node" then - config.type = "pwa-node" - end - local nativeAdapter = dap.adapters["pwa-node"] - if type(nativeAdapter) == "function" then - nativeAdapter(cb, config) - else - cb(nativeAdapter) + } + end + + -- Define adapters without the "pwa-" prefix for VSCode compatibility + if not dap.adapters[adapterType] then + dap.adapters[adapterType] = function(cb, config) + local nativeAdapter = dap.adapters[pwaType] + + config.type = pwaType + + if type(nativeAdapter) == "function" then + nativeAdapter(cb, config) + else + cb(nativeAdapter) + end end end end @@ -628,31 +631,34 @@ end }, opts = function() local dap = require("dap") - if not dap.adapters["pwa-node"] then - require("dap").adapters["pwa-node"] = { - type = "server", - host = "localhost", - port = "${port}", - executable = { - command = "node", - -- 💀 Make sure to update this path to point to your installation - args = { - LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"), - "${port}", + + for _, adapterType in ipairs({ "node", "chrome", "msedge" }) do + local pwaType = "pwa-" .. adapterType + + if not dap.adapters[pwaType] then + dap.adapters[pwaType] = { + type = "server", + host = "localhost", + port = "${port}", + executable = { + command = "js-debug-adapter", + args = { "${port}" }, }, - }, - } - end - if not dap.adapters["node"] then - dap.adapters["node"] = function(cb, config) - if config.type == "node" then - config.type = "pwa-node" - end - local nativeAdapter = dap.adapters["pwa-node"] - if type(nativeAdapter) == "function" then - nativeAdapter(cb, config) - else - cb(nativeAdapter) + } + end + + -- Define adapters without the "pwa-" prefix for VSCode compatibility + if not dap.adapters[adapterType] then + dap.adapters[adapterType] = function(cb, config) + local nativeAdapter = dap.adapters[pwaType] + + config.type = pwaType + + if type(nativeAdapter) == "function" then + nativeAdapter(cb, config) + else + cb(nativeAdapter) + end end end end @@ -715,4 +721,37 @@ end +## [mason-nvim-dap.nvim](https://github.com/jay-babu/mason-nvim-dap.nvim) _(optional)_ + + + + + +```lua +opts = { + -- chrome adapter is deprecated, use js-debug-adapter instead + automatic_installation = { exclude = { "chrome" } }, +} +``` + + + + + + +```lua +{ + "jay-babu/mason-nvim-dap.nvim", + optional = true, + opts = { + -- chrome adapter is deprecated, use js-debug-adapter instead + automatic_installation = { exclude = { "chrome" } }, + }, +} +``` + + + + + From 044d9c6887902a6962dfbea21fee98d929481499 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 12:46:05 +0000 Subject: [PATCH 092/103] chore(build): auto-generate docs --- docs/extras/ai/claudecode.md | 64 ++++++++++++++++++++++++++++++++++++ docs/extras/coding/blink.md | 3 ++ docs/keymaps.md | 16 +++++++++ docs/plugins/treesitter.md | 2 +- 4 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 docs/extras/ai/claudecode.md diff --git a/docs/extras/ai/claudecode.md b/docs/extras/ai/claudecode.md new file mode 100644 index 0000000000..aae4686005 --- /dev/null +++ b/docs/extras/ai/claudecode.md @@ -0,0 +1,64 @@ +# `Claudecode` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +Below you can find a list of included plugins and their default settings. + +:::caution +You don't need to copy the default settings to your config. +They are only shown here for reference. +::: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +## [claudecode.nvim](https://github.com/coder/claudecode.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "coder/claudecode.nvim", + opts = {}, + keys = { + { "a", "", desc = "+ai", mode = { "n", "v" } }, + { "ac", "ClaudeCode", desc = "Toggle Claude" }, + { "af", "ClaudeCodeFocus", desc = "Focus Claude" }, + { "ar", "ClaudeCode --resume", desc = "Resume Claude" }, + { "aC", "ClaudeCode --continue", desc = "Continue Claude" }, + { "ab", "ClaudeCodeAdd %", desc = "Add current buffer" }, + { "as", "ClaudeCodeSend", mode = "v", desc = "Send to Claude" }, + { + "as", + "ClaudeCodeTreeAdd", + desc = "Add file", + ft = { "NvimTree", "neo-tree", "oil" }, + }, + -- Diff management + { "aa", "ClaudeCodeDiffAccept", desc = "Accept diff" }, + { "ad", "ClaudeCodeDiffDeny", desc = "Deny diff" }, + }, +} +``` + + + + + + diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index bdef1f15eb..b0c234dc25 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -206,6 +206,9 @@ opts = { }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } } config = function(_, opts) + if opts.snippets and opts.snippets.preset == "default" then + opts.snippets.expand = LazyVim.cmp.expand + end -- setup compat sources local enabled = opts.sources.default for _, source in ipairs(opts.sources.compat or {}) do diff --git a/docs/keymaps.md b/docs/keymaps.md index 40db9dc484..0492a2f8f6 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -295,6 +295,22 @@ Part of [lazyvim.plugins.extras.ai.avante](/extras/ai/avante) | --- | --- | --- | | n | Toggle Avante | **n** | +## [claudecode.nvim](https://github.com/coder/claudecode.nvim.git) +Part of [lazyvim.plugins.extras.ai.claudecode](/extras/ai/claudecode) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>a | +ai | **n**, **v** | +| <leader>aa | Accept diff | **n** | +| <leader>ab | Add current buffer | **n** | +| <leader>ac | Toggle Claude | **n** | +| <leader>aC | Continue Claude | **n** | +| <leader>ad | Deny diff | **n** | +| <leader>af | Focus Claude | **n** | +| <leader>ar | Resume Claude | **n** | +| <leader>as | Add file | **n** | +| <leader>as | Send to Claude | **v** | + ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 29899e26f3..881fa6d09c 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -171,7 +171,7 @@ opts = { -- highlighting if enabled("highlight", "highlights") then - pcall(vim.treesitter.start) + pcall(vim.treesitter.start, ev.buf) end -- indents From f4616abf66f45bef608dd8922bfbfdc9be4fbe6a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 16:27:24 +0000 Subject: [PATCH 093/103] chore(build): auto-generate docs --- docs/extras/ai/avante.md | 22 +++++++++++----------- docs/keymaps.md | 12 +++++++++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/extras/ai/avante.md b/docs/extras/ai/avante.md index 7537e60f75..f4d64a0e0e 100644 --- a/docs/extras/ai/avante.md +++ b/docs/extras/ai/avante.md @@ -88,17 +88,17 @@ opts = { "AvanteToggle", }, keys = { - { "n", "aa", "AvanteAsk", desc = "Ask Avante" }, - { "n", "ac", "AvanteChat", desc = "Chat with Avante" }, - { "n", "ae", "AvanteEdit", desc = "Edit Avante" }, - { "n", "af", "AvanteFocus", desc = "Focus Avante" }, - { "n", "ah", "AvanteHistory", desc = "Avante History" }, - { "n", "am", "AvanteModels", desc = "Select Avante Model" }, - { "n", "an", "AvanteChatNew", desc = "New Avante Chat" }, - { "n", "ap", "AvanteSwitchProvider", desc = "Switch Avante Provider" }, - { "n", "ar", "AvanteRefresh", desc = "Refresh Avante" }, - { "n", "as", "AvanteStop", desc = "Stop Avante" }, - { "n", "at", "AvanteToggle", desc = "Toggle Avante" }, + { "aa", "AvanteAsk", desc = "Ask Avante" }, + { "ac", "AvanteChat", desc = "Chat with Avante" }, + { "ae", "AvanteEdit", desc = "Edit Avante" }, + { "af", "AvanteFocus", desc = "Focus Avante" }, + { "ah", "AvanteHistory", desc = "Avante History" }, + { "am", "AvanteModels", desc = "Select Avante Model" }, + { "an", "AvanteChatNew", desc = "New Avante Chat" }, + { "ap", "AvanteSwitchProvider", desc = "Switch Avante Provider" }, + { "ar", "AvanteRefresh", desc = "Refresh Avante" }, + { "as", "AvanteStop", desc = "Stop Avante" }, + { "at", "AvanteToggle", desc = "Toggle Avante" }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 0492a2f8f6..2e60280bb9 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -293,7 +293,17 @@ Part of [lazyvim.plugins.extras.ai.avante](/extras/ai/avante) | Key | Description | Mode | | --- | --- | --- | -| n | Toggle Avante | **n** | +| <leader>aa | Ask Avante | **n** | +| <leader>ac | Chat with Avante | **n** | +| <leader>ae | Edit Avante | **n** | +| <leader>af | Focus Avante | **n** | +| <leader>ah | Avante History | **n** | +| <leader>am | Select Avante Model | **n** | +| <leader>an | New Avante Chat | **n** | +| <leader>ap | Switch Avante Provider | **n** | +| <leader>ar | Refresh Avante | **n** | +| <leader>as | Stop Avante | **n** | +| <leader>at | Toggle Avante | **n** | ## [claudecode.nvim](https://github.com/coder/claudecode.nvim.git) Part of [lazyvim.plugins.extras.ai.claudecode](/extras/ai/claudecode) From 2fecf95da5abc1655bcc5f95a43077e1f485c168 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Oct 2025 18:32:20 +0000 Subject: [PATCH 094/103] chore(build): auto-generate docs --- docs/extras/ai/avante.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/extras/ai/avante.md b/docs/extras/ai/avante.md index f4d64a0e0e..050ccf9539 100644 --- a/docs/extras/ai/avante.md +++ b/docs/extras/ai/avante.md @@ -52,6 +52,9 @@ opts = { selection = { hint_display = "none", }, + behaviour = { + auto_set_keymaps = false, + }, } ``` @@ -71,6 +74,9 @@ opts = { selection = { hint_display = "none", }, + behaviour = { + auto_set_keymaps = false, + }, }, cmd = { "AvanteAsk", From 704a38e9efaaf278169768401dc02cfe707e0df0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Oct 2025 05:21:20 +0000 Subject: [PATCH 095/103] chore(build): auto-generate docs --- docs/extras/lang/dart.md | 10 ---------- docs/extras/lang/solidity.md | 12 ------------ 2 files changed, 22 deletions(-) diff --git a/docs/extras/lang/dart.md b/docs/extras/lang/dart.md index c45da0bc3c..867830d2c6 100644 --- a/docs/extras/lang/dart.md +++ b/docs/extras/lang/dart.md @@ -85,11 +85,6 @@ opts = { ensure_installed = { "dart" } } ```lua opts = { - formatters = { - dart_format = { - args = { "format", "--line-length", "120" }, - }, - }, formatters_by_ft = { dart = { "dart_format" }, }, @@ -105,11 +100,6 @@ opts = { { "stevearc/conform.nvim", opts = { - formatters = { - dart_format = { - args = { "format", "--line-length", "120" }, - }, - }, formatters_by_ft = { dart = { "dart_format" }, }, diff --git a/docs/extras/lang/solidity.md b/docs/extras/lang/solidity.md index bb09929153..0eda4c9f02 100644 --- a/docs/extras/lang/solidity.md +++ b/docs/extras/lang/solidity.md @@ -97,12 +97,6 @@ opts = { formatters_by_ft = { solidity = { "forge_fmt" }, }, - formatters = { - forge_fmt = { - command = "forge", - args = { "fmt" }, - }, - }, } ``` @@ -119,12 +113,6 @@ opts = { formatters_by_ft = { solidity = { "forge_fmt" }, }, - formatters = { - forge_fmt = { - command = "forge", - args = { "fmt" }, - }, - }, }, } ``` From 1bc787284dbde15c10c2dbc53cfd0743f895a322 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 Oct 2025 13:34:27 +0000 Subject: [PATCH 096/103] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 3e1c49a344..8ed717d008 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -237,6 +237,8 @@ opts = function() { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, + { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, + { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, }) end ``` @@ -259,6 +261,8 @@ end { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, + { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, + { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, }) end, } From 2e5accd10a4ea94bf9ba66eb73f380c97550acc2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Oct 2025 08:30:06 +0000 Subject: [PATCH 097/103] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 1 + docs/keymaps.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 8ed717d008..006d7e0162 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -111,6 +111,7 @@ opts = { { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, + { "gD", function() Snacks.picker.git_diff({ base = "origin" }) end, desc = "Git Diff (origin)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, -- Grep diff --git a/docs/keymaps.md b/docs/keymaps.md index 2e60280bb9..232b38f898 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -225,6 +225,7 @@ possible keymaps starting with ``. | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | | <leader>gd | Git Diff (hunks) | **n** | +| <leader>gD | Git Diff (origin) | **n** | | <leader>gs | Git Status | **n** | | <leader>gS | Git Stash | **n** | | <leader>n | Notification History | **n** | @@ -568,6 +569,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | | <leader>gd | Git Diff (hunks) | **n** | +| <leader>gD | Git Diff (origin) | **n** | | <leader>gs | Git Status | **n** | | <leader>gS | Git Stash | **n** | | <leader>n | Notification History | **n** | From a7f287e0749824af127ee616675f96eefc773ff6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Oct 2025 10:23:57 +0000 Subject: [PATCH 098/103] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/extras/coding/yanky.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 162408e155..a00b38309d 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -106,7 +106,7 @@ local opt = vim.opt opt.autowrite = true -- Enable auto write -- only set clipboard if not in ssh, to make sure the OSC 52 -- integration works automatically. -opt.clipboard = vim.env.SSH_TTY and "" or "unnamedplus" -- Sync with system clipboard +opt.clipboard = vim.env.SSH_CONNECTION and "" or "unnamedplus" -- Sync with system clipboard opt.completeopt = "menu,menuone,noselect" opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions opt.confirm = true -- Confirm to save changes before exiting modified buffer diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 3344e6a59d..4ae853c7c1 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -27,6 +27,9 @@ import TabItem from '@theme/TabItem'; ```lua opts = { + system_clipboard = { + sync_with_ring = not vim.env.SSH_CONNECTION, + }, highlight = { timer = 150 }, } ``` @@ -43,6 +46,9 @@ opts = { desc = "Better Yank/Paste", event = "LazyFile", opts = { + system_clipboard = { + sync_with_ring = not vim.env.SSH_CONNECTION, + }, highlight = { timer = 150 }, }, keys = { From c103a248ad8fab196e61c4283c0e34b51e818af1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 24 Oct 2025 04:26:07 +0000 Subject: [PATCH 099/103] chore(build): auto-generate docs --- docs/extras/util/chezmoi.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index 8946d000b6..a96dcc6508 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -38,7 +38,7 @@ opts = nil "alker0/chezmoi.vim", init = function() vim.g["chezmoi#use_tmp_buffer"] = 1 - vim.g["chezmoi#source_dir_path"] = os.getenv("HOME") .. "/.local/share/chezmoi" + vim.g["chezmoi#source_dir_path"] = vim.env.HOME .. "/.local/share/chezmoi" end, } ``` @@ -103,7 +103,7 @@ opts = { init = function() -- run chezmoi edit on file enter vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { - pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, + pattern = { vim.env.HOME .. "/.local/share/chezmoi/*" }, callback = function() vim.schedule(require("chezmoi.commands.__edit").watch) end, From 1f971cd3e4fd23d16ffe48c3de56efb167160b23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 25 Oct 2025 06:29:10 +0000 Subject: [PATCH 100/103] chore(build): auto-generate docs --- docs/extras/ai/sidekick.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/extras/ai/sidekick.md b/docs/extras/ai/sidekick.md index 9deb6f8836..5e4a775581 100644 --- a/docs/extras/ai/sidekick.md +++ b/docs/extras/ai/sidekick.md @@ -73,6 +73,15 @@ opts = function() return true end end + Snacks.toggle({ + name = "Sidekick NES", + get = function() + return require("sidekick.nes").enabled + end, + set = function(state) + require("sidekick.nes").enable(state) + end, + }):map("uN") end ``` @@ -92,6 +101,15 @@ end return true end end + Snacks.toggle({ + name = "Sidekick NES", + get = function() + return require("sidekick.nes").enabled + end, + set = function(state) + require("sidekick.nes").enable(state) + end, + }):map("uN") end, -- stylua: ignore keys = { From afea000c2c4b51749772a3a33d646a74ad9e063f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 25 Oct 2025 17:05:34 +0200 Subject: [PATCH 101/103] docs: autogen docs --- docs/extras/editor/fzf.md | 42 +++++++++---------- docs/extras/editor/inc-rename.md | 62 +++++++++++++++++------------ docs/extras/editor/navic.md | 6 +-- docs/extras/editor/snacks_picker.md | 62 ++++++++++++++++------------- docs/extras/editor/telescope.md | 46 +++++++++++---------- docs/extras/lang/angular.md | 8 ++-- docs/extras/lang/go.md | 8 ++-- docs/extras/lang/python.md | 8 ++-- docs/extras/lang/typescript.md | 8 ++-- 9 files changed, 136 insertions(+), 114 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index a9a3d54590..5226a1b6dd 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -448,16 +448,17 @@ opts = nil ```lua -opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, - }) -end +opts = { + servers = { + -- stylua: ignore + ["*"] = { + { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + }, + }, +} ``` @@ -468,16 +469,17 @@ end ```lua { "neovim/nvim-lspconfig", - opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, - }) - end, + opts = { + servers = { + -- stylua: ignore + ["*"] = { + { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + }, + }, + }, } ``` diff --git a/docs/extras/editor/inc-rename.md b/docs/extras/editor/inc-rename.md index 02e9c33bae..87e4036a17 100644 --- a/docs/extras/editor/inc-rename.md +++ b/docs/extras/editor/inc-rename.md @@ -54,19 +54,24 @@ opts = {} ```lua -opts = function() - local keys = require("lazyvim.plugins.lsp.keymaps").get() - keys[#keys + 1] = { - "cr", - function() - local inc_rename = require("inc_rename") - return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") - end, - expr = true, - desc = "Rename (inc-rename.nvim)", - has = "rename", - } -end +opts = { + servers = { + ["*"] = { + keys = { + { + "cr", + function() + local inc_rename = require("inc_rename") + return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") + end, + expr = true, + desc = "Rename (inc-rename.nvim)", + has = "rename", + }, + }, + }, + }, +} ``` @@ -77,19 +82,24 @@ end ```lua { "neovim/nvim-lspconfig", - opts = function() - local keys = require("lazyvim.plugins.lsp.keymaps").get() - keys[#keys + 1] = { - "cr", - function() - local inc_rename = require("inc_rename") - return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") - end, - expr = true, - desc = "Rename (inc-rename.nvim)", - has = "rename", - } - end, + opts = { + servers = { + ["*"] = { + keys = { + { + "cr", + function() + local inc_rename = require("inc_rename") + return ":" .. inc_rename.config.cmd_name .. " " .. vim.fn.expand("") + end, + expr = true, + desc = "Rename (inc-rename.nvim)", + has = "rename", + }, + }, + }, + }, + }, } ``` diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index 772bc80e0c..affab8f8bd 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -51,10 +51,8 @@ end lazy = true, init = function() vim.g.navic_silence = true - LazyVim.lsp.on_attach(function(client, buffer) - if client:supports_method("textDocument/documentSymbol") then - require("nvim-navic").attach(client, buffer) - end + Snacks.util.lsp.on({ method = "textDocument/documentSymbol" }, function(buffer, client) + require("nvim-navic").attach(client, buffer) end) end, opts = function() diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 006d7e0162..52429748b8 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -228,20 +228,23 @@ end ```lua -opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, - { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, - { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, - { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, - { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, - { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, - { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, - { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, - }) -end +opts = { + servers = { + ["*"] = { + -- stylua: ignore + keys = { + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, + { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, + { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, + { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, + }, + }, + }, +} ``` @@ -252,20 +255,23 @@ end ```lua { "neovim/nvim-lspconfig", - opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, - { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, - { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, - { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, - { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, - { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, - { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, - { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, - }) - end, + opts = { + servers = { + ["*"] = { + -- stylua: ignore + keys = { + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, + { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, + { "gai", function() Snacks.picker.lsp_incoming_calls() end, desc = "C[a]lls Incoming", has = "callHierarchy/incomingCalls" }, + { "gao", function() Snacks.picker.lsp_outgoing_calls() end, desc = "C[a]lls Outgoing", has = "callHierarchy/outgoingCalls" }, + }, + }, + }, + }, } ``` diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 256a1155dc..8841edfeb7 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -471,16 +471,19 @@ opts = {} ```lua -opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" }, - { "gr", "Telescope lsp_references", desc = "References", nowait = true }, - { "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" }, - { "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" }, - }) -end +opts = { + servers = { + ["*"] = { + -- stylua: ignore + keys = { + { "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" }, + { "gr", "Telescope lsp_references", desc = "References", nowait = true }, + { "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" }, + { "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" }, + }, + }, + }, +} ``` @@ -491,16 +494,19 @@ end ```lua { "neovim/nvim-lspconfig", - opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" }, - { "gr", "Telescope lsp_references", desc = "References", nowait = true }, - { "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" }, - { "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" }, - }) - end, + opts = { + servers = { + ["*"] = { + -- stylua: ignore + keys = { + { "gd", function() require("telescope.builtin").lsp_definitions({ reuse_win = true }) end, desc = "Goto Definition", has = "definition" }, + { "gr", "Telescope lsp_references", desc = "References", nowait = true }, + { "gI", function() require("telescope.builtin").lsp_implementations({ reuse_win = true }) end, desc = "Goto Implementation" }, + { "gy", function() require("telescope.builtin").lsp_type_definitions({ reuse_win = true }) end, desc = "Goto T[y]pe Definition" }, + }, + }, + }, + }, } ``` diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index a0c9b387a3..d8a71c66f5 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -83,10 +83,10 @@ opts = { }, setup = { angularls = function() - LazyVim.lsp.on_attach(function(client) + Snacks.util.lsp.on({ name = "angularls" }, function(_, client) --HACK: disable angular renaming capability due to duplicate rename popping up client.server_capabilities.renameProvider = false - end, "angularls") + end) end, }, } @@ -106,10 +106,10 @@ opts = { }, setup = { angularls = function() - LazyVim.lsp.on_attach(function(client) + Snacks.util.lsp.on({ name = "angularls" }, function(_, client) --HACK: disable angular renaming capability due to duplicate rename popping up client.server_capabilities.renameProvider = false - end, "angularls") + end) end, }, }, diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 1eaeb8b754..b1496ba158 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -94,7 +94,7 @@ opts = { gopls = function(_, opts) -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 - LazyVim.lsp.on_attach(function(client, _) + Snacks.util.lsp.on({ name = "gopls" }, function(_, client) if not client.server_capabilities.semanticTokensProvider then local semantic = client.config.capabilities.textDocument.semanticTokens client.server_capabilities.semanticTokensProvider = { @@ -106,7 +106,7 @@ opts = { range = true, } end - end, "gopls") + end) -- end workaround end, }, @@ -165,7 +165,7 @@ opts = { gopls = function(_, opts) -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 - LazyVim.lsp.on_attach(function(client, _) + Snacks.util.lsp.on({ name = "gopls" }, function(_, client) if not client.server_capabilities.semanticTokensProvider then local semantic = client.config.capabilities.textDocument.semanticTokens client.server_capabilities.semanticTokensProvider = { @@ -177,7 +177,7 @@ opts = { range = true, } end - end, "gopls") + end) -- end workaround end, }, diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 293afdf995..a97a583143 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -91,10 +91,10 @@ opts = { }, setup = { [ruff] = function() - LazyVim.lsp.on_attach(function(client, _) + Snacks.util.lsp.on({ name = ruff }, function(_, client) -- Disable hover in favor of Pyright client.server_capabilities.hoverProvider = false - end, ruff) + end) end, }, } @@ -137,10 +137,10 @@ opts = { }, setup = { [ruff] = function() - LazyVim.lsp.on_attach(function(client, _) + Snacks.util.lsp.on({ name = ruff }, function(_, client) -- Disable hover in favor of Pyright client.server_capabilities.hoverProvider = false - end, ruff) + end) end, }, }, diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 4cb656c1dd..01116fbfd9 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -165,7 +165,7 @@ opts = { resolve("vtsls") end - LazyVim.lsp.on_attach(function(client, buffer) + Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range local action, uri, range = unpack(command.arguments) @@ -214,7 +214,7 @@ opts = { end) end) end - end, "vtsls") + end) -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) @@ -369,7 +369,7 @@ opts = { resolve("vtsls") end - LazyVim.lsp.on_attach(function(client, buffer) + Snacks.util.lsp.on({ name = "vtsls" }, function(buffer, client) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) ---@type string, string, lsp.Range local action, uri, range = unpack(command.arguments) @@ -418,7 +418,7 @@ opts = { end) end) end - end, "vtsls") + end) -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) From 0d40cce9a1067316f331e45888be5b111d2d376d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 25 Oct 2025 17:15:40 +0200 Subject: [PATCH 102/103] docs: added more docs on lsp keymaps --- docs/configuration/general.md | 3 + docs/configuration/keymaps.md | 44 +++++-- docs/keymaps.md | 14 ++- docs/plugins/lsp.md | 214 +++++++++++++++++++++++++++------- lua/build.lua | 10 +- 5 files changed, 227 insertions(+), 58 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index a00b38309d..f12de88874 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -400,6 +400,9 @@ map("n", "]", "tabnext", { desc = "Next Tab" }) map("n", "d", "tabclose", { desc = "Close Tab" }) map("n", "[", "tabprevious", { desc = "Previous Tab" }) +-- lua +map({"n", "x"}, "r", function() Snacks.debug.run() end, { desc = "Run Lua", ft = "lua" }) + ``` diff --git a/docs/configuration/keymaps.md b/docs/configuration/keymaps.md index 50a40ea461..aff96a700c 100644 --- a/docs/configuration/keymaps.md +++ b/docs/configuration/keymaps.md @@ -20,23 +20,53 @@ For more info on configuring plugin keymaps, see [Adding & Disabling Plugin Keym ## LSP keymaps -These are the default keymaps that will be added when an LSP server is attached to the current buffer. +LSP keymaps are configured using the `keys` option in your LSP server configuration. +You can add global keymaps that apply to all LSP servers using the special `servers['*']` key, +or server-specific keymaps. + For more info see [Customizing LSP Keymaps](/plugins/lsp#%EF%B8%8F-customizing-lsp-keymaps) -### LSP Server keymaps +### Global LSP Keymaps + +Global LSP keymaps apply to all LSP servers: + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + ['*'] = { + keys = { + -- Add or change a keymap + { "K", vim.lsp.buf.hover, desc = "Hover" }, + -- Disable a keymap + { "gd", false }, + -- Capability-based keymap (only set if server supports it) + { "ca", vim.lsp.buf.code_action, desc = "Code Action", has = "codeAction" }, + }, + }, + }, + }, +} +``` + +### Server-Specific Keymaps -Sometimes it may be necessary to add keymaps for a specific LSP server. -Lazyutils provides a `keys` LSP option for this purpose. +Add keymaps for specific LSP servers: ```lua { "neovim/nvim-lspconfig", opts = { servers = { - tsserver = { + vtsls = { keys = { - { "co", "TypescriptOrganizeImports", desc = "Organize Imports" }, - { "cR", "TypescriptRenameFile", desc = "Rename File" }, + { "co", function() + vim.lsp.buf.code_action({ + apply = true, + context = { only = { "source.organizeImports" }, diagnostics = {} }, + }) + end, desc = "Organize Imports" }, }, }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 232b38f898..0f30f66ee2 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -82,6 +82,8 @@ possible keymaps starting with ``. | <leader>dpp | Toggle Profiler | **n** | | <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | +| <leader>gg | Lazygit (Root Dir) | **n** | +| <leader>gG | Lazygit (cwd) | **n** | | <leader>gL | Git Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gf | Git Current File History | **n** | @@ -115,10 +117,10 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | | <leader>cl | Lsp Info | **n** | -| gd | Goto Definition | **n** | -| gr | References | **n** | -| gI | Goto Implementation | **n** | -| gy | Goto T[y]pe Definition | **n** | +| gd | Goto Definition | **n**, **n** | +| gr | References | **n**, **n** | +| gI | Goto Implementation | **n**, **n** | +| gy | Goto T[y]pe Definition | **n**, **n** | | gD | Goto Declaration | **n** | | K | Hover | **n** | | gK | Signature Help | **n** | @@ -133,6 +135,10 @@ possible keymaps starting with ``. | [[ | Prev Reference | **n** | | <a-n> | Next Reference | **n** | | <a-p> | Prev Reference | **n** | +| <leader>ss | LSP Symbols | **n** | +| <leader>sS | LSP Workspace Symbols | **n** | +| gai | C[a]lls Incoming | **n** | +| gao | C[a]lls Outgoing | **n** | ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim.git) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 2bc56ff488..29460736f0 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -2,26 +2,86 @@ ## ⌨️ Customizing [LSP Keymaps](/keymaps#lsp) -The syntax for adding, deleting and changing [LSP Keymaps](/keymaps#lsp), -is the same as for [plugin keymaps](/configuration/plugins#%EF%B8%8F-adding--disabling-plugin-keymaps), -but you need to configure it using the `opts()` method. +LSP keymaps are configured using the `keys` option in your server configuration. +You can add global keymaps that apply to all LSP servers, or server-specific keymaps. + +### Global LSP Keymaps + +Use the special `servers['*']` key to add keymaps for all LSP servers: ```lua --- LSP keymaps { "neovim/nvim-lspconfig", - opts = function() - local keys = require("lazyvim.plugins.lsp.keymaps").get() - -- change a keymap - keys[#keys + 1] = { "K", "echo 'hello'" } - -- disable a keymap - keys[#keys + 1] = { "K", false } - -- add a keymap - keys[#keys + 1] = { "H", "echo 'hello'" } - end, + opts = { + servers = { + ['*'] = { + keys = { + -- Add a keymap + { "H", "echo 'hello'", desc = "Say Hello" }, + -- Change an existing keymap + { "K", "echo 'custom hover'", desc = "Custom Hover" }, + -- Disable a keymap + { "gd", false }, + }, + }, + }, + }, } ``` +### Server-Specific Keymaps + +Add keymaps for specific LSP servers: + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + vtsls = { + keys = { + { "co", function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.organizeImports" }, + diagnostics = {}, + }, + }) + end, desc = "Organize Imports" }, + }, + }, + }, + }, +} +``` + +### Capability-Based Keymaps + +Use the `has` field to only set keymaps when the LSP server supports specific capabilities: + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + ['*'] = { + keys = { + -- Only set this keymap for servers that support code actions + { "ca", vim.lsp.buf.code_action, desc = "Code Action", has = "codeAction" }, + -- Multiple capabilities + { "cR", function() Snacks.rename.rename_file() end, desc = "Rename File", + has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } }, + }, + }, + }, + }, +} +``` + +**Note**: The `has` field automatically prefixes methods with `textDocument/` if no `/` is present. +So `has = "codeAction"` becomes `has = "textDocument/codeAction"`. + import Tabs from '@theme/Tabs'; @@ -81,15 +141,6 @@ opts = function() folds = { enabled = true, }, - -- add any global capabilities here - capabilities = { - workspace = { - fileOperations = { - didRename = true, - willRename = true, - }, - }, - }, -- options for vim.lsp.buf.format -- `bufnr` and `filter` is handled by the LazyVim formatter, -- but can be also overridden when specified @@ -98,9 +149,47 @@ opts = function() timeout_ms = nil, }, -- LSP Server Settings - ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} + -- Sets the default configuration for an LSP client (or all clients if the special name "*" is used). + ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean, keys?:LazyKeysLspSpec[]} ---@type table servers = { + -- configuration for all lsp servers + ["*"] = { + capabilities = { + workspace = { + fileOperations = { + didRename = true, + willRename = true, + }, + }, + }, + -- stylua: ignore + keys = { + { "cl", function() Snacks.picker.lsp_config() end, desc = "Lsp Info" }, + { "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" }, + { "gr", vim.lsp.buf.references, desc = "References", nowait = true }, + { "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" }, + { "gy", vim.lsp.buf.type_definition, desc = "Goto T[y]pe Definition" }, + { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, + { "K", function() return vim.lsp.buf.hover() end, desc = "Hover" }, + { "gK", function() return vim.lsp.buf.signature_help() end, desc = "Signature Help", has = "signatureHelp" }, + { "", function() return vim.lsp.buf.signature_help() end, mode = "i", desc = "Signature Help", has = "signatureHelp" }, + { "ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "x" }, has = "codeAction" }, + { "cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "x" }, has = "codeLens" }, + { "cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" }, + { "cR", function() Snacks.rename.rename_file() end, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } }, + { "cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }, + { "cA", LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" }, + { "]]", function() Snacks.words.jump(vim.v.count1) end, has = "documentHighlight", + desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + { "[[", function() Snacks.words.jump(-vim.v.count1) end, has = "documentHighlight", + desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + { "", function() Snacks.words.jump(vim.v.count1, true) end, has = "documentHighlight", + desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + { "", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight", + desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + }, + }, stylua = { enabled = false }, lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -164,6 +253,7 @@ end "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, }, + opts_extend = { "servers.*.keys" }, opts = function() ---@class PluginLspOpts local ret = { @@ -208,15 +298,6 @@ end folds = { enabled = true, }, - -- add any global capabilities here - capabilities = { - workspace = { - fileOperations = { - didRename = true, - willRename = true, - }, - }, - }, -- options for vim.lsp.buf.format -- `bufnr` and `filter` is handled by the LazyVim formatter, -- but can be also overridden when specified @@ -225,9 +306,47 @@ end timeout_ms = nil, }, -- LSP Server Settings - ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean} + -- Sets the default configuration for an LSP client (or all clients if the special name "*" is used). + ---@alias lazyvim.lsp.Config vim.lsp.Config|{mason?:boolean, enabled?:boolean, keys?:LazyKeysLspSpec[]} ---@type table servers = { + -- configuration for all lsp servers + ["*"] = { + capabilities = { + workspace = { + fileOperations = { + didRename = true, + willRename = true, + }, + }, + }, + -- stylua: ignore + keys = { + { "cl", function() Snacks.picker.lsp_config() end, desc = "Lsp Info" }, + { "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" }, + { "gr", vim.lsp.buf.references, desc = "References", nowait = true }, + { "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" }, + { "gy", vim.lsp.buf.type_definition, desc = "Goto T[y]pe Definition" }, + { "gD", vim.lsp.buf.declaration, desc = "Goto Declaration" }, + { "K", function() return vim.lsp.buf.hover() end, desc = "Hover" }, + { "gK", function() return vim.lsp.buf.signature_help() end, desc = "Signature Help", has = "signatureHelp" }, + { "", function() return vim.lsp.buf.signature_help() end, mode = "i", desc = "Signature Help", has = "signatureHelp" }, + { "ca", vim.lsp.buf.code_action, desc = "Code Action", mode = { "n", "x" }, has = "codeAction" }, + { "cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "x" }, has = "codeLens" }, + { "cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" }, + { "cR", function() Snacks.rename.rename_file() end, desc = "Rename File", mode ={"n"}, has = { "workspace/didRenameFiles", "workspace/willRenameFiles" } }, + { "cr", vim.lsp.buf.rename, desc = "Rename", has = "rename" }, + { "cA", LazyVim.lsp.action.source, desc = "Source Action", has = "codeAction" }, + { "]]", function() Snacks.words.jump(vim.v.count1) end, has = "documentHighlight", + desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + { "[[", function() Snacks.words.jump(-vim.v.count1) end, has = "documentHighlight", + desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + { "", function() Snacks.words.jump(vim.v.count1, true) end, has = "documentHighlight", + desc = "Next Reference", cond = function() return Snacks.words.is_enabled() end }, + { "", function() Snacks.words.jump(-vim.v.count1, true) end, has = "documentHighlight", + desc = "Prev Reference", cond = function() return Snacks.words.is_enabled() end }, + }, + }, stylua = { enabled = false }, lua_ls = { -- mason = false, -- set to false if you don't want this server to be installed with mason @@ -282,16 +401,15 @@ end LazyVim.format.register(LazyVim.lsp.formatter()) -- setup keymaps - LazyVim.lsp.on_attach(function(client, buffer) - require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer) - end) - - LazyVim.lsp.setup() - LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) + for server, server_opts in pairs(opts.servers) do + if type(server_opts) == "table" and server_opts.keys then + require("lazyvim.plugins.lsp.keymaps").set({ name = server ~= "*" and server or nil }, server_opts.keys) + end + end -- inlay hints if opts.inlay_hints.enabled then - LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) + Snacks.util.lsp.on({ method = "textDocument/inlayHint" }, function(buffer) if vim.api.nvim_buf_is_valid(buffer) and vim.bo[buffer].buftype == "" @@ -304,7 +422,7 @@ end -- folds if opts.folds.enabled then - LazyVim.lsp.on_supports_method("textDocument/foldingRange", function(client, buffer) + Snacks.util.lsp.on({ method = "textDocument/foldingRange" }, function() if LazyVim.set_default("foldmethod", "expr") then LazyVim.set_default("foldexpr", "v:lua.vim.lsp.foldexpr()") end @@ -313,7 +431,7 @@ end -- code lens if opts.codelens.enabled and vim.lsp.codelens then - LazyVim.lsp.on_supports_method("textDocument/codeLens", function(client, buffer) + Snacks.util.lsp.on({ method = "textDocument/codeLens" }, function(buffer) vim.lsp.codelens.refresh() vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { buffer = buffer, @@ -337,7 +455,14 @@ end vim.diagnostic.config(vim.deepcopy(opts.diagnostics)) if opts.capabilities then - vim.lsp.config("*", { capabilities = opts.capabilities }) + LazyVim.deprecate("lsp-config.opts.capabilities", "Use lsp-config.opts.servers['*'].capabilities instead") + opts.servers["*"] = vim.tbl_deep_extend("force", opts.servers["*"] or {}, { + capabilities = opts.capabilities, + }) + end + + if opts.servers["*"] then + vim.lsp.config("*", opts.servers["*"]) end -- get all the servers that are available through mason-lspconfig @@ -349,6 +474,9 @@ end ---@return boolean? exclude automatic setup local function configure(server) + if server == "*" then + return false + end local sopts = opts.servers[server] sopts = sopts == true and {} or (not sopts) and { enabled = false } or sopts --[[@as lazyvim.lsp.Config]] diff --git a/lua/build.lua b/lua/build.lua index b71d8d33b1..e64552661d 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -71,15 +71,17 @@ function M.keymaps() group = "General" dofile(rootLazyVim .. "/lua/lazyvim/config/keymaps.lua") group = "LSP" - local lsp = dofile(rootLazyVim .. "/lua/lazyvim/plugins/lsp/keymaps.lua") - for _, keys in ipairs(lsp.get()) do - map(keys.mode or "n", keys[1], keys[2], keys) + local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" }, { optional = true }) + + local Plugin = require("lazy.core.plugin") + local lsp_opts = Plugin.values(core.plugins["nvim-lspconfig"], "opts", false) + for _, km in ipairs(lsp_opts.servers["*"].keys or {}) do + map(km.mode or "n", km[1], km[2], km) end vim.keymap.set = keymap_set group = "Plugins" - local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" }, { optional = true }) Util.foreach(core.plugins, function(name, plugin) Handler.resolve(plugin) group = ("[%s](%s)"):format(plugin.name, plugin.url) From baa059b53846139ebc107a912e9cfbb783135654 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 25 Oct 2025 15:16:04 +0000 Subject: [PATCH 103/103] chore(build): auto-generate docs --- docs/keymaps.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index 0f30f66ee2..e7bc14a5ee 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -82,8 +82,6 @@ possible keymaps starting with ``. | <leader>dpp | Toggle Profiler | **n** | | <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | -| <leader>gg | Lazygit (Root Dir) | **n** | -| <leader>gG | Lazygit (cwd) | **n** | | <leader>gL | Git Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gf | Git Current File History | **n** |