From e6f3bc587bc75bc741aedf3ab644efb1cfc49557 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 08:19:15 +0000 Subject: [PATCH 001/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 23 +++++++++++++++++------ docs/plugins/lsp.md | 9 ++++++++- docs/plugins/ui.md | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 209b461469..6b780fa895 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -99,12 +99,23 @@ opts = { vim.cmd([[Neotree close]]) end, init = function() - if vim.fn.argc(-1) == 1 then - local stat = vim.uv.fs_stat(vim.fn.argv(0)) - if stat and stat.type == "directory" then - require("neo-tree") - end - end + -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, + -- because `cwd` is not set up properly. + vim.api.nvim_create_autocmd("BufEnter", { + group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), + desc = "Start Neo-tree with directory", + once = true, + callback = function() + if package.loaded["neo-tree"] then + return + else + local stats = vim.uv.fs_stat(vim.fn.argv(0)) + if stats and stats.type == "directory" then + require("neo-tree") + end + end + end, + }) end, opts = { sources = { "filesystem", "buffers", "git_status", "document_symbols" }, diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 81770875ce..847d8a2465 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -339,7 +339,14 @@ opts = { end if have_mason then - mlsp.setup({ ensure_installed = ensure_installed, handlers = { setup } }) + mlsp.setup({ + ensure_installed = vim.tbl_deep_extend( + "force", + ensure_installed, + LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {} + ), + handlers = { setup }, + }) end if LazyVim.lsp.get_config("denols") and LazyVim.lsp.get_config("tsserver") then diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 81af0dd296..972c32be93 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -824,7 +824,7 @@ end ```lua { "nvimdev/dashboard-nvim", - event = "VimEnter", + lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. opts = function() local logo = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z From 8a2dbeb781c718f6a4d46423d45b556d1254bc3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 15:15:55 +0000 Subject: [PATCH 002/553] chore(build): auto-generate docs --- docs/extras/util/dot.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index d810120df3..c65fdcbe89 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -118,7 +118,7 @@ opts = function(_, opts) vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "dotenv", + [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { @@ -126,7 +126,7 @@ opts = function(_, opts) [".*/mako/config"] = "dosini", [".*/kitty/.+%.conf"] = "bash", [".*/hypr/.+%.conf"] = "hyprlang", - ["%.env%.[%w_.-]+"] = "dotenv", + ["%.env%.[%w_.-]+"] = "sh", }, }) @@ -164,7 +164,7 @@ end vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "dotenv", + [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { @@ -172,7 +172,7 @@ end [".*/mako/config"] = "dosini", [".*/kitty/.+%.conf"] = "bash", [".*/hypr/.+%.conf"] = "hyprlang", - ["%.env%.[%w_.-]+"] = "dotenv", + ["%.env%.[%w_.-]+"] = "sh", }, }) From 0b8923bb224f137339c60a3dc675e10166363ac1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 17:12:45 +0000 Subject: [PATCH 003/553] chore(build): auto-generate docs --- docs/extras/util/dot.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index c65fdcbe89..ad2b7ee5c1 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -118,7 +118,6 @@ opts = function(_, opts) vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { @@ -164,7 +163,6 @@ end vim.filetype.add({ extension = { rasi = "rasi", rofi = "rasi", wofi = "rasi" }, filename = { - [".env"] = "sh", ["vifmrc"] = "vim", }, pattern = { From b87b704140a046287af74eabc83cf763e5eaabaf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 12 May 2024 20:16:10 +0000 Subject: [PATCH 004/553] chore(build): auto-generate docs --- docs/extras/editor/refactoring.md | 250 ++++++++++++++++++++++++++++++ docs/extras/lang/vue.md | 157 +++++++++++++++++++ docs/keymaps.md | 16 ++ 3 files changed, 423 insertions(+) create mode 100644 docs/extras/editor/refactoring.md create mode 100644 docs/extras/lang/vue.md diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md new file mode 100644 index 0000000000..2d56cf6a8d --- /dev/null +++ b/docs/extras/editor/refactoring.md @@ -0,0 +1,250 @@ +# `Refactoring` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.refactoring" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [refactoring.nvim](https://github.com/ThePrimeagen/refactoring.nvim) + + + + + +```lua +opts = { + prompt_func_return_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + prompt_func_param_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + printf_statements = {}, + print_var_statements = {}, +} +``` + + + + + + +```lua +{ + "ThePrimeagen/refactoring.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + }, + keys = { + { + "rs", + function() + require("telescope").extensions.refactoring.refactors() + end, + mode = "v", + desc = "Refactor", + }, + { + "ri", + function() + require("refactoring").refactor("Inline Variable") + end, + mode = { "n", "v" }, + desc = "Inline Variable", + }, + { + "rb", + function() + require("refactoring").refactor("Extract Block") + end, + desc = "Extract Block", + }, + { + "rf", + function() + require("refactoring").refactor("Extract Block To File") + end, + desc = "Extract Block To File", + }, + { + "rP", + function() + require("refactoring").debug.printf({ below = false }) + end, + desc = "Debug Print", + }, + { + "rp", + function() + require("refactoring").debug.print_var({ normal = true }) + end, + desc = "Debug Print Variable", + }, + { + "rc", + function() + require("refactoring").debug.cleanup({}) + end, + desc = "Debug Cleanup", + }, + { + "rf", + function() + require("refactoring").refactor("Extract Function") + end, + mode = "v", + desc = "Extract Function", + }, + { + "rF", + function() + require("refactoring").refactor("Extract Function To File") + end, + mode = "v", + desc = "Extract Function To File", + }, + { + "rx", + function() + require("refactoring").refactor("Extract Variable") + end, + mode = "v", + desc = "Extract Variable", + }, + { + "rp", + function() + require("refactoring").debug.print_var() + end, + mode = "v", + desc = "Debug Print Variable", + }, + }, + opts = { + prompt_func_return_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + prompt_func_param_type = { + go = false, + java = false, + cpp = false, + c = false, + h = false, + hpp = false, + cxx = false, + }, + printf_statements = {}, + print_var_statements = {}, + }, + config = function(_, opts) + require("refactoring").setup(opts) + if LazyVim.has("telescope.nvim") then + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("refactoring") + end) + end + end, +} +``` + + + + + +## [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"nvim-treesitter/nvim-treesitter" +``` + + + + + + diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md new file mode 100644 index 0000000000..950a96b153 --- /dev/null +++ b/docs/extras/lang/vue.md @@ -0,0 +1,157 @@ +# `Vue` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.vue" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "vue" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "vue" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function(_, opts) + local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path() + .. "/node_modules/@vue/language-server" + .. "/node_modules/@vue/typescript-plugin" + + opts.servers = vim.tbl_deep_extend("force", opts.servers, { + volar = {}, + -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. + -- The new approach to get typescript support involves using the typescript language server along side volar. + tsserver = { + init_options = { + plugins = { + -- Use typescript language server along with vue typescript plugin + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "javascript", "typescript", "vue" }, + }, + }, + }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + }, + }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path() + .. "/node_modules/@vue/language-server" + .. "/node_modules/@vue/typescript-plugin" + + opts.servers = vim.tbl_deep_extend("force", opts.servers, { + volar = {}, + -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. + -- The new approach to get typescript support involves using the typescript language server along side volar. + tsserver = { + init_options = { + plugins = { + -- Use typescript language server along with vue typescript plugin + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "javascript", "typescript", "vue" }, + }, + }, + }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + }, + }, + }) + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index b540ddc740..f0a1436845 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -431,6 +431,22 @@ Part of [lazyvim.plugins.extras.editor.outline](/extras/editor/outline) | --- | --- | --- | | <leader>cs | Toggle Outline | **n** | +## [refactoring.nvim](https://github.com/ThePrimeagen/refactoring.nvim.git) +Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>rb | Extract Block | **n** | +| <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>rP | Debug Print | **n** | +| <leader>rs | Refactor | **v** | +| <leader>rx | Extract Variable | **v** | + ## [trouble.nvim](https://github.com/folke/trouble.nvim.git) Part of [lazyvim.plugins.extras.editor.trouble-v3](/extras/editor/trouble-v3) From 6da0a90faaa028e63dc98ed0928ac4e82c8e4eca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 May 2024 05:17:56 +0000 Subject: [PATCH 005/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 63b402a9c2..8eb5254a84 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -61,7 +61,7 @@ end "Saecki/crates.nvim", event = { "BufRead Cargo.toml" }, opts = { - src = { + completion = { cmp = { enabled = true }, }, }, @@ -87,7 +87,7 @@ end ```lua opts = { - src = { + completion = { cmp = { enabled = true }, }, } @@ -103,7 +103,7 @@ opts = { "Saecki/crates.nvim", event = { "BufRead Cargo.toml" }, opts = { - src = { + completion = { cmp = { enabled = true }, }, }, From 32cb03296199b6a823ef0f1e99dce16f7fe911bc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 May 2024 06:22:09 +0000 Subject: [PATCH 006/553] chore(build): auto-generate docs --- docs/extras/lang/ansible.md | 4 +++- docs/keymaps.md | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index 7ffd74fe02..59cd7d3f28 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -152,12 +152,14 @@ opts = nil ```lua { "mfussenegger/nvim-ansible", + ft = {}, keys = { { - "tr", + "ta", function() require("ansible").run() end, + desc = "Ansible Run Playbook/Role", silent = true, }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index f0a1436845..c7b87d6238 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -460,6 +460,13 @@ Part of [lazyvim.plugins.extras.editor.trouble-v3](/extras/editor/trouble-v3) | <leader>xX | Buffer Diagnostics (Trouble) | **n** | | [q | Previous Trouble/Quickfix Item | **n** | +## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) +Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>ta | Ansible Run Playbook/Role | **n** | + ## [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim.git) Part of [lazyvim.plugins.extras.lang.markdown](/extras/lang/markdown) From ad59ac2a79b338590b07bcf4c029487a41c3fde2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 13 May 2024 07:15:26 +0000 Subject: [PATCH 007/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 6b780fa895..8ff6f11858 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -234,12 +234,23 @@ opts = {} ```lua { "nvim-telescope/telescope-fzf-native.nvim", - build = vim.fn.executable("make") == 1 and "make" + build = have_make and "make" or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = vim.fn.executable("make") == 1 or vim.fn.executable("cmake") == 1, - config = function() + enabled = have_make or have_cmake, + config = function(plugin) LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("fzf") + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end end) end, } @@ -769,12 +780,23 @@ end dependencies = { { "nvim-telescope/telescope-fzf-native.nvim", - build = vim.fn.executable("make") == 1 and "make" + build = have_make and "make" or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = vim.fn.executable("make") == 1 or vim.fn.executable("cmake") == 1, - config = function() + enabled = have_make or have_cmake, + config = function(plugin) LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("fzf") + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end end) end, }, From 2d9694b19ac88c00a6661ab7172485b64cc629e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 20:17:47 +0000 Subject: [PATCH 008/553] chore(build): auto-generate docs --- docs/plugins/treesitter.md | 55 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 5d602964f6..28cba2726b 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -77,6 +77,7 @@ opts = { 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 @@ -86,33 +87,6 @@ opts = { require("lazy.core.loader").add_to_rtp(plugin) require("nvim-treesitter.query_predicates") end, - dependencies = { - { - "nvim-treesitter/nvim-treesitter-textobjects", - config = function() - -- 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 - end - end - return fn(q, ...) - end - end - end - end, - }, - }, cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, keys = { { "", desc = "Increment Selection" }, @@ -181,6 +155,9 @@ opts = { end, opts.ensure_installed) end require("nvim-treesitter.configs").setup(opts) + vim.schedule(function() + require("lazy").load({ plugins = { "nvim-treesitter-textobjects" } }) + end) end, } ``` @@ -195,6 +172,29 @@ opts = { +```lua +opts = nil +``` + + + + + + +```lua +{ "nvim-treesitter-textobjects" } +``` + + + + + +## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) + + + + + ```lua opts = {} ``` @@ -207,6 +207,7 @@ opts = {} ```lua { "nvim-treesitter/nvim-treesitter-textobjects", + lazy = true, config = function() -- When in diff mode, we want to use the default -- vim text objects c & C instead of the treesitter ones. From 5243ed6139e9ae8f68e1b780e828ad9de87cd9dd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 May 2024 21:14:21 +0000 Subject: [PATCH 009/553] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index d20e558619..839968fde4 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -334,7 +334,7 @@ opts = function() type = "codelldb", request = "attach", name = "Attach to process", - processId = require("dap.utils").pick_process, + pid = require("dap.utils").pick_process, cwd = "${workspaceFolder}", }, } @@ -392,7 +392,7 @@ end type = "codelldb", request = "attach", name = "Attach to process", - processId = require("dap.utils").pick_process, + pid = require("dap.utils").pick_process, cwd = "${workspaceFolder}", }, } From 884abc524a871e84ede0c4b06843496b766b3347 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 07:15:55 +0000 Subject: [PATCH 010/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 0b19a32932..6898e04439 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -45,7 +45,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - highlight = { timer = 250 }, + highlight = { timer = 150 }, ring = { storage = LazyVim.is_win() and "shada" or "sqlite" }, } ``` @@ -60,7 +60,7 @@ opts = { "gbprod/yanky.nvim", dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {}, opts = { - highlight = { timer = 250 }, + highlight = { timer = 150 }, ring = { storage = LazyVim.is_win() and "shada" or "sqlite" }, }, keys = { @@ -84,6 +84,12 @@ opts = { { "=p", "(YankyPutAfterFilter)", desc = "Put After Applying a Filter" }, { "=P", "(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" }, }, + config = function(_, opts) + require("yanky").setup(opts) + local sqlite = require("yanky.storage.sqlite") + local push = sqlite.push + sqlite.push = vim.schedule_wrap(push) + end, } ``` From c38e2570bda7037c773a62f5b38dfd099b3b4801 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 10:17:08 +0000 Subject: [PATCH 011/553] chore(build): auto-generate docs --- docs/extras/coding/native_snippets.md | 68 +++++++++++++++++++++++---- docs/plugins/lsp.md | 10 ++-- 2 files changed, 66 insertions(+), 12 deletions(-) diff --git a/docs/extras/coding/native_snippets.md b/docs/extras/coding/native_snippets.md index 7a7bf6f539..7000de3b68 100644 --- a/docs/extras/coding/native_snippets.md +++ b/docs/extras/coding/native_snippets.md @@ -39,13 +39,14 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { - snippet = { +opts = function(_, opts) + opts.snippet = { expand = function(args) vim.snippet.expand(args.body) end, - }, -} + } + table.insert(opts.sources, { name = "snippets" }) +end ``` @@ -56,13 +57,18 @@ opts = { ```lua { "nvim-cmp", - opts = { - snippet = { + dependencies = { + { "rafamadriz/friendly-snippets" }, + { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, + }, + opts = function(_, opts) + opts.snippet = { expand = function(args) vim.snippet.expand(args.body) end, - }, - }, + } + table.insert(opts.sources, { name = "snippets" }) + end, keys = { { "", @@ -112,4 +118,50 @@ opts = { +## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "rafamadriz/friendly-snippets" } +``` + + + + + +## [nvim-snippets](https://github.com/garymjr/nvim-snippets) + + + + + +```lua +opts = { friendly_snippets = true } +``` + + + + + + +```lua +{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } } +``` + + + + + diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 847d8a2465..bc1b477337 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -247,10 +247,12 @@ opts = { -- diagnostics signs if vim.fn.has("nvim-0.10.0") == 0 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 = "" }) + 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 = "" }) + end end end From 74fb95df0c7c3b512de2324df85ef964f7f378cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 14:16:06 +0000 Subject: [PATCH 012/553] chore(build): auto-generate docs --- docs/configuration/general.md | 9 ++--- docs/extras/dap/core.md | 42 +++++++++++++++++++-- docs/extras/lang/omnisharp.md | 67 ++++++++++++++++++++++++++++++++++ docs/extras/lang/terraform.md | 35 ++++++++++++++++++ docs/extras/lang/typescript.md | 42 ++++++++++++++++++++- docs/keymaps.md | 5 +++ docs/plugins/editor.md | 12 ++++-- docs/plugins/lsp.md | 22 +++++++++++ docs/plugins/ui.md | 1 + 9 files changed, 220 insertions(+), 15 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index abdce4f69b..46a4412c7f 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -194,10 +194,10 @@ vim.g.markdown_recommended_style = 0 local map = LazyVim.safe_keymap_set -- better up/down -map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) -map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -map({ "n", "x" }, "", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) +map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) +map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true }) +map({ "n", "x" }, "", "v:count == 0 ? 'gk' : 'k'", { desc = "Up", expr = true, silent = true }) -- Move to window using the hjkl keys map("n", "", "h", { desc = "Go to Left Window", remap = true }) @@ -446,7 +446,6 @@ vim.api.nvim_create_autocmd("FileType", { "lspinfo", "notify", "qf", - "query", "spectre_panel", "startuptime", "tsplayground", diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 149917fd4e..6591ff2158 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -64,8 +64,6 @@ opts = {} }, opts = {}, config = function(_, opts) - -- setup dap config by VsCode launch.json file - -- require("dap.ext.vscode").load_launchjs() local dap = require("dap") local dapui = require("dapui") dapui.setup(opts) @@ -119,6 +117,11 @@ opts = {} }, }, }, + + -- VsCode launch.json parser + { + "folke/neoconf.nvim", + }, }, -- stylua: ignore @@ -153,6 +156,11 @@ opts = {} { text = sign[1], texthl = sign[2] or "DiagnosticInfo", linehl = sign[3], numhl = sign[3] } ) end + + -- setup dap config by VsCode launch.json file + local vscode = require("dap.ext.vscode") + vscode.json_decode = require("neoconf.json.jsonc").decode_jsonc + vscode.load_launchjs() end, } ``` @@ -190,8 +198,6 @@ opts = {} }, opts = {}, config = function(_, opts) - -- setup dap config by VsCode launch.json file - -- require("dap.ext.vscode").load_launchjs() local dap = require("dap") local dapui = require("dapui") dapui.setup(opts) @@ -323,6 +329,34 @@ opts = { +## [neoconf.nvim](https://github.com/folke/neoconf.nvim) + + VsCode launch.json parser + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/neoconf.nvim", +} +``` + + + + + ## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ which key integration diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index be9b90c016..d5a9579fb2 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -193,6 +193,31 @@ opts = { +## [neotest-dotnet](https://github.com/Issafalcon/neotest-dotnet) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "Issafalcon/neotest-dotnet", +} +``` + + + + + ## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ @@ -352,4 +377,46 @@ end +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = { + adapters = { + ["neotest-dotnet"] = { + -- Here we can set options for neotest-dotnet + }, + }, +} +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + dependencies = { + "Issafalcon/neotest-dotnet", + }, + opts = { + adapters = { + ["neotest-dotnet"] = { + -- Here we can set options for neotest-dotnet + }, + }, + }, +} +``` + + + + + diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index bf8d726de1..b920d4bfbb 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -106,6 +106,41 @@ opts = { +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + ensure terraform tools are installed + + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "tflint" }) +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "tflint" }) + end, +} +``` + + + + + ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index d542a1b982..6600a38379 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -112,8 +112,13 @@ opts = { desc = "Remove Unused Imports", }, }, - ---@diagnostic disable-next-line: missing-fields settings = { + typescript = { + inlayHints = inlay_hints_settings, + }, + javascript = { + inlayHints = inlay_hints_settings, + }, completions = { completeFunctionCalls = true, }, @@ -164,8 +169,13 @@ opts = { desc = "Remove Unused Imports", }, }, - ---@diagnostic disable-next-line: missing-fields settings = { + typescript = { + inlayHints = inlay_hints_settings, + }, + javascript = { + inlayHints = inlay_hints_settings, + }, completions = { completeFunctionCalls = true, }, @@ -237,6 +247,20 @@ opts = function() }, } 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 + end + end + for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do if not dap.configurations[language] then dap.configurations[language] = { @@ -296,6 +320,20 @@ end }, } 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 + end + end + for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do if not dap.configurations[language] then dap.configurations[language] = { diff --git a/docs/keymaps.md b/docs/keymaps.md index c7b87d6238..55dae7854b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -19,6 +19,10 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | +| j | Down | **n**, **x** | +| <Down> | Down | **n**, **x** | +| k | Up | **n**, **x** | +| <Up> | Up | **n**, **x** | | <C-h> | Go to Left Window | **n**, **t** | | <C-j> | Go to Lower Window | **n**, **t** | | <C-k> | Go to Upper Window | **n**, **t** | @@ -193,6 +197,7 @@ possible keymaps starting with ``. | <leader>snd | Dismiss All | **n** | | <leader>snh | Noice History | **n** | | <leader>snl | Noice Last Message | **n** | +| <leader>snt | Noice Telescope | **n** | | <S-Enter> | Redirect Cmdline | **c** | ## [nvim-notify](https://github.com/rcarriga/nvim-notify.git) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 8ff6f11858..5db0264327 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -409,8 +409,10 @@ opts = { end -- stylua: ignore start - map("n", "]h", gs.next_hunk, "Next Hunk") - map("n", "[h", gs.prev_hunk, "Prev Hunk") + map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk") + map("n", "[h", function() gs.nav_hunk("prev") 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", "ghS", gs.stage_buffer, "Stage Buffer") @@ -451,8 +453,10 @@ opts = { end -- stylua: ignore start - map("n", "]h", gs.next_hunk, "Next Hunk") - map("n", "[h", gs.prev_hunk, "Prev Hunk") + map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk") + map("n", "[h", function() gs.nav_hunk("prev") 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", "ghS", gs.stage_buffer, "Stage Buffer") diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index bc1b477337..8b520cae39 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -102,6 +102,17 @@ opts = { completion = { callSnippet = "Replace", }, + doc = { + privateName = { "^_" }, + }, + hint = { + enable = true, + setType = false, + paramType = true, + paramName = "Disable", + semicolon = "Disable", + arrayIndex = "Disable", + }, }, }, }, @@ -202,6 +213,17 @@ opts = { completion = { callSnippet = "Replace", }, + doc = { + privateName = { "^_" }, + }, + hint = { + enable = true, + setType = false, + paramType = true, + paramName = "Disable", + semicolon = "Disable", + arrayIndex = "Disable", + }, }, }, }, diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 972c32be93..4e43bc222b 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -686,6 +686,7 @@ opts = { { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, { "snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, + { "snt", function() require("noice").cmd("telescope") end, desc = "Noice Telescope" }, { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} }, { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}}, }, From 66051ca2a44ccb1159d7a518e07abb4832b77cfa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 15:16:01 +0000 Subject: [PATCH 013/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 2cb78f45b7..e22f74cb13 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -155,8 +155,11 @@ end local entry = event.entry local item = entry:get_completion_item() if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) then - local keys = vim.api.nvim_replace_termcodes("()", false, false, true) - vim.api.nvim_feedkeys(keys, "i", true) + local prev_char = vim.fn.getline("."):sub(vim.fn.col(".") - 1, vim.fn.col(".")) + if prev_char ~= "(" and prev_char ~= ")" then + local keys = vim.api.nvim_replace_termcodes("()", false, false, true) + vim.api.nvim_feedkeys(keys, "i", true) + end end end) end, From 228590ad28cfcb2c6552e26bff121f89a3424c5f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 May 2024 16:19:57 +0000 Subject: [PATCH 014/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 6898e04439..5ea2543be7 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -84,12 +84,6 @@ opts = { { "=p", "(YankyPutAfterFilter)", desc = "Put After Applying a Filter" }, { "=P", "(YankyPutBeforeFilter)", desc = "Put Before Applying a Filter" }, }, - config = function(_, opts) - require("yanky").setup(opts) - local sqlite = require("yanky.storage.sqlite") - local push = sqlite.push - sqlite.push = vim.schedule_wrap(push) - end, } ``` From 0e0dd07c1a9a0feef862bf1173e190b81c3b1069 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 May 2024 06:19:17 +0000 Subject: [PATCH 015/553] chore(build): auto-generate docs --- docs/configuration/general.md | 16 ++++++++-------- docs/plugins/coding.md | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 46a4412c7f..278caa4a7e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -144,21 +144,21 @@ if vim.fn.has("nvim-0.10") == 1 then end -- Folding -vim.opt.foldlevel = 99 +opt.foldlevel = 99 if vim.fn.has("nvim-0.9.0") == 1 then - vim.opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]] - vim.opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" + opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]] + opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" end -- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now if vim.fn.has("nvim-0.10") == 1 then - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" - vim.opt.foldtext = "" - vim.opt.fillchars = "fold: " + opt.foldmethod = "expr" + opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" + opt.foldtext = "" + opt.fillchars = "fold: " else - vim.opt.foldmethod = "indent" + opt.foldmethod = "indent" end vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index e22f74cb13..77fc527047 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -154,8 +154,9 @@ end end local entry = event.entry local item = entry:get_completion_item() - if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) then - local prev_char = vim.fn.getline("."):sub(vim.fn.col(".") - 1, vim.fn.col(".")) + if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) and item.insertTextFormat ~= 2 then + local cursor = vim.api.nvim_win_get_cursor(0) + local prev_char = vim.api.nvim_buf_get_text(0, cursor[1] - 1, cursor[2], cursor[1] - 1, cursor[2] + 1, {})[1] if prev_char ~= "(" and prev_char ~= ")" then local keys = vim.api.nvim_replace_termcodes("()", false, false, true) vim.api.nvim_feedkeys(keys, "i", true) From fed22471a65d724110731ee1c1d71d8b3b4335cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 May 2024 10:16:48 +0000 Subject: [PATCH 016/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 6591ff2158..dbe7f7d205 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -159,8 +159,13 @@ opts = {} -- setup dap config by VsCode launch.json file local vscode = require("dap.ext.vscode") + local _filetypes = require("mason-nvim-dap.mappings.filetypes") + local filetypes = vim.tbl_deep_extend("force", _filetypes, { + ["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, + ["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, + }) vscode.json_decode = require("neoconf.json.jsonc").decode_jsonc - vscode.load_launchjs() + vscode.load_launchjs(nil, filetypes) end, } ``` From ec94a59ba85fe4d764125e4d14af2182e554a479 Mon Sep 17 00:00:00 2001 From: John Pitchko Date: Thu, 16 May 2024 07:22:03 -0600 Subject: [PATCH 017/553] Update plugins.md (#89) Wrap the customizing plugin sample code in a `return {...}` block. --- docs/configuration/plugins.md | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/configuration/plugins.md b/docs/configuration/plugins.md index 2d2db709d0..6b481b4ae7 100644 --- a/docs/configuration/plugins.md +++ b/docs/configuration/plugins.md @@ -63,21 +63,23 @@ For `ft`, `event`, `keys`, `cmd` and `opts` you can instead also specify a `valu that can make changes to the default values, or return new values to be used instead. ```lua --- change trouble config -{ - "folke/trouble.nvim", - -- opts will be merged with the parent spec - opts = { use_diagnostic_signs = true }, -} +return { + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + } --- add cmp-emoji -{ - "hrsh7th/nvim-cmp", - dependencies = { "hrsh7th/cmp-emoji" }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, { name = "emoji" }) - end, + -- add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + } } ``` From c192296b474faa4d78bac48cd1452ed49226dc18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 May 2024 15:16:28 +0000 Subject: [PATCH 018/553] chore(build): auto-generate docs --- docs/configuration/general.md | 53 ++++++++++++----------------------- docs/extras/dap/core.md | 5 +++- 2 files changed, 22 insertions(+), 36 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 278caa4a7e..c32be78d82 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -54,7 +54,7 @@ import TabItem from '@theme/TabItem'; vim.g.mapleader = " " vim.g.maplocalleader = "\\" --- Enable LazyVim auto format +-- LazyVim auto format vim.g.autoformat = true -- LazyVim root dir detection @@ -80,18 +80,24 @@ vim.g.lazygit_config = true local opt = vim.opt opt.autowrite = true -- Enable auto write - -if not vim.env.SSH_TTY then - -- only set clipboard if not in ssh, to make sure the OSC 52 - -- integration works automatically. Requires Neovim >= 0.10.0 - opt.clipboard = "unnamedplus" -- Sync with system clipboard -end - +-- only set clipboard if not in ssh, to make sure the OSC 52 +-- integration works automatically. Requires Neovim >= 0.10.0 +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 opt.confirm = true -- Confirm to save changes before exiting modified buffer opt.cursorline = true -- Enable highlighting of the current line opt.expandtab = true -- Use spaces instead of tabs +opt.fillchars = { + foldopen = "", + foldclose = "", + fold = " ", + foldsep = " ", + diff = "╱", + eob = " ", +} +opt.foldlevel = 99 +opt.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" opt.formatoptions = "jcroqlnt" -- tcqj opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" @@ -118,11 +124,10 @@ 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'lazyvim.util'.ui.statuscolumn()]] opt.tabstop = 2 -- Number of spaces tabs count for opt.termguicolors = true -- True color support -if not vim.g.vscode then - opt.timeoutlen = 300 -- Lower than default (1000) to quickly trigger which-key -end +opt.timeoutlen = vim.g.vscode and 1000 or 300 -- Lower than default (1000) to quickly trigger which-key opt.undofile = true opt.undolevels = 10000 opt.updatetime = 200 -- Save swap file and trigger CursorHold @@ -130,39 +135,17 @@ opt.virtualedit = "block" -- Allow cursor to move where there is no text in visu opt.wildmode = "longest:full,full" -- Command-line completion mode opt.winminwidth = 5 -- Minimum window width opt.wrap = false -- Disable line wrap -opt.fillchars = { - foldopen = "", - foldclose = "", - fold = " ", - foldsep = " ", - diff = "╱", - eob = " ", -} if vim.fn.has("nvim-0.10") == 1 then opt.smoothscroll = true -end - --- Folding -opt.foldlevel = 99 - -if vim.fn.has("nvim-0.9.0") == 1 then - opt.statuscolumn = [[%!v:lua.require'lazyvim.util'.ui.statuscolumn()]] - opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" -end - --- HACK: causes freezes on <= 0.9, so only enable on >= 0.10 for now -if vim.fn.has("nvim-0.10") == 1 then - opt.foldmethod = "expr" opt.foldexpr = "v:lua.require'lazyvim.util'.ui.foldexpr()" + opt.foldmethod = "expr" opt.foldtext = "" - opt.fillchars = "fold: " else opt.foldmethod = "indent" + opt.foldtext = "v:lua.require'lazyvim.util'.ui.foldtext()" end -vim.o.formatexpr = "v:lua.require'lazyvim.util'.format.formatexpr()" - -- Fix markdown indentation settings vim.g.markdown_recommended_style = 0 diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index dbe7f7d205..754b5f2918 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -164,7 +164,10 @@ opts = {} ["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, ["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, }) - vscode.json_decode = require("neoconf.json.jsonc").decode_jsonc + local json = require("plenary.json") + vscode.json_decode = function(str) + return vim.json.decode(json.json_strip_comments(str)) + end vscode.load_launchjs(nil, filetypes) end, } From 3cf0bccf537c7825fc03b60f94fa822144ef48a7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 May 2024 22:26:46 +0200 Subject: [PATCH 019/553] ci: fix build --- docs/extras/coding/native_snippets.md | 167 -------------------------- lua/build.lua | 3 + scripts/build_docs.lua | 18 +-- 3 files changed, 12 insertions(+), 176 deletions(-) delete mode 100644 docs/extras/coding/native_snippets.md diff --git a/docs/extras/coding/native_snippets.md b/docs/extras/coding/native_snippets.md deleted file mode 100644 index 7000de3b68..0000000000 --- a/docs/extras/coding/native_snippets.md +++ /dev/null @@ -1,167 +0,0 @@ -# `Native_snippets` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.native_snippets" }, - { import = "plugins" }, - }, -}) -``` - -
- -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-cmp](https://github.com/hrsh7th/nvim-cmp) - - - - - -```lua -opts = function(_, opts) - opts.snippet = { - expand = function(args) - vim.snippet.expand(args.body) - end, - } - table.insert(opts.sources, { name = "snippets" }) -end -``` - - - - - - -```lua -{ - "nvim-cmp", - dependencies = { - { "rafamadriz/friendly-snippets" }, - { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, - }, - opts = function(_, opts) - opts.snippet = { - expand = function(args) - vim.snippet.expand(args.body) - end, - } - table.insert(opts.sources, { name = "snippets" }) - end, - keys = { - { - "", - function() - if vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) - return - end - return "" - end, - expr = true, - silent = true, - mode = "i", - }, - { - "", - function() - vim.schedule(function() - vim.snippet.jump(1) - end) - end, - silent = true, - mode = "s", - }, - { - "", - function() - if vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) - return - end - return "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - }, -} -``` - - - - - -## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "rafamadriz/friendly-snippets" } -``` - - - - - -## [nvim-snippets](https://github.com/garymjr/nvim-snippets) - - - - - -```lua -opts = { friendly_snippets = true } -``` - - - - - - -```lua -{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } } -``` - - - - - - diff --git a/lua/build.lua b/lua/build.lua index 988cdf202d..2b63ee22e5 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -95,6 +95,8 @@ function M.keymaps() local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "") local extra_doc = "/extras/" .. modname:gsub("lazyvim%.plugins%.extras%.", ""):gsub("%.", "/") local extra = require("lazy.core.plugin").Spec.new({ import = modname }, { optional = true }) + local orig_spec = require("lazy.core.config").spec + require("lazy.core.config").spec = extra Util.foreach(extra.plugins, function(name, plugin) group = ("[%s](%s)\nPart of [%s](%s)"):format(plugin.name, plugin.url, modname, extra_doc) Handler.resolve(plugin) @@ -105,6 +107,7 @@ function M.keymaps() end end) end) + require("lazy.core.config").spec = orig_spec end end) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index e151d35e39..820746f387 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -20,7 +20,7 @@ local plugins = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, { "LazyVim/LazyVim", version = false }, { "folke/lazy.nvim", version = false }, - { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = { "lua" } } }, + { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, } local function main() @@ -48,11 +48,11 @@ local function main() print("Done!\n") end -local ok, err = pcall(main) - -if ok then - os.exit(0) -else - print("Error: " .. err .. "\n") - os.exit(1) -end +local Util = require("lazy.core.util") +Util.try(main, { + on_error = function(err) + print(err) + os.exit(1) + end, +}) +os.exit(0) From 4b10589700725e62246dd0108a54a88c62879d6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 May 2024 20:27:17 +0000 Subject: [PATCH 020/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/coding/luasnip.md | 200 +++++++++++++ docs/extras/coding/mini-ai.md | 185 ++++++++++++ docs/extras/coding/mini-comment.md | 74 +++++ docs/extras/coding/mini-surround.md | 98 +++++++ docs/extras/editor/leap.md | 55 ++-- docs/extras/ui/mini-indentscope.md | 127 +++++++++ docs/extras/ui/treesitter-context.md | 77 +++++ docs/extras/ui/treesitter-rewrite.md | 35 +++ docs/extras/util/startuptime.md | 64 +++++ docs/keymaps.md | 39 +-- docs/plugins/coding.md | 412 ++++----------------------- docs/plugins/editor.md | 1 - docs/plugins/formatting.md | 4 +- docs/plugins/lsp.md | 49 ++-- docs/plugins/treesitter.md | 46 --- docs/plugins/ui.md | 65 +---- docs/plugins/util.md | 32 --- 18 files changed, 995 insertions(+), 569 deletions(-) create mode 100644 docs/extras/coding/luasnip.md create mode 100644 docs/extras/coding/mini-ai.md create mode 100644 docs/extras/coding/mini-comment.md create mode 100644 docs/extras/coding/mini-surround.md create mode 100644 docs/extras/ui/mini-indentscope.md create mode 100644 docs/extras/ui/treesitter-context.md create mode 100644 docs/extras/ui/treesitter-rewrite.md create mode 100644 docs/extras/util/startuptime.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index c32be78d82..143dd32fde 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -311,6 +311,7 @@ map("n", "qq", "qa", { desc = "Quit All" }) -- highlights under cursor map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) +map("n", "uI", "InspectTree", { desc = "Inspect Tree" }) -- LazyVim Changelog map("n", "L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" }) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md new file mode 100644 index 0000000000..0f4d15f08b --- /dev/null +++ b/docs/extras/coding/luasnip.md @@ -0,0 +1,200 @@ +# `Luasnip` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.luasnip" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [LuaSnip](https://github.com/L3MON4D3/LuaSnip) + + + + + +```lua +opts = { + history = true, + delete_check_events = "TextChanged", +} +``` + + + + + + +```lua +{ + "L3MON4D3/LuaSnip", + build = (not LazyVim.is_win()) + and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" + or nil, + dependencies = { + { + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, + }, + { + "nvim-cmp", + dependencies = { + "saadparwaiz1/cmp_luasnip", + }, + opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) + end, + }, + }, + opts = { + history = true, + delete_check_events = "TextChanged", + }, + -- stylua: ignore + keys = { + { + "", + function() + return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + end, + expr = true, silent = true, mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, +} +``` + + + + + +## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "rafamadriz/friendly-snippets", + config = function() + require("luasnip.loaders.from_vscode").lazy_load() + end, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + + + + +```lua +opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) +end +``` + + + + + + +```lua +{ + "nvim-cmp", + dependencies = { + "saadparwaiz1/cmp_luasnip", + }, + opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) + end, +} +``` + + + + + +## [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "saadparwaiz1/cmp_luasnip", +} +``` + + + + + + diff --git a/docs/extras/coding/mini-ai.md b/docs/extras/coding/mini-ai.md new file mode 100644 index 0000000000..ec87d8d599 --- /dev/null +++ b/docs/extras/coding/mini-ai.md @@ -0,0 +1,185 @@ +# `Mini-ai` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.mini-ai" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [mini.ai](https://github.com/echasnovski/mini.ai) + + + + + +```lua +opts = function() + local ai = require("mini.ai") + return { + n_lines = 500, + custom_textobjects = { + o = ai.gen_spec.treesitter({ + a = { "@block.outer", "@conditional.outer", "@loop.outer" }, + i = { "@block.inner", "@conditional.inner", "@loop.inner" }, + }, {}), + f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), + c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), + t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, + d = { "%f[%d]%d+" }, -- digits + e = { -- Word with case + { + "%u[%l%d]+%f[^%l%d]", + "%f[%S][%l%d]+%f[^%l%d]", + "%f[%P][%l%d]+%f[^%l%d]", + "^[%l%d]+%f[^%l%d]", + }, + "^().*()$", + }, + g = function() -- Whole buffer, similar to `gg` and 'G' motion + local from = { line = 1, col = 1 } + local to = { + line = vim.fn.line("$"), + col = math.max(vim.fn.getline("$"):len(), 1), + } + return { from = from, to = to } + end, + u = ai.gen_spec.function_call(), -- u for "Usage" + U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name + }, + } +end +``` + + + + + + +```lua +{ + "echasnovski/mini.ai", + -- keys = { + -- { "a", mode = { "x", "o" } }, + -- { "i", mode = { "x", "o" } }, + -- }, + event = "VeryLazy", + opts = function() + local ai = require("mini.ai") + return { + n_lines = 500, + custom_textobjects = { + o = ai.gen_spec.treesitter({ + a = { "@block.outer", "@conditional.outer", "@loop.outer" }, + i = { "@block.inner", "@conditional.inner", "@loop.inner" }, + }, {}), + f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), + c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), + t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, + d = { "%f[%d]%d+" }, -- digits + e = { -- Word with case + { + "%u[%l%d]+%f[^%l%d]", + "%f[%S][%l%d]+%f[^%l%d]", + "%f[%P][%l%d]+%f[^%l%d]", + "^[%l%d]+%f[^%l%d]", + }, + "^().*()$", + }, + g = function() -- Whole buffer, similar to `gg` and 'G' motion + local from = { line = 1, col = 1 } + local to = { + line = vim.fn.line("$"), + col = math.max(vim.fn.getline("$"):len(), 1), + } + return { from = from, to = to } + end, + u = ai.gen_spec.function_call(), -- u for "Usage" + U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name + }, + } + end, + config = function(_, opts) + require("mini.ai").setup(opts) + -- register all text objects with which-key + LazyVim.on_load("which-key.nvim", function() + ---@type table + local i = { + [" "] = "Whitespace", + ['"'] = 'Balanced "', + ["'"] = "Balanced '", + ["`"] = "Balanced `", + ["("] = "Balanced (", + [")"] = "Balanced ) including white-space", + [">"] = "Balanced > including white-space", + [""] = "Balanced <", + ["]"] = "Balanced ] including white-space", + ["["] = "Balanced [", + ["}"] = "Balanced } including white-space", + ["{"] = "Balanced {", + ["?"] = "User Prompt", + _ = "Underscore", + a = "Argument", + b = "Balanced ), ], }", + c = "Class", + d = "Digit(s)", + e = "Word in CamelCase & snake_case", + f = "Function", + g = "Entire file", + o = "Block, conditional, loop", + q = "Quote `, \", '", + t = "Tag", + u = "Use/call function & method", + U = "Use/call without dot in name", + } + local a = vim.deepcopy(i) + for k, v in pairs(a) do + a[k] = v:gsub(" including.*", "") + end + + local ic = vim.deepcopy(i) + local ac = vim.deepcopy(a) + for key, name in pairs({ n = "Next", l = "Last" }) do + i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic) + a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac) + end + require("which-key").register({ + mode = { "o", "x" }, + i = i, + a = a, + }) + end) + end, +} +``` + + + + + + diff --git a/docs/extras/coding/mini-comment.md b/docs/extras/coding/mini-comment.md new file mode 100644 index 0000000000..739bee7b45 --- /dev/null +++ b/docs/extras/coding/mini-comment.md @@ -0,0 +1,74 @@ +# `Mini-comment` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.mini-comment" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [mini.comment](https://github.com/echasnovski/mini.comment) + + + + + +```lua +opts = { + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring + end, + }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.comment", + event = "VeryLazy", + opts = { + options = { + custom_commentstring = function() + return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring + end, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md new file mode 100644 index 0000000000..69197c737e --- /dev/null +++ b/docs/extras/coding/mini-surround.md @@ -0,0 +1,98 @@ +# `Mini-surround` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.mini-surround" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [mini.surround](https://github.com/echasnovski/mini.surround) + + + + + +```lua +opts = { + mappings = { + add = "gsa", -- Add surrounding in Normal and Visual modes + delete = "gsd", -- Delete surrounding + find = "gsf", -- Find surrounding (to the right) + find_left = "gsF", -- Find surrounding (to the left) + highlight = "gsh", -- Highlight surrounding + replace = "gsr", -- Replace surrounding + update_n_lines = "gsn", -- Update `n_lines` + }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.surround", + keys = function(_, keys) + -- 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.delete, desc = "Delete Surrounding" }, + { opts.mappings.find, desc = "Find Right Surrounding" }, + { opts.mappings.find_left, desc = "Find Left Surrounding" }, + { opts.mappings.highlight, desc = "Highlight Surrounding" }, + { opts.mappings.replace, desc = "Replace Surrounding" }, + { opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" }, + } + mappings = vim.tbl_filter(function(m) + return m[1] and #m[1] > 0 + end, mappings) + return vim.list_extend(mappings, keys) + end, + opts = { + mappings = { + add = "gsa", -- Add surrounding in Normal and Visual modes + delete = "gsd", -- Delete surrounding + find = "gsf", -- Find surrounding (to the right) + find_left = "gsF", -- Find surrounding (to the left) + highlight = "gsh", -- Highlight surrounding + replace = "gsr", -- Replace surrounding + update_n_lines = "gsn", -- Update `n_lines` + }, + }, +} +``` + + + + + + diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index d169b4e2ce..26da8743e6 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -110,7 +110,33 @@ opts = {}
-## [mini.surround](https://github.com/echasnovski/mini.surround) +## [vim-repeat](https://github.com/tpope/vim-repeat) + + makes some plugins dot-repeatable like leap + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "tpope/vim-repeat", event = "VeryLazy" } +``` + + + + + +## [mini.surround](https://github.com/echasnovski/mini.surround) _(optional)_ rename surround mappings from gs to gz to prevent conflict with leap @@ -141,6 +167,7 @@ opts = { ```lua { "echasnovski/mini.surround", + optional = true, opts = { mappings = { add = "gza", -- Add surrounding in Normal and Visual modes @@ -159,30 +186,4 @@ opts = { -## [vim-repeat](https://github.com/tpope/vim-repeat) - - makes some plugins dot-repeatable like leap - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "tpope/vim-repeat", event = "VeryLazy" } -``` - - - - - diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md new file mode 100644 index 0000000000..186c90cb14 --- /dev/null +++ b/docs/extras/ui/mini-indentscope.md @@ -0,0 +1,127 @@ +# `Mini-indentscope` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.mini-indentscope" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [mini.indentscope](https://github.com/echasnovski/mini.indentscope) + + Active indent guide and indent text objects. When you're browsing + code, this highlights the current level of indentation, and animates + the highlighting. + + + + + + +```lua +opts = { + -- symbol = "▏", + symbol = "│", + options = { try_as_border = true }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.indentscope", + version = false, -- wait till new 0.7.0 release to put it back on semver + event = "LazyFile", + opts = { + -- symbol = "▏", + symbol = "│", + options = { try_as_border = true }, + }, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + end, +} +``` + + + + + +## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) + + + + + +```lua +opts = { + scope = { enabled = false }, +} +``` + + + + + + +```lua +{ + "lukas-reineke/indent-blankline.nvim", + event = "LazyFile", + opts = { + scope = { enabled = false }, + }, +} +``` + + + + + + diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md new file mode 100644 index 0000000000..bdb3238642 --- /dev/null +++ b/docs/extras/ui/treesitter-context.md @@ -0,0 +1,77 @@ +# `Treesitter-context` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.treesitter-context" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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-context](https://github.com/nvim-treesitter/nvim-treesitter-context) + + + + + +```lua +opts = { mode = "cursor", max_lines = 3 } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter-context", + event = "LazyFile", + opts = { mode = "cursor", max_lines = 3 }, + keys = { + { + "ut", + function() + local tsc = require("treesitter-context") + tsc.toggle() + if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then + LazyVim.info("Enabled Treesitter Context", { title = "Option" }) + else + LazyVim.warn("Disabled Treesitter Context", { title = "Option" }) + end + end, + desc = "Toggle Treesitter Context", + }, + }, +} +``` + + + + + + diff --git a/docs/extras/ui/treesitter-rewrite.md b/docs/extras/ui/treesitter-rewrite.md new file mode 100644 index 0000000000..b17c7b48e3 --- /dev/null +++ b/docs/extras/ui/treesitter-rewrite.md @@ -0,0 +1,35 @@ +# `Treesitter-rewrite` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.treesitter-rewrite" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + + diff --git a/docs/extras/util/startuptime.md b/docs/extras/util/startuptime.md new file mode 100644 index 0000000000..df7ecb53e0 --- /dev/null +++ b/docs/extras/util/startuptime.md @@ -0,0 +1,64 @@ +# `Startuptime` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.util.startuptime" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [vim-startuptime](https://github.com/dstein64/vim-startuptime) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "dstein64/vim-startuptime", + cmd = "StartupTime", + config = function() + vim.g.startuptime_tries = 10 + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 55dae7854b..b7155b6f66 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -76,6 +76,7 @@ possible keymaps starting with ``. | <leader>gf | Lazygit Current File History | **n** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | +| <leader>uI | Inspect Tree | **n** | | <leader>L | LazyVim Changelog | **n** | | <leader>ft | Terminal (Root Dir) | **n** | | <leader>fT | Terminal (cwd) | **n** | @@ -164,18 +165,6 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>up | Toggle Auto Pairs | **n** | -## [mini.surround](https://github.com/echasnovski/mini.surround.git) - -| Key | Description | Mode | -| --- | --- | --- | -| gsa | Add Surrounding | **n**, **v** | -| gsd | Delete Surrounding | **n** | -| gsf | Find Right Surrounding | **n** | -| gsF | Find Left Surrounding | **n** | -| gsh | Highlight Surrounding | **n** | -| gsn | Update `MiniSurround.config.n_lines` | **n** | -| gsr | Replace Surrounding | **n** | - ## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) | Key | Description | Mode | @@ -219,12 +208,6 @@ possible keymaps starting with ``. | <bs> | Decrement Selection | **x** | | <c-space> | Increment Selection | **n** | -## [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>ut | Toggle Treesitter Context | **n** | - ## [persistence.nvim](https://github.com/folke/persistence.nvim.git) | Key | Description | Mode | @@ -303,6 +286,19 @@ possible keymaps starting with ``. | [[ | Prev Reference | **n** | | ]] | Next Reference | **n** | +## [mini.surround](https://github.com/echasnovski/mini.surround.git) +Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) + +| Key | Description | Mode | +| --- | --- | --- | +| gsa | Add Surrounding | **n**, **v** | +| gsd | Delete Surrounding | **n** | +| gsf | Find Right Surrounding | **n** | +| gsF | Find Left Surrounding | **n** | +| gsh | Highlight Surrounding | **n** | +| gsn | Update `MiniSurround.config.n_lines` | **n** | +| gsr | Replace Surrounding | **n** | + ## [yanky.nvim](https://github.com/gbprod/yanky.nvim.git) Part of [lazyvim.plugins.extras.coding.yanky](/extras/coding/yanky) @@ -523,6 +519,13 @@ Part of [lazyvim.plugins.extras.ui.edgy](/extras/ui/edgy) | <leader>ue | Edgy Toggle | **n** | | <leader>uE | Edgy Select Window | **n** | +## [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context.git) +Part of [lazyvim.plugins.extras.ui.treesitter-context](/extras/ui/treesitter-context) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>ut | Toggle Treesitter Context | **n** | + ## [mason.nvim](https://github.com/williamboman/mason.nvim.git) Part of [lazyvim.plugins.extras.util.gitui](/extras/util/gitui) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 77fc527047..d0658c4d20 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -244,20 +244,21 @@ opts = nil -## [LuaSnip](https://github.com/L3MON4D3/LuaSnip) - - snippets - +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) ```lua -opts = { - history = true, - delete_check_events = "TextChanged", -} +opts = function(_, opts) + opts.snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + } + table.insert(opts.sources, { name = "snippets" }) +end ``` @@ -267,47 +268,60 @@ opts = { ```lua { - "L3MON4D3/LuaSnip", - build = (not LazyVim.is_win()) - and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" - or nil, + "nvim-cmp", dependencies = { + { "rafamadriz/friendly-snippets" }, + { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, + }, + opts = function(_, opts) + opts.snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + } + table.insert(opts.sources, { name = "snippets" }) + end, + keys = { { - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() + "", + function() + if vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) + return + end + return "" end, + expr = true, + silent = true, + mode = "i", }, { - "nvim-cmp", - dependencies = { - "saadparwaiz1/cmp_luasnip", - }, - opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) + "", + function() + vim.schedule(function() + vim.snippet.jump(1) + end) end, + silent = true, + mode = "s", }, - }, - opts = { - history = true, - delete_check_events = "TextChanged", - }, - -- stylua: ignore - keys = { { - "", + "", function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + if vim.snippet.active({ direction = -1 }) then + vim.schedule(function() + vim.snippet.jump(-1) + end) + return + end + return "" end, - expr = true, silent = true, mode = "i", + expr = true, + silent = true, + mode = { "i", "s" }, }, - { "", function() require("luasnip").jump(1) end, mode = "s" }, - { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, }, } ``` @@ -323,42 +337,7 @@ opts = { ```lua -opts = {} -``` - - - - - - -```lua -{ - "rafamadriz/friendly-snippets", - config = function() - require("luasnip.loaders.from_vscode").lazy_load() - end, -} -``` - - - - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - - - - -```lua -opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) -end +opts = nil ``` @@ -367,34 +346,21 @@ end ```lua -{ - "nvim-cmp", - dependencies = { - "saadparwaiz1/cmp_luasnip", - }, - opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) - end, -} +{ "rafamadriz/friendly-snippets" } ``` -## [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) +## [nvim-snippets](https://github.com/garymjr/nvim-snippets) ```lua -opts = nil +opts = { friendly_snippets = true } ``` @@ -403,9 +369,7 @@ opts = nil ```lua -{ - "saadparwaiz1/cmp_luasnip", -} +{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } } ``` @@ -464,76 +428,6 @@ opts = { -## [mini.surround](https://github.com/echasnovski/mini.surround) - - Fast and feature-rich surround actions. For text that includes - surrounding characters like brackets or quotes, this allows you - to select the text inside, change or modify the surrounding characters, - and more. - - - - - - -```lua -opts = { - mappings = { - add = "gsa", -- Add surrounding in Normal and Visual modes - delete = "gsd", -- Delete surrounding - find = "gsf", -- Find surrounding (to the right) - find_left = "gsF", -- Find surrounding (to the left) - highlight = "gsh", -- Highlight surrounding - replace = "gsr", -- Replace surrounding - update_n_lines = "gsn", -- Update `n_lines` - }, -} -``` - - - - - - -```lua -{ - "echasnovski/mini.surround", - keys = function(_, keys) - -- Populate the keys based on the user's options - local plugin = require("lazy.core.config").spec.plugins["mini.surround"] - local opts = require("lazy.core.plugin").values(plugin, "opts", false) - local mappings = { - { opts.mappings.add, desc = "Add Surrounding", mode = { "n", "v" } }, - { opts.mappings.delete, desc = "Delete Surrounding" }, - { opts.mappings.find, desc = "Find Right Surrounding" }, - { opts.mappings.find_left, desc = "Find Left Surrounding" }, - { opts.mappings.highlight, desc = "Highlight Surrounding" }, - { opts.mappings.replace, desc = "Replace Surrounding" }, - { opts.mappings.update_n_lines, desc = "Update `MiniSurround.config.n_lines`" }, - } - mappings = vim.tbl_filter(function(m) - return m[1] and #m[1] > 0 - end, mappings) - return vim.list_extend(mappings, keys) - end, - opts = { - mappings = { - add = "gsa", -- Add surrounding in Normal and Visual modes - delete = "gsd", -- Delete surrounding - find = "gsf", -- Find surrounding (to the right) - find_left = "gsF", -- Find surrounding (to the left) - highlight = "gsh", -- Highlight surrounding - replace = "gsr", -- Replace surrounding - update_n_lines = "gsn", -- Update `n_lines` - }, - }, -} -``` - - - - - ## [nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) comments @@ -568,196 +462,4 @@ opts = { -## [mini.comment](https://github.com/echasnovski/mini.comment) - - - - - -```lua -opts = { - options = { - custom_commentstring = function() - return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring - end, - }, -} -``` - - - - - - -```lua -{ - "echasnovski/mini.comment", - event = "VeryLazy", - opts = { - options = { - custom_commentstring = function() - return require("ts_context_commentstring.internal").calculate_commentstring() or vim.bo.commentstring - end, - }, - }, -} -``` - - - - - -## [mini.ai](https://github.com/echasnovski/mini.ai) - - Better text-objects - - - - - - -```lua -opts = function() - local ai = require("mini.ai") - return { - n_lines = 500, - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { "@block.outer", "@conditional.outer", "@loop.outer" }, - i = { "@block.inner", "@conditional.inner", "@loop.inner" }, - }, {}), - f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), - c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), - t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, - d = { "%f[%d]%d+" }, -- digits - e = { -- Word with case - { - "%u[%l%d]+%f[^%l%d]", - "%f[%S][%l%d]+%f[^%l%d]", - "%f[%P][%l%d]+%f[^%l%d]", - "^[%l%d]+%f[^%l%d]", - }, - "^().*()$", - }, - g = function() -- Whole buffer, similar to `gg` and 'G' motion - local from = { line = 1, col = 1 } - local to = { - line = vim.fn.line("$"), - col = math.max(vim.fn.getline("$"):len(), 1), - } - return { from = from, to = to } - end, - u = ai.gen_spec.function_call(), -- u for "Usage" - U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name - }, - } -end -``` - - - - - - -```lua -{ - "echasnovski/mini.ai", - -- keys = { - -- { "a", mode = { "x", "o" } }, - -- { "i", mode = { "x", "o" } }, - -- }, - event = "VeryLazy", - opts = function() - local ai = require("mini.ai") - return { - n_lines = 500, - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { "@block.outer", "@conditional.outer", "@loop.outer" }, - i = { "@block.inner", "@conditional.inner", "@loop.inner" }, - }, {}), - f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), - c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), - t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, - d = { "%f[%d]%d+" }, -- digits - e = { -- Word with case - { - "%u[%l%d]+%f[^%l%d]", - "%f[%S][%l%d]+%f[^%l%d]", - "%f[%P][%l%d]+%f[^%l%d]", - "^[%l%d]+%f[^%l%d]", - }, - "^().*()$", - }, - g = function() -- Whole buffer, similar to `gg` and 'G' motion - local from = { line = 1, col = 1 } - local to = { - line = vim.fn.line("$"), - col = math.max(vim.fn.getline("$"):len(), 1), - } - return { from = from, to = to } - end, - u = ai.gen_spec.function_call(), -- u for "Usage" - U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name - }, - } - end, - config = function(_, opts) - require("mini.ai").setup(opts) - -- register all text objects with which-key - LazyVim.on_load("which-key.nvim", function() - ---@type table - local i = { - [" "] = "Whitespace", - ['"'] = 'Balanced "', - ["'"] = "Balanced '", - ["`"] = "Balanced `", - ["("] = "Balanced (", - [")"] = "Balanced ) including white-space", - [">"] = "Balanced > including white-space", - [""] = "Balanced <", - ["]"] = "Balanced ] including white-space", - ["["] = "Balanced [", - ["}"] = "Balanced } including white-space", - ["{"] = "Balanced {", - ["?"] = "User Prompt", - _ = "Underscore", - a = "Argument", - b = "Balanced ), ], }", - c = "Class", - d = "Digit(s)", - e = "Word in CamelCase & snake_case", - f = "Function", - g = "Entire file", - o = "Block, conditional, loop", - q = "Quote `, \", '", - t = "Tag", - u = "Use/call function & method", - U = "Use/call without dot in name", - } - local a = vim.deepcopy(i) - for k, v in pairs(a) do - a[k] = v:gsub(" including.*", "") - end - - local ic = vim.deepcopy(i) - local ac = vim.deepcopy(a) - for key, name in pairs({ n = "Next", l = "Last" }) do - i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic) - a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac) - end - require("which-key").register({ - mode = { "o", "x" }, - i = i, - a = a, - }) - end) - end, -} -``` - - - - - diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 5db0264327..f95a6d74df 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -566,7 +566,6 @@ opts = nil ```lua { "echasnovski/mini.bufremove", - keys = { { "bd", diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index c5897f686e..330ff9441f 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -101,9 +101,7 @@ end priority = 100, primary = true, format = function(buf) - local plugin = require("lazy.core.config").plugins["conform.nvim"] - local Plugin = require("lazy.core.plugin") - local opts = Plugin.values(plugin, "opts", false) + local opts = LazyVim.opts("conform.nvim") require("conform").format(LazyVim.merge({}, opts.format, { bufnr = buf })) end, sources = function(buf) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 8b520cae39..7c5c87a277 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -65,7 +65,7 @@ opts = { -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { - enabled = false, + enabled = true, }, -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 -- Be aware that you also will need to properly configure your LSP server to @@ -176,7 +176,7 @@ opts = { -- Be aware that you also will need to properly configure your LSP server to -- provide the inlay hints. inlay_hints = { - enabled = false, + enabled = true, }, -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 -- Be aware that you also will need to properly configure your LSP server to @@ -244,8 +244,7 @@ opts = { ---@param opts PluginLspOpts config = function(_, opts) if LazyVim.has("neoconf.nvim") then - local plugin = require("lazy.core.config").spec.plugins["neoconf.nvim"] - require("neoconf").setup(require("lazy.core.plugin").values(plugin, "opts", false)) + require("neoconf").setup(LazyVim.opts("neoconf.nvim")) end -- setup autoformat @@ -278,27 +277,29 @@ opts = { end end - -- inlay hints - if opts.inlay_hints.enabled then - LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/inlayHint") then - LazyVim.toggle.inlay_hints(buffer, true) - end - end) - end + if vim.fn.has("nvim-0.10") == 1 then + -- inlay hints + if opts.inlay_hints.enabled then + LazyVim.lsp.on_attach(function(client, buffer) + if client.supports_method("textDocument/inlayHint") then + LazyVim.toggle.inlay_hints(buffer, true) + end + end) + end - -- code lens - if opts.codelens.enabled and vim.lsp.codelens then - LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/codeLens") then - vim.lsp.codelens.refresh() - --- autocmd BufEnter,CursorHold,InsertLeave lua 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_attach(function(client, buffer) + if client.supports_method("textDocument/codeLens") then + vim.lsp.codelens.refresh() + --- autocmd BufEnter,CursorHold,InsertLeave lua vim.lsp.codelens.refresh() + vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { + buffer = buffer, + callback = vim.lsp.codelens.refresh, + }) + end + end) + end end if type(opts.diagnostics.virtual_text) == "table" and opts.diagnostics.virtual_text.prefix == "icons" then diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 28cba2726b..fd26c85732 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -237,52 +237,6 @@ opts = {} -## [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context) - - Show context of the current function - - - - - - -```lua -opts = { mode = "cursor", max_lines = 3 } -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter-context", - event = "LazyFile", - enabled = true, - opts = { mode = "cursor", max_lines = 3 }, - keys = { - { - "ut", - function() - local tsc = require("treesitter-context") - tsc.toggle() - if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then - LazyVim.info("Enabled Treesitter Context", { title = "Option" }) - else - LazyVim.warn("Disabled Treesitter Context", { title = "Option" }) - end - end, - desc = "Toggle Treesitter Context", - }, - }, -} -``` - - - - - ## [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag) Automatically add closing tags for HTML and JSX diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 4e43bc222b..c8c53d2e6b 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -446,7 +446,7 @@ opts = { char = "│", tab_char = "│", }, - scope = { enabled = false }, + scope = { show_start = false, show_end = false }, exclude = { filetypes = { "help", @@ -479,7 +479,7 @@ opts = { char = "│", tab_char = "│", }, - scope = { enabled = false }, + scope = { show_start = false, show_end = false }, exclude = { filetypes = { "help", @@ -504,67 +504,6 @@ opts = { -## [mini.indentscope](https://github.com/echasnovski/mini.indentscope) - - Active indent guide and indent text objects. When you're browsing - code, this highlights the current level of indentation, and animates - the highlighting. - - - - - - -```lua -opts = { - -- symbol = "▏", - symbol = "│", - options = { try_as_border = true }, -} -``` - - - - - - -```lua -{ - "echasnovski/mini.indentscope", - version = false, -- wait till new 0.7.0 release to put it back on semver - event = "LazyFile", - opts = { - -- symbol = "▏", - symbol = "│", - options = { try_as_border = true }, - }, - init = function() - vim.api.nvim_create_autocmd("FileType", { - pattern = { - "help", - "alpha", - "dashboard", - "neo-tree", - "Trouble", - "trouble", - "lazy", - "mason", - "notify", - "toggleterm", - "lazyterm", - }, - callback = function() - vim.b.miniindentscope_disable = true - end, - }) - end, -} -``` - - - - - ## [which-key.nvim](https://github.com/folke/which-key.nvim) Displays a popup with possible key bindings of the command you started typing diff --git a/docs/plugins/util.md b/docs/plugins/util.md index aa6ba9e1d7..30c28143b8 100644 --- a/docs/plugins/util.md +++ b/docs/plugins/util.md @@ -5,38 +5,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [vim-startuptime](https://github.com/dstein64/vim-startuptime) - - measure startuptime - - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "dstein64/vim-startuptime", - cmd = "StartupTime", - config = function() - vim.g.startuptime_tries = 10 - end, -} -``` - - - - - ## [persistence.nvim](https://github.com/folke/persistence.nvim) Session management. This saves your session in the background, From 943f568c12416fe6aaf2c890ee8a99c4faad9c3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 07:15:10 +0000 Subject: [PATCH 021/553] chore(build): auto-generate docs --- docs/extras/ui/treesitter-rewrite.md | 121 +++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) diff --git a/docs/extras/ui/treesitter-rewrite.md b/docs/extras/ui/treesitter-rewrite.md index b17c7b48e3..86fa2257ea 100644 --- a/docs/extras/ui/treesitter-rewrite.md +++ b/docs/extras/ui/treesitter-rewrite.md @@ -32,4 +32,125 @@ 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 = function() + patch() + return { + highlight = { enable = true }, + indent = { enable = true }, + ensure_install = { + "bash", + "c", + "diff", + "html", + "javascript", + "jsdoc", + "json", + "jsonc", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "xml", + "yaml", + }, + } +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + version = false, -- last release is way too old and doesn't work on Windows + branch = "main", + build = ":TSUpdate", + lazy = false, + cmd = {}, + opts = function() + patch() + return { + highlight = { enable = true }, + indent = { enable = true }, + ensure_install = { + "bash", + "c", + "diff", + "html", + "javascript", + "jsdoc", + "json", + "jsonc", + "lua", + "luadoc", + "luap", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "toml", + "tsx", + "typescript", + "vim", + "vimdoc", + "xml", + "yaml", + }, + } + end, + init = function() end, + ---@param opts TSConfig + config = function(_, opts) + ---@return string[] + local function norm(ensure) + return ensure == nil and {} or type(ensure) == "string" and { ensure } or ensure + end + + -- ensure_installed is deprecated, but still supported + opts.ensure_install = LazyVim.dedup(vim.list_extend(norm(opts.ensure_install), norm(opts.ensure_installed))) + + require("nvim-treesitter").setup(opts) + patch() + + -- 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, +} +``` + + + + + From 3846e0e40911665b83f199bb4356ffa745af01c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 08:19:58 +0000 Subject: [PATCH 022/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 ++ docs/extras/editor/illuminate.md | 125 +++++++++++++++++++++++++++++++ docs/keymaps.md | 24 +++--- docs/plugins/editor.md | 119 ----------------------------- docs/plugins/lsp.md | 10 +++ 5 files changed, 150 insertions(+), 133 deletions(-) create mode 100644 docs/extras/editor/illuminate.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 143dd32fde..9afbe65841 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -77,6 +77,9 @@ vim.g.lazygit_config = true -- * powershell -- LazyVim.terminal.setup("pwsh") +-- Hide deprecation warnings +vim.g.deprecation_warnings = false + local opt = vim.opt opt.autowrite = true -- Enable auto write @@ -209,6 +212,8 @@ map("n", "[b", "bprevious", { desc = "Prev Buffer" }) map("n", "]b", "bnext", { desc = "Next Buffer" }) map("n", "bb", "e #", { desc = "Switch to Other Buffer" }) map("n", "`", "e #", { desc = "Switch to Other Buffer" }) +map("n", "bd", LazyVim.ui.bufremove, { desc = "Delete Buffer" }) +map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) -- Clear search with map({ "i", "n" }, "", "noh", { desc = "Escape and Clear hlsearch" }) diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md new file mode 100644 index 0000000000..8cf74fac2e --- /dev/null +++ b/docs/extras/editor/illuminate.md @@ -0,0 +1,125 @@ +# `Illuminate` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.illuminate" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [vim-illuminate](https://github.com/RRethy/vim-illuminate) + + + + + +```lua +opts = { + delay = 200, + large_file_cutoff = 2000, + large_file_overrides = { + providers = { "lsp" }, + }, +} +``` + + + + + + +```lua +{ + "RRethy/vim-illuminate", + event = "LazyFile", + opts = { + delay = 200, + large_file_cutoff = 2000, + large_file_overrides = { + providers = { "lsp" }, + }, + }, + config = function(_, opts) + require("illuminate").configure(opts) + + local function map(key, dir, buffer) + vim.keymap.set("n", key, function() + require("illuminate")["goto_" .. dir .. "_reference"](false) + end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer }) + end + + map("]]", "next") + map("[[", "prev") + + -- also set it after loading ftplugins, since a lot overwrite [[ and ]] + vim.api.nvim_create_autocmd("FileType", { + callback = function() + local buffer = vim.api.nvim_get_current_buf() + map("]]", "next", buffer) + map("[[", "prev", buffer) + end, + }) + end, + keys = { + { "]]", desc = "Next Reference" }, + { "[[", desc = "Prev Reference" }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { document_highlight = { enabed = false } } +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { document_highlight = { enabed = false } }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index b7155b6f66..68c4663003 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -39,6 +39,8 @@ possible keymaps starting with ``. | ]b | Next Buffer | **n** | | <leader>bb | Switch to Other Buffer | **n** | | <leader>` | Switch to Other Buffer | **n** | +| <leader>bd | Delete Buffer | **n** | +| <leader>bD | Delete Buffer and Window | **n** | | <esc> | Escape and Clear hlsearch | **i**, **n** | | <leader>ur | Redraw / Clear hlsearch / Diff Update | **n** | | n | Next Search Result | **n**, **x**, **o** | @@ -152,13 +154,6 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>cm | Mason | **n** | -## [mini.bufremove](https://github.com/echasnovski/mini.bufremove.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>bd | Delete Buffer | **n** | -| <leader>bD | Delete Buffer (Force) | **n** | - ## [mini.pairs](https://github.com/echasnovski/mini.pairs.git) | Key | Description | Mode | @@ -279,13 +274,6 @@ possible keymaps starting with ``. | [q | Previous Trouble/Quickfix Item | **n** | | ]q | Next Trouble/Quickfix Item | **n** | -## [vim-illuminate](https://github.com/RRethy/vim-illuminate.git) - -| Key | Description | Mode | -| --- | --- | --- | -| [[ | Prev Reference | **n** | -| ]] | Next Reference | **n** | - ## [mini.surround](https://github.com/echasnovski/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) @@ -391,6 +379,14 @@ Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) | <leader>h | Harpoon Quick Menu | **n** | | <leader>H | Harpoon File | **n** | +## [vim-illuminate](https://github.com/RRethy/vim-illuminate.git) +Part of [lazyvim.plugins.extras.editor.illuminate](/extras/editor/illuminate) + +| Key | Description | Mode | +| --- | --- | --- | +| [[ | Prev Reference | **n** | +| ]] | Next Reference | **n** | + ## [flit.nvim](https://github.com/ggandor/flit.nvim.git) Part of [lazyvim.plugins.extras.editor.leap](/extras/editor/leap) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index f95a6d74df..5abbb96095 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -476,125 +476,6 @@ opts = { -## [vim-illuminate](https://github.com/RRethy/vim-illuminate) - - Automatically highlights other instances of the word under your cursor. - This works with LSP, Treesitter, and regexp matching to find the other - instances. - - - - - - -```lua -opts = { - delay = 200, - large_file_cutoff = 2000, - large_file_overrides = { - providers = { "lsp" }, - }, -} -``` - - - - - - -```lua -{ - "RRethy/vim-illuminate", - event = "LazyFile", - opts = { - delay = 200, - large_file_cutoff = 2000, - large_file_overrides = { - providers = { "lsp" }, - }, - }, - config = function(_, opts) - require("illuminate").configure(opts) - - local function map(key, dir, buffer) - vim.keymap.set("n", key, function() - require("illuminate")["goto_" .. dir .. "_reference"](false) - end, { desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", buffer = buffer }) - end - - map("]]", "next") - map("[[", "prev") - - -- also set it after loading ftplugins, since a lot overwrite [[ and ]] - vim.api.nvim_create_autocmd("FileType", { - callback = function() - local buffer = vim.api.nvim_get_current_buf() - map("]]", "next", buffer) - map("[[", "prev", buffer) - end, - }) - end, - keys = { - { "]]", desc = "Next Reference" }, - { "[[", desc = "Prev Reference" }, - }, -} -``` - - - - - -## [mini.bufremove](https://github.com/echasnovski/mini.bufremove) - - buffer remove - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "echasnovski/mini.bufremove", - keys = { - { - "bd", - function() - local bd = require("mini.bufremove").delete - if vim.bo.modified then - local choice = vim.fn.confirm(("Save changes to %q?"):format(vim.fn.bufname()), "&Yes\n&No\n&Cancel") - if choice == 1 then -- Yes - vim.cmd.write() - bd(0) - elseif choice == 2 then -- No - bd(0, true) - end - else - bd(0) - end - end, - desc = "Delete Buffer", - }, - -- stylua: ignore - { "bD", function() require("mini.bufremove").delete(0, true) end, desc = "Delete Buffer (Force)" }, - }, -} -``` - - - - - ## [trouble.nvim](https://github.com/folke/trouble.nvim) better diagnostics list and others diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 7c5c87a277..b44935222b 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -73,6 +73,10 @@ opts = { codelens = { enabled = false, }, + -- Enable lsp cursor word highlighting + document_highlight = { + enabled = true, + }, -- add any global capabilities here capabilities = {}, -- options for vim.lsp.buf.format @@ -184,6 +188,10 @@ opts = { codelens = { enabled = false, }, + -- Enable lsp cursor word highlighting + document_highlight = { + enabled = true, + }, -- add any global capabilities here capabilities = {}, -- options for vim.lsp.buf.format @@ -266,6 +274,8 @@ opts = { return ret end + LazyVim.lsp.words.setup(opts.document_highlight) + -- diagnostics signs if vim.fn.has("nvim-0.10.0") == 0 then if type(opts.diagnostics.signs) ~= "boolean" then From d234de6f03f7c1753d29d082fb2751dccf9344c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 12:29:33 +0000 Subject: [PATCH 023/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index c8c53d2e6b..638b64e4f3 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -130,9 +130,9 @@ opts = nil opts = { options = { -- stylua: ignore - close_command = function(n) require("mini.bufremove").delete(n, false) end, + close_command = function(n) LazyVim.ui.bufremove(n) end, -- stylua: ignore - right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end, + right_mouse_command = function(n) LazyVim.ui.bufremove(n) end, diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) @@ -176,9 +176,9 @@ opts = { opts = { options = { -- stylua: ignore - close_command = function(n) require("mini.bufremove").delete(n, false) end, + close_command = function(n) LazyVim.ui.bufremove(n) end, -- stylua: ignore - right_mouse_command = function(n) require("mini.bufremove").delete(n, false) end, + right_mouse_command = function(n) LazyVim.ui.bufremove(n) end, diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) From 1a979eebc42b20387cecc64d2d4ec361f23600af Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 17 May 2024 20:04:45 +0200 Subject: [PATCH 024/553] fix: remove symbols-outline --- docs/extras/editor/symbols-outline.md | 181 -------------------------- 1 file changed, 181 deletions(-) delete mode 100644 docs/extras/editor/symbols-outline.md diff --git a/docs/extras/editor/symbols-outline.md b/docs/extras/editor/symbols-outline.md deleted file mode 100644 index 1462e8ab50..0000000000 --- a/docs/extras/editor/symbols-outline.md +++ /dev/null @@ -1,181 +0,0 @@ -# Symbols Outline - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.symbols-outline" }, - { import = "plugins" }, - }, -}) -``` - -
- -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'; - -## [symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) - - - - - -```lua -opts = function() - local Config = require("lazyvim.config") - local defaults = require("symbols-outline.config").defaults - local opts = { - symbols = {}, - symbol_blacklist = {}, - } - local filter = Config.kind_filter - - if type(filter) == "table" then - filter = filter.default - if type(filter) == "table" then - for kind, symbol in pairs(defaults.symbols) do - opts.symbols[kind] = { - icon = Config.icons.kinds[kind] or symbol.icon, - hl = symbol.hl, - } - if not vim.tbl_contains(filter, kind) then - table.insert(opts.symbol_blacklist, kind) - end - end - end - end - return opts -end -``` - - - - - - -```lua -{ - "simrat39/symbols-outline.nvim", - keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, - cmd = "SymbolsOutline", - opts = function() - local Config = require("lazyvim.config") - local defaults = require("symbols-outline.config").defaults - local opts = { - symbols = {}, - symbol_blacklist = {}, - } - local filter = Config.kind_filter - - if type(filter) == "table" then - filter = filter.default - if type(filter) == "table" then - for kind, symbol in pairs(defaults.symbols) do - opts.symbols[kind] = { - icon = Config.icons.kinds[kind] or symbol.icon, - hl = symbol.hl, - } - if not vim.tbl_contains(filter, kind) then - table.insert(opts.symbol_blacklist, kind) - end - end - end - end - return opts - end, -} -``` - - - - - -## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ - - edgy integration - - - - - - -```lua -opts = function(_, opts) - local edgy_idx = Util.plugin.extra_idx("ui.edgy") - local symbols_idx = Util.plugin.extra_idx("editor.symbols-outline") - - if edgy_idx and edgy_idx > symbols_idx then - Util.warn( - "The `edgy.nvim` extra must be **imported** before the `symbols-outline.nvim` extra to work properly.", - { - title = "LazyVim", - } - ) - end - - opts.right = opts.right or {} - table.insert(opts.right, { - title = "Symbols Outline", - ft = "Outline", - pinned = true, - open = "SymbolsOutline", - }) -end -``` - - - - - - -```lua -{ - "folke/edgy.nvim", - optional = true, - opts = function(_, opts) - local edgy_idx = Util.plugin.extra_idx("ui.edgy") - local symbols_idx = Util.plugin.extra_idx("editor.symbols-outline") - - if edgy_idx and edgy_idx > symbols_idx then - Util.warn( - "The `edgy.nvim` extra must be **imported** before the `symbols-outline.nvim` extra to work properly.", - { - title = "LazyVim", - } - ) - end - - opts.right = opts.right or {} - table.insert(opts.right, { - title = "Symbols Outline", - ft = "Outline", - pinned = true, - open = "SymbolsOutline", - }) - end, -} -``` - - - - - - From 34fed5fe06e29afecabf2e85c43047c9ee7f0c14 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 18:21:47 +0000 Subject: [PATCH 025/553] chore(build): auto-generate docs --- docs/extras/editor/refactoring.md | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index 2d56cf6a8d..ff08caf8ec 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -247,4 +247,42 @@ opts = nil +## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ + + which key integration + + + + + + +```lua +opts = { + defaults = { + ["r"] = { name = "+refactor" }, + }, +} +``` + + + + + + +```lua +{ + "folke/which-key.nvim", + optional = true, + opts = { + defaults = { + ["r"] = { name = "+refactor" }, + }, + }, +} +``` + + + + + From 31519370d7b2858d8702a29d4771fb1203abcb44 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 21:14:11 +0000 Subject: [PATCH 026/553] chore(build): auto-generate docs --- docs/extras/coding/mini-ai.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/coding/mini-ai.md b/docs/extras/coding/mini-ai.md index ec87d8d599..5f813afdd5 100644 --- a/docs/extras/coding/mini-ai.md +++ b/docs/extras/coding/mini-ai.md @@ -84,6 +84,7 @@ end ```lua { "echasnovski/mini.ai", + desc = "Enhanced text objects", -- keys = { -- { "a", mode = { "x", "o" } }, -- { "i", mode = { "x", "o" } }, From c029ffc1753a88390dc280e67298d2f1d1fddbab Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Sat, 18 May 2024 02:09:32 -0600 Subject: [PATCH 027/553] docs: Update supertab recipe for 0.10 release with native snippets. (#90) --- lua/recipes.lua | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/lua/recipes.lua b/lua/recipes.lua index daac691b25..35e748485d 100644 --- a/lua/recipes.lua +++ b/lua/recipes.lua @@ -26,15 +26,6 @@ return { -- ## Supertab -- -- Use `` for completion and snippets (supertab). - -- - -- 1. Disable default `` and `` behavior in LuaSnip - { - "L3MON4D3/LuaSnip", - keys = function() - return {} - end, - }, - -- 2. Setup supertab in cmp { "hrsh7th/nvim-cmp", ---@param opts cmp.ConfigSchema @@ -45,7 +36,6 @@ return { return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end - local luasnip = require("luasnip") local cmp = require("cmp") opts.mapping = vim.tbl_extend("force", opts.mapping, { @@ -53,10 +43,10 @@ return { if cmp.visible() then -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- this way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -66,8 +56,10 @@ return { [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif vim.snippet.active({ direction = -1 }) then + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end From 96d28e10857d07f3e28e78ccaed51a8e1dbd88d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 08:09:57 +0000 Subject: [PATCH 028/553] chore(build): auto-generate docs --- docs/configuration/recipes.md | 28 ++++++++-------------------- docs/extras/ui/mini-starter.md | 4 +++- 2 files changed, 11 insertions(+), 21 deletions(-) diff --git a/docs/configuration/recipes.md b/docs/configuration/recipes.md index ff4f22b0a8..ad2206b7ea 100644 --- a/docs/configuration/recipes.md +++ b/docs/configuration/recipes.md @@ -40,19 +40,6 @@ override nvim-cmp and add cmp-emoji Use `` for completion and snippets (supertab). -1. Disable default `` and `` behavior in LuaSnip - -```lua -{ - "L3MON4D3/LuaSnip", - keys = function() - return {} - end, -} -``` - -2. Setup supertab in cmp - ```lua { "hrsh7th/nvim-cmp", @@ -64,7 +51,6 @@ Use `` for completion and snippets (supertab). return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end - local luasnip = require("luasnip") local cmp = require("cmp") opts.mapping = vim.tbl_extend("force", opts.mapping, { @@ -72,10 +58,10 @@ Use `` for completion and snippets (supertab). if cmp.visible() then -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- this way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -85,8 +71,10 @@ Use `` for completion and snippets (supertab). [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif vim.snippet.active({ direction = -1 }) then + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index 6d8ca44b80..a247014c1b 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -150,7 +150,9 @@ 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" - pcall(starter.refresh) + -- INFO: Use `VimResized` to avoid the `buf_id in refresh() is not an identifier of valid Starter buffer`, + -- since `starter.refresh` executes on every `VimResized` see https://github.com/echasnovski/mini.starter/blob/f0c491032dcda485ee740716217cd4d5c25b6014/lua/mini/starter.lua#L352-L353 + vim.cmd([[do VimResized]]) end, }) end, From 1782e216a53f0fd1e33ffd5eb081b27b2a1d6af1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 08:18:18 +0000 Subject: [PATCH 029/553] chore(build): auto-generate docs --- docs/extras/editor/leap.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index 26da8743e6..82abb71793 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -186,4 +186,39 @@ opts = { +## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ + + + + + +```lua +opts = { + defaults = { + ["gz"] = { name = "+surround" }, + }, +} +``` + + + + + + +```lua +{ + "folke/which-key.nvim", + optional = true, + opts = { + defaults = { + ["gz"] = { name = "+surround" }, + }, + }, +} +``` + + + + + From 8eaeaba26968f366b9503db029661c401bd65395 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 10:15:07 +0000 Subject: [PATCH 030/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 11 +++++++++++ docs/plugins/ui.md | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index d0658c4d20..fd72a1d445 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -455,6 +455,17 @@ opts = { opts = { enable_autocmd = false, }, + init = function() + if vim.fn.has("nvim-0.10") == 1 then + vim.schedule(function() + local get_option = vim.filetype.get_option + vim.filetype.get_option = function(filetype, option) + return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring() + or get_option(filetype, option) + end + end) + end + end, } ``` diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 638b64e4f3..22e052f16f 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -200,7 +200,7 @@ opts = { config = function(_, opts) require("bufferline").setup(opts) -- Fix bufferline when restoring a session - vim.api.nvim_create_autocmd("BufAdd", { + vim.api.nvim_create_autocmd({ "BufAdd", "BufDelete" }, { callback = function() vim.schedule(function() pcall(nvim_bufferline) @@ -497,6 +497,13 @@ opts = { }, }, main = "ibl", + config = function(_, opts) + if vim.fn.has("nvim-0.10.0") == 0 then + local utils = require("ibl.utils") + utils.tbl_join = vim.tbl_flatten + end + require("ibl").setup(opts) + end, } ``` From cdb9d4a428bd961844bb3c12441b60e8e19b73f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 11:12:06 +0000 Subject: [PATCH 031/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 5ea2543be7..33813b165f 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -46,7 +46,6 @@ import TabItem from '@theme/TabItem'; ```lua opts = { highlight = { timer = 150 }, - ring = { storage = LazyVim.is_win() and "shada" or "sqlite" }, } ``` @@ -58,10 +57,8 @@ opts = { ```lua { "gbprod/yanky.nvim", - dependencies = not LazyVim.is_win() and { "kkharji/sqlite.lua" } or {}, opts = { highlight = { timer = 150 }, - ring = { storage = LazyVim.is_win() and "shada" or "sqlite" }, }, keys = { -- stylua: ignore @@ -91,27 +88,4 @@ opts = { -## [sqlite.lua](https://github.com/kkharji/sqlite.lua) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "kkharji/sqlite.lua" } -``` - - - - - From 9eb66c16ec3029707f470cb1b4a986a518a51de9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 13:16:33 +0000 Subject: [PATCH 032/553] chore(build): auto-generate docs --- docs/extras/coding/mini-ai.md | 1 + docs/extras/coding/mini-surround.md | 1 + docs/extras/coding/yanky.md | 9 ++++----- docs/extras/dap/core.md | 2 ++ docs/extras/editor/dial.md | 2 ++ docs/extras/ui/mini-animate.md | 4 +--- docs/extras/util/mini-hipatterns.md | 2 ++ 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/extras/coding/mini-ai.md b/docs/extras/coding/mini-ai.md index 5f813afdd5..2a2e3e3cd0 100644 --- a/docs/extras/coding/mini-ai.md +++ b/docs/extras/coding/mini-ai.md @@ -85,6 +85,7 @@ end { "echasnovski/mini.ai", desc = "Enhanced text objects", + recommended = true, -- keys = { -- { "a", mode = { "x", "o" } }, -- { "i", mode = { "x", "o" } }, diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index 69197c737e..46b8803cda 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -60,6 +60,7 @@ opts = { ```lua { "echasnovski/mini.surround", + recommended = true, keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 33813b165f..08e3b97d67 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -36,9 +36,6 @@ import TabItem from '@theme/TabItem'; ## [yanky.nvim](https://github.com/gbprod/yanky.nvim) - better yank/paste - - @@ -57,12 +54,14 @@ opts = { ```lua { "gbprod/yanky.nvim", + recommended = true, + desc = "Better Yank/Paste", opts = { highlight = { timer = 150 }, }, keys = { - -- stylua: ignore - { "p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" }, + -- stylua: ignore + { "p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" }, { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" }, { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" }, { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" }, diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 754b5f2918..50d1d67191 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -50,6 +50,8 @@ opts = {} ```lua { "mfussenegger/nvim-dap", + recommended = true, + desc = "Debugging support. Requires language specific adapters to be configured. (see lang extras)", dependencies = { diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 66634308e9..b6b6406cb2 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -193,6 +193,8 @@ end ```lua { "monaqa/dial.nvim", + recommended = true, + desc = "Increment and decrement numbers, dates, and more", -- stylua: ignore keys = { { "", function() return M.dial(true) end, expr = true, desc = "Increment", mode = {"n", "v"} }, diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index cdc6f0ce1e..45480fe4bc 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -34,9 +34,6 @@ import TabItem from '@theme/TabItem'; ## [mini.animate](https://github.com/echasnovski/mini.animate) - animations - - @@ -82,6 +79,7 @@ end ```lua { "echasnovski/mini.animate", + recommended = true, event = "VeryLazy", opts = function() -- don't use animate when scrolling with the mouse diff --git a/docs/extras/util/mini-hipatterns.md b/docs/extras/util/mini-hipatterns.md index 033ba894ea..e875b94a5b 100644 --- a/docs/extras/util/mini-hipatterns.md +++ b/docs/extras/util/mini-hipatterns.md @@ -77,6 +77,8 @@ end ```lua { "echasnovski/mini.hipatterns", + recommended = true, + desc = "Highlight colors in your code. Also includes Tailwind CSS support.", event = "LazyFile", opts = function() local hi = require("mini.hipatterns") From 546640e4ec577cacea6a38834fb883a7f8cc9c97 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 14:14:10 +0000 Subject: [PATCH 033/553] chore(build): auto-generate docs --- docs/keymaps.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/keymaps.md b/docs/keymaps.md index 68c4663003..3d52c3b44a 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -116,6 +116,8 @@ possible keymaps starting with ``. | <leader>cc | Run Codelens | **n**, **v** | | <leader>cC | Refresh & Display Codelens | **n** | | <leader>cA | Source Action | **n** | +| ]] | Next Reference | **n** | +| [[ | Next Reference | **n** | | <leader>cr | Rename | **n** | ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim.git) From c97168fe58db1c5dd26e7b15f9c55e5828fe9de1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 16:18:34 +0000 Subject: [PATCH 034/553] chore(build): auto-generate docs --- docs/extras/ui/mini-starter.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index a247014c1b..fbc05f3bda 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -145,14 +145,15 @@ end vim.api.nvim_create_autocmd("User", { pattern = "LazyVimStarted", - callback = function() + callback = function(ev) local stats = require("lazy").stats() 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: Use `VimResized` to avoid the `buf_id in refresh() is not an identifier of valid Starter buffer`, - -- since `starter.refresh` executes on every `VimResized` see https://github.com/echasnovski/mini.starter/blob/f0c491032dcda485ee740716217cd4d5c25b6014/lua/mini/starter.lua#L352-L353 - vim.cmd([[do VimResized]]) + -- INFO: based on @echasnovski's recommendation (thanks a lot!!!) + if vim.bo[ev.buf].filetype == "starter" then + pcall(starter.refresh) + end end, }) end, From e5bc818be89877d138bcecd4f71e333cd5c567a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 20:16:16 +0000 Subject: [PATCH 035/553] chore(build): auto-generate docs --- docs/extras/util/gitui.md | 4 ++ docs/plugins/coding.md | 110 ++++++++++++++++++++++++++++--------- docs/plugins/treesitter.md | 45 +++------------ docs/plugins/ui.md | 7 --- 4 files changed, 98 insertions(+), 68 deletions(-) diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index 0d75354bb0..804bdeb78b 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -45,6 +45,8 @@ import TabItem from '@theme/TabItem'; opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} vim.list_extend(opts.ensure_installed, { "gitui" }) + -- delete lazygit keymap for file history + vim.keymap.del("n", "gf") end ``` @@ -71,6 +73,8 @@ end opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} vim.list_extend(opts.ensure_installed, { "gitui" }) + -- delete lazygit keymap for file history + vim.keymap.del("n", "gf") end, } ``` diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index fd72a1d445..3ee0e05ffd 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -285,38 +285,16 @@ end { "", function() - if vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) - return - end - return "" + return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" end, expr = true, silent = true, - mode = "i", - }, - { - "", - function() - vim.schedule(function() - vim.snippet.jump(1) - end) - end, - silent = true, - mode = "s", + mode = { "i", "s" }, }, { "", function() - if vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) - return - end - return "" + return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" end, expr = true, silent = true, @@ -473,4 +451,86 @@ opts = { +## [mini.ai](https://github.com/echasnovski/mini.ai) + + Better text-objects + + + + + + +```lua +opts = function() + LazyVim.on_load("which-key.nvim", function() + vim.schedule(LazyVim.mini.ai_whichkey) + end) + local ai = require("mini.ai") + return { + n_lines = 500, + custom_textobjects = { + o = ai.gen_spec.treesitter({ -- code block + a = { "@block.outer", "@conditional.outer", "@loop.outer" }, + i = { "@block.inner", "@conditional.inner", "@loop.inner" }, + }), + f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function + c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class + t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, -- tags + d = { "%f[%d]%d+" }, -- digits + e = { -- Word with case + { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" }, + "^().*()$", + }, + i = LazyVim.mini.ai_indent, -- indent + g = LazyVim.mini.ai_buffer, -- buffer + u = ai.gen_spec.function_call(), -- u for "Usage" + U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name + }, + } +end +``` + + + + + + +```lua +{ + "echasnovski/mini.ai", + event = "VeryLazy", + opts = function() + LazyVim.on_load("which-key.nvim", function() + vim.schedule(LazyVim.mini.ai_whichkey) + end) + local ai = require("mini.ai") + return { + n_lines = 500, + custom_textobjects = { + o = ai.gen_spec.treesitter({ -- code block + a = { "@block.outer", "@conditional.outer", "@loop.outer" }, + i = { "@block.inner", "@conditional.inner", "@loop.inner" }, + }), + f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function + c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class + t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, -- tags + d = { "%f[%d]%d+" }, -- digits + e = { -- Word with case + { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" }, + "^().*()$", + }, + i = LazyVim.mini.ai_indent, -- indent + g = LazyVim.mini.ai_buffer, -- buffer + u = ai.gen_spec.function_call(), -- u for "Usage" + U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name + }, + } + end, +} +``` + + + + + diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index fd26c85732..56f76ecdef 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -144,20 +144,9 @@ opts = { ---@param opts TSConfig config = function(_, opts) if type(opts.ensure_installed) == "table" then - ---@type table - local added = {} - opts.ensure_installed = vim.tbl_filter(function(lang) - if added[lang] then - return false - end - added[lang] = true - return true - end, opts.ensure_installed) + opts.ensure_installed = LazyVim.dedup(opts.ensure_installed) end require("nvim-treesitter.configs").setup(opts) - vim.schedule(function() - require("lazy").load({ plugins = { "nvim-treesitter-textobjects" } }) - end) end, } ``` @@ -172,29 +161,6 @@ opts = { -```lua -opts = nil -``` - - - - - - -```lua -{ "nvim-treesitter-textobjects" } -``` - - - - - -## [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) - - - - - ```lua opts = {} ``` @@ -207,8 +173,15 @@ opts = {} ```lua { "nvim-treesitter/nvim-treesitter-textobjects", - lazy = true, + 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 diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 22e052f16f..d161aa62bf 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -497,13 +497,6 @@ opts = { }, }, main = "ibl", - config = function(_, opts) - if vim.fn.has("nvim-0.10.0") == 0 then - local utils = require("ibl.utils") - utils.tbl_join = vim.tbl_flatten - end - require("ibl").setup(opts) - end, } ``` From 7202642db6fcd5ab183b076465a2ff139dfeba00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 18 May 2024 22:13:42 +0000 Subject: [PATCH 036/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 3ee0e05ffd..e8436876b3 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -31,7 +31,15 @@ opts = function() [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + if cmp.visible() then + LazyVim.create_undo() + if cmp.confirm({ select = true }) then + return + end + end + return fallback() + end, [""] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true, @@ -107,7 +115,15 @@ end [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + if cmp.visible() then + LazyVim.create_undo() + if cmp.confirm({ select = true }) then + return + end + end + return fallback() + end, [""] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true, From 8f1049d006e2207b2e3304f208e1054568fd0d54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 08:18:33 +0000 Subject: [PATCH 037/553] chore(build): auto-generate docs --- docs/configuration/examples.md | 23 ++++++++--------------- docs/extras/util/gitui.md | 26 ++++++++++++++++++-------- docs/plugins/coding.md | 4 ++-- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/docs/configuration/examples.md b/docs/configuration/examples.md index b2ed0e51e3..fee689707b 100644 --- a/docs/configuration/examples.md +++ b/docs/configuration/examples.md @@ -197,14 +197,6 @@ return { }, -- Use for completion and snippets (supertab) - -- first: disable default and behavior in LuaSnip - { - "L3MON4D3/LuaSnip", - keys = function() - return {} - end, - }, - -- then: setup supertab in cmp { "hrsh7th/nvim-cmp", dependencies = { @@ -218,17 +210,16 @@ return { return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end - local luasnip = require("luasnip") local cmp = require("cmp") opts.mapping = vim.tbl_extend("force", opts.mapping, { [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- this way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() + elseif vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -238,8 +229,10 @@ return { [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif vim.snippet.active({ direction = -1 }) then + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index 804bdeb78b..c7b8ca56cc 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -45,8 +45,6 @@ import TabItem from '@theme/TabItem'; opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} vim.list_extend(opts.ensure_installed, { "gitui" }) - -- delete lazygit keymap for file history - vim.keymap.del("n", "gf") end ``` @@ -59,22 +57,34 @@ end { "williamboman/mason.nvim", keys = { - { "gG", + { + "gG", function() LazyVim.terminal.open({ "gitui" }, { esc_esc = false, ctrl_hjkl = false }) end, - desc = "GitUi (cwd)" }, - { "gg", + desc = "GitUi (cwd)", + }, + { + "gg", function() LazyVim.terminal.open({ "gitui" }, { cwd = LazyVim.root.get(), esc_esc = false, ctrl_hjkl = false }) end, - desc = "GitUi (Root Dir)" } + desc = "GitUi (Root Dir)", + }, }, + init = function() + -- delete lazygit keymap for file history + vim.api.nvim_create_autocmd("User", { + pattern = "LazyVimKeymaps", + once = true, + callback = function() + pcall(vim.keymap.del, "n", "gf") + end, + }) + end, opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} vim.list_extend(opts.ensure_installed, { "gitui" }) - -- delete lazygit keymap for file history - vim.keymap.del("n", "gf") end, } ``` diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index e8436876b3..c8a8041a1a 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -32,7 +32,7 @@ opts = function() [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), [""] = function(fallback) - if cmp.visible() then + if cmp.core.view:visible() or vim.fn.pumvisible() == 1 then LazyVim.create_undo() if cmp.confirm({ select = true }) then return @@ -116,7 +116,7 @@ end [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), [""] = function(fallback) - if cmp.visible() then + if cmp.core.view:visible() or vim.fn.pumvisible() == 1 then LazyVim.create_undo() if cmp.confirm({ select = true }) then return From 4427f87b8e57c04522484590b9dd03fc6ada6d3b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 16:19:31 +0000 Subject: [PATCH 038/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 1 + docs/extras/editor/refactoring.md | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 08e3b97d67..e2508a72f4 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -56,6 +56,7 @@ opts = { "gbprod/yanky.nvim", recommended = true, desc = "Better Yank/Paste", + event = "LazyFile", opts = { highlight = { timer = 150 }, }, diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index ff08caf8ec..c0e136465a 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -60,6 +60,8 @@ opts = { }, printf_statements = {}, print_var_statements = {}, + show_success_message = true, -- shows a message with information about the refactor on success + -- i.e. [Refactor] Inlined 3 variable occurrences } ``` @@ -182,6 +184,8 @@ opts = { }, printf_statements = {}, print_var_statements = {}, + show_success_message = true, -- shows a message with information about the refactor on success + -- i.e. [Refactor] Inlined 3 variable occurrences }, config = function(_, opts) require("refactoring").setup(opts) From 3a90be3e8580d95da60aa2401c5499e7eb3e6e42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 18:19:50 +0000 Subject: [PATCH 039/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index d161aa62bf..7e03f81a87 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -161,6 +161,7 @@ opts = { ```lua { "akinsho/bufferline.nvim", + commit = vim.fn.has("nvim-0.10") == 0 and "73540cb95f8d95aa1af3ed57713c6720c78af915" or nil, event = "VeryLazy", keys = { { "bp", "BufferLineTogglePin", desc = "Toggle Pin" }, From 6baaa41dd7dec90885853fe474b8db5b74ddb1c8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 19:11:51 +0000 Subject: [PATCH 040/553] chore(build): auto-generate docs --- docs/extras/lang/toml.md | 135 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 docs/extras/lang/toml.md diff --git a/docs/extras/lang/toml.md b/docs/extras/lang/toml.md new file mode 100644 index 0000000000..1ae7343583 --- /dev/null +++ b/docs/extras/lang/toml.md @@ -0,0 +1,135 @@ +# `Toml` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.toml" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "toml" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "toml" }) + end + end, +} +``` + + + + + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "taplo" }) +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "taplo" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + taplo = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + taplo = {}, + }, + }, +} +``` + + + + + + From 638476b181b74a0ef79398999c5b268858fe6a90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 21:14:57 +0000 Subject: [PATCH 041/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 56 ++++++++++-------------------------------- 1 file changed, 13 insertions(+), 43 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index c8a8041a1a..bcf00e22c3 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -31,19 +31,8 @@ opts = function() [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = function(fallback) - if cmp.core.view:visible() or vim.fn.pumvisible() == 1 then - LazyVim.create_undo() - if cmp.confirm({ select = true }) then - return - end - end - return fallback() - end, - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = LazyVim.cmp.confirm(), + [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. [""] = function(fallback) cmp.abort() fallback() @@ -115,19 +104,8 @@ end [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), [""] = cmp.mapping.abort(), - [""] = function(fallback) - if cmp.core.view:visible() or vim.fn.pumvisible() == 1 then - LazyVim.create_undo() - if cmp.confirm({ select = true }) then - return - end - end - return fallback() - end, - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = LazyVim.cmp.confirm(), + [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. [""] = function(fallback) cmp.abort() fallback() @@ -162,23 +140,15 @@ end source.group_index = source.group_index or 1 end local cmp = require("cmp") - local Kind = cmp.lsp.CompletionItemKind cmp.setup(opts) cmp.event:on("confirm_done", function(event) - if not vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then - return - end - local entry = event.entry - local item = entry:get_completion_item() - if vim.tbl_contains({ Kind.Function, Kind.Method }, item.kind) and item.insertTextFormat ~= 2 then - local cursor = vim.api.nvim_win_get_cursor(0) - local prev_char = vim.api.nvim_buf_get_text(0, cursor[1] - 1, cursor[2], cursor[1] - 1, cursor[2] + 1, {})[1] - if prev_char ~= "(" and prev_char ~= ")" then - local keys = vim.api.nvim_replace_termcodes("()", false, false, true) - vim.api.nvim_feedkeys(keys, "i", true) - end + if vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then + LazyVim.cmp.auto_brackets(event.entry) end end) + cmp.event:on("menu_opened", function(event) + LazyVim.cmp.add_missing_snippet_docs(event.window) + end) end, } ``` @@ -269,8 +239,8 @@ opts = nil ```lua opts = function(_, opts) opts.snippet = { - expand = function(args) - vim.snippet.expand(args.body) + expand = function(item) + return LazyVim.cmp.expand(item.body) end, } table.insert(opts.sources, { name = "snippets" }) @@ -291,8 +261,8 @@ end }, opts = function(_, opts) opts.snippet = { - expand = function(args) - vim.snippet.expand(args.body) + expand = function(item) + return LazyVim.cmp.expand(item.body) end, } table.insert(opts.sources, { name = "snippets" }) From efdbbf566afbc2684db7b30b65a760a19781e96c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 May 2024 22:16:53 +0000 Subject: [PATCH 042/553] chore(build): auto-generate docs --- docs/plugins/lsp.md | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index b44935222b..532c5abeda 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -263,16 +263,8 @@ opts = { require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer) end) - local register_capability = vim.lsp.handlers["client/registerCapability"] - - vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx) - ---@diagnostic disable-next-line: no-unknown - local ret = register_capability(err, res, ctx) - local client = vim.lsp.get_client_by_id(ctx.client_id) - local buffer = vim.api.nvim_get_current_buf() - require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer) - return ret - end + LazyVim.lsp.setup_dynamic_capability() + LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) LazyVim.lsp.words.setup(opts.document_highlight) @@ -290,24 +282,19 @@ opts = { if vim.fn.has("nvim-0.10") == 1 then -- inlay hints if opts.inlay_hints.enabled then - LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/inlayHint") then - LazyVim.toggle.inlay_hints(buffer, true) - end + LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) + LazyVim.toggle.inlay_hints(buffer, true) end) end -- code lens if opts.codelens.enabled and vim.lsp.codelens then - LazyVim.lsp.on_attach(function(client, buffer) - if client.supports_method("textDocument/codeLens") then - vim.lsp.codelens.refresh() - --- autocmd BufEnter,CursorHold,InsertLeave lua vim.lsp.codelens.refresh() - vim.api.nvim_create_autocmd({ "BufEnter", "CursorHold", "InsertLeave" }, { - buffer = buffer, - callback = vim.lsp.codelens.refresh, - }) - end + 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 end From 6eb0c9f4348f905f2d3cdde12bc379134457ab88 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 May 2024 18:21:08 +0000 Subject: [PATCH 043/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 7e03f81a87..d161aa62bf 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -161,7 +161,6 @@ opts = { ```lua { "akinsho/bufferline.nvim", - commit = vim.fn.has("nvim-0.10") == 0 and "73540cb95f8d95aa1af3ed57713c6720c78af915" or nil, event = "VeryLazy", keys = { { "bp", "BufferLineTogglePin", desc = "Toggle Pin" }, From 5288005ebfadc912f86766acf7d9a96e439d75ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 May 2024 19:12:22 +0000 Subject: [PATCH 044/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 22 +++++++++++++++++++--- docs/plugins/lsp.md | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 59039e5d25..cb7f8e8563 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -201,6 +201,15 @@ opts = function() dap = { hotcodereplace = "auto", config_overrides = {} }, dap_main = {}, test = true, + settings = { + java = { + inlayHints = { + parameterNames = { + enabled = "all", + }, + }, + }, + }, } end ``` @@ -257,11 +266,18 @@ end dap = { hotcodereplace = "auto", config_overrides = {} }, dap_main = {}, test = true, + settings = { + java = { + inlayHints = { + parameterNames = { + enabled = "all", + }, + }, + }, + }, } end, - config = function() - local opts = LazyVim.opts("nvim-jdtls") or {} - + config = function(_, opts) -- Find the extra bundles that should be passed on the jdtls command-line -- if nvim-dap is enabled with java debug/test. local mason_registry = require("mason-registry") diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 532c5abeda..b8c85bbbbd 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -263,7 +263,7 @@ opts = { require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer) end) - LazyVim.lsp.setup_dynamic_capability() + LazyVim.lsp.setup() LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) LazyVim.lsp.words.setup(opts.document_highlight) From cfe382a4d1eb233afbc785020ee735bd6fc9607e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 May 2024 20:16:57 +0000 Subject: [PATCH 045/553] chore(build): auto-generate docs --- docs/extras/lang/kotlin.md | 366 +++++++++++++++++++++++++++++++++++++ 1 file changed, 366 insertions(+) create mode 100644 docs/extras/lang/kotlin.md diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md new file mode 100644 index 0000000000..b0b688761d --- /dev/null +++ b/docs/extras/lang/kotlin.md @@ -0,0 +1,366 @@ +# `Kotlin` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.kotlin" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + Add packages(linting, debug adapter) + + + + + + +```lua +opts = function(_, opts) + vim.list_extend(opts.ensure_installed or {}, { "ktlint", "kotlin-debug-adapter" }) +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed or {}, { "ktlint", "kotlin-debug-adapter" }) + end, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + Add syntax highlighting + + + + + + +```lua +opts = function(_, opts) + vim.list_extend(opts.ensure_installed or {}, { "kotlin" }) +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed or {}, { "kotlin" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Add language server + + + + + + +```lua +opts = { + servers = { + kotlin_language_server = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + kotlin_language_server = {}, + }, + }, +} +``` + + + + + +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + Add linting as optional + + + + + + +```lua +opts = { + linters_by_ft = { kotlin = { "ktlint" } }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + dependencies = "williamboman/mason.nvim", + opts = { + linters_by_ft = { kotlin = { "ktlint" } }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + Add formatting as optional + + + + + + +```lua +opts = { + formatters_by_ft = { kotlin = { "ktlint" } }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { kotlin = { "ktlint" } }, + }, +} +``` + + + + + +## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ + + Add formatting and linting as optional + + + + + + +```lua +opts = function(_, opts) + local nls = require("null-ls") + opts.sources = vim.list_extend(opts.sources or {}, { + nls.builtins.formatting.ktlint, + nls.builtins.diagnostics.ktlint, + }) +end +``` + + + + + + +```lua +{ + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = vim.list_extend(opts.sources or {}, { + nls.builtins.formatting.ktlint, + nls.builtins.diagnostics.ktlint, + }) + end, +} +``` + + + + + +## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ + + Add debugger + + + + + + +```lua +opts = function() + local dap = require("dap") + if not dap.adapters.kotlin then + require("dap").adapters.kotlin = { + type = "executable", + command = "kotlin-debug-adapter", + options = { auto_continue_if_many_stopped = false }, + } + end + + dap.configurations.kotlin = { + { + type = "kotlin", + request = "launch", + name = "This file", + -- may differ, when in doubt, whatever your project structure may be, + -- it has to correspond to the class file located at `build/classes/` + -- and of course you have to build before you debug + mainClass = function() + local root = vim.fs.find("src", { path = vim.uv.cwd(), upward = true, stop = vim.env.HOME })[1] or "" + local fname = vim.api.nvim_buf_get_name(0) + -- src/main/kotlin/websearch/Main.kt -> websearch.MainKt + return fname:gsub(root, ""):gsub("main/kotlin/", ""):gsub(".kt", "Kt"):gsub("/", "."):sub(2, -1) + end, + projectRoot = "${workspaceFolder}", + jsonLogFile = "", + enableJsonLogging = false, + }, + { + -- Use this for unit tests + -- First, run + -- ./gradlew --info cleanTest test --debug-jvm + -- then attach the debugger to it + type = "kotlin", + request = "attach", + name = "Attach to debugging session", + port = 5005, + args = {}, + projectRoot = vim.fn.getcwd, + hostName = "localhost", + timeout = 2000, + }, + } +end +``` + + + + + + +```lua +{ + "mfussenegger/nvim-dap", + optional = true, + dependencies = "williamboman/mason.nvim", + opts = function() + local dap = require("dap") + if not dap.adapters.kotlin then + require("dap").adapters.kotlin = { + type = "executable", + command = "kotlin-debug-adapter", + options = { auto_continue_if_many_stopped = false }, + } + end + + dap.configurations.kotlin = { + { + type = "kotlin", + request = "launch", + name = "This file", + -- may differ, when in doubt, whatever your project structure may be, + -- it has to correspond to the class file located at `build/classes/` + -- and of course you have to build before you debug + mainClass = function() + local root = vim.fs.find("src", { path = vim.uv.cwd(), upward = true, stop = vim.env.HOME })[1] or "" + local fname = vim.api.nvim_buf_get_name(0) + -- src/main/kotlin/websearch/Main.kt -> websearch.MainKt + return fname:gsub(root, ""):gsub("main/kotlin/", ""):gsub(".kt", "Kt"):gsub("/", "."):sub(2, -1) + end, + projectRoot = "${workspaceFolder}", + jsonLogFile = "", + enableJsonLogging = false, + }, + { + -- Use this for unit tests + -- First, run + -- ./gradlew --info cleanTest test --debug-jvm + -- then attach the debugger to it + type = "kotlin", + request = "attach", + name = "Attach to debugging session", + port = 5005, + args = {}, + projectRoot = vim.fn.getcwd, + hostName = "localhost", + timeout = 2000, + }, + } + end, +} +``` + + + + + + From ad458aa33b8c47e54a2df504669be1f55d7cd32a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 May 2024 21:14:12 +0000 Subject: [PATCH 046/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index cb7f8e8563..4e45e52d8e 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -313,6 +313,7 @@ end init_options = { bundles = bundles, }, + settings = opts.settings, -- enable CMP capabilities capabilities = LazyVim.has("cmp-nvim-lsp") and require("cmp_nvim_lsp").default_capabilities() or nil, }, opts.jdtls) From c756a9822f08628b23c00538e3c7469d19cf7fd0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 18:20:47 +0000 Subject: [PATCH 047/553] chore(build): auto-generate docs --- docs/extras/coding/mini-comment.md | 31 +++++++++++++ docs/plugins/coding.md | 74 +++++++++++++++++++----------- 2 files changed, 77 insertions(+), 28 deletions(-) diff --git a/docs/extras/coding/mini-comment.md b/docs/extras/coding/mini-comment.md index 739bee7b45..3fb490b80d 100644 --- a/docs/extras/coding/mini-comment.md +++ b/docs/extras/coding/mini-comment.md @@ -71,4 +71,35 @@ opts = {
+## [nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) + + + + + +```lua +opts = { + enable_autocmd = false, +} +``` + + + + + + +```lua +{ + "JoosepAlviste/nvim-ts-context-commentstring", + lazy = true, + opts = { + enable_autocmd = false, + }, +} +``` + + + + + diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index bcf00e22c3..f69ea07dfc 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -139,6 +139,16 @@ end for _, source in ipairs(opts.sources) do source.group_index = source.group_index or 1 end + + local parse = require("cmp.utils.snippet").parse + require("cmp.utils.snippet").parse = function(input) + local ok, ret = pcall(parse, input) + if ok then + return ret + end + return LazyVim.cmp.snippet_preview(input) + end + local cmp = require("cmp") cmp.setup(opts) cmp.event:on("confirm_done", function(event) @@ -256,8 +266,17 @@ end { "nvim-cmp", dependencies = { - { "rafamadriz/friendly-snippets" }, - { "garymjr/nvim-snippets", opts = { friendly_snippets = true } }, + { + "garymjr/nvim-snippets", + -- Use my branch till PR is merged. + -- https://github.com/garymjr/nvim-snippets/pull/10 + url = "https://github.com/folke/nvim-snippets", + opts = { + friendly_snippets = true, + global_snippets = { "all", "global" }, + }, + dependencies = { "rafamadriz/friendly-snippets" }, + }, }, opts = function(_, opts) opts.snippet = { @@ -294,14 +313,17 @@ end -## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) +## [nvim-snippets](https://github.com/folke/nvim-snippets) ```lua -opts = nil +opts = { + friendly_snippets = true, + global_snippets = { "all", "global" }, +} ``` @@ -310,21 +332,31 @@ opts = nil ```lua -{ "rafamadriz/friendly-snippets" } +{ + "garymjr/nvim-snippets", + -- Use my branch till PR is merged. + -- https://github.com/garymjr/nvim-snippets/pull/10 + url = "https://github.com/folke/nvim-snippets", + opts = { + friendly_snippets = true, + global_snippets = { "all", "global" }, + }, + dependencies = { "rafamadriz/friendly-snippets" }, +} ``` -## [nvim-snippets](https://github.com/garymjr/nvim-snippets) +## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) ```lua -opts = { friendly_snippets = true } +opts = nil ``` @@ -333,7 +365,7 @@ opts = { friendly_snippets = true } ```lua -{ "garymjr/nvim-snippets", opts = { friendly_snippets = true } } +{ "rafamadriz/friendly-snippets" } ``` @@ -392,7 +424,7 @@ opts = { -## [nvim-ts-context-commentstring](https://github.com/JoosepAlviste/nvim-ts-context-commentstring) +## [ts-comments.nvim](https://github.com/folke/ts-comments.nvim) comments @@ -402,9 +434,7 @@ opts = { ```lua -opts = { - enable_autocmd = false, -} +opts = {} ``` @@ -414,22 +444,10 @@ opts = { ```lua { - "JoosepAlviste/nvim-ts-context-commentstring", - lazy = true, - opts = { - enable_autocmd = false, - }, - init = function() - if vim.fn.has("nvim-0.10") == 1 then - vim.schedule(function() - local get_option = vim.filetype.get_option - vim.filetype.get_option = function(filetype, option) - return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring() - or get_option(filetype, option) - end - end) - end - end, + "folke/ts-comments.nvim", + event = "VeryLazy", + opts = {}, + enabled = vim.fn.has("nvim-0.10") == 1, } ``` From 588683c6ca07f56075605af525e4347ce94dd519 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 19:13:36 +0000 Subject: [PATCH 048/553] chore(build): auto-generate docs --- docs/keymaps.md | 2 ++ docs/plugins/coding.md | 8 +------- docs/plugins/editor.md | 2 ++ 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index 3d52c3b44a..2cf68d2588 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -242,9 +242,11 @@ possible keymaps starting with ``. | <leader>sh | Help Pages | **n** | | <leader>sH | Search Highlight Groups | **n** | | <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | | <leader>sm | Jump to Mark | **n** | | <leader>sM | Man Pages | **n** | | <leader>so | Options | **n** | +| <leader>sq | Quickfix List | **n** | | <leader>sR | Resume | **n** | | <leader>ss | Goto Symbol | **n** | | <leader>sS | Goto Symbol (Workspace) | **n** | diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index f69ea07dfc..e8841e244c 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -268,9 +268,6 @@ end dependencies = { { "garymjr/nvim-snippets", - -- Use my branch till PR is merged. - -- https://github.com/garymjr/nvim-snippets/pull/10 - url = "https://github.com/folke/nvim-snippets", opts = { friendly_snippets = true, global_snippets = { "all", "global" }, @@ -313,7 +310,7 @@ end -## [nvim-snippets](https://github.com/folke/nvim-snippets) +## [nvim-snippets](https://github.com/garymjr/nvim-snippets) @@ -334,9 +331,6 @@ opts = { ```lua { "garymjr/nvim-snippets", - -- Use my branch till PR is merged. - -- https://github.com/garymjr/nvim-snippets/pull/10 - url = "https://github.com/folke/nvim-snippets", opts = { friendly_snippets = true, global_snippets = { "all", "global" }, diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 5abbb96095..1ba2d35069 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -718,10 +718,12 @@ end { "sh", "Telescope help_tags", desc = "Help Pages" }, { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, { "sk", "Telescope keymaps", desc = "Key Maps" }, + { "sl", "Telescope loclist", desc = "Location List" }, { "sM", "Telescope man_pages", desc = "Man Pages" }, { "sm", "Telescope marks", desc = "Jump to Mark" }, { "so", "Telescope vim_options", desc = "Options" }, { "sR", "Telescope resume", desc = "Resume" }, + { "sq", "Telescope quickfix", desc = "Quickfix List" }, { "sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" }, { "sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" }, { "sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (Root Dir)" }, From eea34982cb728fe74e8ec4a547b81ce0062e6094 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 20:17:47 +0000 Subject: [PATCH 049/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 1ba2d35069..3d02e3d9d7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -49,6 +49,12 @@ opts = { expander_expanded = "", expander_highlight = "NeoTreeExpander", }, + git_status = { + symbols = { + unstaged = "󰄱", + staged = "󰱒", + }, + }, }, } ``` @@ -151,6 +157,12 @@ opts = { expander_expanded = "", expander_highlight = "NeoTreeExpander", }, + git_status = { + symbols = { + unstaged = "󰄱", + staged = "󰱒", + }, + }, }, }, config = function(_, opts) From 69cfd04f49d8961435d795d81b2c4b56e7aede9c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 21:15:03 +0000 Subject: [PATCH 050/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 35 +++++++++++++++++++++++++++++++++++ docs/keymaps.md | 1 + docs/plugins/editor.md | 1 + 3 files changed, 37 insertions(+) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 1b33945063..d8c1e7b64c 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -239,6 +239,41 @@ end +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + markdown = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + markdown = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + }, + }, +} +``` + + + + + ## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ diff --git a/docs/keymaps.md b/docs/keymaps.md index 2cf68d2588..c18cc003e5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -241,6 +241,7 @@ possible keymaps starting with ``. | <leader>sG | Grep (cwd) | **n** | | <leader>sh | Help Pages | **n** | | <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | | <leader>sk | Key Maps | **n** | | <leader>sl | Location List | **n** | | <leader>sm | Jump to Mark | **n** | diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 3d02e3d9d7..e36067112c 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -729,6 +729,7 @@ end { "sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" }, { "sh", "Telescope help_tags", desc = "Help Pages" }, { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, + { "sj", "Telescope jumplist", desc = "Jumplist" }, { "sk", "Telescope keymaps", desc = "Key Maps" }, { "sl", "Telescope loclist", desc = "Location List" }, { "sM", "Telescope man_pages", desc = "Man Pages" }, From 7128d6ad610aade98c728ef380efd4f4bf91c18b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 21 May 2024 22:15:08 +0000 Subject: [PATCH 051/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index d8c1e7b64c..27d01fab4e 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -248,7 +248,8 @@ end ```lua opts = { formatters_by_ft = { - markdown = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, }, } ``` @@ -264,7 +265,8 @@ opts = { optional = true, opts = { formatters_by_ft = { - markdown = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, }, }, } From 221e266689be389ffaccfe070db4f5a17e3e024c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 22 May 2024 18:21:16 +0000 Subject: [PATCH 052/553] chore(build): auto-generate docs --- docs/extras/lang/python.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index ff3e2d257f..5ed46fb0bb 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -296,7 +296,7 @@ end }, }) end, - keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv" } }, + keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, } ``` From 1f29953de7647b2bc887f8f9a48b0378a606a813 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 May 2024 05:18:00 +0000 Subject: [PATCH 053/553] chore(build): auto-generate docs --- docs/plugins/lsp.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index b8c85bbbbd..db1938d1fa 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -283,7 +283,9 @@ opts = { -- inlay hints if opts.inlay_hints.enabled then LazyVim.lsp.on_supports_method("textDocument/inlayHint", function(client, buffer) - LazyVim.toggle.inlay_hints(buffer, true) + if vim.api.nvim_buf_is_valid(buffer) and vim.bo[buffer].buftype == "" then + LazyVim.toggle.inlay_hints(buffer, true) + end end) end From dee9e3d9e53c6a870eaeca745222f3d8da506b24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 09:17:35 +0000 Subject: [PATCH 054/553] chore(build): auto-generate docs --- docs/extras/editor/illuminate.md | 4 ++-- docs/keymaps.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md index 8cf74fac2e..19004fe84c 100644 --- a/docs/extras/editor/illuminate.md +++ b/docs/extras/editor/illuminate.md @@ -103,7 +103,7 @@ opts = { ```lua -opts = { document_highlight = { enabed = false } } +opts = { document_highlight = { enabled = false } } ``` @@ -114,7 +114,7 @@ opts = { document_highlight = { enabed = false } } ```lua { "neovim/nvim-lspconfig", - opts = { document_highlight = { enabed = false } }, + opts = { document_highlight = { enabled = false } }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index c18cc003e5..6fefb971a2 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -117,7 +117,7 @@ possible keymaps starting with ``. | <leader>cC | Refresh & Display Codelens | **n** | | <leader>cA | Source Action | **n** | | ]] | Next Reference | **n** | -| [[ | Next Reference | **n** | +| [[ | Prev Reference | **n** | | <leader>cr | Rename | **n** | ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim.git) From c186ccb13233efbcf333409565c7a39868dcb92d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 26 May 2024 15:13:19 +0200 Subject: [PATCH 055/553] fix: remove zfz-native from recipes, since its included by default --- lua/recipes.lua | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/lua/recipes.lua b/lua/recipes.lua index 35e748485d..771efff001 100644 --- a/lua/recipes.lua +++ b/lua/recipes.lua @@ -11,18 +11,6 @@ return { end, }, - -- ## Add telescope-fzf-native - { - "telescope.nvim", - dependencies = { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - config = function() - require("telescope").load_extension("fzf") - end, - }, - }, - -- ## Supertab -- -- Use `` for completion and snippets (supertab). @@ -44,9 +32,9 @@ return { -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior cmp.select_next_item() elseif vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -57,9 +45,9 @@ return { if cmp.visible() then cmp.select_prev_item() elseif vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end From 155e60c4714bc61ff901c8b809c28732dc852290 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 13:13:38 +0000 Subject: [PATCH 056/553] chore(build): auto-generate docs --- docs/configuration/recipes.md | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/docs/configuration/recipes.md b/docs/configuration/recipes.md index ad2206b7ea..80cceca794 100644 --- a/docs/configuration/recipes.md +++ b/docs/configuration/recipes.md @@ -21,21 +21,6 @@ override nvim-cmp and add cmp-emoji } ``` -## Add telescope-fzf-native - -```lua -{ - "telescope.nvim", - dependencies = { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - config = function() - require("telescope").load_extension("fzf") - end, - }, -} -``` - ## Supertab Use `` for completion and snippets (supertab). @@ -59,9 +44,9 @@ Use `` for completion and snippets (supertab). -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior cmp.select_next_item() elseif vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) + vim.schedule(function() + vim.snippet.jump(1) + end) elseif has_words_before() then cmp.complete() else @@ -72,9 +57,9 @@ Use `` for completion and snippets (supertab). if cmp.visible() then cmp.select_prev_item() elseif vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) + vim.schedule(function() + vim.snippet.jump(-1) + end) else fallback() end From 0e28828ce4460feb97da44ae110fbd83f10dd6ee Mon Sep 17 00:00:00 2001 From: Darkhan Kubigenov Date: Sun, 26 May 2024 15:09:50 +0100 Subject: [PATCH 057/553] Update `editUrl` in docusaurus.config.js (#92) When jumping to `Edit this page`, it shows `Branch not found, redirected to default branch` message. This renames the branch from `master` to `main`. --- docusaurus.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index c6d26458e7..056d07a646 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -36,7 +36,7 @@ const config = { docs: { routeBasePath: "/", sidebarPath: require.resolve("./sidebars.js"), - editUrl: "https://github.com/LazyVim/lazyvim.github.io/tree/master/", + editUrl: "https://github.com/LazyVim/lazyvim.github.io/tree/main/", }, blog: false, theme: { From cfed40c5d48de1ada2023adda6270829e57fc350 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 14:10:13 +0000 Subject: [PATCH 058/553] chore(build): auto-generate docs --- docs/keymaps.md | 2 + docs/plugins/lsp.md | 236 ++++++++++++++++++++++---------------------- 2 files changed, 122 insertions(+), 116 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index 6fefb971a2..70509accc1 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -118,6 +118,8 @@ possible keymaps starting with ``. | <leader>cA | Source Action | **n** | | ]] | Next Reference | **n** | | [[ | Prev Reference | **n** | +| <a-n> | Next Reference | **n** | +| <a-p> | Prev Reference | **n** | | <leader>cr | Rename | **n** | ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim.git) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index db1938d1fa..6b16284ad9 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -37,122 +37,8 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { - -- options for vim.diagnostic.config() - ---@type vim.diagnostic.Opts - diagnostics = { - underline = true, - update_in_insert = false, - virtual_text = { - spacing = 4, - 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, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error, - [vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn, - [vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint, - [vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info, - }, - }, - }, - -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 - -- Be aware that you also will need to properly configure your LSP server to - -- provide the inlay hints. - inlay_hints = { - enabled = true, - }, - -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 - -- Be aware that you also will need to properly configure your LSP server to - -- provide the code lenses. - codelens = { - enabled = false, - }, - -- Enable lsp cursor word highlighting - document_highlight = { - enabled = true, - }, - -- add any global capabilities here - capabilities = {}, - -- options for vim.lsp.buf.format - -- `bufnr` and `filter` is handled by the LazyVim formatter, - -- but can be also overridden when specified - format = { - formatting_options = nil, - timeout_ms = nil, - }, - -- LSP Server Settings - ---@type lspconfig.options - servers = { - 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 - -- for specific lsp servers - ---@type LazyKeysSpec[] - -- keys = {}, - settings = { - Lua = { - workspace = { - checkThirdParty = false, - }, - codeLens = { - enable = true, - }, - completion = { - callSnippet = "Replace", - }, - doc = { - privateName = { "^_" }, - }, - hint = { - enable = true, - setType = false, - paramType = true, - paramName = "Disable", - semicolon = "Disable", - arrayIndex = "Disable", - }, - }, - }, - }, - }, - -- 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 - setup = { - -- example to setup with typescript.nvim - -- tsserver = function(_, opts) - -- require("typescript").setup({ server = opts }) - -- return true - -- end, - -- Specify * to use this function as a fallback for any server - -- ["*"] = function(server, opts) end, - }, -} -``` - - - - - - -```lua -{ - "neovim/nvim-lspconfig", - event = "LazyFile", - dependencies = { - { "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } }, - { "folke/neodev.nvim", opts = {} }, - "mason.nvim", - "williamboman/mason-lspconfig.nvim", - }, - ---@class PluginLspOpts - opts = { +opts = function() + return { -- options for vim.diagnostic.config() ---@type vim.diagnostic.Opts diagnostics = { @@ -248,7 +134,125 @@ opts = { -- Specify * to use this function as a fallback for any server -- ["*"] = function(server, opts) end, }, + } +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + event = "LazyFile", + dependencies = { + { "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } }, + { "folke/neodev.nvim", opts = {} }, + "mason.nvim", + "williamboman/mason-lspconfig.nvim", }, + ---@class PluginLspOpts + opts = function() + return { + -- options for vim.diagnostic.config() + ---@type vim.diagnostic.Opts + diagnostics = { + underline = true, + update_in_insert = false, + virtual_text = { + spacing = 4, + 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, + signs = { + text = { + [vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error, + [vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn, + [vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint, + [vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info, + }, + }, + }, + -- Enable this to enable the builtin LSP inlay hints on Neovim >= 0.10.0 + -- Be aware that you also will need to properly configure your LSP server to + -- provide the inlay hints. + inlay_hints = { + enabled = true, + }, + -- Enable this to enable the builtin LSP code lenses on Neovim >= 0.10.0 + -- Be aware that you also will need to properly configure your LSP server to + -- provide the code lenses. + codelens = { + enabled = false, + }, + -- Enable lsp cursor word highlighting + document_highlight = { + enabled = true, + }, + -- add any global capabilities here + capabilities = {}, + -- options for vim.lsp.buf.format + -- `bufnr` and `filter` is handled by the LazyVim formatter, + -- but can be also overridden when specified + format = { + formatting_options = nil, + timeout_ms = nil, + }, + -- LSP Server Settings + ---@type lspconfig.options + servers = { + 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 + -- for specific lsp servers + ---@type LazyKeysSpec[] + -- keys = {}, + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + codeLens = { + enable = true, + }, + completion = { + callSnippet = "Replace", + }, + doc = { + privateName = { "^_" }, + }, + hint = { + enable = true, + setType = false, + paramType = true, + paramName = "Disable", + semicolon = "Disable", + arrayIndex = "Disable", + }, + }, + }, + }, + }, + -- 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 + setup = { + -- example to setup with typescript.nvim + -- tsserver = function(_, opts) + -- require("typescript").setup({ server = opts }) + -- return true + -- end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + } + end, ---@param opts PluginLspOpts config = function(_, opts) if LazyVim.has("neoconf.nvim") then From d923bf82407c6d350b2c117060d348133f8b5d1d Mon Sep 17 00:00:00 2001 From: Theo Lemay <16546293+theol0403@users.noreply.github.com> Date: Mon, 27 May 2024 00:50:13 -0400 Subject: [PATCH 059/553] docs(extras.vscode): update enabled plugins (#91) Update from https://github.com/LazyVim/LazyVim/pull/3250/files --- docs/extras/vscode.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/extras/vscode.md b/docs/extras/vscode.md index 6e3c9037d0..b5a7be886a 100644 --- a/docs/extras/vscode.md +++ b/docs/extras/vscode.md @@ -6,17 +6,20 @@ Enabled plugins: ```lua { + "dial.nvim", "flit.nvim", "lazy.nvim", "leap.nvim", "mini.ai", "mini.comment", + "mini.move", "mini.pairs", "mini.surround", "nvim-treesitter", "nvim-treesitter-textobjects", "nvim-ts-context-commentstring", "vim-repeat", + "yanky.nvim", } ``` From e8a4a64da8eb9e89444979dacc4ecfa27a5b5976 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 27 May 2024 06:51:56 +0200 Subject: [PATCH 060/553] fix: remove lazyrc --- docs/extras/lazyrc.md | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 docs/extras/lazyrc.md diff --git a/docs/extras/lazyrc.md b/docs/extras/lazyrc.md deleted file mode 100644 index 628a4f06ab..0000000000 --- a/docs/extras/lazyrc.md +++ /dev/null @@ -1,35 +0,0 @@ -# `Lazyrc` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lazyrc" }, - { import = "plugins" }, - }, -}) -``` - -
- -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'; - - From 31538fa4816da302249a4b4e81afd2326c13df79 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 06:23:51 +0000 Subject: [PATCH 061/553] chore(build): auto-generate docs --- docs/configuration/general.md | 4 ++++ docs/extras/lang/rust.md | 18 ++++++------------ docs/keymaps.md | 1 + 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 9afbe65841..db32eb0b54 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -311,6 +311,10 @@ map("n", "gf", function() LazyVim.lazygit({args = { "-f", vim.trim(git_path) }}) end, { desc = "Lazygit Current File History" }) +map("n", "gl", function() + LazyVim.lazygit({ args = { "log" } }) +end, { desc = "Lazygit Log" }) + -- quit map("n", "qq", "qa", { desc = "Quit All" }) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 8eb5254a84..1c62c8b819 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -246,6 +246,12 @@ opts = { }, config = function(_, opts) vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) + if vim.fn.executable("rust-analyzer") == 0 then + LazyVim.error( + "**rust-analyzer** not found in PATH, please install it.\nhttps://rust-analyzer.github.io/", + { title = "rustaceanvim" } + ) + end end, } ``` @@ -266,7 +272,6 @@ opts = { ```lua opts = { servers = { - rust_analyzer = {}, taplo = { keys = { { @@ -283,11 +288,6 @@ opts = { }, }, }, - setup = { - rust_analyzer = function() - return true - end, - }, } ``` @@ -301,7 +301,6 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - rust_analyzer = {}, taplo = { keys = { { @@ -318,11 +317,6 @@ opts = { }, }, }, - setup = { - rust_analyzer = function() - return true - end, - }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 70509accc1..d6d2c150e5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -76,6 +76,7 @@ possible keymaps starting with ``. | <leader>gG | Lazygit (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gf | Lazygit Current File History | **n** | +| <leader>gl | Lazygit Log | **n** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | From b7435b2c93013057ae08e32e1850ab267ce34c6c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 07:16:50 +0000 Subject: [PATCH 062/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 177 +++++++++++++++++++++++++++++ docs/keymaps.md | 17 +++ 2 files changed, 194 insertions(+) create mode 100644 docs/extras/coding/copilot-chat.md diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md new file mode 100644 index 0000000000..655ebb9cbc --- /dev/null +++ b/docs/extras/coding/copilot-chat.md @@ -0,0 +1,177 @@ +# `Copilot-chat` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.copilot-chat" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim) + + + + + +```lua +opts = { + model = "gpt-4", + auto_insert_mode = true, + window = { + width = 0.4, + }, + selection = function(source) + local select = require("CopilotChat.select") + return select.visual(source) or select.buffer(source) + end, +} +``` + + + + + + +```lua +{ + "CopilotC-Nvim/CopilotChat.nvim", + branch = "canary", + cmd = "CopilotChat", + opts = { + model = "gpt-4", + auto_insert_mode = true, + window = { + width = 0.4, + }, + selection = function(source) + local select = require("CopilotChat.select") + return select.visual(source) or select.buffer(source) + end, + }, + keys = { + { + "aa", + function() + return require("CopilotChat").toggle() + end, + desc = "Toggle (CopilotChat)", + }, + { + "ax", + function() + return require("CopilotChat").clear() + end, + desc = "Clear (CopilotChat)", + }, + { + "aq", + function() + local input = vim.fn.input("Quick Chat: ") + if input ~= "" then + require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer }) + end + end, + desc = "Quick Chat (CopilotChat)", + }, + }, + init = function() + LazyVim.on_load("which-key.nvim", function() + vim.schedule(function() + require("which-key").register({ a = { name = "+CopilotChat (AI)" } }, { prefix = "" }) + end) + end) + end, + config = function(_, opts) + vim.api.nvim_create_autocmd("BufEnter", { + pattern = "copilot-chat", + callback = function() + vim.opt_local.relativenumber = false + vim.opt_local.number = false + end, + }) + require("CopilotChat").setup(opts) + end, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + optional = true, + keys = { + -- Show help actions with telescope + { + "ad", + function() + local actions = require("CopilotChat.actions") + local help = actions.help_actions() + if not help then + LazyVim.warn("No diagnostics found on the current line") + return + end + require("CopilotChat.integrations.telescope").pick(help) + end, + desc = "Diagnostic Help (CopilotChat)", + }, + -- Show prompts actions with telescope + { + "ap", + function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) + end, + desc = "Prompt Actions (CopilotChat)", + }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index d6d2c150e5..9d9699443a 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -282,6 +282,23 @@ possible keymaps starting with ``. | [q | Previous Trouble/Quickfix Item | **n** | | ]q | Next Trouble/Quickfix Item | **n** | +## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) +Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>aa | Toggle (CopilotChat) | **n** | +| <leader>aq | Quick Chat (CopilotChat) | **n** | +| <leader>ax | Clear (CopilotChat) | **n** | + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) +Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>ad | Diagnostic Help (CopilotChat) | **n** | +| <leader>ap | Prompt Actions (CopilotChat) | **n** | + ## [mini.surround](https://github.com/echasnovski/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) From 6924672c06613ec45cc2526a49745bad34abd03c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 15:18:23 +0000 Subject: [PATCH 063/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 59 +++++++++++++++++++++++++++++- docs/keymaps.md | 10 ++--- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 655ebb9cbc..26bc5ffd1e 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -42,6 +42,7 @@ import TabItem from '@theme/TabItem'; opts = { model = "gpt-4", auto_insert_mode = true, + show_help = true, window = { width = 0.4, }, @@ -65,6 +66,7 @@ opts = { opts = { model = "gpt-4", auto_insert_mode = true, + show_help = true, window = { width = 0.4, }, @@ -80,6 +82,7 @@ opts = { return require("CopilotChat").toggle() end, desc = "Toggle (CopilotChat)", + mode = { "n", "v" }, }, { "ax", @@ -87,16 +90,18 @@ opts = { return require("CopilotChat").clear() end, desc = "Clear (CopilotChat)", + mode = { "n", "v" }, }, { "aq", function() local input = vim.fn.input("Quick Chat: ") if input ~= "" then - require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer }) + require("CopilotChat").ask(input) end end, desc = "Quick Chat (CopilotChat)", + mode = { "n", "v" }, }, }, init = function() @@ -107,6 +112,7 @@ opts = { end) end, config = function(_, opts) + local chat = require("CopilotChat") vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", callback = function() @@ -114,7 +120,7 @@ opts = { vim.opt_local.number = false end, }) - require("CopilotChat").setup(opts) + chat.setup(opts) end, } ``` @@ -125,6 +131,9 @@ opts = { ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + Telescope integration + + @@ -156,6 +165,7 @@ opts = nil require("CopilotChat.integrations.telescope").pick(help) end, desc = "Diagnostic Help (CopilotChat)", + mode = { "n", "v" }, }, -- Show prompts actions with telescope { @@ -165,6 +175,7 @@ opts = nil require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) end, desc = "Prompt Actions (CopilotChat)", + mode = { "n", "v" }, }, }, } @@ -174,4 +185,48 @@ opts = nil +## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ + + Edgy integration + + + + + + +```lua +opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, { + ft = "copilot-chat", + title = "Copilot Chat", + size = { width = 50 }, + }) +end +``` + + + + + + +```lua +{ + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, { + ft = "copilot-chat", + title = "Copilot Chat", + size = { width = 50 }, + }) + end, +} +``` + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 9d9699443a..733c60c795 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -287,17 +287,17 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | Key | Description | Mode | | --- | --- | --- | -| <leader>aa | Toggle (CopilotChat) | **n** | -| <leader>aq | Quick Chat (CopilotChat) | **n** | -| <leader>ax | Clear (CopilotChat) | **n** | +| <leader>aa | Toggle (CopilotChat) | **n**, **v** | +| <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | +| <leader>ax | Clear (CopilotChat) | **n**, **v** | ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) | Key | Description | Mode | | --- | --- | --- | -| <leader>ad | Diagnostic Help (CopilotChat) | **n** | -| <leader>ap | Prompt Actions (CopilotChat) | **n** | +| <leader>ad | Diagnostic Help (CopilotChat) | **n**, **v** | +| <leader>ap | Prompt Actions (CopilotChat) | **n**, **v** | ## [mini.surround](https://github.com/echasnovski/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) From 9990037605ec5204d91f869aec661dbf1b88fb84 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 16:19:46 +0000 Subject: [PATCH 064/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 93 +++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 26 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 26bc5ffd1e..1b6b400c35 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -39,18 +39,25 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { - model = "gpt-4", - auto_insert_mode = true, - show_help = true, - window = { - width = 0.4, - }, - selection = function(source) - local select = require("CopilotChat.select") - return select.visual(source) or select.buffer(source) - end, -} +opts = function() + local user = vim.env.USER or "User" + user = user:sub(1, 1):upper() .. user:sub(2) + return { + model = "gpt-4", + auto_insert_mode = true, + show_help = true, + question_header = " " .. user .. " ", + answer_header = " Copilot ", + separator = "---", + window = { + width = 0.4, + }, + selection = function(source) + local select = require("CopilotChat.select") + return select.visual(source) or select.buffer(source) + end, + } +end ``` @@ -63,18 +70,25 @@ opts = { "CopilotC-Nvim/CopilotChat.nvim", branch = "canary", cmd = "CopilotChat", - opts = { - model = "gpt-4", - auto_insert_mode = true, - show_help = true, - window = { - width = 0.4, - }, - selection = function(source) - local select = require("CopilotChat.select") - return select.visual(source) or select.buffer(source) - end, - }, + opts = function() + local user = vim.env.USER or "User" + user = user:sub(1, 1):upper() .. user:sub(2) + return { + model = "gpt-4", + auto_insert_mode = true, + show_help = true, + question_header = " " .. user .. " ", + answer_header = " Copilot ", + separator = "---", + window = { + width = 0.4, + }, + selection = function(source) + local select = require("CopilotChat.select") + return select.visual(source) or select.buffer(source) + end, + } + end, keys = { { "aa", @@ -87,7 +101,7 @@ opts = { { "ax", function() - return require("CopilotChat").clear() + return require("CopilotChat").reset() end, desc = "Clear (CopilotChat)", mode = { "n", "v" }, @@ -113,13 +127,40 @@ opts = { end, config = function(_, opts) local chat = require("CopilotChat") + local ns = vim.api.nvim_create_namespace("copilot-chat-text-hl") + vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", - callback = function() + callback = function(ev) vim.opt_local.relativenumber = false vim.opt_local.number = false + + vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, { + group = vim.api.nvim_create_augroup("copilot-chat-text-" .. ev.buf, { clear = true }), + buffer = ev.buf, + callback = function() + vim.api.nvim_buf_clear_namespace(ev.buf, ns, 0, -1) + local lines = vim.api.nvim_buf_get_lines(ev.buf, 0, -1, false) + for l, line in ipairs(lines) do + if line:match(opts.separator .. "$") then + local sep = vim.fn.strwidth(line) - vim.fn.strwidth(opts.separator) + vim.api.nvim_buf_set_extmark(ev.buf, ns, l - 1, sep, { + virt_text_win_col = sep, + virt_text = { { string.rep("─", vim.go.columns), "@punctuation.special.markdown" } }, + priority = 100, + }) + vim.api.nvim_buf_set_extmark(ev.buf, ns, l - 1, 0, { + end_col = sep + 1, + hl_group = "@markup.heading.2.markdown", + priority = 100, + }) + end + end + end, + }) end, }) + chat.setup(opts) end, } From 151195997629928fa6c1386090a7057ae5d77744 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 19:13:34 +0000 Subject: [PATCH 065/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 1b6b400c35..7eb16d6a68 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -48,7 +48,6 @@ opts = function() show_help = true, question_header = " " .. user .. " ", answer_header = " Copilot ", - separator = "---", window = { width = 0.4, }, @@ -79,7 +78,6 @@ end show_help = true, question_header = " " .. user .. " ", answer_header = " Copilot ", - separator = "---", window = { width = 0.4, }, @@ -134,30 +132,6 @@ end callback = function(ev) vim.opt_local.relativenumber = false vim.opt_local.number = false - - vim.api.nvim_create_autocmd({ "TextChanged", "TextChangedI" }, { - group = vim.api.nvim_create_augroup("copilot-chat-text-" .. ev.buf, { clear = true }), - buffer = ev.buf, - callback = function() - vim.api.nvim_buf_clear_namespace(ev.buf, ns, 0, -1) - local lines = vim.api.nvim_buf_get_lines(ev.buf, 0, -1, false) - for l, line in ipairs(lines) do - if line:match(opts.separator .. "$") then - local sep = vim.fn.strwidth(line) - vim.fn.strwidth(opts.separator) - vim.api.nvim_buf_set_extmark(ev.buf, ns, l - 1, sep, { - virt_text_win_col = sep, - virt_text = { { string.rep("─", vim.go.columns), "@punctuation.special.markdown" } }, - priority = 100, - }) - vim.api.nvim_buf_set_extmark(ev.buf, ns, l - 1, 0, { - end_col = sep + 1, - hl_group = "@markup.heading.2.markdown", - priority = 100, - }) - end - end - end, - }) end, }) From 253f0c91c07cede21695ba42695f55bdd7b4a814 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 20:16:58 +0000 Subject: [PATCH 066/553] chore(build): auto-generate docs --- docs/plugins/lsp.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 6b16284ad9..11987ecbdf 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -67,6 +67,7 @@ opts = function() -- provide the inlay hints. inlay_hints = { enabled = true, + exclude = {}, -- 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 -- Be aware that you also will need to properly configure your LSP server to @@ -184,6 +185,7 @@ end -- provide the inlay hints. inlay_hints = { enabled = true, + exclude = {}, -- 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 -- Be aware that you also will need to properly configure your LSP server to @@ -287,7 +289,11 @@ end -- 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 == "" then + 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 LazyVim.toggle.inlay_hints(buffer, true) end end) From b7fd8dbce1a8e94b01c844425ba9e10afad6f236 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 06:22:23 +0000 Subject: [PATCH 067/553] chore(build): auto-generate docs --- docs/configuration/general.md | 4 ++++ docs/keymaps.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index db32eb0b54..5e9f197cc1 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -250,6 +250,10 @@ map("n", "K", "norm! K", { desc = "Keywordprg" }) map("v", "<", "", ">gv") +-- commenting +map("n", "gco", "oVcxnormal gccfxa", { desc = "Add Comment Below" }) +map("n", "gcO", "OVcxnormal gccfxa", { desc = "Add Comment Above" }) + -- lazy map("n", "l", "Lazy", { desc = "Lazy" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 733c60c795..bfddbf2980 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -47,6 +47,8 @@ possible keymaps starting with ``. | N | Prev Search Result | **n**, **x**, **o** | | <C-s> | Save File | **i**, **x**, **n**, **s** | | <leader>K | Keywordprg | **n** | +| gco | Add Comment Below | **n** | +| gcO | Add Comment Above | **n** | | <leader>l | Lazy | **n** | | <leader>fn | New File | **n** | | <leader>xl | Location List | **n** | From ea4c9274d3ac3c8fd6c27685806689e1482937ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 12:31:07 +0000 Subject: [PATCH 068/553] chore(build): auto-generate docs --- docs/extras/lang/r.md | 332 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 332 insertions(+) create mode 100644 docs/extras/lang/r.md diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md new file mode 100644 index 0000000000..f0ff270eb6 --- /dev/null +++ b/docs/extras/lang/r.md @@ -0,0 +1,332 @@ +# `R` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.r" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [R.nvim](https://github.com/R-nvim/R.nvim) + + + + + +```lua +opts = { + -- Create a table with the options to be passed to setup() + R_args = { "--quiet", "--no-save" }, + hook = { + on_filetype = function() + -- This function will be called at the FileType event + -- 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 }) + + -- Increase the width of which-key to handle the longer r-nvim descriptions + local wk = require("which-key") + -- Workaround from https://github.com/folke/which-key.nvim/issues/514#issuecomment-1987286901 + wk.register({ + [""] = { + a = { name = "+(a)ll", ["🚫"] = "which_key_ignore" }, + b = { name = "+(b)etween marks", ["🚫"] = "which_key_ignore" }, + c = { name = "+(c)hunks", ["🚫"] = "which_key_ignore" }, + f = { name = "+(f)unctions", ["🚫"] = "which_key_ignore" }, + g = { name = "+(g)oto", ["🚫"] = "which_key_ignore" }, + k = { name = "+(k)nit", ["🚫"] = "which_key_ignore" }, + p = { name = "+(p)aragraph", ["🚫"] = "which_key_ignore" }, + q = { name = "+(q)uarto", ["🚫"] = "which_key_ignore" }, + r = { name = "+(r) general", ["🚫"] = "which_key_ignore" }, + s = { name = "+(s)plit or (s)end", ["🚫"] = "which_key_ignore" }, + t = { name = "+(t)erminal", ["🚫"] = "which_key_ignore" }, + v = { name = "+(v)iew", ["🚫"] = "which_key_ignore" }, + }, + }) + end, + }, + pdfviewer = "" +} +``` + + + + + + +```lua +{ + "R-nvim/R.nvim", + lazy = false, + opts = { + -- Create a table with the options to be passed to setup() + R_args = { "--quiet", "--no-save" }, + hook = { + on_filetype = function() + -- This function will be called at the FileType event + -- 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 }) + + -- Increase the width of which-key to handle the longer r-nvim descriptions + local wk = require("which-key") + -- Workaround from https://github.com/folke/which-key.nvim/issues/514#issuecomment-1987286901 + wk.register({ + [""] = { + a = { name = "+(a)ll", ["🚫"] = "which_key_ignore" }, + b = { name = "+(b)etween marks", ["🚫"] = "which_key_ignore" }, + c = { name = "+(c)hunks", ["🚫"] = "which_key_ignore" }, + f = { name = "+(f)unctions", ["🚫"] = "which_key_ignore" }, + g = { name = "+(g)oto", ["🚫"] = "which_key_ignore" }, + k = { name = "+(k)nit", ["🚫"] = "which_key_ignore" }, + p = { name = "+(p)aragraph", ["🚫"] = "which_key_ignore" }, + q = { name = "+(q)uarto", ["🚫"] = "which_key_ignore" }, + r = { name = "+(r) general", ["🚫"] = "which_key_ignore" }, + s = { name = "+(s)plit or (s)end", ["🚫"] = "which_key_ignore" }, + t = { name = "+(t)erminal", ["🚫"] = "which_key_ignore" }, + v = { name = "+(v)iew", ["🚫"] = "which_key_ignore" }, + }, + }) + end, + }, + pdfviewer = "" + }, + config = function(_, opts) + require("r").setup(opts) + require("r.pdf.generic").open = vim.ui.open + end, +} +``` + + + + + +## [cmp-r](https://github.com/R-nvim/cmp-r) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "R-nvim/cmp-r" } +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline", "r", "rnoweb" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline", "r", "rnoweb" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +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, + }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + 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, + }, + }, + }, +} +``` + + + + + +## [neotest-testthat](https://github.com/shunsambongi/neotest-testthat) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "shunsambongi/neotest-testthat", +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { name = "cmp_r" }) +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { "R-nvim/cmp-r" }, + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { name = "cmp_r" }) + end, +} +``` + + + + + +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = { + adapters = { + ["neotest-testthat"] = {}, + }, +} +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + dependencies = { + "shunsambongi/neotest-testthat", + }, + opts = { + adapters = { + ["neotest-testthat"] = {}, + }, + }, +} +``` + + + + + + From 1e8b98ae3f8f19440c14a473dc2e209d7b247420 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 13:18:38 +0000 Subject: [PATCH 069/553] chore(build): auto-generate docs --- docs/extras/lang/scala.md | 20 +++++++++++++++++++- docs/keymaps.md | 8 ++++++++ docs/plugins/coding.md | 15 +++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index f9c4524713..b39344cd49 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -87,7 +87,7 @@ opts = nil ft = { "scala", "sbt", "java" }, init = function() local metals_config = require("metals").bare_config() - metals_config.init_options.statusBarProvider = "on" + metals_config.init_options.statusBarProvider = "off" metals_config.settings = { showImplicitArguments = true, excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, @@ -131,6 +131,24 @@ opts = nil }, } end, + keys = { + { + "me", + function() + require("telescope").extensions.metals.commands() + end, + desc = "Metals commands", + ft = { "scala", "sbt", "java" }, + }, + { + "mc", + function() + require("metals").compile_cascade() + end, + desc = "Metals compile cascade", + ft = { "scala", "sbt", "java" }, + }, + }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index bfddbf2980..10d5a6fae2 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -513,6 +513,14 @@ 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** | + ## [neotest](https://github.com/nvim-neotest/neotest.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index e8841e244c..4e0c607e67 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -271,6 +271,11 @@ end opts = { friendly_snippets = true, global_snippets = { "all", "global" }, + extended_filetypes = { + typescript = { "javascript" }, + typescriptreact = { "javascript" }, + javascriptreact = { "javascript" }, + }, }, dependencies = { "rafamadriz/friendly-snippets" }, }, @@ -320,6 +325,11 @@ end opts = { friendly_snippets = true, global_snippets = { "all", "global" }, + extended_filetypes = { + typescript = { "javascript" }, + typescriptreact = { "javascript" }, + javascriptreact = { "javascript" }, + }, } ``` @@ -334,6 +344,11 @@ opts = { opts = { friendly_snippets = true, global_snippets = { "all", "global" }, + extended_filetypes = { + typescript = { "javascript" }, + typescriptreact = { "javascript" }, + javascriptreact = { "javascript" }, + }, }, dependencies = { "rafamadriz/friendly-snippets" }, } From 59b2affaff1acd67743bc677e6718b6442b2241d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 14:15:06 +0000 Subject: [PATCH 070/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 4e0c607e67..e8841e244c 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -271,11 +271,6 @@ end opts = { friendly_snippets = true, global_snippets = { "all", "global" }, - extended_filetypes = { - typescript = { "javascript" }, - typescriptreact = { "javascript" }, - javascriptreact = { "javascript" }, - }, }, dependencies = { "rafamadriz/friendly-snippets" }, }, @@ -325,11 +320,6 @@ end opts = { friendly_snippets = true, global_snippets = { "all", "global" }, - extended_filetypes = { - typescript = { "javascript" }, - typescriptreact = { "javascript" }, - javascriptreact = { "javascript" }, - }, } ``` @@ -344,11 +334,6 @@ opts = { opts = { friendly_snippets = true, global_snippets = { "all", "global" }, - extended_filetypes = { - typescript = { "javascript" }, - typescriptreact = { "javascript" }, - javascriptreact = { "javascript" }, - }, }, dependencies = { "rafamadriz/friendly-snippets" }, } From 56395664caa7e7a143190dfa99442d783d4e2061 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 16:19:47 +0000 Subject: [PATCH 071/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index e8841e244c..8b3a583c6b 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -270,7 +270,6 @@ end "garymjr/nvim-snippets", opts = { friendly_snippets = true, - global_snippets = { "all", "global" }, }, dependencies = { "rafamadriz/friendly-snippets" }, }, @@ -319,7 +318,6 @@ end ```lua opts = { friendly_snippets = true, - global_snippets = { "all", "global" }, } ``` @@ -333,7 +331,6 @@ opts = { "garymjr/nvim-snippets", opts = { friendly_snippets = true, - global_snippets = { "all", "global" }, }, dependencies = { "rafamadriz/friendly-snippets" }, } From 8d32d84c80331c5a1b9dd20de37a63225638ca4e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 13:18:55 +0000 Subject: [PATCH 072/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 3 +- docs/extras/lang/typescript.md | 211 +++++++++++++++++++---------- docs/extras/lang/vue.md | 40 +++--- docs/keymaps.md | 3 +- docs/plugins/lsp.md | 30 +++- 5 files changed, 193 insertions(+), 94 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 7eb16d6a68..58647b31f1 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -125,11 +125,10 @@ end end, config = function(_, opts) local chat = require("CopilotChat") - local ns = vim.api.nvim_create_namespace("copilot-chat-text-hl") vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", - callback = function(ev) + callback = function() vim.opt_local.relativenumber = false vim.opt_local.number = false end, diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 6600a38379..b55d4c01ce 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -32,21 +32,14 @@ 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 typescript to treesitter - +## [nvim-vtsls](https://github.com/yioneko/nvim-vtsls) ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "typescript", "tsx" }) - end -end +opts = {} ``` @@ -56,11 +49,11 @@ end ```lua { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "typescript", "tsx" }) - end + "yioneko/nvim-vtsls", + lazy = true, + opts = {}, + config = function(_, opts) + require("vtsls").config(opts) end, } ``` @@ -82,49 +75,71 @@ end opts = { -- make sure mason installs the server servers = { - ---@type lspconfig.options.tsserver tsserver = { + enabled = false, + }, + vtsls = { + settings = { + complete_function_calls = true, + typescript = { + updateImportsOnFileMove = { enabled = "always" }, + enableMoveToFileCodeAction = true, + experimental = { + completion = { + enableServerSideFuzzyMatch = true, + }, + }, + suggest = { + completeFunctionCalls = true, + }, + inlayHints = { + enumMemberValues = { enabled = true }, + functionLikeReturnTypes = { enabled = true }, + parameterNames = { enabled = "literals" }, + parameterTypes = { enabled = true }, + propertyDeclarationTypes = { enabled = true }, + variableTypes = { enabled = false }, + }, + }, + }, keys = { + { + "gD", + function() + require("vtsls").commands.goto_source_definition(0) + end, + desc = "Goto Source Definition", + }, { "co", function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports.ts" }, - diagnostics = {}, - }, - }) + require("vtsls").commands.organize_imports(0) end, desc = "Organize Imports", }, { - "cR", + "cM", function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.removeUnused.ts" }, - diagnostics = {}, - }, - }) + require("vtsls").commands.add_missing_imports(0) end, - desc = "Remove Unused Imports", - }, - }, - settings = { - typescript = { - inlayHints = inlay_hints_settings, + desc = "Add missing imports", }, - javascript = { - inlayHints = inlay_hints_settings, - }, - completions = { - completeFunctionCalls = true, + { + "cD", + function() + require("vtsls").commands.fix_all(0) + end, + desc = "Fix all diagnostics", }, }, }, }, + setup = { + tsserver = function() + -- disable tsserver + return true + end, + }, } ``` @@ -139,49 +154,71 @@ opts = { opts = { -- make sure mason installs the server servers = { - ---@type lspconfig.options.tsserver tsserver = { + enabled = false, + }, + vtsls = { + settings = { + complete_function_calls = true, + typescript = { + updateImportsOnFileMove = { enabled = "always" }, + enableMoveToFileCodeAction = true, + experimental = { + completion = { + enableServerSideFuzzyMatch = true, + }, + }, + suggest = { + completeFunctionCalls = true, + }, + inlayHints = { + enumMemberValues = { enabled = true }, + functionLikeReturnTypes = { enabled = true }, + parameterNames = { enabled = "literals" }, + parameterTypes = { enabled = true }, + propertyDeclarationTypes = { enabled = true }, + variableTypes = { enabled = false }, + }, + }, + }, keys = { + { + "gD", + function() + require("vtsls").commands.goto_source_definition(0) + end, + desc = "Goto Source Definition", + }, { "co", function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports.ts" }, - diagnostics = {}, - }, - }) + require("vtsls").commands.organize_imports(0) end, desc = "Organize Imports", }, { - "cR", + "cM", function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.removeUnused.ts" }, - diagnostics = {}, - }, - }) + require("vtsls").commands.add_missing_imports(0) end, - desc = "Remove Unused Imports", + desc = "Add missing imports", }, - }, - settings = { - typescript = { - inlayHints = inlay_hints_settings, - }, - javascript = { - inlayHints = inlay_hints_settings, - }, - completions = { - completeFunctionCalls = true, + { + "cD", + function() + require("vtsls").commands.fix_all(0) + end, + desc = "Fix all diagnostics", }, }, }, }, + setup = { + tsserver = function() + -- disable tsserver + return true + end, + }, }, } ``` @@ -190,6 +227,44 @@ opts = { +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function(_, opts) + -- copy typescript settings to javascript + opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) + + -- add vtsls to lspconfig + require("lspconfig.configs").vtsls = require("vtsls").lspconfig +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + -- copy typescript settings to javascript + opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) + + -- add vtsls to lspconfig + require("lspconfig.configs").vtsls = require("vtsls").lspconfig + end, +} +``` + + + + + ## [mason.nvim](https://github.com/williamboman/mason.nvim) diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 950a96b153..199cfc5d5a 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -82,14 +82,18 @@ opts = function(_, opts) volar = {}, -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. -- The new approach to get typescript support involves using the typescript language server along side volar. - tsserver = { - init_options = { - plugins = { - -- Use typescript language server along with vue typescript plugin - { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "javascript", "typescript", "vue" }, + vtsls = { + settings = { + vtsls = { + tsserver = { + globalPlugins = { + -- Use typescript language server along with vue typescript plugin + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "vue" }, + }, + }, }, }, }, @@ -124,14 +128,18 @@ end volar = {}, -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. -- The new approach to get typescript support involves using the typescript language server along side volar. - tsserver = { - init_options = { - plugins = { - -- Use typescript language server along with vue typescript plugin - { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "javascript", "typescript", "vue" }, + vtsls = { + settings = { + vtsls = { + tsserver = { + globalPlugins = { + -- Use typescript language server along with vue typescript plugin + { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "vue" }, + }, + }, }, }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 10d5a6fae2..4cf3e19984 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -117,7 +117,8 @@ possible keymaps starting with ``. | <c-k> | Signature Help | **i** | | <leader>ca | Code Action | **n**, **v** | | <leader>cc | Run Codelens | **n**, **v** | -| <leader>cC | Refresh & Display Codelens | **n** | +| <leader>cC | Refresh & Display Codelens | **n**, **n** | +| <leader>cR | Rename File | **n**, **n** | | <leader>cA | Source Action | **n** | | ]] | Next Reference | **n** | | [[ | Prev Reference | **n** | diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 11987ecbdf..5389684410 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -80,7 +80,14 @@ opts = function() enabled = true, }, -- add any global capabilities here - capabilities = {}, + 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 @@ -198,7 +205,14 @@ end enabled = true, }, -- add any global capabilities here - capabilities = {}, + 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 @@ -363,11 +377,13 @@ end for server, server_opts in pairs(servers) do if server_opts then server_opts = server_opts == true and {} or server_opts - -- 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) - elseif server_opts.enabled ~= false then - ensure_installed[#ensure_installed + 1] = server + 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) + else + ensure_installed[#ensure_installed + 1] = server + end end end end From 255afa870301546a70e6f86e6b54cf330dda9c55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 14:15:40 +0000 Subject: [PATCH 073/553] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 28 ++++++++++++++++++++-------- docs/plugins/lsp.md | 4 ++-- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index b55d4c01ce..c09b6e9853 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -81,9 +81,11 @@ opts = { vtsls = { settings = { complete_function_calls = true, + vtsls = { + enableMoveToFileCodeAction = true, + }, typescript = { updateImportsOnFileMove = { enabled = "always" }, - enableMoveToFileCodeAction = true, experimental = { completion = { enableServerSideFuzzyMatch = true, @@ -110,6 +112,13 @@ opts = { end, desc = "Goto Source Definition", }, + { + "gR", + function() + require("vtsls").commands.file_references(0) + end, + desc = "File References", + }, { "co", function() @@ -160,9 +169,11 @@ opts = { vtsls = { settings = { complete_function_calls = true, + vtsls = { + enableMoveToFileCodeAction = true, + }, typescript = { updateImportsOnFileMove = { enabled = "always" }, - enableMoveToFileCodeAction = true, experimental = { completion = { enableServerSideFuzzyMatch = true, @@ -189,6 +200,13 @@ opts = { end, desc = "Goto Source Definition", }, + { + "gR", + function() + require("vtsls").commands.file_references(0) + end, + desc = "File References", + }, { "co", function() @@ -237,9 +255,6 @@ opts = { opts = function(_, opts) -- copy typescript settings to javascript opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) - - -- add vtsls to lspconfig - require("lspconfig.configs").vtsls = require("vtsls").lspconfig end ``` @@ -254,9 +269,6 @@ end opts = function(_, opts) -- copy typescript settings to javascript opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) - - -- add vtsls to lspconfig - require("lspconfig.configs").vtsls = require("vtsls").lspconfig end, } ``` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 5389684410..185f6fe14d 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -399,9 +399,9 @@ end }) end - if LazyVim.lsp.get_config("denols") and LazyVim.lsp.get_config("tsserver") then + 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("tsserver", is_deno) + LazyVim.lsp.disable("vtsls", is_deno) LazyVim.lsp.disable("denols", function(root_dir) return not is_deno(root_dir) end) From a2642623771aa27459c9ad29578efca56c76dec3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 15:18:10 +0000 Subject: [PATCH 074/553] chore(build): auto-generate docs --- docs/keymaps.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index 4cf3e19984..a41e1529a4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -117,8 +117,8 @@ possible keymaps starting with ``. | <c-k> | Signature Help | **i** | | <leader>ca | Code Action | **n**, **v** | | <leader>cc | Run Codelens | **n**, **v** | -| <leader>cC | Refresh & Display Codelens | **n**, **n** | -| <leader>cR | Rename File | **n**, **n** | +| <leader>cC | Refresh & Display Codelens | **n** | +| <leader>cR | Rename File | **n** | | <leader>cA | Source Action | **n** | | ]] | Next Reference | **n** | | [[ | Prev Reference | **n** | From 24e1e189562a95469609719bfacfebe66f1cc268 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 20:17:44 +0000 Subject: [PATCH 075/553] chore(build): auto-generate docs --- docs/extras/editor/trouble-v3.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/editor/trouble-v3.md b/docs/extras/editor/trouble-v3.md index 4582212ff6..222b8a213b 100644 --- a/docs/extras/editor/trouble-v3.md +++ b/docs/extras/editor/trouble-v3.md @@ -107,6 +107,7 @@ opts = function(_, opts) title = false, filter = { range = true }, format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", }) table.insert(opts.sections.lualine_c, { symbols.get, @@ -137,6 +138,7 @@ end title = false, filter = { range = true }, format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", }) table.insert(opts.sections.lualine_c, { symbols.get, From 4d92ccbc83ccdf56082c3b2e1bb1118bf2c9c29e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 21:14:54 +0000 Subject: [PATCH 076/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 ++ docs/extras/ui/mini-animate.md | 4 ++-- docs/keymaps.md | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 5e9f197cc1..6a764e86b2 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -352,6 +352,8 @@ map("n", "w-", "s", { desc = "Split Window Below", remap = true }) map("n", "w|", "v", { desc = "Split Window Right", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) +map("n", "wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) +map("n", "m", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 45480fe4bc..0d6327f5d0 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -53,7 +53,7 @@ opts = function() local animate = require("mini.animate") return { resize = { - timing = animate.gen_timing.linear({ duration = 100, unit = "total" }), + timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), }, scroll = { timing = animate.gen_timing.linear({ duration = 150, unit = "total" }), @@ -95,7 +95,7 @@ end local animate = require("mini.animate") return { resize = { - timing = animate.gen_timing.linear({ duration = 100, unit = "total" }), + timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), }, scroll = { timing = animate.gen_timing.linear({ duration = 150, unit = "total" }), diff --git a/docs/keymaps.md b/docs/keymaps.md index a41e1529a4..a1ef1d86fa 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -95,6 +95,8 @@ possible keymaps starting with ``. | <leader>w| | Split Window Right | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | +| <leader>wm | Maximize Toggle | **n** | +| <leader>m | Maximize Toggle | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>f | First Tab | **n** | | <leader><tab><tab> | New Tab | **n** | From 4168f927d9a37c1c6e8fd122312ae66e5985d64f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 23:16:18 +0000 Subject: [PATCH 077/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 58647b31f1..74b2b64cfe 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -125,6 +125,7 @@ end end, config = function(_, opts) local chat = require("CopilotChat") + require("CopilotChat.integrations.cmp").setup() vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", From 728bdab9c51282c23249fc0162f1c0ff6feb07a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 06:22:20 +0000 Subject: [PATCH 078/553] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 839968fde4..a0fdb7aea8 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -160,7 +160,7 @@ opts = { -- Ensure mason installs the server clangd = { keys = { - { "cR", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, + { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_dir = function(fname) return require("lspconfig.util").root_pattern( @@ -217,7 +217,7 @@ opts = { -- Ensure mason installs the server clangd = { keys = { - { "cR", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, + { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_dir = function(fname) return require("lspconfig.util").root_pattern( From 6266dd481c6dc4abad91bf93709f143de8f9bb38 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 08:21:23 +0000 Subject: [PATCH 079/553] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index c09b6e9853..6e9ad9943d 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -140,6 +140,13 @@ opts = { end, desc = "Fix all diagnostics", }, + { + "cV", + function() + require("vtsls").commands.select_ts_version(0) + end, + desc = "Select TS workspace version", + }, }, }, }, @@ -228,6 +235,13 @@ opts = { end, desc = "Fix all diagnostics", }, + { + "cV", + function() + require("vtsls").commands.select_ts_version(0) + end, + desc = "Select TS workspace version", + }, }, }, }, From d6ab3031180863dad122a63c282a0afe63f7b666 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 09:17:58 +0000 Subject: [PATCH 080/553] chore(build): auto-generate docs --- docs/extras/lang/astro.md | 103 +++++++++++++++++++++++++++++++++ docs/extras/lang/typescript.md | 54 +++++++---------- docs/extras/lang/vue.md | 4 +- 3 files changed, 127 insertions(+), 34 deletions(-) create mode 100644 docs/extras/lang/astro.md diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md new file mode 100644 index 0000000000..abc132cf68 --- /dev/null +++ b/docs/extras/lang/astro.md @@ -0,0 +1,103 @@ +# `Astro` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.astro" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "astro" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "astro" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + astro = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + astro = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 6e9ad9943d..40bb5af87b 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -155,6 +155,17 @@ opts = { -- disable tsserver return true end, + vtsls = function(_, opts) + -- copy typescript settings to javascript + opts.settings.javascript = + vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) + local plugins = vim.tbl_get(opts.settings, "vtsls", "tsserver", "globalPlugins") + -- allow plugins to have a key for proper merging + -- remove the key here + if plugins then + opts.settings.vtsls.tsserver.globalPlugins = vim.tbl_values(plugins) + end + end, }, } ``` @@ -250,6 +261,17 @@ opts = { -- disable tsserver return true end, + vtsls = function(_, opts) + -- copy typescript settings to javascript + opts.settings.javascript = + vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) + local plugins = vim.tbl_get(opts.settings, "vtsls", "tsserver", "globalPlugins") + -- allow plugins to have a key for proper merging + -- remove the key here + if plugins then + opts.settings.vtsls.tsserver.globalPlugins = vim.tbl_values(plugins) + end + end, }, }, } @@ -259,38 +281,6 @@ opts = {
-## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - - - - - -```lua -opts = function(_, opts) - -- copy typescript settings to javascript - opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) -end -``` - - - - - - -```lua -{ - "neovim/nvim-lspconfig", - opts = function(_, opts) - -- copy typescript settings to javascript - opts.servers.vtsls.settings.javascript = vim.deepcopy(opts.servers.vtsls.settings.typescript) - end, -} -``` - - - - - ## [mason.nvim](https://github.com/williamboman/mason.nvim) diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 199cfc5d5a..f9a2bdbab7 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -88,7 +88,7 @@ opts = function(_, opts) tsserver = { globalPlugins = { -- Use typescript language server along with vue typescript plugin - { + vue = { name = "@vue/typescript-plugin", location = vue_typescript_plugin, languages = { "vue" }, @@ -134,7 +134,7 @@ end tsserver = { globalPlugins = { -- Use typescript language server along with vue typescript plugin - { + vue = { name = "@vue/typescript-plugin", location = vue_typescript_plugin, languages = { "vue" }, From 488507df8828ad36887dbbff86413d1b09f5a102 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 10:17:33 +0000 Subject: [PATCH 081/553] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 12 ++++++------ docs/extras/util/gitui.md | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 40bb5af87b..c01a95c663 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -83,14 +83,14 @@ opts = { complete_function_calls = true, vtsls = { enableMoveToFileCodeAction = true, - }, - typescript = { - updateImportsOnFileMove = { enabled = "always" }, experimental = { completion = { enableServerSideFuzzyMatch = true, }, }, + }, + typescript = { + updateImportsOnFileMove = { enabled = "always" }, suggest = { completeFunctionCalls = true, }, @@ -189,14 +189,14 @@ opts = { complete_function_calls = true, vtsls = { enableMoveToFileCodeAction = true, - }, - typescript = { - updateImportsOnFileMove = { enabled = "always" }, experimental = { completion = { enableServerSideFuzzyMatch = true, }, }, + }, + typescript = { + updateImportsOnFileMove = { enabled = "always" }, suggest = { completeFunctionCalls = true, }, diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index c7b8ca56cc..9025d53cbf 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -79,6 +79,7 @@ end once = true, callback = function() pcall(vim.keymap.del, "n", "gf") + pcall(vim.keymap.del, "n", "gl") end, }) end, From a155c13b74c765009cce4e4ea044f64ee0e25ce4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 13:18:04 +0000 Subject: [PATCH 082/553] chore(build): auto-generate docs --- docs/extras/ui/edgy.md | 26 ++++++++++++++++++++++++++ docs/keymaps.md | 19 ++++--------------- docs/plugins/editor.md | 34 +++++++++++++++------------------- docs/plugins/ui.md | 30 ++++++++++++++++++++++++++++++ 4 files changed, 75 insertions(+), 34 deletions(-) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index cad5f5fece..23faeba359 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -133,6 +133,19 @@ opts = function() end, }, } + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do + opts[pos] = opts[pos] or {} + table.insert(opts[pos], { + ft = "trouble", + filter = function(_buf, win) + return vim.w[win].trouble + and vim.w[win].trouble.position == pos + and vim.w[win].trouble.type == "split" + and vim.w[win].trouble.relative == "editor" + and not vim.w[win].trouble_preview + end, + }) + end return opts end ``` @@ -248,6 +261,19 @@ end end, }, } + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do + opts[pos] = opts[pos] or {} + table.insert(opts[pos], { + ft = "trouble", + filter = function(_buf, win) + return vim.w[win].trouble + and vim.w[win].trouble.position == pos + and vim.w[win].trouble.type == "split" + and vim.w[win].trouble.relative == "editor" + and not vim.w[win].trouble_preview + end, + }) + end return opts end, } diff --git a/docs/keymaps.md b/docs/keymaps.md index a1ef1d86fa..504da4d302 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -280,10 +280,12 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | +| <leader>cs | Symbols (Trouble) | **n** | +| <leader>cS | LSP references/definitions/... (Trouble) | **n** | | <leader>xL | Location List (Trouble) | **n** | | <leader>xQ | Quickfix List (Trouble) | **n** | -| <leader>xx | Document Diagnostics (Trouble) | **n** | -| <leader>xX | Workspace Diagnostics (Trouble) | **n** | +| <leader>xx | Diagnostics (Trouble) | **n** | +| <leader>xX | Buffer Diagnostics (Trouble) | **n** | | [q | Previous Trouble/Quickfix Item | **n** | | ]q | Next Trouble/Quickfix Item | **n** | @@ -474,19 +476,6 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | -## [trouble.nvim](https://github.com/folke/trouble.nvim.git) -Part of [lazyvim.plugins.extras.editor.trouble-v3](/extras/editor/trouble-v3) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>cs | Symbols (Trouble) | **n** | -| <leader>cS | LSP references/definitions/... (Trouble) | **n** | -| <leader>xL | Location List (Trouble) | **n** | -| <leader>xQ | Quickfix List (Trouble) | **n** | -| <leader>xx | Diagnostics (Trouble) | **n** | -| <leader>xX | Buffer Diagnostics (Trouble) | **n** | -| [q | Previous Trouble/Quickfix Item | **n** | - ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index e36067112c..1bd709daaa 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -512,15 +512,21 @@ opts = { use_diagnostic_signs = true } cmd = { "TroubleToggle", "Trouble" }, opts = { use_diagnostic_signs = true }, keys = { - { "xx", "TroubleToggle document_diagnostics", desc = "Document Diagnostics (Trouble)" }, - { "xX", "TroubleToggle workspace_diagnostics", desc = "Workspace Diagnostics (Trouble)" }, - { "xL", "TroubleToggle loclist", desc = "Location List (Trouble)" }, - { "xQ", "TroubleToggle quickfix", desc = "Quickfix List (Trouble)" }, + { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, + { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, + { "cs", "Trouble symbols toggle focus=false", desc = "Symbols (Trouble)" }, + { + "cS", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP references/definitions/... (Trouble)", + }, + { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, + { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, { "[q", function() if require("trouble").is_open() then - require("trouble").previous({ skip_groups = true, jump = true }) + require("trouble").prev({ skip_groups = true, jump = true }) else local ok, err = pcall(vim.cmd.cprev) if not ok then @@ -609,12 +615,7 @@ opts = {} opts = function() local actions = require("telescope.actions") - local open_with_trouble = function(...) - return require("trouble.providers.telescope").open_with_trouble(...) - end - local open_selected_with_trouble = function(...) - return require("trouble.providers.telescope").open_selected_with_trouble(...) - end + local open_with_trouble = require("trouble.sources.telescope").open local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() @@ -646,7 +647,7 @@ opts = function() mappings = { i = { [""] = open_with_trouble, - [""] = open_selected_with_trouble, + [""] = open_with_trouble, [""] = find_files_no_ignore, [""] = find_files_with_hidden, [""] = actions.cycle_history_next, @@ -764,12 +765,7 @@ end opts = function() local actions = require("telescope.actions") - local open_with_trouble = function(...) - return require("trouble.providers.telescope").open_with_trouble(...) - end - local open_selected_with_trouble = function(...) - return require("trouble.providers.telescope").open_selected_with_trouble(...) - end + local open_with_trouble = require("trouble.sources.telescope").open local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() @@ -801,7 +797,7 @@ end mappings = { i = { [""] = open_with_trouble, - [""] = open_selected_with_trouble, + [""] = open_with_trouble, [""] = find_files_no_ignore, [""] = find_files_with_hidden, [""] = actions.cycle_history_next, diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index d161aa62bf..f47b78512b 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -234,6 +234,17 @@ opts = function() vim.o.laststatus = vim.g.lualine_laststatus + local trouble = require("trouble") + local symbols = trouble.statusline + and trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) + return { options = { theme = "auto", @@ -257,6 +268,10 @@ opts = function() }, { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, { LazyVim.lualine.pretty_path() }, + { + symbols and symbols.get, + cond = symbols and symbols.has, + }, }, lualine_x = { -- stylua: ignore @@ -344,6 +359,17 @@ end vim.o.laststatus = vim.g.lualine_laststatus + local trouble = require("trouble") + local symbols = trouble.statusline + and trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) + return { options = { theme = "auto", @@ -367,6 +393,10 @@ end }, { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, { LazyVim.lualine.pretty_path() }, + { + symbols and symbols.get, + cond = symbols and symbols.has, + }, }, lualine_x = { -- stylua: ignore From c4b2aab54aa2d724261df9ea99568ac24891eee0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 May 2024 14:16:10 +0000 Subject: [PATCH 083/553] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index c01a95c663..8b7b34fe3d 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -133,6 +133,13 @@ opts = { end, desc = "Add missing imports", }, + { + "cu", + function() + require("vtsls").commands.remove_unused_imports(0) + end, + desc = "Remove unused imports", + }, { "cD", function() @@ -239,6 +246,13 @@ opts = { end, desc = "Add missing imports", }, + { + "cu", + function() + require("vtsls").commands.remove_unused_imports(0) + end, + desc = "Remove unused imports", + }, { "cD", function() From d973e1db8c21cc74261261024152346f88d32ccd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 06:22:31 +0000 Subject: [PATCH 084/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 74b2b64cfe..bae000a900 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -119,7 +119,7 @@ end init = function() LazyVim.on_load("which-key.nvim", function() vim.schedule(function() - require("which-key").register({ a = { name = "+CopilotChat (AI)" } }, { prefix = "" }) + require("which-key").register({ a = { name = "+ai" } }, { prefix = "" }) end) end) end, From 6f67ce7b00ac7ac6aad0de43360e066519635b1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 12:30:49 +0000 Subject: [PATCH 085/553] chore(build): auto-generate docs --- docs/configuration/general.md | 3 ++ docs/extras/coding/copilot-chat.md | 42 ++++++++++++++--- docs/extras/lang/typescript.md | 12 ----- docs/extras/lang/vue.md | 40 +++++----------- docs/plugins/ui.md | 74 +++++++++++++++++------------- 5 files changed, 92 insertions(+), 79 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 6a764e86b2..749686a9c7 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -80,6 +80,9 @@ vim.g.lazygit_config = true -- Hide deprecation warnings vim.g.deprecation_warnings = false +-- Show the current document symbols location from Trouble in lualine +vim.g.trouble_lualine = true + local opt = vim.opt opt.autowrite = true -- Enable auto write diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index bae000a900..5121df46b2 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -116,13 +116,6 @@ end mode = { "n", "v" }, }, }, - init = function() - LazyVim.on_load("which-key.nvim", function() - vim.schedule(function() - require("which-key").register({ a = { name = "+ai" } }, { prefix = "" }) - end) - end) - end, config = function(_, opts) local chat = require("CopilotChat") require("CopilotChat.integrations.cmp").setup() @@ -144,6 +137,41 @@ end +## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ + + + + + +```lua +opts = { + defaults = { + ["a"] = { name = "+ai" }, + }, +} +``` + + + + + + +```lua +{ + "folke/which-key.nvim", + optional = true, + opts = { + defaults = { + ["a"] = { name = "+ai" }, + }, + }, +} +``` + + + + + ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ Telescope integration diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 8b7b34fe3d..4eaeb8a922 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -166,12 +166,6 @@ opts = { -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) - local plugins = vim.tbl_get(opts.settings, "vtsls", "tsserver", "globalPlugins") - -- allow plugins to have a key for proper merging - -- remove the key here - if plugins then - opts.settings.vtsls.tsserver.globalPlugins = vim.tbl_values(plugins) - end end, }, } @@ -279,12 +273,6 @@ opts = { -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) - local plugins = vim.tbl_get(opts.settings, "vtsls", "tsserver", "globalPlugins") - -- allow plugins to have a key for proper merging - -- remove the key here - if plugins then - opts.settings.vtsls.tsserver.globalPlugins = vim.tbl_values(plugins) - end end, }, }, diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index f9a2bdbab7..6fc14bf1a3 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -83,20 +83,6 @@ opts = function(_, opts) -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. -- The new approach to get typescript support involves using the typescript language server along side volar. vtsls = { - settings = { - vtsls = { - tsserver = { - globalPlugins = { - -- Use typescript language server along with vue typescript plugin - vue = { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "vue" }, - }, - }, - }, - }, - }, filetypes = { "javascript", "javascriptreact", @@ -108,6 +94,12 @@ opts = function(_, opts) }, }, }) + + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "vue" }, + }) end ``` @@ -129,20 +121,6 @@ end -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. -- The new approach to get typescript support involves using the typescript language server along side volar. vtsls = { - settings = { - vtsls = { - tsserver = { - globalPlugins = { - -- Use typescript language server along with vue typescript plugin - vue = { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "vue" }, - }, - }, - }, - }, - }, filetypes = { "javascript", "javascriptreact", @@ -154,6 +132,12 @@ end }, }, }) + + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + name = "@vue/typescript-plugin", + location = vue_typescript_plugin, + languages = { "vue" }, + }) end, } ``` diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index f47b78512b..8b8600bb17 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -234,18 +234,7 @@ opts = function() vim.o.laststatus = vim.g.lualine_laststatus - local trouble = require("trouble") - local symbols = trouble.statusline - and trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - - return { + local opts = { options = { theme = "auto", globalstatus = true, @@ -268,10 +257,6 @@ opts = function() }, { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, { LazyVim.lualine.pretty_path() }, - { - symbols and symbols.get, - cond = symbols and symbols.has, - }, }, lualine_x = { -- stylua: ignore @@ -328,6 +313,26 @@ opts = function() }, extensions = { "neo-tree", "lazy" }, } + + -- do not add trouble symbols if aerial is enabled + if vim.g.trouble_lualine then + local trouble = require("trouble") + local symbols = trouble.statusline + and trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) + table.insert(opts.sections.lualine_c, { + symbols and symbols.get, + cond = symbols and symbols.has, + }) + end + + return opts end ``` @@ -359,18 +364,7 @@ end vim.o.laststatus = vim.g.lualine_laststatus - local trouble = require("trouble") - local symbols = trouble.statusline - and trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - - return { + local opts = { options = { theme = "auto", globalstatus = true, @@ -393,10 +387,6 @@ end }, { "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } }, { LazyVim.lualine.pretty_path() }, - { - symbols and symbols.get, - cond = symbols and symbols.has, - }, }, lualine_x = { -- stylua: ignore @@ -453,6 +443,26 @@ end }, extensions = { "neo-tree", "lazy" }, } + + -- do not add trouble symbols if aerial is enabled + if vim.g.trouble_lualine then + local trouble = require("trouble") + local symbols = trouble.statusline + and trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) + table.insert(opts.sections.lualine_c, { + symbols and symbols.get, + cond = symbols and symbols.has, + }) + end + + return opts end, } ``` From f77884dd0f9b36ec9f1a8f58e08dda93f67876f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 15:18:40 +0000 Subject: [PATCH 086/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 8b8600bb17..3b23380cbe 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -871,39 +871,4 @@ end
-## [alpha-nvim](https://github.com/goolord/alpha-nvim) _(optional)_ - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "goolord/alpha-nvim", - optional = true, - enabled = function() - LazyVim.warn({ - "`dashboard.nvim` is now the default LazyVim starter plugin.", - "", - "To keep using `alpha.nvim`, please enable the `lazyvim.plugins.extras.ui.alpha` extra.", - "Or to hide this message, remove the alpha spec from your config.", - }) - return false - end, -} -``` - - - - - From 982f3e2d49c62dc934f366b84f8a4ededb09ed86 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 19:13:54 +0000 Subject: [PATCH 087/553] chore(build): auto-generate docs --- docs/extras/lang/vue.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 6fc14bf1a3..fcb1c06608 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -94,11 +94,11 @@ opts = function(_, opts) }, }, }) - LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { name = "@vue/typescript-plugin", location = vue_typescript_plugin, languages = { "vue" }, + configNamespace = "typescript", }) end ``` @@ -132,11 +132,11 @@ end }, }, }) - LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { name = "@vue/typescript-plugin", location = vue_typescript_plugin, languages = { "vue" }, + configNamespace = "typescript", }) end, } From 87bb1063f9635d0334df29a65e23121fe0277712 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 22:14:59 +0000 Subject: [PATCH 088/553] chore(build): auto-generate docs --- docs/extras/editor/aerial.md | 29 +++++++++++++++++++++++++++++ docs/extras/editor/outline.md | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+) diff --git a/docs/extras/editor/aerial.md b/docs/extras/editor/aerial.md index 7859b39681..3423e645b5 100644 --- a/docs/extras/editor/aerial.md +++ b/docs/extras/editor/aerial.md @@ -138,6 +138,35 @@ end +## [trouble.nvim](https://github.com/folke/trouble.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/trouble.nvim", + optional = true, + keys = { + { "cs", false }, + }, +} +``` + + + + + ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ Telescope integration diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index 81c780c391..cc3e132aca 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -108,6 +108,38 @@ end +## [trouble.nvim](https://github.com/folke/trouble.nvim) _(optional)_ + + Disable `cs` keymap so it doesn't conflict with `outline.nvim` + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/trouble.nvim", + optional = true, + keys = { + { "cs", false }, + }, +} +``` + + + + + ## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ edgy integration From 07a9e33f97231af77a0a192d3b030a8e17b105bd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 1 Jun 2024 10:42:20 +0200 Subject: [PATCH 089/553] fix: added support for imported extras --- lua/build.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lua/build.lua b/lua/build.lua index 2b63ee22e5..016809fb42 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -364,7 +364,15 @@ end function M.plugins(path) local test = rootLazyVim .. "/lua/lazyvim/plugins/" .. path - local spec = require("lazy.core.plugin").Spec.new(dofile(test), { optional = true }) + local mod = dofile(test) + local imports = {} + for k, v in pairs(mod) do + if type(v) == "table" and v.import then + imports[k] = v.import + mod[k] = {} + end + end + local spec = require("lazy.core.plugin").Spec.new(mod, { optional = true }) local source = Util.read_file(test) local parser = vim.treesitter.get_string_parser(source, "lua") parser:parse() @@ -458,6 +466,17 @@ import TabItem from '@theme/TabItem'; ]], } + table.sort(imports) + if #imports > 0 then + lines[#lines + 1] = "### Includes the following extras" + lines[#lines + 1] = "" + for _, x in ipairs(imports) do + x = x:gsub("lazyvim%.plugins%.extras%.", "") + lines[#lines + 1] = ("- [%s](/extras/%s)"):format(x, x:gsub("%.", "/")) + end + lines[#lines + 1] = "" + end + -- sort by optional and idx table.sort(plugins, function(a, b) if a.optional ~= b.optional then From f4e93a046f9faa72fe85cbea13053d3701ecde1b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Jun 2024 08:42:41 +0000 Subject: [PATCH 090/553] chore(build): auto-generate docs --- docs/extras/lang/astro.md | 60 ++++++++++++ docs/extras/lang/python.md | 6 +- docs/extras/lang/svelte.md | 163 +++++++++++++++++++++++++++++++++ docs/extras/lang/typescript.md | 28 +++++- docs/extras/lang/vue.md | 108 ++++++++++++---------- docs/plugins/lsp.md | 10 +- 6 files changed, 313 insertions(+), 62 deletions(-) create mode 100644 docs/extras/lang/svelte.md diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index abc132cf68..05547befa4 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -32,6 +32,10 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +### Includes the following extras + +- [lang.typescript](/extras/lang/typescript) + ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) @@ -68,6 +72,9 @@ end ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + LSP Servers + + @@ -100,4 +107,57 @@ opts = { +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Configure tsserver plugin + + + + + + +```lua +opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "@astrojs/ts-plugin", + location = LazyVim.get_pkg_path( + "astro-language-server", + "/node_modules/@astrojs/ts-plugin", + { warn = false } + ), + enableForWorkspaceTypeScriptVersions = true, + }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "@astrojs/ts-plugin", + location = LazyVim.get_pkg_path( + "astro-language-server", + "/node_modules/@astrojs/ts-plugin", + { warn = false } + ), + enableForWorkspaceTypeScriptVersions = true, + }, + }) + end, +} +``` + + + + + diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 5ed46fb0bb..03dbd1c30d 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -242,8 +242,7 @@ opts = {} { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - local path = require("mason-registry").get_package("debugpy"):get_install_path() - require("dap-python").setup(path .. "/venv/bin/python") + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) end, } ``` @@ -409,8 +408,7 @@ opts = nil { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - local path = require("mason-registry").get_package("debugpy"):get_install_path() - require("dap-python").setup(path .. "/venv/bin/python") + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) end, }, } diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md new file mode 100644 index 0000000000..052ec0fdd0 --- /dev/null +++ b/docs/extras/lang/svelte.md @@ -0,0 +1,163 @@ +# `Svelte` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.svelte" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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.typescript](/extras/lang/typescript) + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "svelte" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "svelte" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + LSP Servers + + + + + + +```lua +opts = { + servers = { + svelte = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + svelte = {}, + }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Configure tsserver plugin + + + + + + +```lua +opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "typescript-svelte-plugin", + location = LazyVim.get_pkg_path( + "svelte-language-server", + "/node_modules/typescript-svelte-plugin", + { warn = false } + ), + enableForWorkspaceTypeScriptVersions = true, + }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "typescript-svelte-plugin", + location = LazyVim.get_pkg_path( + "svelte-language-server", + "/node_modules/typescript-svelte-plugin", + { warn = false } + ), + enableForWorkspaceTypeScriptVersions = true, + }, + }) + end, +} +``` + + + + + + diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 4eaeb8a922..25d1f81a45 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -79,10 +79,21 @@ opts = { enabled = false, }, vtsls = { + -- explicitly add default filetypes, so that we can extend + -- them in related extras + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, settings = { complete_function_calls = true, vtsls = { enableMoveToFileCodeAction = true, + autoUseWorkspaceTsdk = true, experimental = { completion = { enableServerSideFuzzyMatch = true, @@ -186,10 +197,21 @@ opts = { enabled = false, }, vtsls = { + -- explicitly add default filetypes, so that we can extend + -- them in related extras + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, settings = { complete_function_calls = true, vtsls = { enableMoveToFileCodeAction = true, + autoUseWorkspaceTsdk = true, experimental = { completion = { enableServerSideFuzzyMatch = true, @@ -333,8 +355,7 @@ opts = function() command = "node", -- 💀 Make sure to update this path to point to your installation args = { - require("mason-registry").get_package("js-debug-adapter"):get_install_path() - .. "/js-debug/src/dapDebugServer.js", + LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"), "${port}", }, }, @@ -406,8 +427,7 @@ end command = "node", -- 💀 Make sure to update this path to point to your installation args = { - require("mason-registry").get_package("js-debug-adapter"):get_install_path() - .. "/js-debug/src/dapDebugServer.js", + LazyVim.get_pkg_path("js-debug-adapter", "/js-debug/src/dapDebugServer.js"), "${port}", }, }, diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index fcb1c06608..0e8bd29bba 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -32,6 +32,10 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +### Includes the following extras + +- [lang.typescript](/extras/lang/typescript) + ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) @@ -68,37 +72,63 @@ end ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + Add LSP servers + + ```lua -opts = function(_, opts) - local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path() - .. "/node_modules/@vue/language-server" - .. "/node_modules/@vue/typescript-plugin" - - opts.servers = vim.tbl_deep_extend("force", opts.servers, { +opts = { + servers = { volar = {}, - -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. - -- The new approach to get typescript support involves using the typescript language server along side volar. - vtsls = { - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - "vue", - }, + vtsls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + volar = {}, + vtsls = {}, }, - }) + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Configure tsserver plugin + + + + + + +```lua +opts = function(_, opts) + table.insert(opts.servers.vtsls.filetypes, "vue") LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "vue" }, - configNamespace = "typescript", + { + name = "@vue/typescript-plugin", + location = LazyVim.get_pkg_path("vue-language-server", "/node_modules/@vue/language-server"), + languages = { "vue" }, + configNamespace = "typescript", + enableForWorkspaceTypeScriptVersions = true, + }, }) end ``` @@ -112,31 +142,15 @@ end { "neovim/nvim-lspconfig", opts = function(_, opts) - local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path() - .. "/node_modules/@vue/language-server" - .. "/node_modules/@vue/typescript-plugin" - - opts.servers = vim.tbl_deep_extend("force", opts.servers, { - volar = {}, - -- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files. - -- The new approach to get typescript support involves using the typescript language server along side volar. - vtsls = { - filetypes = { - "javascript", - "javascriptreact", - "javascript.jsx", - "typescript", - "typescriptreact", - "typescript.tsx", - "vue", - }, - }, - }) + table.insert(opts.servers.vtsls.filetypes, "vue") LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { - name = "@vue/typescript-plugin", - location = vue_typescript_plugin, - languages = { "vue" }, - configNamespace = "typescript", + { + name = "@vue/typescript-plugin", + location = LazyVim.get_pkg_path("vue-language-server", "/node_modules/@vue/language-server"), + languages = { "vue" }, + configNamespace = "typescript", + enableForWorkspaceTypeScriptVersions = true, + }, }) end, } diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 185f6fe14d..06f04ef1fe 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -580,19 +580,15 @@ opts = { }) end, 100) end) - local function ensure_installed() + + mr.refresh(function() for _, tool in ipairs(opts.ensure_installed) do local p = mr.get_package(tool) if not p:is_installed() then p:install() end end - end - if mr.refresh then - mr.refresh(ensure_installed) - else - ensure_installed() - end + end) end, } ``` From ae4bb18da2270691996e414e6ab6cd2c8c953f80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Jun 2024 13:16:11 +0000 Subject: [PATCH 091/553] chore(build): auto-generate docs --- docs/extras/lang/r.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index f0ff270eb6..9423b3f9fe 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -119,6 +119,7 @@ opts = { pdfviewer = "" }, config = function(_, opts) + vim.g.rout_follow_colorscheme = true require("r").setup(opts) require("r.pdf.generic").open = vim.ui.open end, From 12a0878bcf93d3bc92494454bebe2eb4b2f17e57 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Jun 2024 19:15:33 +0000 Subject: [PATCH 092/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 4 +++- docs/plugins/lsp.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 8b3a583c6b..bb6296e7cb 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -242,6 +242,9 @@ opts = nil ## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + snippets + + @@ -438,7 +441,6 @@ opts = {} "folke/ts-comments.nvim", event = "VeryLazy", opts = {}, - enabled = vim.fn.has("nvim-0.10") == 1, } ``` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 06f04ef1fe..7652d394f8 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -102,7 +102,7 @@ opts = function() -- mason = false, -- set to false if you don't want this server to be installed with mason -- Use this to add any additional keymaps -- for specific lsp servers - ---@type LazyKeysSpec[] + -- ---@type LazyKeysSpec[] -- keys = {}, settings = { Lua = { @@ -227,7 +227,7 @@ end -- mason = false, -- set to false if you don't want this server to be installed with mason -- Use this to add any additional keymaps -- for specific lsp servers - ---@type LazyKeysSpec[] + -- ---@type LazyKeysSpec[] -- keys = {}, settings = { Lua = { From fe3aec74b2b30ca1802f89ad96a4c40303f02e30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 08:19:04 +0000 Subject: [PATCH 093/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 33 ------------ docs/extras/lsp/neoconf.md | 94 ++++++++++++++++++++++++++++++++++ docs/plugins/coding.md | 100 +++++++++++++++++++++++++++++++++++++ docs/plugins/lsp.md | 80 ++--------------------------- 4 files changed, 198 insertions(+), 109 deletions(-) create mode 100644 docs/extras/lsp/neoconf.md diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 50d1d67191..1234c3cad4 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -119,11 +119,6 @@ opts = {} }, }, }, - - -- VsCode launch.json parser - { - "folke/neoconf.nvim", - }, }, -- stylua: ignore @@ -339,34 +334,6 @@ opts = { -## [neoconf.nvim](https://github.com/folke/neoconf.nvim) - - VsCode launch.json parser - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "folke/neoconf.nvim", -} -``` - - - - - ## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ which key integration diff --git a/docs/extras/lsp/neoconf.md b/docs/extras/lsp/neoconf.md new file mode 100644 index 0000000000..53f21bc640 --- /dev/null +++ b/docs/extras/lsp/neoconf.md @@ -0,0 +1,94 @@ +# `Neoconf` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lsp.neoconf" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = nil +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + dependencies = { + { + "folke/neoconf.nvim", + cmd = "Neoconf", + opts = {}, + }, + }, +} +``` + + + + + +## [neoconf.nvim](https://github.com/folke/neoconf.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "folke/neoconf.nvim", + cmd = "Neoconf", + opts = {}, +} +``` + + + + + + diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index bb6296e7cb..9082d6c91e 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -530,4 +530,104 @@ end
+## [lazydev.nvim](https://github.com/folke/lazydev.nvim) + + + + + +```lua +opts = function() + return { + library = { + uv = LazyVim.get_plugin_path("luvit-meta", "library"), + lazyvim = LazyVim.get_plugin_path("LazyVim"), + }, + } +end +``` + + + + + + +```lua +{ + "folke/lazydev.nvim", + ft = "lua", + opts = function() + return { + library = { + uv = LazyVim.get_plugin_path("luvit-meta", "library"), + lazyvim = LazyVim.get_plugin_path("LazyVim"), + }, + } + end, +} +``` + + + + + +## [luvit-meta](https://github.com/Bilal2453/luvit-meta) + + Manage libuv types with lazy. Plugin will never be loaded + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "Bilal2453/luvit-meta", lazy = true } +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + Add lazydev source to cmp + + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources, { name = "lazydev", group_index = 0 }) +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + opts = function(_, opts) + table.insert(opts.sources, { name = "lazydev", group_index = 0 }) + end, +} +``` + + + + + diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 7652d394f8..468b73d99f 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -156,8 +156,6 @@ end "neovim/nvim-lspconfig", event = "LazyFile", dependencies = { - { "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } }, - { "folke/neodev.nvim", opts = {} }, "mason.nvim", "williamboman/mason-lspconfig.nvim", }, @@ -271,10 +269,6 @@ end end, ---@param opts PluginLspOpts config = function(_, opts) - if LazyVim.has("neoconf.nvim") then - require("neoconf").setup(LazyVim.opts("neoconf.nvim")) - end - -- setup autoformat LazyVim.format.register(LazyVim.lsp.formatter()) @@ -414,75 +408,6 @@ end
-## [neoconf.nvim](https://github.com/folke/neoconf.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } } -``` - - - - - -## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "nvim-lspconfig" } -``` - - - - - -## [neodev.nvim](https://github.com/folke/neodev.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ "folke/neodev.nvim", opts = {} } -``` - - - - - ## [mason.nvim](https://github.com/williamboman/mason.nvim) @@ -499,7 +424,10 @@ opts = nil ```lua -"mason.nvim" +{ + "mason.nvim", + "williamboman/mason-lspconfig.nvim", +} ``` From 3513f1c0f3b1dfd5534c16b68e62451dc93f9ff3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 11:14:25 +0000 Subject: [PATCH 094/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 1bd709daaa..b86a72cc90 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -587,8 +587,8 @@ opts = {} keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" }, - { "xt", "TodoTrouble", desc = "Todo (Trouble)" }, - { "xT", "TodoTrouble keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme (Trouble)" }, + { "xt", "Trouble todo", desc = "Todo (Trouble)" }, + { "xT", "Trouble todo filter = {tag = {TODO,FIX,FIXME}}", desc = "Todo/Fix/Fixme (Trouble)" }, { "st", "TodoTelescope", desc = "Todo" }, { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, From f22fcfaf751277adf6094f673b3930294507454a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 12:28:45 +0000 Subject: [PATCH 095/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 9082d6c91e..bc3f8998e2 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -540,8 +540,8 @@ end opts = function() return { library = { - uv = LazyVim.get_plugin_path("luvit-meta", "library"), - lazyvim = LazyVim.get_plugin_path("LazyVim"), + uv = "luvit-meta/library", + lazyvim = "LazyVim", }, } end @@ -559,8 +559,8 @@ end opts = function() return { library = { - uv = LazyVim.get_plugin_path("luvit-meta", "library"), - lazyvim = LazyVim.get_plugin_path("LazyVim"), + uv = "luvit-meta/library", + lazyvim = "LazyVim", }, } end, From 6b202fa0942078764a390795ba4180084b4cc29a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 13:16:25 +0000 Subject: [PATCH 096/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index b86a72cc90..4cc8277be8 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -587,8 +587,8 @@ opts = {} keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" }, { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" }, - { "xt", "Trouble todo", desc = "Todo (Trouble)" }, - { "xT", "Trouble todo filter = {tag = {TODO,FIX,FIXME}}", desc = "Todo/Fix/Fixme (Trouble)" }, + { "xt", "Trouble todo toggle", desc = "Todo (Trouble)" }, + { "xT", "Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}", desc = "Todo/Fix/Fixme (Trouble)" }, { "st", "TodoTelescope", desc = "Todo" }, { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, From 3d12bd6b82b36076b9453b25b6062052f03a3c2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 15:15:35 +0000 Subject: [PATCH 097/553] chore(build): auto-generate docs --- docs/configuration/lazy.nvim.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/lazy.nvim.md b/docs/configuration/lazy.nvim.md index 5ead956104..c71b9cc7fb 100644 --- a/docs/configuration/lazy.nvim.md +++ b/docs/configuration/lazy.nvim.md @@ -49,7 +49,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then -- stylua: ignore vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) end -vim.opt.rtp:prepend(vim.env.LAZY or lazypath) +vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { From ecb31a25a498ca50f060fe601cacc2c1bc3f28ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 17:14:51 +0000 Subject: [PATCH 098/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 49 ++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 0f4d15f08b..96069b7ed2 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -82,18 +82,6 @@ opts = { history = true, delete_check_events = "TextChanged", }, - -- stylua: ignore - keys = { - { - "", - function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" - end, - expr = true, silent = true, mode = "i", - }, - { "", function() require("luasnip").jump(1) end, mode = "s" }, - { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, - }, } ``` @@ -197,4 +185,41 @@ opts = nil +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-cmp", + -- stylua: ignore + keys = { + { + "", + function() + return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" + end, + expr = true, silent = true, mode = "i", + }, + { "", function() require("luasnip").jump(1) end, mode = "s" }, + { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, + }, +} +``` + + + + + From 372237847b00e0ec16d515b23ee0b24f71b54786 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Jun 2024 07:15:33 +0000 Subject: [PATCH 099/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 3b23380cbe..9304d9f6d4 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -766,7 +766,7 @@ opts = function() { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = "qa", desc = " Quit", icon = " ", key = "q" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, }, footer = function() local stats = require("lazy").stats() @@ -836,7 +836,7 @@ end { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = "qa", desc = " Quit", icon = " ", key = "q" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, }, footer = function() local stats = require("lazy").stats() From 8c12505146f4e074b389f894b90b25125232f34a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Jun 2024 08:21:35 +0000 Subject: [PATCH 100/553] chore(build): auto-generate docs --- docs/extras/util/mini-hipatterns.md | 38 +++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/docs/extras/util/mini-hipatterns.md b/docs/extras/util/mini-hipatterns.md index e875b94a5b..c713e17af9 100644 --- a/docs/extras/util/mini-hipatterns.md +++ b/docs/extras/util/mini-hipatterns.md @@ -45,7 +45,20 @@ opts = function() -- custom LazyVim option to enable the tailwind integration tailwind = { enabled = true, - ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, + ft = { + "astro", + "css", + "heex", + "html", + "html-eex", + "javascript", + "javascriptreact", + "rust", + "svelte", + "typescript", + "typescriptreact", + "vue", + }, -- full: the whole css class will be highlighted -- compact: only the color will be highlighted style = "full", @@ -86,7 +99,20 @@ end -- custom LazyVim option to enable the tailwind integration tailwind = { enabled = true, - ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, + ft = { + "astro", + "css", + "heex", + "html", + "html-eex", + "javascript", + "javascriptreact", + "rust", + "svelte", + "typescript", + "typescriptreact", + "vue", + }, -- full: the whole css class will be highlighted -- compact: only the color will be highlighted style = "full", @@ -109,14 +135,6 @@ end } end, config = function(_, opts) - -- backward compatibility - if opts.tailwind == true then - opts.tailwind = { - enabled = true, - ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, - style = "full", - } - end if type(opts.tailwind) == "table" and opts.tailwind.enabled then -- reset hl groups when colorscheme changes vim.api.nvim_create_autocmd("ColorScheme", { From 107948f6da34874bd87881c478df744f647727a1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Jun 2024 09:18:01 +0000 Subject: [PATCH 101/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 9304d9f6d4..2239848262 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -263,24 +263,25 @@ opts = function() { function() return require("noice").api.status.command.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = LazyVim.ui.fg("Statement"), + color = function() return LazyVim.ui.fg("Statement") end, }, -- stylua: ignore { function() return require("noice").api.status.mode.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = LazyVim.ui.fg("Constant"), + color = function() return LazyVim.ui.fg("Constant") end, }, -- stylua: ignore { function() return " " .. require("dap").status() end, - cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end, - color = LazyVim.ui.fg("Debug"), + cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, + color = function() return LazyVim.ui.fg("Debug") end, }, + -- stylua: ignore { require("lazy.status").updates, cond = require("lazy.status").has_updates, - color = LazyVim.ui.fg("Special"), + color = function() return LazyVim.ui.fg("Special") end, }, { "diff", @@ -393,24 +394,25 @@ end { function() return require("noice").api.status.command.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = LazyVim.ui.fg("Statement"), + color = function() return LazyVim.ui.fg("Statement") end, }, -- stylua: ignore { function() return require("noice").api.status.mode.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = LazyVim.ui.fg("Constant"), + color = function() return LazyVim.ui.fg("Constant") end, }, -- stylua: ignore { function() return " " .. require("dap").status() end, - cond = function () return package.loaded["dap"] and require("dap").status() ~= "" end, - color = LazyVim.ui.fg("Debug"), + cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, + color = function() return LazyVim.ui.fg("Debug") end, }, + -- stylua: ignore { require("lazy.status").updates, cond = require("lazy.status").has_updates, - color = LazyVim.ui.fg("Special"), + color = function() return LazyVim.ui.fg("Special") end, }, { "diff", From 39f975b1a772c2973b78baafba2c5d7da46a4df9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Jun 2024 07:15:58 +0000 Subject: [PATCH 102/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index bc3f8998e2..8f682775e1 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -537,14 +537,13 @@ end ```lua -opts = function() - return { - library = { - uv = "luvit-meta/library", - lazyvim = "LazyVim", - }, - } -end +opts = { + library = { + { path = "luvit-meta/library", words = { "vim%.uv" } }, + { path = "LazyVim", words = { "LazyVim" } }, + { path = "lazy.nvim", words = { "LazyVim" } }, + }, +} ``` @@ -556,14 +555,13 @@ end { "folke/lazydev.nvim", ft = "lua", - opts = function() - return { - library = { - uv = "luvit-meta/library", - lazyvim = "LazyVim", - }, - } - end, + opts = { + library = { + { path = "luvit-meta/library", words = { "vim%.uv" } }, + { path = "LazyVim", words = { "LazyVim" } }, + { path = "lazy.nvim", words = { "LazyVim" } }, + }, + }, } ``` From 33ac633164e758983944b239ac77364facb1407a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 Jun 2024 10:01:40 +0200 Subject: [PATCH 103/553] fix(lsp): override lsp keymaps in opts --- docs/plugins/lsp.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 468b73d99f..68e6802d77 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -10,7 +10,7 @@ but you need to configure it using the `init()` method. -- LSP keymaps { "neovim/nvim-lspconfig", - init = function() + opts = function() local keys = require("lazyvim.plugins.lsp.keymaps").get() -- change a keymap keys[#keys + 1] = { "K", "echo 'hello'" } @@ -29,8 +29,7 @@ import TabItem from '@theme/TabItem'; ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - lspconfig - +lspconfig @@ -148,7 +147,6 @@ end - ```lua @@ -420,7 +418,6 @@ opts = nil - ```lua @@ -446,7 +443,6 @@ opts = nil - ```lua @@ -459,8 +455,7 @@ opts = nil ## [mason.nvim](https://github.com/williamboman/mason.nvim) - cmdline tools and lsp servers - +cmdline tools and lsp servers @@ -478,7 +473,6 @@ opts = { - ```lua From 4a35256739b2bef4ba34520912f1615f0ec24317 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Jun 2024 08:02:08 +0000 Subject: [PATCH 104/553] chore(build): auto-generate docs --- docs/extras/editor/inc-rename.md | 149 +++++++++++++++++++++++++++++++ docs/extras/lang/tex.md | 4 +- docs/keymaps.md | 2 +- docs/plugins/coding.md | 1 + docs/plugins/lsp.md | 10 ++- docs/plugins/ui.md | 2 - 6 files changed, 161 insertions(+), 7 deletions(-) create mode 100644 docs/extras/editor/inc-rename.md diff --git a/docs/extras/editor/inc-rename.md b/docs/extras/editor/inc-rename.md new file mode 100644 index 0000000000..1d3d268c36 --- /dev/null +++ b/docs/extras/editor/inc-rename.md @@ -0,0 +1,149 @@ +# `Inc-rename` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.inc-rename" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [inc-rename.nvim](https://github.com/smjonas/inc-rename.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "smjonas/inc-rename.nvim", + cmd = "IncRename", + opts = {}, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + LSP Keymaps + + + + + + +```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 +``` + + + + + + +```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, +} +``` + + + + + +## [noice.nvim](https://github.com/folke/noice.nvim) _(optional)_ + + Noice integration + + + + + + +```lua +opts = { + presets = { inc_rename = true }, +} +``` + + + + + + +```lua +{ + "folke/noice.nvim", + optional = true, + opts = { + presets = { inc_rename = true }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index f55b0e8626..98b5bbc5c8 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -44,7 +44,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "bibtex", "latex" }) + vim.list_extend(opts.ensure_installed, { "bibtex" }) end if type(opts.highlight.disable) == "table" then vim.list_extend(opts.highlight.disable, { "latex" }) @@ -64,7 +64,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "bibtex", "latex" }) + vim.list_extend(opts.ensure_installed, { "bibtex" }) end if type(opts.highlight.disable) == "table" then vim.list_extend(opts.highlight.disable, { "latex" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 504da4d302..7554e2117b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -121,12 +121,12 @@ possible keymaps starting with ``. | <leader>cc | Run Codelens | **n**, **v** | | <leader>cC | Refresh & Display Codelens | **n** | | <leader>cR | Rename File | **n** | +| <leader>cr | Rename | **n** | | <leader>cA | Source Action | **n** | | ]] | Next Reference | **n** | | [[ | Prev Reference | **n** | | <a-n> | Next Reference | **n** | | <a-p> | Prev Reference | **n** | -| <leader>cr | Rename | **n** | ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim.git) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 8f682775e1..b10a4cb592 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -555,6 +555,7 @@ opts = { { "folke/lazydev.nvim", ft = "lua", + cmd = "LazyDev", opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } }, diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 68e6802d77..da725f07fc 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -29,7 +29,8 @@ import TabItem from '@theme/TabItem'; ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) -lspconfig + lspconfig + @@ -147,6 +148,7 @@ end
+ ```lua @@ -418,6 +420,7 @@ opts = nil + ```lua @@ -443,6 +446,7 @@ opts = nil + ```lua @@ -455,7 +459,8 @@ opts = nil ## [mason.nvim](https://github.com/williamboman/mason.nvim) -cmdline tools and lsp servers + cmdline tools and lsp servers + @@ -473,6 +478,7 @@ opts = { + ```lua diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 2239848262..e2248d08be 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -618,7 +618,6 @@ opts = { bottom_search = true, command_palette = true, long_message_to_split = true, - inc_rename = true, }, } ``` @@ -657,7 +656,6 @@ opts = { bottom_search = true, command_palette = true, long_message_to_split = true, - inc_rename = true, }, }, -- stylua: ignore From 0403bd16137db42cabc2aa8c5d665efcef003bab Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:59:03 +0300 Subject: [PATCH 105/553] fix(lsp): fix typo in docs to represent latest changes (#93) --- 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 da725f07fc..095aa8fef2 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -4,7 +4,7 @@ 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 `init()` method. +but you need to configure it using the `opts()` method. ```lua -- LSP keymaps From ce765c579822f856046569961ea980b9ec775a70 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Jun 2024 09:59:28 +0000 Subject: [PATCH 106/553] chore(build): auto-generate docs --- docs/plugins/lsp.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 095aa8fef2..1b4c2d2f9a 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -396,8 +396,11 @@ 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) - return not is_deno(root_dir) + LazyVim.lsp.disable("denols", function(root_dir, config) + if not is_deno(root_dir) then + config.settings.deno.enable = false + end + return false end) end end, From cbb86e2cb6980687b358b160fc87ecb5fcf15142 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 Jun 2024 19:24:32 +0200 Subject: [PATCH 107/553] fix: properly add imports --- lua/build.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/build.lua b/lua/build.lua index 016809fb42..dcc76a05fb 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -368,8 +368,8 @@ function M.plugins(path) local imports = {} for k, v in pairs(mod) do if type(v) == "table" and v.import then - imports[k] = v.import - mod[k] = {} + table.insert(imports, v.import) + table.remove(mod, k) end end local spec = require("lazy.core.plugin").Spec.new(mod, { optional = true }) From 83cbea3c64975e2cacccdaa5ebcc856816f01c00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Jun 2024 17:24:54 +0000 Subject: [PATCH 108/553] chore(build): auto-generate docs --- docs/extras/lang/angular.md | 175 ++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 docs/extras/lang/angular.md diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md new file mode 100644 index 0000000000..243df271c7 --- /dev/null +++ b/docs/extras/lang/angular.md @@ -0,0 +1,175 @@ +# `Angular` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.angular" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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.typescript](/extras/lang/typescript) + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "angular", "scss" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "angular", "scss" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + LSP Servers + + + + + + +```lua +opts = { + servers = { + angularls = {}, + }, + setup = { + angularls = function() + LazyVim.lsp.on_attach(function(client) + if client.name == "angularls" then + --HACK: disable angular renaming capability due to duplicate rename popping up + client.server_capabilities.renameProvider = false + end + end) + end, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + angularls = {}, + }, + setup = { + angularls = function() + LazyVim.lsp.on_attach(function(client) + if client.name == "angularls" then + --HACK: disable angular renaming capability due to duplicate rename popping up + client.server_capabilities.renameProvider = false + end + end) + end, + }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + Configure tsserver plugin + + + + + + +```lua +opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "@angular/language-server", + location = LazyVim.get_pkg_path("angular-language-server", "/node_modules/@angular/language-server"), + enableForWorkspaceTypeScriptVersions = false, + }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { + { + name = "@angular/language-server", + location = LazyVim.get_pkg_path("angular-language-server", "/node_modules/@angular/language-server"), + enableForWorkspaceTypeScriptVersions = false, + }, + }) + end, +} +``` + + + + + + From 8b348b421bd465835a2f833fc3694f579fcdbd0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 06:22:57 +0000 Subject: [PATCH 109/553] chore(build): auto-generate docs --- docs/extras/lang/scala.md | 267 ++++++++++++++++++++++---------------- docs/keymaps.md | 8 -- 2 files changed, 156 insertions(+), 119 deletions(-) diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index b39344cd49..219402803c 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -32,14 +32,18 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) ```lua -opts = nil +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "scala" }) + end +end ``` @@ -49,12 +53,12 @@ opts = nil ```lua { - "hrsh7th/nvim-cmp", - requires = { - { "hrsh7th/cmp-nvim-lsp" }, - { "hrsh7th/cmp-vsnip" }, - { "hrsh7th/vim-vsnip" }, - }, + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "scala" }) + end + end, } ``` @@ -69,7 +73,7 @@ opts = nil ```lua -opts = nil +opts = {} ``` @@ -80,75 +84,8 @@ opts = nil ```lua { "scalameta/nvim-metals", - dependencies = { - "nvim-lua/plenary.nvim", - "mfussenegger/nvim-dap", - }, - ft = { "scala", "sbt", "java" }, - init = function() - local metals_config = require("metals").bare_config() - metals_config.init_options.statusBarProvider = "off" - metals_config.settings = { - showImplicitArguments = true, - excludedPackages = { "akka.actor.typed.javadsl", "com.github.swagger.akka.javadsl" }, - } - metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities() - metals_config.on_attach = function(client, bufnr) - require("metals").setup_dap() - end - - local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true }) - vim.api.nvim_create_autocmd("FileType", { - -- NOTE: You may or may not want java included here. You will need it if you - -- want basic Java support but it may also conflict if you are using - -- something like nvim-jdtls which also works on a java filetype autocmd. - pattern = { "scala", "sbt", "java" }, - callback = function() - require("metals").initialize_or_attach(metals_config) - end, - group = nvim_metals_group, - }) - - -- Debug settings - local dap = require("dap") - dap.configurations.scala = { - { - type = "scala", - request = "launch", - name = "RunOrTest", - metals = { - runType = "runOrTestFile", - --args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example - }, - }, - { - type = "scala", - request = "launch", - name = "Test Target", - metals = { - runType = "testTarget", - }, - }, - } - end, - keys = { - { - "me", - function() - require("telescope").extensions.metals.commands() - end, - desc = "Metals commands", - ft = { "scala", "sbt", "java" }, - }, - { - "mc", - function() - require("metals").compile_cascade() - end, - desc = "Metals compile cascade", - ft = { "scala", "sbt", "java" }, - }, - }, + ft = { "scala", "sbt" }, + config = function() end, } ``` @@ -156,14 +93,59 @@ opts = nil -## [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) ```lua -opts = nil +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", + }, + }, + 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, + }, +} ``` @@ -173,8 +155,53 @@ opts = nil ```lua { - "nvim-lua/plenary.nvim", - "mfussenegger/nvim-dap", + "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", + }, + }, + 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, + }, + }, } ``` @@ -182,38 +209,35 @@ opts = nil -## [nvim-dap](https://github.com/mfussenegger/nvim-dap) +## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ ```lua -opts = nil -``` - - - - - - -```lua -"mfussenegger/nvim-dap" -``` - - - - - -## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - - - - - -```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { "scala" }) +opts = function() + -- Debug settings + local dap = require("dap") + dap.configurations.scala = { + { + type = "scala", + request = "launch", + name = "RunOrTest", + metals = { + runType = "runOrTestFile", + --args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example + }, + }, + { + type = "scala", + request = "launch", + name = "Test Target", + metals = { + runType = "testTarget", + }, + }, + } end ``` @@ -224,9 +248,30 @@ end ```lua { - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { "scala" }) + "mfussenegger/nvim-dap", + optional = true, + opts = function() + -- Debug settings + local dap = require("dap") + dap.configurations.scala = { + { + type = "scala", + request = "launch", + name = "RunOrTest", + metals = { + runType = "runOrTestFile", + --args = { "firstArg", "secondArg", "thirdArg" }, -- here just as an example + }, + }, + { + type = "scala", + request = "launch", + name = "Test Target", + metals = { + runType = "testTarget", + }, + }, + } end, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 7554e2117b..0e616301e3 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -505,14 +505,6 @@ 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** | - ## [neotest](https://github.com/nvim-neotest/neotest.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) From 3b4ed30aea1253e382532671d86188fc8f13db48 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 09:19:46 +0000 Subject: [PATCH 110/553] chore(build): auto-generate docs --- docs/extras/lang/astro.md | 12 ++---------- docs/extras/lang/svelte.md | 12 ++---------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index 05547befa4..2189356102 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -121,11 +121,7 @@ opts = function(_, opts) LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { { name = "@astrojs/ts-plugin", - location = LazyVim.get_pkg_path( - "astro-language-server", - "/node_modules/@astrojs/ts-plugin", - { warn = false } - ), + location = LazyVim.get_pkg_path("astro-language-server", "/node_modules/@astrojs/ts-plugin"), enableForWorkspaceTypeScriptVersions = true, }, }) @@ -144,11 +140,7 @@ end LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { { name = "@astrojs/ts-plugin", - location = LazyVim.get_pkg_path( - "astro-language-server", - "/node_modules/@astrojs/ts-plugin", - { warn = false } - ), + location = LazyVim.get_pkg_path("astro-language-server", "/node_modules/@astrojs/ts-plugin"), enableForWorkspaceTypeScriptVersions = true, }, }) diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index 052ec0fdd0..497259509a 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -121,11 +121,7 @@ opts = function(_, opts) LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { { name = "typescript-svelte-plugin", - location = LazyVim.get_pkg_path( - "svelte-language-server", - "/node_modules/typescript-svelte-plugin", - { warn = false } - ), + location = LazyVim.get_pkg_path("svelte-language-server", "/node_modules/typescript-svelte-plugin"), enableForWorkspaceTypeScriptVersions = true, }, }) @@ -144,11 +140,7 @@ end LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", { { name = "typescript-svelte-plugin", - location = LazyVim.get_pkg_path( - "svelte-language-server", - "/node_modules/typescript-svelte-plugin", - { warn = false } - ), + location = LazyVim.get_pkg_path("svelte-language-server", "/node_modules/typescript-svelte-plugin"), enableForWorkspaceTypeScriptVersions = true, }, }) From 8b76d4708119e3c84bfb4edab1a4c64ca0b4d9d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 10:17:34 +0000 Subject: [PATCH 111/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 749686a9c7..7bb3870137 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -71,6 +71,12 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } -- Set to false to disable. vim.g.lazygit_config = true +-- Options for the LazyVim statuscolumn +vim.g.lazyvim_statuscolumn = { + folds_open = false, -- show fold sign when fold is open + folds_githl = false, -- highlight fold sign with git sign color +} + -- Optionally setup the terminal to use -- This sets `vim.o.shell` and does some additional configuration for: -- * pwsh From 4d9065c1d877771c6c5105f173deacf597a77e0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 12:31:42 +0000 Subject: [PATCH 112/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 ++++- docs/keymaps.md | 1 + docs/plugins/ui.md | 36 +++++++++++++++++------------------ 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 7bb3870137..26e53a0e51 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -325,8 +325,11 @@ map("n", "gf", function() end, { desc = "Lazygit Current File History" }) map("n", "gl", function() - LazyVim.lazygit({ args = { "log" } }) + LazyVim.lazygit({ args = { "log" }, cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) +map("n", "gL", function() + LazyVim.lazygit({ args = { "log" } }) +end, { desc = "Lazygit Log (cwd)" }) -- quit map("n", "qq", "qa", { desc = "Quit All" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 0e616301e3..ed81a6c73e 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -79,6 +79,7 @@ possible keymaps starting with ``. | <leader>gb | Git Blame Line | **n** | | <leader>gf | Lazygit Current File History | **n** | | <leader>gl | Lazygit Log | **n** | +| <leader>gL | Lazygit Log (cwd) | **n** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index e2248d08be..69a901ddcb 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -758,15 +758,15 @@ opts = function() header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, - { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, - { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, - { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, - { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, - { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, - { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, + { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, + { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, + { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, + { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, + { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, + { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, + { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, }, footer = function() local stats = require("lazy").stats() @@ -828,15 +828,15 @@ end header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, - { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, - { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, - { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, - { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, - { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, - { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, + { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, + { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, + { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, + { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, + { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, + { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, + { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, }, footer = function() local stats = require("lazy").stats() From 8684bc7e65e4f169c3de8a076b82eda8bd0695cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 14:17:02 +0000 Subject: [PATCH 113/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/lang/r.md | 4 ++-- docs/keymaps.md | 3 +++ docs/plugins/ui.md | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 26e53a0e51..aa2dd88730 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -369,6 +369,7 @@ map("n", "m", function() LazyVim.toggle.maximize() end, { desc = "Maximi -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) +map("n", "o", "tabonly", { desc = "Close Other Tabs" }) map("n", "f", "tabfirst", { desc = "First Tab" }) map("n", "", "tabnew", { desc = "New Tab" }) map("n", "]", "tabnext", { desc = "Next Tab" }) diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 9423b3f9fe..e646d1ef8e 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -71,7 +71,7 @@ opts = { }) end, }, - pdfviewer = "" + pdfviewer = "", } ``` @@ -116,7 +116,7 @@ opts = { }) end, }, - pdfviewer = "" + pdfviewer = "", }, config = function(_, opts) vim.g.rout_follow_colorscheme = true diff --git a/docs/keymaps.md b/docs/keymaps.md index ed81a6c73e..1333231b56 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -99,6 +99,7 @@ possible keymaps starting with ``. | <leader>wm | Maximize Toggle | **n** | | <leader>m | Maximize Toggle | **n** | | <leader><tab>l | Last Tab | **n** | +| <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | | <leader><tab><tab> | New Tab | **n** | | <leader><tab>] | Next Tab | **n** | @@ -139,7 +140,9 @@ possible keymaps starting with ``. | <leader>bP | Delete Non-Pinned Buffers | **n** | | <leader>br | Delete Buffers to the Right | **n** | | [b | Prev Buffer | **n** | +| [B | Move buffer prev | **n** | | ]b | Next Buffer | **n** | +| ]B | Move buffer next | **n** | | <S-h> | Prev Buffer | **n** | | <S-l> | Next Buffer | **n** | diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 69a901ddcb..1503abd356 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -172,6 +172,8 @@ opts = { { "", "BufferLineCycleNext", desc = "Next Buffer" }, { "[b", "BufferLineCyclePrev", desc = "Prev Buffer" }, { "]b", "BufferLineCycleNext", desc = "Next Buffer" }, + { "[B", "BufferLineMovePrev", desc = "Move buffer prev" }, + { "]B", "BufferLineMoveNext", desc = "Move buffer next" }, }, opts = { options = { From 4b8ac0875de57aa2dcdd023ef4e0198612c204f0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 15:17:27 +0000 Subject: [PATCH 114/553] chore(build): auto-generate docs --- docs/extras/lang/python.md | 39 +++++++++++++++----------------------- 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 03dbd1c30d..2be3447cca 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -258,19 +258,13 @@ opts = {} ```lua -opts = function(_, opts) - if LazyVim.has("nvim-dap-python") then - opts.dap_enabled = true - end - return vim.tbl_deep_extend("force", opts, { - name = { - "venv", - ".venv", - "env", - ".env", +opts = { + settings = { + options = { + notify_user_on_venv_activation = true, }, - }) -end + }, +} ``` @@ -281,20 +275,17 @@ end ```lua { "linux-cultist/venv-selector.nvim", + branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", - opts = function(_, opts) - if LazyVim.has("nvim-dap-python") then - opts.dap_enabled = true - end - return vim.tbl_deep_extend("force", opts, { - name = { - "venv", - ".venv", - "env", - ".env", + opts = { + settings = { + options = { + notify_user_on_venv_activation = true, }, - }) - end, + }, + }, + -- Call config for python files and load the cached venv automatically + ft = "python", keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, } ``` From 95dd2df0b3355ab5f3c73a093d035d46fe82d3f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 16:21:06 +0000 Subject: [PATCH 115/553] chore(build): auto-generate docs --- docs/extras/lang/ansible.md | 34 --------------- docs/extras/lang/clangd.md | 4 +- docs/extras/lang/elixir.md | 34 --------------- docs/extras/lang/helm.md | 34 --------------- docs/extras/lang/json.md | 4 +- docs/extras/lang/markdown.md | 38 +---------------- docs/extras/lang/python.md | 4 +- docs/extras/lang/r.md | 4 +- docs/extras/lang/ruby.md | 34 --------------- docs/extras/lang/rust.md | 4 +- docs/extras/lang/tex.md | 2 + docs/extras/lang/toml.md | 81 +----------------------------------- docs/extras/lang/yaml.md | 37 ---------------- 13 files changed, 16 insertions(+), 298 deletions(-) diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index 59cd7d3f28..fecbeb49c4 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -32,40 +32,6 @@ 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 = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "yaml" }) - end -end -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "yaml" }) - end - end, -} -``` - - - - - ## [mason.nvim](https://github.com/williamboman/mason.nvim) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index a0fdb7aea8..e8dd3acf14 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -44,7 +44,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "c", "cpp" }) + vim.list_extend(opts.ensure_installed, { "cpp" }) end end ``` @@ -59,7 +59,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "c", "cpp" }) + vim.list_extend(opts.ensure_installed, { "cpp" }) end end, } diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index e57fd662a0..b3f18d8107 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -70,40 +70,6 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) - - - - - -```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "elixir-ls", - }) -end -``` - - - - - - -```lua -{ - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "elixir-ls", - }) - end, -} -``` - - - - - ## [neotest-elixir](https://github.com/jfpedroza/neotest-elixir) diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index 214b9862e5..a6a7c8b56e 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -91,38 +91,4 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) - - - - - -```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "helm-ls", - }) -end -``` - - - - - - -```lua -{ - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "helm-ls", - }) - end, -} -``` - - - - - diff --git a/docs/extras/lang/json.md b/docs/extras/lang/json.md index acb34e1e74..31deb685b0 100644 --- a/docs/extras/lang/json.md +++ b/docs/extras/lang/json.md @@ -44,7 +44,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "json", "json5", "jsonc" }) + vim.list_extend(opts.ensure_installed, { "json5" }) end end ``` @@ -59,7 +59,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "json", "json5", "jsonc" }) + vim.list_extend(opts.ensure_installed, { "json5" }) end end, } diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 27d01fab4e..920e56961a 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -32,40 +32,6 @@ 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 = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" }) - end -end -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline" }) - end - end, -} -``` - - - - - ## [mason.nvim](https://github.com/williamboman/mason.nvim) @@ -75,7 +41,7 @@ end ```lua opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint", "marksman" }) + vim.list_extend(opts.ensure_installed, { "markdownlint" }) end ``` @@ -89,7 +55,7 @@ end "williamboman/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint", "marksman" }) + vim.list_extend(opts.ensure_installed, { "markdownlint" }) end, } ``` diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 2be3447cca..0e1144fe91 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -52,7 +52,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "ninja", "python", "rst", "toml" }) + vim.list_extend(opts.ensure_installed, { "ninja", "rst" }) end end ``` @@ -67,7 +67,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "ninja", "python", "rst", "toml" }) + vim.list_extend(opts.ensure_installed, { "ninja", "rst" }) end end, } diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index e646d1ef8e..900d7893b9 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -162,7 +162,7 @@ opts = nil ```lua opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline", "r", "rnoweb" }) + vim.list_extend(opts.ensure_installed, { "r", "rnoweb" }) end end ``` @@ -177,7 +177,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "markdown", "markdown_inline", "r", "rnoweb" }) + vim.list_extend(opts.ensure_installed, { "r", "rnoweb" }) end end, } diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index 09e6921c87..2217ed95bf 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -66,40 +66,6 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) - - - - - -```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "solargraph", - }) -end -``` - - - - - - -```lua -{ - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "solargraph", - }) - end, -} -``` - - - - - ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 1c62c8b819..a6f1593df5 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -126,7 +126,7 @@ opts = { ```lua opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ron", "rust", "toml" }) + vim.list_extend(opts.ensure_installed, { "ron", "rust" }) end ``` @@ -140,7 +140,7 @@ end "nvim-treesitter/nvim-treesitter", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ron", "rust", "toml" }) + vim.list_extend(opts.ensure_installed, { "ron", "rust" }) end, } ``` diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index 98b5bbc5c8..f77217d0e9 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -43,6 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) + opts.highlight = opts.highlight or {} if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "bibtex" }) end @@ -63,6 +64,7 @@ end { "nvim-treesitter/nvim-treesitter", opts = function(_, opts) + opts.highlight = opts.highlight or {} if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "bibtex" }) end diff --git a/docs/extras/lang/toml.md b/docs/extras/lang/toml.md index 1ae7343583..48ab00c404 100644 --- a/docs/extras/lang/toml.md +++ b/docs/extras/lang/toml.md @@ -32,72 +32,6 @@ 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 = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "toml" }) - end -end -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "toml" }) - end - end, -} -``` - - - - - -## [mason.nvim](https://github.com/williamboman/mason.nvim) - - - - - -```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "taplo" }) -end -``` - - - - - - -```lua -{ - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "taplo" }) - end, -} -``` - - - - - ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) @@ -105,11 +39,7 @@ end ```lua -opts = { - servers = { - taplo = {}, - }, -} +opts = nil ``` @@ -118,14 +48,7 @@ opts = { ```lua -{ - "neovim/nvim-lspconfig", - opts = { - servers = { - taplo = {}, - }, - }, -} +"neovim/nvim-lspconfig" ``` diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 5d96ac436b..99c20eb993 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -32,43 +32,6 @@ 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 yaml specific modules to treesitter - - - - - - -```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "yaml" }) - end -end -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "yaml" }) - end - end, -} -``` - - - - - ## [SchemaStore.nvim](https://github.com/b0o/SchemaStore.nvim) yaml schema support From b6f454139a4af162695ebb16b7023825b9e639a8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 19:13:15 +0000 Subject: [PATCH 116/553] chore(build): auto-generate docs --- docs/extras/lang/svelte.md | 81 +++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index 497259509a..fdb0e3e252 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -82,7 +82,28 @@ end ```lua opts = { servers = { - svelte = {}, + svelte = { + keys = { + { + "co", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.organizeImports" }, + diagnostics = {}, + }, + }) + end, + desc = "Organize Imports", + }, + }, + capabilities = { + workspace = { + didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, + }, + }, + }, }, } ``` @@ -97,7 +118,28 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - svelte = {}, + svelte = { + keys = { + { + "co", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.organizeImports" }, + diagnostics = {}, + }, + }) + end, + desc = "Organize Imports", + }, + }, + capabilities = { + workspace = { + didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, + }, + }, + }, }, }, } @@ -152,4 +194,39 @@ end +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + ["svelte"] = { "prettier" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + ["svelte"] = { "prettier" }, + }, + }, +} +``` + + + + + From 1772316f57975016186bb26d5204b03e637fe9ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 21:16:57 +0000 Subject: [PATCH 117/553] chore(build): auto-generate docs --- docs/extras/formatting/prettier.md | 43 ++++++++++++++ docs/extras/lang/python.md | 20 +------ docs/extras/lang/svelte.md | 55 +----------------- docs/extras/lang/typescript.md | 92 +++++++++++------------------- docs/plugins/linting.md | 3 + 5 files changed, 82 insertions(+), 131 deletions(-) diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index c82a152954..cfd6ba2e88 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -22,6 +22,17 @@ require("lazy").setup({ +### 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" +-- By default, prettier will only be used for formatting +-- if a prettier configuration file is found in the project. +-- Set to `false` to always use prettier for supported filetypes. +vim.g.lazyvim_prettier_needs_config = true +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -122,6 +133,22 @@ opts = { ["markdown.mdx"] = { "prettier" }, ["graphql"] = { "prettier" }, ["handlebars"] = { "prettier" }, + ["svelte"] = { "prettier" }, + }, + formatters = { + prettier = { + condition = function(_, ctx) + if not needs_config then + return true + end + if enabled[ctx.filename] == nil then + enabled[ctx.filename] = vim.fs.find(function(name, path) + return name:match("^%.prettierrc%.") or name:match("^prettier%.config%.") + end, { path = ctx.filename, upward = true })[1] ~= nil + end + return enabled[ctx.filename] + end, + }, }, } ``` @@ -153,6 +180,22 @@ opts = { ["markdown.mdx"] = { "prettier" }, ["graphql"] = { "prettier" }, ["handlebars"] = { "prettier" }, + ["svelte"] = { "prettier" }, + }, + formatters = { + prettier = { + condition = function(_, ctx) + if not needs_config then + return true + end + if enabled[ctx.filename] == nil then + enabled[ctx.filename] = vim.fs.find(function(name, path) + return name:match("^%.prettierrc%.") or name:match("^prettier%.config%.") + end, { path = ctx.filename, upward = true })[1] ~= nil + end + return enabled[ctx.filename] + end, + }, }, }, } diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 0e1144fe91..9c6ae27ada 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -105,15 +105,7 @@ opts = { keys = { { "co", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports" }, - diagnostics = {}, - }, - }) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, }, @@ -161,15 +153,7 @@ opts = { keys = { { "co", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports" }, - diagnostics = {}, - }, - }) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, }, diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index fdb0e3e252..00ad5a403e 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -86,15 +86,7 @@ opts = { keys = { { "co", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports" }, - diagnostics = {}, - }, - }) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, }, @@ -122,15 +114,7 @@ opts = { keys = { { "co", - function() - vim.lsp.buf.code_action({ - apply = true, - context = { - only = { "source.organizeImports" }, - diagnostics = {}, - }, - }) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, }, @@ -194,39 +178,4 @@ end -## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ - - - - - -```lua -opts = { - formatters_by_ft = { - ["svelte"] = { "prettier" }, - }, -} -``` - - - - - - -```lua -{ - "stevearc/conform.nvim", - optional = true, - opts = { - formatters_by_ft = { - ["svelte"] = { "prettier" }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 25d1f81a45..60db681b0a 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -32,36 +32,6 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-vtsls](https://github.com/yioneko/nvim-vtsls) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "yioneko/nvim-vtsls", - lazy = true, - opts = {}, - config = function(_, opts) - require("vtsls").config(opts) - end, -} -``` - - - - - ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) correctly setup lspconfig @@ -119,49 +89,50 @@ opts = { { "gD", function() - require("vtsls").commands.goto_source_definition(0) + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "typescript.goToSourceDefinition", + arguments = { params.textDocument.uri, params.position }, + open = true, + }) end, desc = "Goto Source Definition", }, { "gR", function() - require("vtsls").commands.file_references(0) + LazyVim.lsp.execute({ + command = "typescript.findAllFileReferences", + arguments = { vim.uri_from_bufnr(0) }, + open = true, + }) end, desc = "File References", }, { "co", - function() - require("vtsls").commands.organize_imports(0) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, { "cM", - function() - require("vtsls").commands.add_missing_imports(0) - end, + LazyVim.lsp.action["source.addMissingImports.ts"], desc = "Add missing imports", }, { "cu", - function() - require("vtsls").commands.remove_unused_imports(0) - end, + LazyVim.lsp.action["source.removeUnused.ts"], desc = "Remove unused imports", }, { "cD", - function() - require("vtsls").commands.fix_all(0) - end, + LazyVim.lsp.action["source.fixAll.ts"], desc = "Fix all diagnostics", }, { "cV", function() - require("vtsls").commands.select_ts_version(0) + LazyVim.lsp.execute({ command = "typescript.selectTypeScriptVersion" }) end, desc = "Select TS workspace version", }, @@ -237,49 +208,50 @@ opts = { { "gD", function() - require("vtsls").commands.goto_source_definition(0) + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "typescript.goToSourceDefinition", + arguments = { params.textDocument.uri, params.position }, + open = true, + }) end, desc = "Goto Source Definition", }, { "gR", function() - require("vtsls").commands.file_references(0) + LazyVim.lsp.execute({ + command = "typescript.findAllFileReferences", + arguments = { vim.uri_from_bufnr(0) }, + open = true, + }) end, desc = "File References", }, { "co", - function() - require("vtsls").commands.organize_imports(0) - end, + LazyVim.lsp.action["source.organizeImports"], desc = "Organize Imports", }, { "cM", - function() - require("vtsls").commands.add_missing_imports(0) - end, + LazyVim.lsp.action["source.addMissingImports.ts"], desc = "Add missing imports", }, { "cu", - function() - require("vtsls").commands.remove_unused_imports(0) - end, + LazyVim.lsp.action["source.removeUnused.ts"], desc = "Remove unused imports", }, { "cD", - function() - require("vtsls").commands.fix_all(0) - end, + LazyVim.lsp.action["source.fixAll.ts"], desc = "Fix all diagnostics", }, { "cV", function() - require("vtsls").commands.select_ts_version(0) + LazyVim.lsp.execute({ command = "typescript.selectTypeScriptVersion" }) end, desc = "Select TS workspace version", }, diff --git a/docs/plugins/linting.md b/docs/plugins/linting.md index ab3c0271bf..9c4329149d 100644 --- a/docs/plugins/linting.md +++ b/docs/plugins/linting.md @@ -80,6 +80,9 @@ opts = { for name, linter in pairs(opts.linters) do if type(linter) == "table" and type(lint.linters[name]) == "table" then lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter) + if type(linter.prepend_args) == "table" then + vim.list_extend(lint.linters[name].args, linter.prepend_args) + end else lint.linters[name] = linter end From c7113f2d1eb4957f61aef9ed31da8d037927b757 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Jun 2024 22:15:55 +0000 Subject: [PATCH 118/553] chore(build): auto-generate docs --- docs/extras/editor/mini-files.md | 51 ++++++++++- docs/extras/lang/angular.md | 14 +++ docs/extras/lang/nix.md | 136 ++++++++++++++++++++++++++++ docs/extras/lang/nushell.md | 149 +++++++++++++++++++++++++++++++ docs/extras/test/core.md | 1 + docs/keymaps.md | 1 + 6 files changed, 350 insertions(+), 2 deletions(-) create mode 100644 docs/extras/lang/nix.md create mode 100644 docs/extras/lang/nushell.md diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 3e0598ec53..7c92622051 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -106,12 +106,59 @@ opts = { require("mini.files").refresh({ content = { filter = new_filter } }) end + local map_split = function(buf_id, lhs, direction, close_on_file) + local rhs = function() + local new_target_window + local cur_target_window = require("mini.files").get_target_window() + if cur_target_window ~= nil then + vim.api.nvim_win_call(cur_target_window, function() + vim.cmd("belowright " .. direction .. " split") + new_target_window = vim.api.nvim_get_current_win() + end) + + require("mini.files").set_target_window(new_target_window) + require("mini.files").go_in({ close_on_file = close_on_file }) + end + end + + local desc = "Open in " .. direction .. " split" + if close_on_file then + desc = desc .. " and close" + end + vim.keymap.set("n", lhs, rhs, { buffer = buf_id, desc = desc }) + end + + local files_set_cwd = function() + local cur_entry_path = MiniFiles.get_fs_entry().path + local cur_directory = vim.fs.dirname(cur_entry_path) + if cur_directory ~= nil then + vim.fn.chdir(cur_directory) + end + end + vim.api.nvim_create_autocmd("User", { pattern = "MiniFilesBufferCreate", callback = function(args) local buf_id = args.data.buf_id - -- Tweak left-hand side of mapping to your liking - vim.keymap.set("n", "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle Hidden Files" }) + + vim.keymap.set( + "n", + opts.mappings.toggle_hidden or "g.", + toggle_dotfiles, + { buffer = buf_id, desc = "Toggle hidden files" } + ) + + vim.keymap.set( + "n", + opts.mappings.change_cwd or "gc", + files_set_cwd, + { buffer = args.data.buf_id, desc = "Set cwd" } + ) + + map_split(buf_id, opts.mappings.go_in_horizontal or "s", "horizontal", false) + map_split(buf_id, opts.mappings.go_in_vertical or "v", "vertical", false) + map_split(buf_id, opts.mappings.go_in_horizontal_plus or "S", "horizontal", true) + map_split(buf_id, opts.mappings.go_in_vertical_plus or "V", "vertical", true) end, }) diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index 243df271c7..5dc8930f52 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -47,6 +47,13 @@ opts = function(_, opts) if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end + vim.filetype.add({ + pattern = { + [".*%.component%.html"] = "angular.html", + [".*%.container%.html"] = "angular.html", + }, + }) + vim.treesitter.language.register("angular", "angular.html") end ``` @@ -62,6 +69,13 @@ end if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end + vim.filetype.add({ + pattern = { + [".*%.component%.html"] = "angular.html", + [".*%.container%.html"] = "angular.html", + }, + }) + vim.treesitter.language.register("angular", "angular.html") end, } ``` diff --git a/docs/extras/lang/nix.md b/docs/extras/lang/nix.md new file mode 100644 index 0000000000..14e12595b7 --- /dev/null +++ b/docs/extras/lang/nix.md @@ -0,0 +1,136 @@ +# `Nix` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.nix" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "nix" }) +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "nix" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + nil_ls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + nil_ls = {}, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + nix = { "nixfmt" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + nix = { "nixfmt" }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/nushell.md b/docs/extras/lang/nushell.md new file mode 100644 index 0000000000..2df522800e --- /dev/null +++ b/docs/extras/lang/nushell.md @@ -0,0 +1,149 @@ +# `Nushell` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.nushell" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = { + nushell = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + nushell = {}, + }, + }, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = function(_, opts) + ---@diagnostic disable-next-line: inject-field + require("nvim-treesitter.parsers").get_parser_configs().nu = { + install_info = { + url = "https://github.com/nushell/tree-sitter-nu", + files = { "src/parser.c" }, + branch = "main", + }, + filetype = "nu", + } + + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "nu" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + dependencies = { + { "nushell/tree-sitter-nu" }, + }, + opts = function(_, opts) + ---@diagnostic disable-next-line: inject-field + require("nvim-treesitter.parsers").get_parser_configs().nu = { + install_info = { + url = "https://github.com/nushell/tree-sitter-nu", + files = { "src/parser.c" }, + branch = "main", + }, + filetype = "nu", + } + + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "nu" }) + end + end, +} +``` + + + + + +## [tree-sitter-nu](https://github.com/nushell/tree-sitter-nu) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "nushell/tree-sitter-nu" } +``` + + + + + + diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 3db5a25286..306b409e4a 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -193,6 +193,7 @@ opts = { { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, { "tS", function() require("neotest").run.stop() end, desc = "Stop" }, + { "tw", function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch" }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 1333231b56..05ffc5878f 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -522,6 +522,7 @@ Part of [lazyvim.plugins.extras.test.core](/extras/test/core) | <leader>tS | Stop | **n** | | <leader>tt | Run File | **n** | | <leader>tT | Run All Test Files | **n** | +| <leader>tw | Toggle Watch | **n** | ## [nvim-dap](https://github.com/mfussenegger/nvim-dap.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) From 01277175f1ec5966e27e8bf6f61cefd3ece7a68b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 09:18:49 +0000 Subject: [PATCH 119/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/configuration/index.md | 3 ++ docs/extras/coding/copilot-chat.md | 36 +-------------------- docs/extras/coding/yanky.md | 2 +- docs/extras/dap/core.md | 50 +----------------------------- docs/extras/editor/leap.md | 36 ++------------------- docs/extras/editor/refactoring.md | 39 +---------------------- docs/extras/lang/angular.md | 14 --------- docs/extras/lang/kotlin.md | 14 ++++----- docs/extras/lang/tex.md | 36 ++------------------- docs/extras/test/core.md | 36 +-------------------- docs/keymaps.md | 20 ++++++++++++ docs/plugins/ui.md | 50 +++++++----------------------- 13 files changed, 51 insertions(+), 286 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index aa2dd88730..832252d730 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -318,6 +318,7 @@ map("n", "ub", function() LazyVim.toggle("background", false, {"light", map("n", "gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" }) map("n", "gb", LazyVim.lazygit.blame_line, { desc = "Git Blame Line" }) +map("n", "gB", LazyVim.lazygit.browse, { desc = "Git Browse" }) map("n", "gf", function() local git_path = vim.api.nvim_buf_get_name(0) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 1d6e557f9c..ad75c1364f 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -72,6 +72,9 @@ return { misc = { dots = "󰇘", }, + ft = { + octo = "", + }, dap = { Stopped = { "󰁕 ", "DiagnosticWarn", "DapStoppedLine" }, Breakpoint = " ", diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 5121df46b2..0c9439a62d 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -88,6 +88,7 @@ end } end, keys = { + { "a", "", desc = "+ai" }, { "aa", function() @@ -137,41 +138,6 @@ end
-## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - - - - -```lua -opts = { - defaults = { - ["a"] = { name = "+ai" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["a"] = { name = "+ai" }, - }, - }, -} -``` - - - - - ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ Telescope integration diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index e2508a72f4..314045207f 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -62,7 +62,7 @@ opts = { }, keys = { -- stylua: ignore - { "p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" }, + { "p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" }, { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" }, { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" }, { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" }, diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 1234c3cad4..218b4dc221 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -87,17 +87,6 @@ opts = {} opts = {}, }, - -- which key integration - { - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["d"] = { name = "+debug" }, - }, - }, - }, - -- mason.nvim integration { "jay-babu/mason-nvim-dap.nvim", @@ -123,6 +112,7 @@ opts = {} -- stylua: ignore keys = { + { "d", "", desc = "+debug" }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dc", function() require("dap").continue() end, desc = "Continue" }, @@ -334,42 +324,4 @@ opts = {
-## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - which key integration - - - - - - -```lua -opts = { - defaults = { - ["d"] = { name = "+debug" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["d"] = { name = "+debug" }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index 82abb71793..af8fe1366a 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -179,40 +179,8 @@ opts = { update_n_lines = "gzn", -- Update `n_lines` }, }, -} -``` - - - -
- -## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - - - - -```lua -opts = { - defaults = { - ["gz"] = { name = "+surround" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["gz"] = { name = "+surround" }, - }, + keys = { + { "gz", "", desc = "+surround" }, }, } ``` diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index c0e136465a..ccfe144e47 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -79,6 +79,7 @@ opts = { "nvim-treesitter/nvim-treesitter", }, keys = { + { "r", "", desc = "+refactor" }, { "rs", function() @@ -251,42 +252,4 @@ opts = nil -## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - which key integration - - - - - - -```lua -opts = { - defaults = { - ["r"] = { name = "+refactor" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["r"] = { name = "+refactor" }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index 5dc8930f52..243df271c7 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -47,13 +47,6 @@ opts = function(_, opts) if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end - vim.filetype.add({ - pattern = { - [".*%.component%.html"] = "angular.html", - [".*%.container%.html"] = "angular.html", - }, - }) - vim.treesitter.language.register("angular", "angular.html") end ``` @@ -69,13 +62,6 @@ end if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end - vim.filetype.add({ - pattern = { - [".*%.component%.html"] = "angular.html", - [".*%.container%.html"] = "angular.html", - }, - }) - vim.treesitter.language.register("angular", "angular.html") end, } ``` diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index b0b688761d..431d12214b 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -43,7 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint", "kotlin-debug-adapter" }) + vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) end ``` @@ -56,7 +56,7 @@ end { "williamboman/mason.nvim", opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint", "kotlin-debug-adapter" }) + vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) end, } ``` @@ -137,7 +137,7 @@ opts = { ## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ - Add linting as optional + Add linting @@ -172,7 +172,7 @@ opts = { ## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ - Add formatting as optional + Add formatting @@ -206,7 +206,7 @@ opts = { ## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ - Add formatting and linting as optional + Add formatting and linting @@ -259,7 +259,7 @@ end opts = function() local dap = require("dap") if not dap.adapters.kotlin then - require("dap").adapters.kotlin = { + dap.adapters.kotlin = { type = "executable", command = "kotlin-debug-adapter", options = { auto_continue_if_many_stopped = false }, @@ -315,7 +315,7 @@ end opts = function() local dap = require("dap") if not dap.adapters.kotlin then - require("dap").adapters.kotlin = { + dap.adapters.kotlin = { type = "executable", command = "kotlin-debug-adapter", options = { auto_continue_if_many_stopped = false }, diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index f77217d0e9..44247b2a52 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -104,40 +104,8 @@ opts = {} vim.g.vimtex_mappings_disable = { ["n"] = { "K" } } -- disable `K` as it conflicts with LSP hover vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" end, -} -``` - - - - - -## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - - - - -```lua -opts = { - defaults = { - ["l"] = { name = "+vimtex" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["l"] = { name = "+vimtex" }, - }, + keys = { + { "l", "", desc = "+vimtext" }, }, } ``` diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 306b409e4a..e55d0833fb 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -185,6 +185,7 @@ opts = { end, -- stylua: ignore keys = { + {"t", "", desc = "+test"}, { "tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, { "tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files" }, { "tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, @@ -225,41 +226,6 @@ opts = nil -## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ - - - - - -```lua -opts = { - defaults = { - ["t"] = { name = "+test" }, - }, -} -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - optional = true, - opts = { - defaults = { - ["t"] = { name = "+test" }, - }, - }, -} -``` - - - - - ## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ diff --git a/docs/keymaps.md b/docs/keymaps.md index 05ffc5878f..073a2ddaef 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -77,6 +77,7 @@ possible keymaps starting with ``. | <leader>gg | Lazygit (Root Dir) | **n** | | <leader>gG | Lazygit (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | +| <leader>gB | Git Browse | **n** | | <leader>gf | Lazygit Current File History | **n** | | <leader>gl | Lazygit Log | **n** | | <leader>gL | Lazygit Log (cwd) | **n** | @@ -191,6 +192,7 @@ possible keymaps starting with ``. | --- | --- | --- | | <c-b> | Scroll Backward | **n**, **i**, **s** | | <c-f> | Scroll Forward | **n**, **i**, **s** | +| <leader>sn | +noice | **n** | | <leader>sna | Noice All | **n** | | <leader>snd | Dismiss All | **n** | | <leader>snh | Noice History | **n** | @@ -298,6 +300,7 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | Key | Description | Mode | | --- | --- | --- | +| <leader>a | +ai | **n** | | <leader>aa | Toggle (CopilotChat) | **n**, **v** | | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | @@ -352,6 +355,7 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | Key | Description | Mode | | --- | --- | --- | +| <leader>d | +debug | **n** | | <leader>da | Run with Args | **n** | | <leader>db | Toggle Breakpoint | **n** | | <leader>dB | Breakpoint Condition | **n** | @@ -442,6 +446,13 @@ 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) +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) Part of [lazyvim.plugins.extras.editor.mini-diff](/extras/editor/mini-diff) @@ -469,6 +480,7 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | Key | Description | Mode | | --- | --- | --- | +| <leader>r | +refactor | **n** | | <leader>rb | Extract Block | **n** | | <leader>rc | Debug Cleanup | **n** | | <leader>rf | Extract Block To File | **n** | @@ -509,11 +521,19 @@ Part of [lazyvim.plugins.extras.lang.python](/extras/lang/python) | --- | --- | --- | | <leader>cv | Select VirtualEnv | **n** | +## [vimtex](https://github.com/lervag/vimtex.git) +Part of [lazyvim.plugins.extras.lang.tex](/extras/lang/tex) + +| Key | Description | Mode | +| --- | --- | --- | +| <localLeader>l | +vimtext | **n** | + ## [neotest](https://github.com/nvim-neotest/neotest.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) | Key | Description | Mode | | --- | --- | --- | +| <leader>t | +test | **n** | | <leader>tl | Run Last | **n** | | <leader>to | Show Output | **n** | | <leader>tO | Toggle Output Panel | **n** | diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 1503abd356..e5a5c5aea2 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -149,6 +149,10 @@ opts = { text_align = "left", }, }, + ---@param opts bufferline.IconFetcherOpts + get_element_icon = function(opts) + return LazyVim.config.icons.ft[opts.filetype] + end, }, } ``` @@ -197,6 +201,10 @@ opts = { text_align = "left", }, }, + ---@param opts bufferline.IconFetcherOpts + get_element_icon = function(opts) + return LazyVim.config.icons.ft[opts.filetype] + end, }, }, config = function(_, opts) @@ -239,7 +247,7 @@ opts = function() local opts = { options = { theme = "auto", - globalstatus = true, + globalstatus = vim.o.laststatus == 3, disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } }, }, sections = { @@ -370,7 +378,7 @@ end local opts = { options = { theme = "auto", - globalstatus = true, + globalstatus = vim.o.laststatus == 3, disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } }, }, sections = { @@ -548,43 +556,6 @@ opts = { -## [which-key.nvim](https://github.com/folke/which-key.nvim) - - Displays a popup with possible key bindings of the command you started typing - - - - - - -```lua -opts = function(_, opts) - if LazyVim.has("noice.nvim") then - opts.defaults["sn"] = { name = "+noice" } - end -end -``` - - - - - - -```lua -{ - "folke/which-key.nvim", - opts = function(_, opts) - if LazyVim.has("noice.nvim") then - opts.defaults["sn"] = { name = "+noice" } - end - end, -} -``` - - - - - ## [noice.nvim](https://github.com/folke/noice.nvim) Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu. @@ -662,6 +633,7 @@ opts = { }, -- stylua: ignore keys = { + { "sn", "", desc = "+noice"}, { "", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" }, { "snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" }, { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, From 14cc2db380dd49fa0ed989ce014d3425defa28c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 11:14:15 +0000 Subject: [PATCH 120/553] chore(build): auto-generate docs --- docs/extras/lang/angular.md | 12 +++ docs/extras/lang/git.md | 134 +++++++++++++++++++++++++++++++++ docs/extras/util/octo.md | 144 ++++++++++++++++++++++++++++++++++++ docs/keymaps.md | 19 +++++ docs/plugins/treesitter.md | 2 + 5 files changed, 311 insertions(+) create mode 100644 docs/extras/lang/git.md create mode 100644 docs/extras/util/octo.md diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index 243df271c7..998a40e2ea 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -47,6 +47,12 @@ opts = function(_, opts) if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end + vim.api.nvim_create_autocmd("BufRead", { + pattern = { "*.component.html", "*.container.html" }, + callback = function() + vim.treesitter.start(nil, "angular") + end, + }) end ``` @@ -62,6 +68,12 @@ end if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end + vim.api.nvim_create_autocmd("BufRead", { + pattern = { "*.component.html", "*.container.html" }, + callback = function() + vim.treesitter.start(nil, "angular") + end, + }) end, } ``` diff --git a/docs/extras/lang/git.md b/docs/extras/lang/git.md new file mode 100644 index 0000000000..9c1d58d2d8 --- /dev/null +++ b/docs/extras/lang/git.md @@ -0,0 +1,134 @@ +# `Git` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.git" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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) + + Treesitter git support + + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) + end, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources, { name = "git" }) +end +``` + + + + + + +```lua +{ + "nvim-cmp", + dependencies = { + { + "petertriho/cmp-git", + opts = {}, + }, + }, + ---@module 'cmp' + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "git" }) + end, +} +``` + + + + + +## [cmp-git](https://github.com/petertriho/cmp-git) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "petertriho/cmp-git", + opts = {}, +} +``` + + + + + + diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md new file mode 100644 index 0000000000..a0515efee2 --- /dev/null +++ b/docs/extras/util/octo.md @@ -0,0 +1,144 @@ +# `Octo` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.util.octo" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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) + +## [octo.nvim](https://github.com/pwntester/octo.nvim) + + Octo + + + + + + +```lua +opts = { + enable_builtin = true, + default_to_projects_v2 = true, + default_merge_method = "squash", + picker = "telescope", +} +``` + + + + + + +```lua +{ + "pwntester/octo.nvim", + cmd = "Octo", + init = function() + vim.treesitter.language.register("markdown", "octo") + end, + opts = { + enable_builtin = true, + default_to_projects_v2 = true, + default_merge_method = "squash", + picker = "telescope", + }, + keys = { + { "gi", "Octo issue list", desc = "List Isues (Octo)" }, + { "gI", "Octo issue search", desc = "Search Isues (Octo)" }, + { "gp", "Octo pr list", desc = "List PRs (Octo)" }, + { "gP", "Octo pr search", desc = "Search PRs (Octo)" }, + { "gr", "Octo repo list", desc = "List Repos (Octo)" }, + { "gS", "Octo search", desc = "Search (Octo)" }, + { "a", "", desc = "+assignee (Otco)", ft = "octo" }, + { "c", "", desc = "+comment/code (Otco)", ft = "octo" }, + { "l", "", desc = "+label (Otco)", ft = "octo" }, + { "i", "", desc = "+issue (Otco)", ft = "octo" }, + { "r", "", desc = "+react (Otco)", ft = "octo" }, + { "p", "", desc = "+pr (Otco)", ft = "octo" }, + { "v", "", desc = "+review (Otco)", ft = "octo" }, + { "@", "@", mode = "i", ft = "octo", silent = true }, + { "#", "#", mode = "i", ft = "octo", silent = true }, + }, +} +``` + + + + + +## [octo.nvim](https://github.com/pwntester/octo.nvim) + + Octo Picker + + + + + + +```lua +opts = function(_, opts) + if LazyVim.has("telescope.nvim") then + opts.picker = "telescope" + elseif LazyVim.has("fzf-lua") then + opts.picker = "fzf-lua" + else + LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") + end +end +``` + + + + + + +```lua +{ + "pwntester/octo.nvim", + opts = function(_, opts) + if LazyVim.has("telescope.nvim") then + opts.picker = "telescope" + elseif LazyVim.has("fzf-lua") then + opts.picker = "fzf-lua" + else + LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") + end + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 073a2ddaef..b2abae39ad 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -574,6 +574,25 @@ Part of [lazyvim.plugins.extras.util.gitui](/extras/util/gitui) | <leader>gg | GitUi (Root Dir) | **n** | | <leader>gG | GitUi (cwd) | **n** | +## [octo.nvim](https://github.com/pwntester/octo.nvim.git) +Part of [lazyvim.plugins.extras.util.octo](/extras/util/octo) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>a | +assignee (Otco) | **n** | +| <leader>c | +comment/code (Otco) | **n** | +| <leader>gi | List Isues (Octo) | **n** | +| <leader>gI | Search Isues (Octo) | **n** | +| <leader>gp | List PRs (Octo) | **n** | +| <leader>gP | Search PRs (Octo) | **n** | +| <leader>gr | List Repos (Octo) | **n** | +| <leader>gS | Search (Octo) | **n** | +| <leader>i | +issue (Otco) | **n** | +| <leader>l | +label (Otco) | **n** | +| <leader>p | +pr (Otco) | **n** | +| <leader>r | +react (Otco) | **n** | +| <leader>v | +review (Otco) | **n** | + ## [project.nvim](https://github.com/ahmedkhalf/project.nvim.git) Part of [lazyvim.plugins.extras.util.project](/extras/util/project) diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index 56f76ecdef..cfd5831baa 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -34,6 +34,7 @@ opts = { "luap", "markdown", "markdown_inline", + "printf", "python", "query", "regex", @@ -111,6 +112,7 @@ opts = { "luap", "markdown", "markdown_inline", + "printf", "python", "query", "regex", From 6a54d2a36f41e9c8e888febaaf5eb75e1511e540 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 12:31:38 +0000 Subject: [PATCH 121/553] chore(build): auto-generate docs --- docs/extras/coding/neogen.md | 113 +++++++++++++++++++++ docs/extras/lang/elm.md | 170 ++++++++++++++++++++++++++++++++ docs/extras/lang/gleam.md | 103 ++++++++++++++++++++ docs/extras/lang/php.md | 184 +++++++++++++++++++++++++++++++++++ docs/extras/lang/thrift.md | 103 ++++++++++++++++++++ docs/keymaps.md | 7 ++ 6 files changed, 680 insertions(+) create mode 100644 docs/extras/coding/neogen.md create mode 100644 docs/extras/lang/elm.md create mode 100644 docs/extras/lang/gleam.md create mode 100644 docs/extras/lang/php.md create mode 100644 docs/extras/lang/thrift.md diff --git a/docs/extras/coding/neogen.md b/docs/extras/coding/neogen.md new file mode 100644 index 0000000000..f7c9e860f6 --- /dev/null +++ b/docs/extras/coding/neogen.md @@ -0,0 +1,113 @@ +# `Neogen` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.neogen" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [neogen](https://github.com/danymat/neogen) + + + + + +```lua +opts = function(_, opts) + if opts.snippet_engine ~= nil then + return + end + + local map = { + ["LuaSnip"] = "luasnip", + ["nvim-snippy"] = "snippy", + ["vim-vsnip"] = "vsnip", + } + + for plugin, engine in pairs(map) do + if LazyVim.has(plugin) then + opts.snippet_engine = engine + return + end + end + + if vim.snippet then + opts.snippet_engine = "nvim" + end +end +``` + + + + + + +```lua +{ + "danymat/neogen", + cmd = "Neogen", + keys = { + { + "cn", + function() + require("neogen").generate() + end, + desc = "Generate Annotations (Neogen)", + }, + }, + opts = function(_, opts) + if opts.snippet_engine ~= nil then + return + end + + local map = { + ["LuaSnip"] = "luasnip", + ["nvim-snippy"] = "snippy", + ["vim-vsnip"] = "vsnip", + } + + for plugin, engine in pairs(map) do + if LazyVim.has(plugin) then + opts.snippet_engine = engine + return + end + end + + if vim.snippet then + opts.snippet_engine = "nvim" + end + end, +} +``` + + + + + + diff --git a/docs/extras/lang/elm.md b/docs/extras/lang/elm.md new file mode 100644 index 0000000000..f9206833d1 --- /dev/null +++ b/docs/extras/lang/elm.md @@ -0,0 +1,170 @@ +# `Elm` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.elm" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "elm" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "elm" }) + end + end, +} +``` + + + + + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "elm-format" }) +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "elm-format" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + elmls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + elmls = {}, + }, + }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + elm = { "elm_format" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + elm = { "elm_format" }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/gleam.md b/docs/extras/lang/gleam.md new file mode 100644 index 0000000000..e50cd7cd43 --- /dev/null +++ b/docs/extras/lang/gleam.md @@ -0,0 +1,103 @@ +# `Gleam` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.gleam" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "gleam" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "gleam" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + gleam = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + gleam = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md new file mode 100644 index 0000000000..5bffc189a8 --- /dev/null +++ b/docs/extras/lang/php.md @@ -0,0 +1,184 @@ +# `Php` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.php" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + vim.list_extend(opts.ensure_installed, { "php" }) +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { "php" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + phpactor = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + phpactor = {}, + }, + }, +} +``` + + + + + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + table.insert(opts.ensure_installed, "php-debug-adapter") + end +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + table.insert(opts.ensure_installed, "php-debug-adapter") + end + end, +} +``` + + + + + +## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ + + + + + +```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" }, + } +end +``` + + + + + + +```lua +{ + "mfussenegger/nvim-dap", + optional = true, + dependencies = { + "williamboman/mason.nvim", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + table.insert(opts.ensure_installed, "php-debug-adapter") + end + end, + }, + 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" }, + } + end, +} +``` + + + + + + diff --git a/docs/extras/lang/thrift.md b/docs/extras/lang/thrift.md new file mode 100644 index 0000000000..e7482d0083 --- /dev/null +++ b/docs/extras/lang/thrift.md @@ -0,0 +1,103 @@ +# `Thrift` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.thrift" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "thrift" }) +end +``` + + + + + + +```lua +{ + "nvim-treesitter", + optional = true, + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "thrift" }) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) _(optional)_ + + + + + +```lua +opts = { + servers = { + thriftls = {}, + }, +} +``` + + + + + + +```lua +{ + "nvim-lspconfig", + optional = true, + opts = { + servers = { + thriftls = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index b2abae39ad..0468793068 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -326,6 +326,13 @@ Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surrou | gsn | Update `MiniSurround.config.n_lines` | **n** | | gsr | Replace Surrounding | **n** | +## [neogen](https://github.com/danymat/neogen.git) +Part of [lazyvim.plugins.extras.coding.neogen](/extras/coding/neogen) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>cn | Generate Annotations (Neogen) | **n** | + ## [yanky.nvim](https://github.com/gbprod/yanky.nvim.git) Part of [lazyvim.plugins.extras.coding.yanky](/extras/coding/yanky) From 66d43f4dc799982e8e161d99b1ee550f21515b2e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 13:19:01 +0000 Subject: [PATCH 122/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 22 ---------------------- docs/extras/util/octo.md | 2 ++ 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 218b4dc221..0c0a970641 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -86,28 +86,6 @@ opts = {} "theHamsta/nvim-dap-virtual-text", opts = {}, }, - - -- mason.nvim integration - { - "jay-babu/mason-nvim-dap.nvim", - dependencies = "mason.nvim", - cmd = { "DapInstall", "DapUninstall" }, - opts = { - -- Makes a best effort to setup the various debuggers with - -- reasonable debug configurations - automatic_installation = true, - - -- You can provide additional configuration to the handlers, - -- see mason-nvim-dap README for more information - handlers = {}, - - -- You'll need to check that you have the required things installed - -- online, please don't ask me how to install them :) - ensure_installed = { - -- Update this to ensure that you have the debuggers for the langs you want - }, - }, - }, }, -- stylua: ignore diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index a0515efee2..6f7093262f 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -63,6 +63,7 @@ opts = { { "pwntester/octo.nvim", cmd = "Octo", + event = { { event = "BufReadCmd", pattern = "octo://*" } }, init = function() vim.treesitter.language.register("markdown", "octo") end, @@ -79,6 +80,7 @@ opts = { { "gP", "Octo pr search", desc = "Search PRs (Octo)" }, { "gr", "Octo repo list", desc = "List Repos (Octo)" }, { "gS", "Octo search", desc = "Search (Octo)" }, + { "a", "", desc = "+assignee (Otco)", ft = "octo" }, { "c", "", desc = "+comment/code (Otco)", ft = "octo" }, { "l", "", desc = "+label (Otco)", ft = "octo" }, From 7e44e77d5a5e732ba6de8351012127229548a153 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 14:15:54 +0000 Subject: [PATCH 123/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/formatting/prettier.md | 4 +- docs/extras/util/octo.md | 94 ++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 832252d730..8353ce215e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -116,6 +116,7 @@ opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute opt.laststatus = 3 -- global statusline +opt.linebreak = true -- Wrap lines at convenient points opt.list = true -- Show some invisible characters (tabs... opt.mouse = "a" -- Enable mouse mode opt.number = true -- Print line number diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index cfd6ba2e88..3d0cdf300e 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -143,7 +143,7 @@ opts = { end if enabled[ctx.filename] == nil then enabled[ctx.filename] = vim.fs.find(function(name, path) - return name:match("^%.prettierrc%.") or name:match("^prettier%.config%.") + return name:match("^%.prettierrc%.?") or name:match("^prettier%.config%.") end, { path = ctx.filename, upward = true })[1] ~= nil end return enabled[ctx.filename] @@ -190,7 +190,7 @@ opts = { end if enabled[ctx.filename] == nil then enabled[ctx.filename] = vim.fs.find(function(name, path) - return name:match("^%.prettierrc%.") or name:match("^prettier%.config%.") + return name:match("^%.prettierrc%.?") or name:match("^prettier%.config%.") end, { path = ctx.filename, upward = true })[1] ~= nil end return enabled[ctx.filename] diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 6f7093262f..ba38d47a4c 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -116,6 +116,53 @@ opts = function(_, opts) else LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") end + local Signs = require("octo.ui.signs") + + ---@type {buf: number, from: number, to: number, dirty: boolean}[] + local signs = {} + + local unplace = Signs.unplace + function Signs.unplace(bufnr) + signs = vim.tbl_filter(function(s) + return s.buf ~= bufnr + end, signs) + return unplace(bufnr) + end + + function Signs.place_signs(bufnr, start_line, end_line, is_dirty) + signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty } + end + -- stylua: ignore + local corners = { + top = "┌╴", + middle = "│ ", + last = "└╴", + single = "[ ", + } + + --- Fixes octo's comment rendering to take wrapping into account + ---@param buf number + ---@param lnum number + ---@param vnum number + ---@param win number + table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win) + lnum = lnum - 1 + for _, s in ipairs(signs) do + if buf == s.buf and lnum >= s.from and lnum <= s.to then + local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all + local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all + local corner = corners.middle + if height == 1 then + corner = corners.single + elseif lnum == s.from and vnum == 0 then + corner = corners.top + elseif lnum == s.to and vnum == height_end - 1 then + corner = corners.last + end + return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } } + end + end + end) end ``` @@ -135,6 +182,53 @@ end else LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") end + local Signs = require("octo.ui.signs") + + ---@type {buf: number, from: number, to: number, dirty: boolean}[] + local signs = {} + + local unplace = Signs.unplace + function Signs.unplace(bufnr) + signs = vim.tbl_filter(function(s) + return s.buf ~= bufnr + end, signs) + return unplace(bufnr) + end + + function Signs.place_signs(bufnr, start_line, end_line, is_dirty) + signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty } + end + -- stylua: ignore + local corners = { + top = "┌╴", + middle = "│ ", + last = "└╴", + single = "[ ", + } + + --- Fixes octo's comment rendering to take wrapping into account + ---@param buf number + ---@param lnum number + ---@param vnum number + ---@param win number + table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win) + lnum = lnum - 1 + for _, s in ipairs(signs) do + if buf == s.buf and lnum >= s.from and lnum <= s.to then + local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all + local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all + local corner = corners.middle + if height == 1 then + corner = corners.single + elseif lnum == s.from and vnum == 0 then + corner = corners.top + elseif lnum == s.to and vnum == height_end - 1 then + corner = corners.last + end + return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } } + end + end + end) end, } ``` From 5a52f941ed454ce70bd0441deb89c2e918dcd09b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 15:18:33 +0000 Subject: [PATCH 124/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 920e56961a..6d45a08771 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -41,7 +41,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint" }) + vim.list_extend(opts.ensure_installed, { "markdownlint", "markdown-toc" }) end ``` @@ -55,7 +55,7 @@ end "williamboman/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint" }) + vim.list_extend(opts.ensure_installed, { "markdownlint", "markdown-toc" }) end, } ``` From 611502f9a68a633c8f6195e99f35af2243ce50f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 16:21:12 +0000 Subject: [PATCH 125/553] chore(build): auto-generate docs --- docs/extras/formatting/prettier.md | 10 ++++------ docs/plugins/editor.md | 4 ++++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index 3d0cdf300e..05c39ee7ec 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -142,9 +142,8 @@ opts = { return true end if enabled[ctx.filename] == nil then - enabled[ctx.filename] = vim.fs.find(function(name, path) - return name:match("^%.prettierrc%.?") or name:match("^prettier%.config%.") - end, { path = ctx.filename, upward = true })[1] ~= nil + vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) + enabled[ctx.filename] = vim.v.shell_error == 0 end return enabled[ctx.filename] end, @@ -189,9 +188,8 @@ opts = { return true end if enabled[ctx.filename] == nil then - enabled[ctx.filename] = vim.fs.find(function(name, path) - return name:match("^%.prettierrc%.?") or name:match("^prettier%.config%.") - end, { path = ctx.filename, upward = true })[1] ~= nil + vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) + enabled[ctx.filename] = vim.v.shell_error == 0 end return enabled[ctx.filename] end, diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4cc8277be8..01962a8b54 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -25,6 +25,8 @@ opts = { }, window = { mappings = { + ["l"] = "open", + ["h"] = "close_node", [""] = "none", ["Y"] = { function(state) @@ -133,6 +135,8 @@ opts = { }, window = { mappings = { + ["l"] = "open", + ["h"] = "close_node", [""] = "none", ["Y"] = { function(state) From e895be146ca905ed62628104bbb0d33c090393c7 Mon Sep 17 00:00:00 2001 From: Dusty Phillips <86920+dusty-phillips@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:54:26 -0300 Subject: [PATCH 126/553] docs: Add Learn section to main page (#94) --- docs/intro.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/intro.md b/docs/intro.md index c7bd85ed12..780ea89c60 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -37,3 +37,14 @@ 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)_** + +## 🎓 Learn + +There's a great video created by [@elijahmanor](https://github.com/elijahmanor) +with a walkthrough to get started. + +[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) + +[@dusty-phillips](https://github.com/dusty-phillips) is working on a book called +[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes) +available for free online. From 8fcd9be7b0d542ba9993ca14ac1fb091cf22c4a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 19:15:18 +0000 Subject: [PATCH 127/553] chore(build): auto-generate docs --- docs/extras/editor/mini-files.md | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 7c92622051..df9bf3c64a 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -40,6 +40,14 @@ import TabItem from '@theme/TabItem'; ```lua opts = { + mappings = { + toggle_hidden = "g.", + change_cwd = "gc", + go_in_horizontal = "s", + go_in_vertical = "v", + go_in_horizontal_plus = "S", + go_in_vertical_plus = "V", + }, windows = { preview = true, width_focus = 30, @@ -62,6 +70,14 @@ opts = { { "echasnovski/mini.files", opts = { + mappings = { + toggle_hidden = "g.", + change_cwd = "gc", + go_in_horizontal = "s", + go_in_vertical = "v", + go_in_horizontal_plus = "S", + go_in_vertical_plus = "V", + }, windows = { preview = true, width_focus = 30, @@ -143,22 +159,17 @@ opts = { vim.keymap.set( "n", - opts.mappings.toggle_hidden or "g.", + opts.mappings.toggle_hidden, toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" } ) - vim.keymap.set( - "n", - opts.mappings.change_cwd or "gc", - files_set_cwd, - { buffer = args.data.buf_id, desc = "Set cwd" } - ) + vim.keymap.set("n", opts.mappings.change_cwd, files_set_cwd, { buffer = args.data.buf_id, desc = "Set cwd" }) - map_split(buf_id, opts.mappings.go_in_horizontal or "s", "horizontal", false) - map_split(buf_id, opts.mappings.go_in_vertical or "v", "vertical", false) - map_split(buf_id, opts.mappings.go_in_horizontal_plus or "S", "horizontal", true) - map_split(buf_id, opts.mappings.go_in_vertical_plus or "V", "vertical", true) + map_split(buf_id, opts.mappings.go_in_horizontal, "horizontal", false) + map_split(buf_id, opts.mappings.go_in_vertical, "vertical", false) + map_split(buf_id, opts.mappings.go_in_horizontal_plus, "horizontal", true) + map_split(buf_id, opts.mappings.go_in_vertical_plus, "vertical", true) end, }) From a8e2c874cec09ae4c2520ac350c70bc988e5b341 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 21:16:53 +0000 Subject: [PATCH 128/553] chore(build): auto-generate docs --- docs/configuration/general.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 8353ce215e..a4ed2d07fb 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -134,6 +134,7 @@ opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift t opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically opt.spelllang = { "en" } +opt.spelloptions:append("noplainbuffer") opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current @@ -486,7 +487,7 @@ vim.api.nvim_create_autocmd("FileType", { -- wrap and check for spell in text filetypes vim.api.nvim_create_autocmd("FileType", { group = augroup("wrap_spell"), - pattern = { "gitcommit", "markdown" }, + pattern = { "*.txt", "*.tex", "*.typ", "gitcommit", "markdown" }, callback = function() vim.opt_local.wrap = true vim.opt_local.spell = true From 1b5231a543f1bd3e0d6e32d159f2945061d653b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 22:15:03 +0000 Subject: [PATCH 129/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/lang/sql.md | 367 ++++++++++++++++++++++++++++++++++ docs/keymaps.md | 7 + 3 files changed, 375 insertions(+) create mode 100644 docs/extras/lang/sql.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index a4ed2d07fb..276a535945 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -468,6 +468,7 @@ vim.api.nvim_create_autocmd("FileType", { "checkhealth", "neotest-summary", "neotest-output-panel", + "dbout", }, callback = function(event) vim.bo[event.buf].buflisted = false diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md new file mode 100644 index 0000000000..089f68ccdd --- /dev/null +++ b/docs/extras/lang/sql.md @@ -0,0 +1,367 @@ +# `Sql` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.sql" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [vim-dadbod](https://github.com/tpope/vim-dadbod) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "tpope/vim-dadbod", + cmd = "DB", +} +``` + + + + + +## [vim-dadbod-completion](https://github.com/kristijanhusak/vim-dadbod-completion) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "kristijanhusak/vim-dadbod-completion", + dependencies = "vim-dadbod", + ft = sql_ft, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = sql_ft, + callback = function() + local cmp = require("cmp") + + -- global sources + ---@param source cmp.SourceConfig + local sources = vim.tbl_map(function(source) + return { name = source.name } + end, cmp.get_config().sources) + + -- add vim-dadbod-completion source + table.insert(sources, { name = "vim-dadbod-completion" }) + + -- update sources for the current buffer + cmp.setup.buffer({ sources = sources }) + end, + }) + end, +} +``` + + + + + +## [vim-dadbod-ui](https://github.com/kristijanhusak/vim-dadbod-ui) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "kristijanhusak/vim-dadbod-ui", + cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" }, + dependencies = "vim-dadbod", + keys = { + { "D", "DBUIToggle", desc = "Toggle DBUI" }, + }, + init = function() + local data_path = vim.fn.stdpath("data") + + vim.g.db_ui_auto_execute_table_helpers = 1 + vim.g.db_ui_save_location = data_path .. "/dadbod_ui" + vim.g.db_ui_show_database_icon = true + vim.g.db_ui_tmp_query_location = data_path .. "/dadbod_ui/tmp" + vim.g.db_ui_use_nerd_fonts = true + vim.g.db_ui_use_nvim_notify = true + + -- NOTE: The default behavior of auto-execution of queries on save is disabled + -- this is useful when you have a big query that you don't want to run every time + -- you save the file running those queries can crash neovim to run use the + -- default keymap: S + vim.g.db_ui_execute_on_save = false + end, +} +``` + + + + + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + Linters & formatters + + + + + + +```lua +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "sqlfluff" }) +end +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "sqlfluff" }) + end, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) _(optional)_ + + Treesitter + + + + + + +```lua +opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "sql" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + optional = true, + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "sql" }) + end + end, +} +``` + + + + + +## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ + + Edgy integration + + + + + + +```lua +opts = function(_, opts) + table.insert(opts.right, { + title = "Database", + ft = "dbui", + pinned = true, + width = 0.3, + open = function() + vim.cmd("DBUI") + end, + }) + + table.insert(opts.bottom, { + title = "DB Query Result", + ft = "dbout", + }) +end +``` + + + + + + +```lua +{ + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + table.insert(opts.right, { + title = "Database", + ft = "dbui", + pinned = true, + width = 0.3, + open = function() + vim.cmd("DBUI") + end, + }) + + table.insert(opts.bottom, { + title = "DB Query Result", + ft = "dbout", + }) + end, +} +``` + + + + + +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + + + + +```lua +opts = function(_, opts) + for _, ft in ipairs(sql_ft) do + opts.linters_by_ft[ft] = opts.linters_by_ft[ft] or {} + table.insert(opts.linters_by_ft[ft], "sqlfluff") + end +end +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + opts = function(_, opts) + for _, ft in ipairs(sql_ft) do + opts.linters_by_ft[ft] = opts.linters_by_ft[ft] or {} + table.insert(opts.linters_by_ft[ft], "sqlfluff") + end + end, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.formatters.sqlfluff = { + args = { "format", "--dialect=ansi", "-" }, + } + for _, ft in ipairs(sql_ft) do + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "sqlfluff") + end +end +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = function(_, opts) + opts.formatters.sqlfluff = { + args = { "format", "--dialect=ansi", "-" }, + } + for _, ft in ipairs(sql_ft) do + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "sqlfluff") + end + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 0468793068..37e0410896 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -528,6 +528,13 @@ Part of [lazyvim.plugins.extras.lang.python](/extras/lang/python) | --- | --- | --- | | <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) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>D | Toggle DBUI | **n** | + ## [vimtex](https://github.com/lervag/vimtex.git) Part of [lazyvim.plugins.extras.lang.tex](/extras/lang/tex) From 5b280a2c51493a9f2e29d7977425452f347ab0a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 07:15:34 +0000 Subject: [PATCH 130/553] chore(build): auto-generate docs --- docs/extras/lang/ansible.md | 12 ++------ docs/extras/lang/astro.md | 12 ++------ docs/extras/lang/clangd.md | 30 +++--------------- docs/extras/lang/cmake.md | 22 +++---------- docs/extras/lang/docker.md | 22 +++---------- docs/extras/lang/elixir.md | 16 ++-------- docs/extras/lang/elm.md | 22 +++---------- docs/extras/lang/git.md | 20 +++--------- docs/extras/lang/gleam.md | 12 ++------ docs/extras/lang/go.md | 58 ++++++----------------------------- docs/extras/lang/haskell.md | 37 +++++----------------- docs/extras/lang/helm.md | 9 ++++-- docs/extras/lang/java.md | 25 +++------------ docs/extras/lang/json.md | 12 ++------ docs/extras/lang/kotlin.md | 16 +++------- docs/extras/lang/markdown.md | 10 ++---- docs/extras/lang/nix.md | 10 ++---- docs/extras/lang/omnisharp.md | 24 +++------------ docs/extras/lang/php.md | 26 +++------------- docs/extras/lang/python.md | 12 ++------ docs/extras/lang/r.md | 12 ++------ docs/extras/lang/ruby.md | 12 ++------ docs/extras/lang/rust.md | 20 +++--------- docs/extras/lang/scala.md | 12 ++------ docs/extras/lang/sql.md | 22 +++---------- docs/extras/lang/svelte.md | 12 ++------ docs/extras/lang/terraform.md | 28 +++-------------- docs/extras/lang/thrift.md | 13 ++------ docs/extras/lang/vue.md | 12 ++------ docs/extras/util/dot.md | 10 ++---- docs/extras/util/gitui.md | 10 ++---- docs/plugins/coding.md | 1 - docs/plugins/lsp.md | 3 +- docs/plugins/treesitter.md | 1 + 34 files changed, 109 insertions(+), 466 deletions(-) diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index fecbeb49c4..798f7765a0 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - -- for ansiblels validation - vim.list_extend(opts.ensure_installed, { "ansible-lint" }) -end +opts = { ensure_installed = { "ansible-lint" } } ``` @@ -54,11 +50,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - -- for ansiblels validation - vim.list_extend(opts.ensure_installed, { "ansible-lint" }) - end, + opts = { ensure_installed = { "ansible-lint" } }, } ``` diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index 2189356102..b006722da2 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -43,11 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "astro" }) - end -end +opts = { ensure_installed = { "astro" } } ``` @@ -58,11 +54,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "astro" }) - end - end, + opts = { ensure_installed = { "astro" } }, } ``` diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index e8dd3acf14..924cf599f5 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -42,11 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cpp" }) - end -end +opts = { ensure_installed = { "cpp" } } ``` @@ -57,11 +53,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cpp" }) - end - end, + opts = { ensure_installed = { "cpp" } }, } ``` @@ -355,11 +347,7 @@ end -- Ensure C/C++ debugger is installed "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end - end, + opts = { ensure_installed = { "codelldb" } }, }, opts = function() local dap = require("dap") @@ -412,11 +400,7 @@ end ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end -end +opts = { ensure_installed = { "codelldb" } } ``` @@ -429,11 +413,7 @@ end -- Ensure C/C++ debugger is installed "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end - end, + opts = { ensure_installed = { "codelldb" } }, } ``` diff --git a/docs/extras/lang/cmake.md b/docs/extras/lang/cmake.md index b207008c1d..d1ad6e2f71 100644 --- a/docs/extras/lang/cmake.md +++ b/docs/extras/lang/cmake.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cmake" }) - end -end +opts = { ensure_installed = { "cmake" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "cmake" }) - end - end, + opts = { ensure_installed = { "cmake" } }, } ``` @@ -73,10 +65,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "cmakelang", "cmakelint" }) -end +opts = { ensure_installed = { "cmakelang", "cmakelint" } } ``` @@ -87,10 +76,7 @@ end ```lua { "mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "cmakelang", "cmakelint" }) - end, + opts = { ensure_installed = { "cmakelang", "cmakelint" } }, } ``` diff --git a/docs/extras/lang/docker.md b/docs/extras/lang/docker.md index c97fe4cc67..bb2f7d0b61 100644 --- a/docs/extras/lang/docker.md +++ b/docs/extras/lang/docker.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "dockerfile" }) - end -end +opts = { ensure_installed = { "dockerfile" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "dockerfile" }) - end - end, + opts = { ensure_installed = { "dockerfile" } }, } ``` @@ -73,10 +65,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "hadolint" }) -end +opts = { ensure_installed = { "hadolint" } } ``` @@ -87,10 +76,7 @@ end ```lua { "mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "hadolint" }) - end, + opts = { ensure_installed = { "hadolint" } }, } ``` diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index b3f18d8107..e1326be418 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -39,13 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "elixir", - "heex", - "eex", - }) -end +opts = { ensure_installed = { "elixir", "heex", "eex" } } ``` @@ -56,13 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "elixir", - "heex", - "eex", - }) - end, + opts = { ensure_installed = { "elixir", "heex", "eex" } }, } ``` diff --git a/docs/extras/lang/elm.md b/docs/extras/lang/elm.md index f9206833d1..9d37ebea3b 100644 --- a/docs/extras/lang/elm.md +++ b/docs/extras/lang/elm.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "elm" }) - end -end +opts = { ensure_installed = { "elm" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "elm" }) - end - end, + opts = { ensure_installed = { "elm" } }, } ``` @@ -73,10 +65,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "elm-format" }) -end +opts = { ensure_installed = { "elm-format" } } ``` @@ -87,10 +76,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "elm-format" }) - end, + opts = { ensure_installed = { "elm-format" } }, } ``` diff --git a/docs/extras/lang/git.md b/docs/extras/lang/git.md index 9c1d58d2d8..f7b97b718a 100644 --- a/docs/extras/lang/git.md +++ b/docs/extras/lang/git.md @@ -42,10 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) -end +opts = { ensure_installed = { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" } } ``` @@ -56,10 +53,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) - end, + opts = { ensure_installed = { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" } }, } ``` @@ -88,10 +82,7 @@ end { "nvim-cmp", dependencies = { - { - "petertriho/cmp-git", - opts = {}, - }, + { "petertriho/cmp-git", opts = {} }, }, ---@module 'cmp' ---@param opts cmp.ConfigSchema @@ -121,10 +112,7 @@ opts = {} ```lua -{ - "petertriho/cmp-git", - opts = {}, -} +{ "petertriho/cmp-git", opts = {} } ``` diff --git a/docs/extras/lang/gleam.md b/docs/extras/lang/gleam.md index e50cd7cd43..705f768afd 100644 --- a/docs/extras/lang/gleam.md +++ b/docs/extras/lang/gleam.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "gleam" }) - end -end +opts = { ensure_installed = { "gleam" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "gleam" }) - end - end, + opts = { ensure_installed = { "gleam" } }, } ``` diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index b09ba7d12d..0660173d1b 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -39,14 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "go", - "gomod", - "gowork", - "gosum", - }) -end +opts = { ensure_installed = { "go", "gomod", "gowork", "gosum" } } ``` @@ -57,14 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "go", - "gomod", - "gowork", - "gosum", - }) - end, + opts = { ensure_installed = { "go", "gomod", "gowork", "gosum" } }, } ``` @@ -242,10 +228,7 @@ opts = { ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "goimports", "gofumpt" }) -end +opts = { ensure_installed = { "goimports", "gofumpt" } } ``` @@ -256,10 +239,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "goimports", "gofumpt" }) - end, + opts = { ensure_installed = { "goimports", "gofumpt" } }, } ``` @@ -274,10 +254,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl" }) -end +opts = { ensure_installed = { "gomodifytags", "impl" } } ``` @@ -288,10 +265,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl" }) - end, + opts = { ensure_installed = { "gomodifytags", "impl" } }, } ``` @@ -306,10 +280,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "delve" }) -end +opts = { ensure_installed = { "delve" } } ``` @@ -320,10 +291,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "delve" }) - end, + opts = { ensure_installed = { "delve" } }, } ``` @@ -412,10 +380,7 @@ end dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gomodifytags", "impl" }) - end, + opts = { ensure_installed = { "gomodifytags", "impl" } }, }, }, opts = function(_, opts) @@ -491,10 +456,7 @@ opts = nil dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "delve" }) - end, + opts = { ensure_installed = { "delve" } }, }, { "leoluz/nvim-dap-go", diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 713119fcf3..78f99f64dd 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -42,11 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "haskell" }) - end -end +opts = { ensure_installed = { "haskell" } } ``` @@ -57,11 +53,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "haskell" }) - end - end, + opts = { ensure_installed = { "haskell" } }, } ``` @@ -112,10 +104,7 @@ opts = {} ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-language-server" }) -end +opts = { ensure_installed = { "haskell-language-server" } } ``` @@ -126,10 +115,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-language-server" }) - end, + opts = { ensure_installed = { "haskell-language-server" } }, } ``` @@ -144,10 +130,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-debug-adapter" }) -end +opts = { ensure_installed = { "haskell-debug-adapter" } } ``` @@ -158,10 +141,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-debug-adapter" }) - end, + opts = { ensure_installed = { "haskell-debug-adapter" } }, } ``` @@ -368,10 +348,7 @@ opts = nil dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "haskell-debug-adapter" }) - end, + opts = { ensure_installed = { "haskell-debug-adapter" } }, }, }, } diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index a6a7c8b56e..3c98b3ae80 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -32,14 +32,14 @@ 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) +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) ```lua -opts = nil +opts = { ensure_installed = { "helm" } } ``` @@ -48,7 +48,10 @@ opts = nil ```lua -{ "towolf/vim-helm", ft = "helm" } +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "helm" } }, +} ``` diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 4e45e52d8e..aeb1b36034 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -42,10 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java" }) -end +opts = { ensure_installed = { "java" } } ``` @@ -56,10 +53,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java" }) - end, + opts = { ensure_installed = { "java" } }, } ``` @@ -74,10 +68,7 @@ end ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) -end +opts = { ensure_installed = { "java-debug-adapter", "java-test" } } ``` @@ -88,10 +79,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) - end, + opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, } ``` @@ -447,10 +435,7 @@ opts = nil dependencies = { { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "java-test", "java-debug-adapter" }) - end, + opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, }, }, } diff --git a/docs/extras/lang/json.md b/docs/extras/lang/json.md index 31deb685b0..a1112aa6f1 100644 --- a/docs/extras/lang/json.md +++ b/docs/extras/lang/json.md @@ -42,11 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "json5" }) - end -end +opts = { ensure_installed = { "json5" } } ``` @@ -57,11 +53,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "json5" }) - end - end, + opts = { ensure_installed = { "json5" } }, } ``` diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index 431d12214b..98dff3611c 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -42,9 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) -end +opts = { ensure_installed = { "ktlint" } } ``` @@ -55,9 +53,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "ktlint" }) - end, + opts = { ensure_installed = { "ktlint" } }, } ``` @@ -75,9 +71,7 @@ end ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "kotlin" }) -end +opts = { ensure_installed = { "kotlin" } } ``` @@ -88,9 +82,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed or {}, { "kotlin" }) - end, + opts = { ensure_installed = { "kotlin" } }, } ``` diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 6d45a08771..5ba125df38 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -39,10 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint", "markdown-toc" }) -end +opts = { ensure_installed = { "markdownlint", "markdown-toc" } } ``` @@ -53,10 +50,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "markdownlint", "markdown-toc" }) - end, + opts = { ensure_installed = { "markdownlint", "markdown-toc" } }, } ``` diff --git a/docs/extras/lang/nix.md b/docs/extras/lang/nix.md index 14e12595b7..85b1ec4260 100644 --- a/docs/extras/lang/nix.md +++ b/docs/extras/lang/nix.md @@ -39,10 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "nix" }) -end +opts = { ensure_installed = { "nix" } } ``` @@ -53,10 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "nix" }) - end, + opts = { ensure_installed = { "nix" } }, } ``` diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index d5a9579fb2..1ff585e08b 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -62,11 +62,7 @@ opts = nil ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "c_sharp" }) - end -end +opts = { ensure_installed = { "c_sharp" } } ``` @@ -77,11 +73,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "c_sharp" }) - end - end, + opts = { ensure_installed = { "c_sharp" } }, } ``` @@ -96,11 +88,7 @@ end ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "netcoredbg", "csharpier" }) - end -end +opts = { ensure_installed = { "csharpier", "netcoredbg" } } ``` @@ -111,11 +99,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "netcoredbg", "csharpier" }) - end - end, + opts = { ensure_installed = { "csharpier", "netcoredbg" } }, } ``` diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 5bffc189a8..4403b2992f 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -39,9 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { "php" }) -end +opts = { ensure_installed = { "php" } } ``` @@ -52,9 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { "php" }) - end, + opts = { ensure_installed = { "php" } }, } ``` @@ -103,11 +99,7 @@ opts = { ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - table.insert(opts.ensure_installed, "php-debug-adapter") - end -end +opts = { ensure_installed = { "php-debug-adapter" } } ``` @@ -118,11 +110,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - table.insert(opts.ensure_installed, "php-debug-adapter") - end - end, + opts = { ensure_installed = { "php-debug-adapter" } }, } ``` @@ -159,11 +147,7 @@ end optional = true, dependencies = { "williamboman/mason.nvim", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - table.insert(opts.ensure_installed, "php-debug-adapter") - end - end, + opts = { ensure_installed = { "php-debug-adapter" } }, }, opts = function() local dap = require("dap") diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 9c6ae27ada..3430411c82 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -50,11 +50,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "ninja", "rst" }) - end -end +opts = { ensure_installed = { "ninja", "rst" } } ``` @@ -65,11 +61,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "ninja", "rst" }) - end - end, + opts = { ensure_installed = { "ninja", "rst" } }, } ``` diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 900d7893b9..6345f95aa1 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -160,11 +160,7 @@ opts = nil ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "r", "rnoweb" }) - end -end +opts = { ensure_installed = { "r", "rnoweb" } } ``` @@ -175,11 +171,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "r", "rnoweb" }) - end - end, + opts = { ensure_installed = { "r", "rnoweb" } }, } ``` diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index 2217ed95bf..097d2a12cc 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "ruby", - }) -end +opts = { ensure_installed = { "ruby" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "ruby", - }) - end, + opts = { ensure_installed = { "ruby" } }, } ``` diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index a6f1593df5..f005cf894e 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -124,10 +124,7 @@ opts = { ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ron", "rust" }) -end +opts = { ensure_installed = { "rust", "ron" } } ``` @@ -138,10 +135,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ron", "rust" }) - end, + opts = { ensure_installed = { "rust", "ron" } }, } ``` @@ -335,10 +329,7 @@ opts = { ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "codelldb" }) -end +opts = { ensure_installed = { "codelldb" } } ``` @@ -350,10 +341,7 @@ end { "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "codelldb" }) - end, + opts = { ensure_installed = { "codelldb" } }, } ``` diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index 219402803c..dec868c9e9 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -39,11 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "scala" }) - end -end +opts = { ensure_installed = { "scala" } } ``` @@ -54,11 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "scala" }) - end - end, + opts = { ensure_installed = { "scala" } }, } ``` diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 089f68ccdd..d8f9715c8c 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -161,10 +161,7 @@ opts = nil ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlfluff" }) -end +opts = { ensure_installed = { "sqlfluff" } } ``` @@ -175,10 +172,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlfluff" }) - end, + opts = { ensure_installed = { "sqlfluff" } }, } ``` @@ -196,11 +190,7 @@ end ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "sql" }) - end -end +opts = { ensure_installed = { "sql" } } ``` @@ -212,11 +202,7 @@ end { "nvim-treesitter/nvim-treesitter", optional = true, - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "sql" }) - end - end, + opts = { ensure_installed = { "sql" } }, } ``` diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index 00ad5a403e..f116f13372 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -43,11 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "svelte" }) - end -end +opts = { ensure_installed = { "svelte" } } ``` @@ -58,11 +54,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "svelte" }) - end - end, + opts = { ensure_installed = { "svelte" } }, } ``` diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index b920d4bfbb..f17234b60a 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -39,14 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { - "terraform", - "hcl", - }) - end -end +opts = { ensure_installed = { "terraform", "hcl" } } ``` @@ -57,14 +50,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { - "terraform", - "hcl", - }) - end - end, + opts = { ensure_installed = { "terraform", "hcl" } }, } ``` @@ -116,10 +102,7 @@ opts = { ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "tflint" }) -end +opts = { ensure_installed = { "tflint" } } ``` @@ -130,10 +113,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "tflint" }) - end, + opts = { ensure_installed = { "tflint" } }, } ``` diff --git a/docs/extras/lang/thrift.md b/docs/extras/lang/thrift.md index e7482d0083..8bba7bacbb 100644 --- a/docs/extras/lang/thrift.md +++ b/docs/extras/lang/thrift.md @@ -32,17 +32,14 @@ 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) _(optional)_ +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "thrift" }) -end +opts = { ensure_installed = { "thrift" } } ``` @@ -53,11 +50,7 @@ end ```lua { "nvim-treesitter", - optional = true, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "thrift" }) - end, + opts = { ensure_installed = { "thrift" } }, } ``` diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 0e8bd29bba..4a73a32a9a 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -43,11 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "vue" }) - end -end +opts = { ensure_installed = { "vue" } } ``` @@ -58,11 +54,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "vue" }) - end - end, + opts = { ensure_installed = { "vue" } }, } ``` diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index ad2b7ee5c1..1f09c4d3bd 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -73,10 +73,7 @@ opts = { ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "shellcheck" }) -end +opts = { ensure_installed = { "shellcheck" } } ``` @@ -87,10 +84,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "shellcheck" }) - end, + opts = { ensure_installed = { "shellcheck" } }, } ``` diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index 9025d53cbf..c35275a218 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -42,10 +42,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gitui" }) -end +opts = { ensure_installed = { "gitui" } } ``` @@ -56,6 +53,7 @@ end ```lua { "williamboman/mason.nvim", + opts = { ensure_installed = { "gitui" } }, keys = { { "gG", @@ -83,10 +81,6 @@ end end, }) end, - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "gitui" }) - end, } ``` diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index b10a4cb592..10c59b5b39 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -87,7 +87,6 @@ end -- auto_brackets = { "python" } -- } -- ``` - opts = function() vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 1b4c2d2f9a..4fa255ea01 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -474,7 +474,6 @@ opts = { ensure_installed = { "stylua", "shfmt", - -- "flake8", }, } ``` @@ -491,11 +490,11 @@ opts = { cmd = "Mason", keys = { { "cm", "Mason", desc = "Mason" } }, build = ":MasonUpdate", + opts_extend = { "ensure_installed" }, opts = { ensure_installed = { "stylua", "shfmt", - -- "flake8", }, }, ---@param opts MasonSettings | {ensure_installed: string[]} diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index cfd5831baa..b43d931de8 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -93,6 +93,7 @@ opts = { { "", desc = "Increment Selection" }, { "", desc = "Decrement Selection", mode = "x" }, }, + opts_extend = { "ensure_installed" }, ---@type TSConfig ---@diagnostic disable-next-line: missing-fields opts = { From 8680c7c2039adb1a18c3d71431144a42316139ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 09:17:43 +0000 Subject: [PATCH 131/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/keymaps.md | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 276a535945..af2fbfb84e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -368,7 +368,6 @@ map("n", "w|", "v", { desc = "Split Window Right", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) -map("n", "m", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 37e0410896..2c24c06604 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -98,7 +98,6 @@ possible keymaps starting with ``. | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | | <leader>wm | Maximize Toggle | **n** | -| <leader>m | Maximize Toggle | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | From a9ec569fcae13b050b82871ed0c8fb203fe8a311 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 10:17:44 +0000 Subject: [PATCH 132/553] chore(build): auto-generate docs --- docs/extras/editor/aerial.md | 72 +++++++++++++++++++----------------- docs/extras/editor/navic.md | 36 ++++++++++-------- 2 files changed, 58 insertions(+), 50 deletions(-) diff --git a/docs/extras/editor/aerial.md b/docs/extras/editor/aerial.md index 3423e645b5..997733a831 100644 --- a/docs/extras/editor/aerial.md +++ b/docs/extras/editor/aerial.md @@ -287,40 +287,7 @@ end ```lua opts = function(_, opts) - table.insert(opts.sections.lualine_c, { - "aerial", - sep = " ", -- separator between symbols - sep_icon = "", -- separator between icon and symbol - - -- The number of symbols to render top-down. In order to render only 'N' last - -- symbols, negative numbers may be supplied. For instance, 'depth = -1' can - -- be used in order to render only current symbol. - depth = 5, - - -- When 'dense' mode is on, icons are not rendered near their symbols. Only - -- a single icon that represents the kind of current symbol is rendered at - -- the beginning of status line. - dense = false, - - -- The separator to be used to separate symbols in dense mode. - dense_sep = ".", - - -- Color the symbol icons. - colored = true, - }) -end -``` - - - - - - -```lua -{ - "nvim-lualine/lualine.nvim", - optional = true, - opts = function(_, opts) + if not vim.g.trouble_lualine then table.insert(opts.sections.lualine_c, { "aerial", sep = " ", -- separator between symbols @@ -342,6 +309,43 @@ end -- Color the symbol icons. colored = true, }) + end +end +``` + + + + + + +```lua +{ + "nvim-lualine/lualine.nvim", + optional = true, + opts = function(_, opts) + if not vim.g.trouble_lualine then + table.insert(opts.sections.lualine_c, { + "aerial", + sep = " ", -- separator between symbols + sep_icon = "", -- separator between icon and symbol + + -- The number of symbols to render top-down. In order to render only 'N' last + -- symbols, negative numbers may be supplied. For instance, 'depth = -1' can + -- be used in order to render only current symbol. + depth = 5, + + -- When 'dense' mode is on, icons are not rendered near their symbols. Only + -- a single icon that represents the kind of current symbol is rendered at + -- the beginning of status line. + dense = false, + + -- The separator to be used to separate symbols in dense mode. + dense_sep = ".", + + -- Color the symbol icons. + colored = true, + }) + end end, } ``` diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index 761f8b93fa..c7a905169f 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -99,14 +99,16 @@ end ```lua opts = function(_, opts) - table.insert(opts.sections.lualine_c, { - function() - return require("nvim-navic").get_location() - end, - cond = function() - return package.loaded["nvim-navic"] and require("nvim-navic").is_available() - end, - }) + if not vim.g.trouble_lualine then + table.insert(opts.sections.lualine_c, { + function() + return require("nvim-navic").get_location() + end, + cond = function() + return package.loaded["nvim-navic"] and require("nvim-navic").is_available() + end, + }) + end end ``` @@ -120,14 +122,16 @@ end "nvim-lualine/lualine.nvim", optional = true, opts = function(_, opts) - table.insert(opts.sections.lualine_c, { - function() - return require("nvim-navic").get_location() - end, - cond = function() - return package.loaded["nvim-navic"] and require("nvim-navic").is_available() - end, - }) + if not vim.g.trouble_lualine then + table.insert(opts.sections.lualine_c, { + function() + return require("nvim-navic").get_location() + end, + cond = function() + return package.loaded["nvim-navic"] and require("nvim-navic").is_available() + end, + }) + end end, } ``` From 72ed995582c2e0a72f4ffb3c3de686e2111736c4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 12:32:53 +0000 Subject: [PATCH 133/553] chore(build): auto-generate docs --- docs/extras/util/octo.md | 4 ++-- docs/keymaps.md | 4 ++-- docs/plugins/editor.md | 8 ++++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index ba38d47a4c..0416f9b5bc 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -74,8 +74,8 @@ opts = { picker = "telescope", }, keys = { - { "gi", "Octo issue list", desc = "List Isues (Octo)" }, - { "gI", "Octo issue search", desc = "Search Isues (Octo)" }, + { "gi", "Octo issue list", desc = "List Issues (Octo)" }, + { "gI", "Octo issue search", desc = "Search Issues (Octo)" }, { "gp", "Octo pr list", desc = "List PRs (Octo)" }, { "gP", "Octo pr search", desc = "Search PRs (Octo)" }, { "gr", "Octo repo list", desc = "List Repos (Octo)" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 2c24c06604..b5ff66179b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -594,8 +594,8 @@ Part of [lazyvim.plugins.extras.util.octo](/extras/util/octo) | --- | --- | --- | | <leader>a | +assignee (Otco) | **n** | | <leader>c | +comment/code (Otco) | **n** | -| <leader>gi | List Isues (Octo) | **n** | -| <leader>gI | Search Isues (Octo) | **n** | +| <leader>gi | List Issues (Octo) | **n** | +| <leader>gI | Search Issues (Octo) | **n** | | <leader>gp | List PRs (Octo) | **n** | | <leader>gP | Search PRs (Octo) | **n** | | <leader>gr | List Repos (Octo) | **n** | diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 01962a8b54..79bea3f775 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -619,7 +619,9 @@ opts = {} opts = function() local actions = require("telescope.actions") - local open_with_trouble = require("trouble.sources.telescope").open + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() @@ -769,7 +771,9 @@ end opts = function() local actions = require("telescope.actions") - local open_with_trouble = require("trouble.sources.telescope").open + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() From 92042e18e50d6cb0b242bb8b2f5ea9fffd55cfb9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 14:16:15 +0000 Subject: [PATCH 134/553] chore(build): auto-generate docs --- docs/extras/util/octo.md | 14 +++++++------- docs/keymaps.md | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 0416f9b5bc..fbe3d3ccc9 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -81,13 +81,13 @@ opts = { { "gr", "Octo repo list", desc = "List Repos (Octo)" }, { "gS", "Octo search", desc = "Search (Octo)" }, - { "a", "", desc = "+assignee (Otco)", ft = "octo" }, - { "c", "", desc = "+comment/code (Otco)", ft = "octo" }, - { "l", "", desc = "+label (Otco)", ft = "octo" }, - { "i", "", desc = "+issue (Otco)", ft = "octo" }, - { "r", "", desc = "+react (Otco)", ft = "octo" }, - { "p", "", desc = "+pr (Otco)", ft = "octo" }, - { "v", "", desc = "+review (Otco)", ft = "octo" }, + { "a", "", desc = "+assignee (Octo)", ft = "octo" }, + { "c", "", desc = "+comment/code (Octo)", ft = "octo" }, + { "l", "", desc = "+label (Octo)", ft = "octo" }, + { "i", "", desc = "+issue (Octo)", ft = "octo" }, + { "r", "", desc = "+react (Octo)", ft = "octo" }, + { "p", "", desc = "+pr (Octo)", ft = "octo" }, + { "v", "", desc = "+review (Octo)", ft = "octo" }, { "@", "@", mode = "i", ft = "octo", silent = true }, { "#", "#", mode = "i", ft = "octo", silent = true }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index b5ff66179b..cce0603c11 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -592,19 +592,19 @@ Part of [lazyvim.plugins.extras.util.octo](/extras/util/octo) | Key | Description | Mode | | --- | --- | --- | -| <leader>a | +assignee (Otco) | **n** | -| <leader>c | +comment/code (Otco) | **n** | +| <leader>a | +assignee (Octo) | **n** | +| <leader>c | +comment/code (Octo) | **n** | | <leader>gi | List Issues (Octo) | **n** | | <leader>gI | Search Issues (Octo) | **n** | | <leader>gp | List PRs (Octo) | **n** | | <leader>gP | Search PRs (Octo) | **n** | | <leader>gr | List Repos (Octo) | **n** | | <leader>gS | Search (Octo) | **n** | -| <leader>i | +issue (Otco) | **n** | -| <leader>l | +label (Otco) | **n** | -| <leader>p | +pr (Otco) | **n** | -| <leader>r | +react (Otco) | **n** | -| <leader>v | +review (Otco) | **n** | +| <leader>i | +issue (Octo) | **n** | +| <leader>l | +label (Octo) | **n** | +| <leader>p | +pr (Octo) | **n** | +| <leader>r | +react (Octo) | **n** | +| <leader>v | +review (Octo) | **n** | ## [project.nvim](https://github.com/ahmedkhalf/project.nvim.git) Part of [lazyvim.plugins.extras.util.project](/extras/util/project) From 5312915d30b00c97e99f24d1514447a496eb2d9b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 16:19:39 +0000 Subject: [PATCH 135/553] chore(build): auto-generate docs --- docs/extras/lang/clojure.md | 292 ++++++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 docs/extras/lang/clojure.md diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md new file mode 100644 index 0000000000..3623025e97 --- /dev/null +++ b/docs/extras/lang/clojure.md @@ -0,0 +1,292 @@ +# `Clojure` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.clojure" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 Clojure & related to treesitter + + + + + + +```lua +opts = { ensure_installed = { "clojure" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "clojure" } }, +} +``` + + + + + +## [cmp-conjure](https://github.com/PaterJason/cmp-conjure) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "PaterJason/cmp-conjure", +} +``` + + + + + +## [rainbow-delimiters.nvim](https://github.com/HiPhish/rainbow-delimiters.nvim) + + Enable rainbow parenthesis + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "HiPhish/rainbow-delimiters.nvim" } +``` + + + + + +## [nvim-treesitter-sexp](https://github.com/PaterJason/nvim-treesitter-sexp) + + Add s-exp mappings + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "PaterJason/nvim-treesitter-sexp" } +``` + + + + + +## [baleia.nvim](https://github.com/m00qek/baleia.nvim) + + Colorize the output of the log buffer + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "m00qek/baleia.nvim", + config = function() + vim.g.conjure_baleia = require("baleia").setup({ line_starts_at = 3 }) + + vim.api.nvim_create_user_command("BaleiaColorize", function() + vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf()) + end, { bang = true }) + + vim.api.nvim_create_user_command("BaleiaLogs", vim.g.conjure_baleia.logger.show, { bang = true }) + end, +} +``` + + + + + +## [conjure](https://github.com/Olical/conjure) + + Use Clojure REPL + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "Olical/conjure", + config = function(_, _) + require("conjure.main").main() + require("conjure.mapping")["on-filetype"]() + end, + init = function() + -- print color codes if baleia.nvim is available + local colorize = require("lazyvim.util").has("baleia.nvim") + + if colorize then + vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = 0 + else + vim.g["conjure#log#strip_ansi_escape_sequences_line_limit"] = 1 + end + + -- disable diagnostics in log buffer and colorize it + vim.api.nvim_create_autocmd({ "BufWinEnter" }, { + pattern = "conjure-log-*", + callback = function() + local buffer = vim.api.nvim_get_current_buf() + vim.diagnostic.enable(false, { bufnr = buffer }) + + if colorize and vim.g.conjure_baleia then + vim.g.conjure_baleia.automatically(buffer) + end + + vim.keymap.set( + { "n", "v" }, + "[c", + "call search('^; -\\+$', 'bw')", + { silent = true, buffer = true, desc = "Jumps to the begining of previous evaluation output." } + ) + vim.keymap.set( + { "n", "v" }, + "]c", + "call search('^; -\\+$', 'w')", + { silent = true, buffer = true, desc = "Jumps to the begining of next evaluation output." } + ) + end, + }) + + -- prefer LSP for jump-to-definition and symbol-doc, and use conjure + -- alternatives with K and gd + vim.g["conjure#mapping#doc_word"] = "K" + vim.g["conjure#mapping#def_word"] = "gd" + end, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + Extend auto completion + + + + + + +```lua +opts = function(_, opts) + if type(opts.sources) == "table" then + vim.list_extend(opts.sources, { name = "clojure" }) + end +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { + "PaterJason/cmp-conjure", + }, + opts = function(_, opts) + if type(opts.sources) == "table" then + vim.list_extend(opts.sources, { name = "clojure" }) + end + end, +} +``` + + + + + + From 32da6a10eb4d340377949d6efeff347808424629 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 21:17:24 +0000 Subject: [PATCH 136/553] chore(build): auto-generate docs --- docs/extras/formatting/prettier.md | 140 +++++++++++------------------ docs/extras/lang/astro.md | 36 ++++++++ docs/extras/lang/clojure.md | 42 +++------ docs/extras/lang/svelte.md | 36 ++++++++ docs/plugins/coding.md | 8 +- 5 files changed, 139 insertions(+), 123 deletions(-) diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index 05c39ee7ec..602fd22591 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -27,10 +27,9 @@ require("lazy").setup({ Additional options for this extra can be configured in your [lua/config/options.lua](/configuration/general#options) file: ```lua title="lua/config/options.lua" --- By default, prettier will only be used for formatting --- if a prettier configuration file is found in the project. --- Set to `false` to always use prettier for supported filetypes. -vim.g.lazyvim_prettier_needs_config = true +-- Enable the option to require a Prettier config file +-- If no prettier config file is found, the formatter will not be used +vim.g.lazyvim_prettier_needs_config = false ``` Below you can find a list of included plugins and their default settings. @@ -50,9 +49,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function(_, opts) - table.insert(opts.ensure_installed, "prettier") -end +opts = { ensure_installed = { "prettier" } } ``` @@ -63,9 +60,7 @@ end ```lua { "williamboman/mason.nvim", - opts = function(_, opts) - table.insert(opts.ensure_installed, "prettier") - end, + opts = { ensure_installed = { "prettier" } }, } ``` @@ -73,7 +68,10 @@ end
-## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + conform + @@ -81,9 +79,18 @@ end ```lua opts = function(_, opts) - local nls = require("null-ls") - opts.sources = opts.sources or {} - table.insert(opts.sources, nls.builtins.formatting.prettier) + opts.formatters_by_ft = opts.formatters_by_ft or {} + for _, ft in ipairs(supported) do + opts.formatters_by_ft[ft] = { "prettier" } + end + + opts.formatters = { + prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, + }, + } end ``` @@ -94,12 +101,22 @@ end ```lua { - "nvimtools/none-ls.nvim", + "stevearc/conform.nvim", optional = true, + ---@param opts ConformOpts opts = function(_, opts) - local nls = require("null-ls") - opts.sources = opts.sources or {} - table.insert(opts.sources, nls.builtins.formatting.prettier) + opts.formatters_by_ft = opts.formatters_by_ft or {} + for _, ft in ipairs(supported) do + opts.formatters_by_ft[ft] = { "prettier" } + end + + opts.formatters = { + prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, + }, + } end, } ``` @@ -108,48 +125,21 @@ end -## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ +## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ + + none-ls support + ```lua -opts = { - formatters_by_ft = { - ["javascript"] = { "prettier" }, - ["javascriptreact"] = { "prettier" }, - ["typescript"] = { "prettier" }, - ["typescriptreact"] = { "prettier" }, - ["vue"] = { "prettier" }, - ["css"] = { "prettier" }, - ["scss"] = { "prettier" }, - ["less"] = { "prettier" }, - ["html"] = { "prettier" }, - ["json"] = { "prettier" }, - ["jsonc"] = { "prettier" }, - ["yaml"] = { "prettier" }, - ["markdown"] = { "prettier" }, - ["markdown.mdx"] = { "prettier" }, - ["graphql"] = { "prettier" }, - ["handlebars"] = { "prettier" }, - ["svelte"] = { "prettier" }, - }, - formatters = { - prettier = { - condition = function(_, ctx) - if not needs_config then - return true - end - if enabled[ctx.filename] == nil then - vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) - enabled[ctx.filename] = vim.v.shell_error == 0 - end - return enabled[ctx.filename] - end, - }, - }, -} +opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.formatting.prettier) +end ``` @@ -159,43 +149,13 @@ opts = { ```lua { - "stevearc/conform.nvim", + "nvimtools/none-ls.nvim", optional = true, - opts = { - formatters_by_ft = { - ["javascript"] = { "prettier" }, - ["javascriptreact"] = { "prettier" }, - ["typescript"] = { "prettier" }, - ["typescriptreact"] = { "prettier" }, - ["vue"] = { "prettier" }, - ["css"] = { "prettier" }, - ["scss"] = { "prettier" }, - ["less"] = { "prettier" }, - ["html"] = { "prettier" }, - ["json"] = { "prettier" }, - ["jsonc"] = { "prettier" }, - ["yaml"] = { "prettier" }, - ["markdown"] = { "prettier" }, - ["markdown.mdx"] = { "prettier" }, - ["graphql"] = { "prettier" }, - ["handlebars"] = { "prettier" }, - ["svelte"] = { "prettier" }, - }, - formatters = { - prettier = { - condition = function(_, ctx) - if not needs_config then - return true - end - if enabled[ctx.filename] == nil then - vim.fn.system({ "prettier", "--find-config-path", ctx.filename }) - enabled[ctx.filename] = vim.v.shell_error == 0 - end - return enabled[ctx.filename] - end, - }, - }, - }, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.formatting.prettier) + end, } ``` diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index b006722da2..fc869d7388 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -144,4 +144,40 @@ end +## [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.astro = { "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.astro = { "prettier" } + end + end, +} +``` + + + + + diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index 3623025e97..d7401d7e6a 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -86,32 +86,6 @@ opts = nil
-## [rainbow-delimiters.nvim](https://github.com/HiPhish/rainbow-delimiters.nvim) - - Enable rainbow parenthesis - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "HiPhish/rainbow-delimiters.nvim" } -``` - - - - - ## [nvim-treesitter-sexp](https://github.com/PaterJason/nvim-treesitter-sexp) Add s-exp mappings @@ -122,7 +96,7 @@ opts = nil ```lua -opts = nil +opts = {} ``` @@ -131,7 +105,7 @@ opts = nil ```lua -{ "PaterJason/nvim-treesitter-sexp" } +{ "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" } ``` @@ -148,7 +122,9 @@ opts = nil ```lua -opts = {} +opts = { + line_starts_at = 3, +} ``` @@ -159,8 +135,11 @@ opts = {} ```lua { "m00qek/baleia.nvim", - config = function() - vim.g.conjure_baleia = require("baleia").setup({ line_starts_at = 3 }) + opts = { + line_starts_at = 3, + }, + config = function(_, opts) + vim.g.conjure_baleia = require("baleia").setup(opts) vim.api.nvim_create_user_command("BaleiaColorize", function() vim.g.conjure_baleia.once(vim.api.nvim_get_current_buf()) @@ -196,6 +175,7 @@ opts = {} ```lua { "Olical/conjure", + event = "LazyFile", config = function(_, _) require("conjure.main").main() require("conjure.mapping")["on-filetype"]() diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index f116f13372..e36da298c7 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -170,4 +170,40 @@ end
+## [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.svelte = { "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.svelte = { "prettier" } + end + end, +} +``` + + + + + diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 10c59b5b39..9214ea110b 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -255,7 +255,9 @@ opts = function(_, opts) return LazyVim.cmp.expand(item.body) end, } - table.insert(opts.sources, { name = "snippets" }) + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end end ``` @@ -282,7 +284,9 @@ end return LazyVim.cmp.expand(item.body) end, } - table.insert(opts.sources, { name = "snippets" }) + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end end, keys = { { From b5234480801773c1d195db0a3c5a9cf804c03cc5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 7 Jun 2024 23:38:48 +0200 Subject: [PATCH 137/553] feat: added news section --- docs/news.md | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++ lua/build.lua | 5 ++ 2 files changed, 165 insertions(+) create mode 100644 docs/news.md diff --git a/docs/news.md b/docs/news.md new file mode 100644 index 0000000000..d0e93202b5 --- /dev/null +++ b/docs/news.md @@ -0,0 +1,160 @@ +--- +sidebar_position: 2 +--- + +# 🗞️What's new? + +## 11.x + +- **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) + instead of `neodev.nvim` + +- moved `neoconf.nvim` to extras. Project specific LSP settings + can be done with a `.lazy.lua` file instead. + +- `mini.ai` is back as a default plugin! Removing it was a mistake. + 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 + - **Plugins**: other plugin extras + - **Languages**: other language extras + +- new option `vim.g.deprecation_warnings` to disable deprecation warnings + Defaults to `false`. To enable deprecation warnings, set it to `true` in your `options.lua` + +- `vim-illuminate` move to extras + Document highlights now use native lsp functionality by default + +Since Neovim 0.10 has been released, I've been working on a new version of **LazyVim** +that is fully compatible with all the latest Neovim features. + +Additionally, some core plugins have been moved to extras. + +- `native snippets` are now the default on Neovim 0.10 + Older versions of Neovim will use the new `luasnip` extra. + +- `native comments` are now the default on Neovim 0.10 + Older versions of Neovim will use the new `mini-comment` extra. + `nvim-ts-context-commentstring` has been integrated in the native comments. + +- `inlay hints` have been in **LazyVim** for a while, but are now + enabled by default. To disable them: + + ```lua + { + "nvim-lspconfig", + opts = { + inlay_hints = { enabled = false }, + } + } + ``` + +- plugins moved to extras: + + - `mini.surround` + - `mini.indentscope` scopes are now also highlighted with `indent-blankline` + - `nvim-treesitter-context` + +## 10.x + +- added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md) + This is a plugin similar to gitsigns but with a neat diff overlay + that can be toggled with `go`. + +- **trouble.nvim** has been rewritten from scratch and is now in beta. + I've added a new extra for it (`trouble-v3`) for those of you who want to try it out. + 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 + +- The option `vim.g.lazygit_theme` was renamed to `vim.g.lazygit_config` + +- **lazygit** now automatically uses the colors of your current colorscheme. + This is enabled by default. To disable, add the below to your `options.lua`: + + ```lua + vim.g.lazygit_config = false + ``` + +- Added support for `basedpyright` to the **python** extra. + Enable in your `options.lua` with: + + ```lua + vim.g.lazyvim_python_lsp = "basedpyright" + ``` + + Be aware that `basedpyright` is still in development and + may not work exactly the same as `pyright`. + +- User extras under `lua/plugins/extras` can now also be managed + with **LazyExtras** + +- `nvim-ts-autotag` is now included by default + +- `nvim-treesitter-context` is now included by default + +- Added extra for `symbols-outline.nvim` + +- Added extra for `aerial.nvim` + +- `nvim-navic` has been removed. If you want to keep using `nvim-navic`, + you can enable the **editor.navic** extra + +- 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, ...)_ + + - **LazyVim** automatically selects the primary formatter based on the + current available sources and priorities. + + - New `:LazyFormat` command for formatting the current selection or buffer + - New `:LazyFormatInfo` command for displaying the active formatters + for the current buffer + - Auto-formatting can be disabled with: + + ```lua + vim.g.autoformat = false -- globally + vim.b.autoformat = false -- buffer-local + ``` + +- `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` + + ```lua + -- LazyVim root dir detection + -- Each entry can be: + -- * the name of a detector function like `lsp` or `cwd` + -- * a pattern or array of patterns like `.git` or `lua`. + -- * a function with signature `function(buf) -> string|string[]` + vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } + + -- To disable root detection set to just "cwd" + vim.g.root_spec = { "cwd" } + ``` diff --git a/lua/build.lua b/lua/build.lua index dcc76a05fb..edcf9a2e9a 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -233,6 +233,11 @@ function M.extract_options(extra_file) end function M.update() + local news = Util.read_file(rootLazyVim .. "/NEWS.md") + news = "---\nsidebar_position: 2\n---\n\n" .. news + news = news:gsub("# What's new", "# 📰 What's new") + Util.write_file("docs/news.md", news) + local Plugin = require("lazy.core.plugin") --- include all specs --- From b949366e8864d0f253b80aa52bca624368bbf8e7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 21:39:09 +0000 Subject: [PATCH 138/553] chore(build): auto-generate docs --- docs/extras/formatting/prettier.md | 22 ++++++++++------------ docs/news.md | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index 602fd22591..4568b35f25 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -84,12 +84,11 @@ opts = function(_, opts) opts.formatters_by_ft[ft] = { "prettier" } end - opts.formatters = { - prettier = { - condition = function(_, ctx) - return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) - end, - }, + opts.formatters = opts.formatters or {} + opts.formatters.prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, } end ``` @@ -110,12 +109,11 @@ end opts.formatters_by_ft[ft] = { "prettier" } end - opts.formatters = { - prettier = { - condition = function(_, ctx) - return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) - end, - }, + opts.formatters = opts.formatters or {} + opts.formatters.prettier = { + condition = function(_, ctx) + return M.has_parser(ctx) and (vim.g.lazyvim_prettier_needs_config ~= true or M.has_config(ctx)) + end, } end, } diff --git a/docs/news.md b/docs/news.md index d0e93202b5..91bfbe5ab8 100644 --- a/docs/news.md +++ b/docs/news.md @@ -2,7 +2,7 @@ sidebar_position: 2 --- -# 🗞️What's new? +# 📰 What's new? ## 11.x From 4f68b2d8b7c34f84081d14746ebd4cb3fbf28c9c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 21:55:32 +0000 Subject: [PATCH 139/553] chore(build): auto-generate docs --- docs/news.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/news.md b/docs/news.md index 91bfbe5ab8..a8d63b4fee 100644 --- a/docs/news.md +++ b/docs/news.md @@ -6,6 +6,27 @@ sidebar_position: 2 ## 11.x +- **prettier** extra now works for all prettier supported filetypes + and will be enabled for astro/svelte extra if you have a proper + config file with the correct prettier plugin + +- **New Language Support:** SQL, Clojure, Thrift, Elm, Gleam, Angular, + NuShell, Svelte, Kotlin, Astro, Toml and PHP + +- The **typescript** extra now uses `vtsls` instead of `tsserver` + +- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` + +- **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 + +- **lazydev.nvim:** faster alternative to `neodev.nvim` + +- **Options:** Added `linebreak=true` to default options. + - **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) instead of `neodev.nvim` From 486fcc314ef8434a4988c89531fdb6814a9abc42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Jun 2024 22:16:08 +0000 Subject: [PATCH 140/553] chore(build): auto-generate docs --- docs/news.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/news.md b/docs/news.md index a8d63b4fee..c14b25d9fa 100644 --- a/docs/news.md +++ b/docs/news.md @@ -4,7 +4,9 @@ sidebar_position: 2 # 📰 What's new? -## 11.x +## 12.x + +- This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news) - **prettier** extra now works for all prettier supported filetypes and will be enabled for astro/svelte extra if you have a proper @@ -13,9 +15,17 @@ sidebar_position: 2 - **New Language Support:** SQL, Clojure, Thrift, Elm, Gleam, Angular, NuShell, Svelte, Kotlin, Astro, Toml and PHP +- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` + - The **typescript** extra now uses `vtsls` instead of `tsserver` -- **New Extras:** `copilot-chat`, `git`, `octo`, `inc-rename` and `neogen` +- **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) + instead of `neodev.nvim` + +- moved `neoconf.nvim` to extras. Project specific LSP settings + can be done with a `.lazy.lua` file instead. + +## 11.x - **Keymaps:** @@ -27,12 +37,6 @@ sidebar_position: 2 - **Options:** Added `linebreak=true` to default options. -- **Neovim >= 0.10** now uses the much faster [lazydev.nvim](https://github.com/folke/lazydev.nvim) - instead of `neodev.nvim` - -- moved `neoconf.nvim` to extras. Project specific LSP settings - can be done with a `.lazy.lua` file instead. - - `mini.ai` is back as a default plugin! Removing it was a mistake. It's a great plugin that enhances the native text objects. From 3db483628f43a39dc764016c592d1b0010e9d03b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Jun 2024 06:21:20 +0000 Subject: [PATCH 141/553] chore(build): auto-generate docs --- docs/extras/coding/copilot.md | 12 ++-- docs/extras/lang/angular.md | 16 ++---- docs/extras/lang/go.md | 48 ++++++++-------- docs/extras/lang/helm.md | 24 +++++++- docs/extras/lang/python.md | 16 ++---- docs/extras/lang/typescript.md | 100 +++++++++++++++++++++++++++++++++ docs/extras/lang/yaml.md | 12 ++-- 7 files changed, 164 insertions(+), 64 deletions(-) diff --git a/docs/extras/coding/copilot.md b/docs/extras/coding/copilot.md index b4216b8a34..d949b42aa7 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/coding/copilot.md @@ -115,10 +115,8 @@ end -- attach cmp source whenever copilot attaches -- fixes lazy-loading issues with the copilot cmp source LazyVim.lsp.on_attach(function(client) - if client.name == "copilot" then - copilot_cmp._on_insert_enter({}) - end - end) + copilot_cmp._on_insert_enter({}) + end, "copilot") end, }, }, @@ -163,10 +161,8 @@ opts = {} -- attach cmp source whenever copilot attaches -- fixes lazy-loading issues with the copilot cmp source LazyVim.lsp.on_attach(function(client) - if client.name == "copilot" then - copilot_cmp._on_insert_enter({}) - end - end) + copilot_cmp._on_insert_enter({}) + end, "copilot") end, } ``` diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index 998a40e2ea..ff4d06849c 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -99,11 +99,9 @@ opts = { setup = { angularls = function() LazyVim.lsp.on_attach(function(client) - if client.name == "angularls" then - --HACK: disable angular renaming capability due to duplicate rename popping up - client.server_capabilities.renameProvider = false - end - end) + --HACK: disable angular renaming capability due to duplicate rename popping up + client.server_capabilities.renameProvider = false + end, "angularls") end, }, } @@ -124,11 +122,9 @@ opts = { setup = { angularls = function() LazyVim.lsp.on_attach(function(client) - if client.name == "angularls" then - --HACK: disable angular renaming capability due to duplicate rename popping up - client.server_capabilities.renameProvider = false - end - end) + --HACK: disable angular renaming capability due to duplicate rename popping up + client.server_capabilities.renameProvider = false + end, "angularls") end, }, }, diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 0660173d1b..42718e4ceb 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -115,20 +115,18 @@ opts = { -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 LazyVim.lsp.on_attach(function(client, _) - if client.name == "gopls" then - if not client.server_capabilities.semanticTokensProvider then - local semantic = client.config.capabilities.textDocument.semanticTokens - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - tokenTypes = semantic.tokenTypes, - tokenModifiers = semantic.tokenModifiers, - }, - range = true, - } - end + if not client.server_capabilities.semanticTokensProvider then + local semantic = client.config.capabilities.textDocument.semanticTokens + client.server_capabilities.semanticTokensProvider = { + full = true, + legend = { + tokenTypes = semantic.tokenTypes, + tokenModifiers = semantic.tokenModifiers, + }, + range = true, + } end - end) + end, "gopls") -- end workaround end, }, @@ -193,20 +191,18 @@ opts = { -- workaround for gopls not supporting semanticTokensProvider -- https://github.com/golang/go/issues/54531#issuecomment-1464982242 LazyVim.lsp.on_attach(function(client, _) - if client.name == "gopls" then - if not client.server_capabilities.semanticTokensProvider then - local semantic = client.config.capabilities.textDocument.semanticTokens - client.server_capabilities.semanticTokensProvider = { - full = true, - legend = { - tokenTypes = semantic.tokenTypes, - tokenModifiers = semantic.tokenModifiers, - }, - range = true, - } - end + if not client.server_capabilities.semanticTokensProvider then + local semantic = client.config.capabilities.textDocument.semanticTokens + client.server_capabilities.semanticTokensProvider = { + full = true, + legend = { + tokenTypes = semantic.tokenTypes, + tokenModifiers = semantic.tokenModifiers, + }, + range = true, + } end - end) + end, "gopls") -- end workaround end, }, diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index 3c98b3ae80..095f4cc341 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -67,9 +67,19 @@ opts = { ensure_installed = { "helm" } } ```lua opts = { servers = { - yamlls = {}, 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, + }, } ``` @@ -83,9 +93,19 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - yamlls = {}, 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/python.md b/docs/extras/lang/python.md index 3430411c82..8e222d1494 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -106,11 +106,9 @@ opts = { setup = { [ruff] = function() LazyVim.lsp.on_attach(function(client, _) - if client.name == ruff then - -- Disable hover in favor of Pyright - client.server_capabilities.hoverProvider = false - end - end) + -- Disable hover in favor of Pyright + client.server_capabilities.hoverProvider = false + end, ruff) end, }, } @@ -154,11 +152,9 @@ opts = { setup = { [ruff] = function() LazyVim.lsp.on_attach(function(client, _) - if client.name == ruff then - -- Disable hover in favor of Pyright - client.server_capabilities.hoverProvider = false - end - end) + -- Disable hover in favor of Pyright + client.server_capabilities.hoverProvider = false + end, ruff) end, }, }, diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 60db681b0a..f9d11ac8e3 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -145,6 +145,56 @@ opts = { return true end, vtsls = function(_, opts) + LazyVim.lsp.on_attach(function(client, buffer) + client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) + ---@type string, string, lsp.Range + local action, uri, range = unpack(command.arguments) + + local function move(newf) + client.request("workspace/executeCommand", { + command = command.command, + arguments = { action, uri, range, newf }, + }) + end + + local fname = vim.uri_to_fname(uri) + client.request("workspace/executeCommand", { + command = "typescript.tsserverRequest", + arguments = { + "getMoveToRefactoringFileSuggestions", + { + file = fname, + startLine = range.start.line + 1, + startOffset = range.start.character + 1, + endLine = range["end"].line + 1, + endOffset = range["end"].character + 1, + }, + }, + }, function(_, result) + ---@type string[] + local files = result.body.files + table.insert(files, 1, "Enter new path...") + vim.ui.select(files, { + prompt = "Select move destination:", + format_item = function(f) + return vim.fn.fnamemodify(f, ":~:.") + end, + }, function(f) + if f and f:find("^Enter new path") then + vim.ui.input({ + prompt = "Enter move destination:", + default = vim.fn.fnamemodify(fname, ":h") .. "/", + completion = "file", + }, function(newf) + return newf and move(newf) + end) + elseif f then + move(f) + end + end) + end) + end + end, "vtsls") -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) @@ -264,6 +314,56 @@ opts = { return true end, vtsls = function(_, opts) + LazyVim.lsp.on_attach(function(client, buffer) + client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) + ---@type string, string, lsp.Range + local action, uri, range = unpack(command.arguments) + + local function move(newf) + client.request("workspace/executeCommand", { + command = command.command, + arguments = { action, uri, range, newf }, + }) + end + + local fname = vim.uri_to_fname(uri) + client.request("workspace/executeCommand", { + command = "typescript.tsserverRequest", + arguments = { + "getMoveToRefactoringFileSuggestions", + { + file = fname, + startLine = range.start.line + 1, + startOffset = range.start.character + 1, + endLine = range["end"].line + 1, + endOffset = range["end"].character + 1, + }, + }, + }, function(_, result) + ---@type string[] + local files = result.body.files + table.insert(files, 1, "Enter new path...") + vim.ui.select(files, { + prompt = "Select move destination:", + format_item = function(f) + return vim.fn.fnamemodify(f, ":~:.") + end, + }, function(f) + if f and f:find("^Enter new path") then + vim.ui.input({ + prompt = "Enter move destination:", + default = vim.fn.fnamemodify(fname, ":h") .. "/", + completion = "file", + }, function(newf) + return newf and move(newf) + end) + elseif f then + move(f) + end + end) + end) + end + end, "vtsls") -- copy typescript settings to javascript opts.settings.javascript = vim.tbl_deep_extend("force", {}, opts.settings.typescript, opts.settings.javascript or {}) diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 99c20eb993..0349298a18 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -117,10 +117,8 @@ opts = { -- 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, _) - if client.name == "yamlls" then - client.server_capabilities.documentFormattingProvider = true - end - end) + client.server_capabilities.documentFormattingProvider = true + end, "yamlls") end end, }, @@ -180,10 +178,8 @@ opts = { -- 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, _) - if client.name == "yamlls" then - client.server_capabilities.documentFormattingProvider = true - end - end) + client.server_capabilities.documentFormattingProvider = true + end, "yamlls") end end, }, From 1169c2e8e7bc816231c7bc9b264604fd5f3e315b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Jun 2024 08:18:46 +0000 Subject: [PATCH 142/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 2 +- docs/extras/editor/refactoring.md | 2 +- docs/keymaps.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 0c0a970641..e6603a745e 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -90,7 +90,7 @@ opts = {} -- stylua: ignore keys = { - { "d", "", desc = "+debug" }, + { "d", "", desc = "+debug", mode = {"n", "v"} }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dc", function() require("dap").continue() end, desc = "Continue" }, diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index ccfe144e47..19c5fd6838 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -79,7 +79,7 @@ opts = { "nvim-treesitter/nvim-treesitter", }, keys = { - { "r", "", desc = "+refactor" }, + { "r", "", desc = "+refactor", mode = { "n", "v" } }, { "rs", function() diff --git a/docs/keymaps.md b/docs/keymaps.md index cce0603c11..66b0545e1c 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -361,7 +361,7 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | Key | Description | Mode | | --- | --- | --- | -| <leader>d | +debug | **n** | +| <leader>d | +debug | **n**, **v** | | <leader>da | Run with Args | **n** | | <leader>db | Toggle Breakpoint | **n** | | <leader>dB | Breakpoint Condition | **n** | @@ -486,7 +486,7 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | Key | Description | Mode | | --- | --- | --- | -| <leader>r | +refactor | **n** | +| <leader>r | +refactor | **n**, **v** | | <leader>rb | Extract Block | **n** | | <leader>rc | Debug Cleanup | **n** | | <leader>rf | Extract Block To File | **n** | From d9fd10a5c00a471763582a3c3475dccedc40addb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Jun 2024 22:15:30 +0000 Subject: [PATCH 143/553] chore(build): auto-generate docs --- docs/extras/lang/angular.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index ff4d06849c..dd8093a64e 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -47,7 +47,7 @@ opts = function(_, opts) if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end - vim.api.nvim_create_autocmd("BufRead", { + vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, { pattern = { "*.component.html", "*.container.html" }, callback = function() vim.treesitter.start(nil, "angular") @@ -68,7 +68,7 @@ end if type(opts.ensure_installed) == "table" then vim.list_extend(opts.ensure_installed, { "angular", "scss" }) end - vim.api.nvim_create_autocmd("BufRead", { + vim.api.nvim_create_autocmd({ "BufReadPost", "BufNewFile" }, { pattern = { "*.component.html", "*.container.html" }, callback = function() vim.treesitter.start(nil, "angular") From 11ae61f8fbea7a1d7a2ce5ba49329f695c59938c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 06:21:59 +0000 Subject: [PATCH 144/553] chore(build): auto-generate docs --- docs/extras/lang/helm.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index 095f4cc341..878afb8af6 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -32,6 +32,29 @@ 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) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "towolf/vim-helm", ft = "helm" } +``` + + + + + ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) From 78fad8d7eb4e80fd2445bf8c320a5089f163a8fa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 07:15:12 +0000 Subject: [PATCH 145/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 41 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index f005cf894e..211ccc32d9 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -319,17 +319,18 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ - - Ensure Rust debugger is installed - +## [neotest](https://github.com/nvim-neotest/neotest) ```lua -opts = { ensure_installed = { "codelldb" } } +opts = { + adapters = { + ["rustaceanvim.neotest"] = {}, + }, +} ``` @@ -339,9 +340,12 @@ opts = { ensure_installed = { "codelldb" } } ```lua { - "williamboman/mason.nvim", - optional = true, - opts = { ensure_installed = { "codelldb" } }, + "nvim-neotest/neotest", + opts = { + adapters = { + ["rustaceanvim.neotest"] = {}, + }, + }, } ``` @@ -349,19 +353,17 @@ opts = { ensure_installed = { "codelldb" } } -## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ +## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ + + Ensure Rust debugger is installed + ```lua -opts = function(_, opts) - opts.adapters = opts.adapters or {} - vim.list_extend(opts.adapters, { - require("rustaceanvim.neotest"), - }) -end +opts = { ensure_installed = { "codelldb" } } ``` @@ -371,14 +373,9 @@ end ```lua { - "nvim-neotest/neotest", + "williamboman/mason.nvim", optional = true, - opts = function(_, opts) - opts.adapters = opts.adapters or {} - vim.list_extend(opts.adapters, { - require("rustaceanvim.neotest"), - }) - end, + opts = { ensure_installed = { "codelldb" } }, } ``` From 230c87b118cf14fb5d33e17d9626e68f38a84f7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 08:18:54 +0000 Subject: [PATCH 146/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 211ccc32d9..6e5dfb2092 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -319,18 +319,17 @@ opts = { -## [neotest](https://github.com/nvim-neotest/neotest) +## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ + + Ensure Rust debugger is installed + ```lua -opts = { - adapters = { - ["rustaceanvim.neotest"] = {}, - }, -} +opts = { ensure_installed = { "codelldb" } } ``` @@ -340,12 +339,9 @@ opts = { ```lua { - "nvim-neotest/neotest", - opts = { - adapters = { - ["rustaceanvim.neotest"] = {}, - }, - }, + "williamboman/mason.nvim", + optional = true, + opts = { ensure_installed = { "codelldb" } }, } ``` @@ -353,17 +349,18 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ - - Ensure Rust debugger is installed - +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ ```lua -opts = { ensure_installed = { "codelldb" } } +opts = { + adapters = { + ["rustaceanvim.neotest"] = {}, + }, +} ``` @@ -373,9 +370,13 @@ opts = { ensure_installed = { "codelldb" } } ```lua { - "williamboman/mason.nvim", + "nvim-neotest/neotest", optional = true, - opts = { ensure_installed = { "codelldb" } }, + opts = { + adapters = { + ["rustaceanvim.neotest"] = {}, + }, + }, } ``` From f1d10d4435c787bb5597c67a011932f57d2b5f0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 10:16:13 +0000 Subject: [PATCH 147/553] chore(build): auto-generate docs --- docs/extras/util/octo.md | 110 ++++++++------------------------------- 1 file changed, 22 insertions(+), 88 deletions(-) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index fbe3d3ccc9..38255b675a 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -116,53 +116,20 @@ opts = function(_, opts) else LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") end - local Signs = require("octo.ui.signs") - ---@type {buf: number, from: number, to: number, dirty: boolean}[] - local signs = {} - - local unplace = Signs.unplace - function Signs.unplace(bufnr) - signs = vim.tbl_filter(function(s) - return s.buf ~= bufnr - end, signs) - return unplace(bufnr) - end - - function Signs.place_signs(bufnr, start_line, end_line, is_dirty) - signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty } - end - -- stylua: ignore - local corners = { - top = "┌╴", - middle = "│ ", - last = "└╴", - single = "[ ", - } - - --- Fixes octo's comment rendering to take wrapping into account - ---@param buf number - ---@param lnum number - ---@param vnum number - ---@param win number - table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win) - lnum = lnum - 1 - for _, s in ipairs(signs) do - if buf == s.buf and lnum >= s.from and lnum <= s.to then - local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all - local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all - local corner = corners.middle - if height == 1 then - corner = corners.single - elseif lnum == s.from and vnum == 0 then - corner = corners.top - elseif lnum == s.to and vnum == height_end - 1 then - corner = corners.last + -- Keep some empty windows in sessions + vim.api.nvim_create_autocmd("ExitPre", { + group = vim.api.nvim_create_augroup("octo_exit_pre", { clear = true }), + callback = function(ev) + local keep = { "octo" } + for _, win in ipairs(vim.api.nvim_list_wins()) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.tbl_contains(keep, vim.bo[buf].filetype) then + vim.bo[buf].buftype = "" -- set buftype to empty to keep the window end - return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } } end - end - end) + end, + }) end ``` @@ -182,53 +149,20 @@ end else LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") end - local Signs = require("octo.ui.signs") - ---@type {buf: number, from: number, to: number, dirty: boolean}[] - local signs = {} - - local unplace = Signs.unplace - function Signs.unplace(bufnr) - signs = vim.tbl_filter(function(s) - return s.buf ~= bufnr - end, signs) - return unplace(bufnr) - end - - function Signs.place_signs(bufnr, start_line, end_line, is_dirty) - signs[#signs + 1] = { buf = bufnr, from = start_line, to = end_line, dirty = is_dirty } - end - -- stylua: ignore - local corners = { - top = "┌╴", - middle = "│ ", - last = "└╴", - single = "[ ", - } - - --- Fixes octo's comment rendering to take wrapping into account - ---@param buf number - ---@param lnum number - ---@param vnum number - ---@param win number - table.insert(LazyVim.ui.virtual, function(buf, lnum, vnum, win) - lnum = lnum - 1 - for _, s in ipairs(signs) do - if buf == s.buf and lnum >= s.from and lnum <= s.to then - local height = vim.api.nvim_win_text_height(win, { start_row = s.from, end_row = s.to }).all - local height_end = vim.api.nvim_win_text_height(win, { start_row = s.to, end_row = s.to }).all - local corner = corners.middle - if height == 1 then - corner = corners.single - elseif lnum == s.from and vnum == 0 then - corner = corners.top - elseif lnum == s.to and vnum == height_end - 1 then - corner = corners.last + -- Keep some empty windows in sessions + vim.api.nvim_create_autocmd("ExitPre", { + group = vim.api.nvim_create_augroup("octo_exit_pre", { clear = true }), + callback = function(ev) + local keep = { "octo" } + for _, win in ipairs(vim.api.nvim_list_wins()) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.tbl_contains(keep, vim.bo[buf].filetype) then + vim.bo[buf].buftype = "" -- set buftype to empty to keep the window end - return { { text = corner, texthl = s.dirty and "OctoDirty" or "IblScope" } } end - end - end) + end, + }) end, } ``` From cf3e0dc280f6ee6ebc45eed288e87aefc6593060 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 21:15:49 +0000 Subject: [PATCH 148/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 6 ------ docs/extras/lang/typescript.md | 16 ++++++++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index e6603a745e..08699e9f46 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -124,16 +124,10 @@ opts = {} -- setup dap config by VsCode launch.json file local vscode = require("dap.ext.vscode") - local _filetypes = require("mason-nvim-dap.mappings.filetypes") - local filetypes = vim.tbl_deep_extend("force", _filetypes, { - ["node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, - ["pwa-node"] = { "javascriptreact", "typescriptreact", "typescript", "javascript" }, - }) local json = require("plenary.json") vscode.json_decode = function(str) return vim.json.decode(json.json_strip_comments(str)) end - vscode.load_launchjs(nil, filetypes) end, } ``` diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index f9d11ac8e3..b6cfc3180c 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -447,7 +447,13 @@ opts = function() end end - for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do + local js_filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact" } + + local vscode = require("dap.ext.vscode") + vscode.type_to_filetypes["node"] = js_filetypes + vscode.type_to_filetypes["pwa-node"] = js_filetypes + + for _, language in ipairs(js_filetypes) do if not dap.configurations[language] then dap.configurations[language] = { { @@ -519,7 +525,13 @@ end end end - for _, language in ipairs({ "typescript", "javascript", "typescriptreact", "javascriptreact" }) do + local js_filetypes = { "typescript", "javascript", "typescriptreact", "javascriptreact" } + + local vscode = require("dap.ext.vscode") + vscode.type_to_filetypes["node"] = js_filetypes + vscode.type_to_filetypes["pwa-node"] = js_filetypes + + for _, language in ipairs(js_filetypes) do if not dap.configurations[language] then dap.configurations[language] = { { From 9399b083ad954e43f00ad47abfd4fa026100923f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 18:22:06 +0000 Subject: [PATCH 149/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 2 +- docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 0c9439a62d..a1aa546387 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -88,7 +88,7 @@ end } end, keys = { - { "a", "", desc = "+ai" }, + { "a", "", desc = "+ai", mode = { "n", "v" } }, { "aa", function() diff --git a/docs/keymaps.md b/docs/keymaps.md index 66b0545e1c..96d5b47e93 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -299,7 +299,7 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | Key | Description | Mode | | --- | --- | --- | -| <leader>a | +ai | **n** | +| <leader>a | +ai | **n**, **v** | | <leader>aa | Toggle (CopilotChat) | **n**, **v** | | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | From 22e539ab94ee3d6d5161590a4a0784bd745c5936 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 20:17:10 +0000 Subject: [PATCH 150/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 347 +++++++++++++++++++++++++++++++ docs/extras/editor/mini-files.md | 33 +-- docs/extras/lang/php.md | 164 ++++++++++++++- docs/keymaps.md | 52 +++++ docs/plugins/editor.md | 36 ++-- docs/plugins/ui.md | 16 +- 6 files changed, 598 insertions(+), 50 deletions(-) create mode 100644 docs/extras/editor/fzf.md diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md new file mode 100644 index 0000000000..04db71345b --- /dev/null +++ b/docs/extras/editor/fzf.md @@ -0,0 +1,347 @@ +# `Fzf` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.fzf" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [fzf-lua](https://github.com/ibhagwan/fzf-lua) + + + + + +```lua +opts = function(_, opts) + local config = require("fzf-lua.config") + local actions = require("fzf-lua.actions") + + -- Quickfix + config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.builtin[""] = "preview-page-down" + config.defaults.keymap.builtin[""] = "preview-page-up" + + -- Trouble + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + + -- Toggle root dir / cwd + config.defaults.actions.files["ctrl-r"] = function(_, ctx) + local o = vim.deepcopy(ctx.__call_opts) + o.root = o.root == false + o.cwd = nil + o.buf = ctx.__CTX.bufnr + LazyVim.pick.open(ctx.__INFO.cmd, o) + end + config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + + -- use the same prompt for all + local defaults = require("fzf-lua.profiles.default-title") + local function fix(t) + t.prompt = t.prompt ~= nil and " " or nil + for _, v in pairs(t) do + if type(v) == "table" then + fix(v) + end + end + end + fix(defaults) + + vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true }) + + return vim.tbl_deep_extend("force", opts, defaults, { + fzf_colors = true, + files = { + cwd_prompt = false, + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + grep = { + formatter = "path.hl", + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + formatters = { + path = { + hl = { + _to = function() + local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo") + return [[ + return function(s, _, m) + return "]] .. (escseq or "") .. [[" + .. s .. m.utils.ansi_escseq.clear + end + ]] + end, + }, + }, + }, + }) +end +``` + + + + + + +```lua +{ + "ibhagwan/fzf-lua", + event = "VeryLazy", + opts = function(_, opts) + local config = require("fzf-lua.config") + local actions = require("fzf-lua.actions") + + -- Quickfix + config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.builtin[""] = "preview-page-down" + config.defaults.keymap.builtin[""] = "preview-page-up" + + -- Trouble + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + + -- Toggle root dir / cwd + config.defaults.actions.files["ctrl-r"] = function(_, ctx) + local o = vim.deepcopy(ctx.__call_opts) + o.root = o.root == false + o.cwd = nil + o.buf = ctx.__CTX.bufnr + LazyVim.pick.open(ctx.__INFO.cmd, o) + end + config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + + -- use the same prompt for all + local defaults = require("fzf-lua.profiles.default-title") + local function fix(t) + t.prompt = t.prompt ~= nil and " " or nil + for _, v in pairs(t) do + if type(v) == "table" then + fix(v) + end + end + end + fix(defaults) + + vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true }) + + return vim.tbl_deep_extend("force", opts, defaults, { + fzf_colors = true, + files = { + cwd_prompt = false, + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + grep = { + formatter = "path.hl", + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + formatters = { + path = { + hl = { + _to = function() + local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo") + return [[ + return function(s, _, m) + return "]] .. (escseq or "") .. [[" + .. s .. m.utils.ansi_escseq.clear + end + ]] + end, + }, + }, + }, + }) + end, + keys = { + { "", "close", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { + ",", + "FzfLua buffers sort_mru=true sort_lastused=true", + desc = "Switch Buffer", + }, + { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { ":", "FzfLua command_history", desc = "Command History" }, + { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, + { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, + { "fr", "FzfLua oldfiles", desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { root = false }), desc = "Recent (cwd)" }, + -- git + { "gc", "FzfLua git_commits", desc = "Commits" }, + { "gs", "FzfLua git_status", desc = "Status" }, + -- search + { 's"', "FzfLua registers", desc = "Registers" }, + { "sa", "FzfLua autocmds", desc = "Auto Commands" }, + { "sb", "FzfLua grep_curbuf", desc = "Buffer" }, + { "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" }, + { "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" }, + { "sH", "FzfLua highlights", desc = "Search Highlight Groups" }, + { "sj", "FzfLua jumps", desc = "Jumplist" }, + { "sk", "FzfLua keymaps", desc = "Key Maps" }, + { "sl", "FzfLua loclist", desc = "Location List" }, + { "sM", "FzfLua man_pages", desc = "Man Pages" }, + { "sm", "FzfLua marks", desc = "Jump to Mark" }, + { "sR", "FzfLua resume", desc = "Resume" }, + { "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)" }, + { "uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" }, + { + "ss", + function() + require("fzf-lua").lsp_document_symbols({ + regex_filter = symbols_filter, + }) + end, + desc = "Goto Symbol", + }, + { + "sS", + function() + require("fzf-lua").lsp_dynamic_workspace_symbols({ + regex_filter = symbols_filter, + }) + end, + desc = "Goto Symbol (Workspace)", + }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function() + local Keys = require("lazyvim.plugins.lsp.keymaps").get() + vim.list_extend(Keys, { + { + "gd", + "FzfLua lsp_definitions jump_to_single_result=true", + desc = "Goto Definition", + has = "definition", + }, + { "gr", "FzfLua lsp_references jump_to_single_result=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true", desc = "Goto T[y]pe Definition" }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function() + local Keys = require("lazyvim.plugins.lsp.keymaps").get() + vim.list_extend(Keys, { + { + "gd", + "FzfLua lsp_definitions jump_to_single_result=true", + desc = "Goto Definition", + has = "definition", + }, + { "gr", "FzfLua lsp_references jump_to_single_result=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true", desc = "Goto T[y]pe Definition" }, + }) + end, +} +``` + + + + + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/todo-comments.nvim", + optional = true, + -- stylua: ignore + keys = { + { "st", function() require("todo-comments.fzf").todo() end, desc = "Todo" }, + { "sT", function () require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + }, +} +``` + + + + + + diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index df9bf3c64a..7a7fb3d33f 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -40,14 +40,6 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - mappings = { - toggle_hidden = "g.", - change_cwd = "gc", - go_in_horizontal = "s", - go_in_vertical = "v", - go_in_horizontal_plus = "S", - go_in_vertical_plus = "V", - }, windows = { preview = true, width_focus = 30, @@ -70,14 +62,6 @@ opts = { { "echasnovski/mini.files", opts = { - mappings = { - toggle_hidden = "g.", - change_cwd = "gc", - go_in_horizontal = "s", - go_in_vertical = "v", - go_in_horizontal_plus = "S", - go_in_vertical_plus = "V", - }, windows = { preview = true, width_focus = 30, @@ -159,17 +143,22 @@ opts = { vim.keymap.set( "n", - opts.mappings.toggle_hidden, + opts.mappings and opts.mappings.toggle_hidden or "g.", toggle_dotfiles, { buffer = buf_id, desc = "Toggle hidden files" } ) - vim.keymap.set("n", opts.mappings.change_cwd, files_set_cwd, { buffer = args.data.buf_id, desc = "Set cwd" }) + vim.keymap.set( + "n", + opts.mappings and opts.mappings.change_cwd or "gc", + files_set_cwd, + { buffer = args.data.buf_id, desc = "Set cwd" } + ) - map_split(buf_id, opts.mappings.go_in_horizontal, "horizontal", false) - map_split(buf_id, opts.mappings.go_in_vertical, "vertical", false) - map_split(buf_id, opts.mappings.go_in_horizontal_plus, "horizontal", true) - map_split(buf_id, opts.mappings.go_in_vertical_plus, "vertical", true) + map_split(buf_id, opts.mappings and opts.mappings.go_in_horizontal or "s", "horizontal", false) + map_split(buf_id, opts.mappings and opts.mappings.go_in_vertical or "v", "vertical", false) + map_split(buf_id, opts.mappings and opts.mappings.go_in_horizontal_plus or "S", "horizontal", true) + map_split(buf_id, opts.mappings and opts.mappings.go_in_vertical_plus or "V", "vertical", true) end, }) diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 4403b2992f..5054fe3f21 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -99,7 +99,45 @@ opts = { ```lua -opts = { ensure_installed = { "php-debug-adapter" } } +opts = { + ensure_installed = { + "phpcs", + "php-cs-fixer", + }, +} +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "phpcs", + "php-cs-fixer", + }, + }, +} +``` + + + +
+ +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = { ensure_installed = { + "php-debug-adapter", +} } ``` @@ -110,7 +148,53 @@ opts = { ensure_installed = { "php-debug-adapter" } } ```lua { "williamboman/mason.nvim", - opts = { ensure_installed = { "php-debug-adapter" } }, + opts = { ensure_installed = { + "php-debug-adapter", + } }, +} +``` + + + + + +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) + + + + + +```lua +opts = { + linters_by_ft = { + php = { "phpcs" }, + }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + php = { "phpcs" }, + }, + }, + { + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + php = { "php-cs-fixer" }, + }, + }, + }, } ``` @@ -147,7 +231,9 @@ end optional = true, dependencies = { "williamboman/mason.nvim", - opts = { ensure_installed = { "php-debug-adapter" } }, + opts = { ensure_installed = { + "php-debug-adapter", + } }, }, opts = function() local dap = require("dap") @@ -165,4 +251,76 @@ end +## [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.formatting.phpcsfixer) + table.insert(opts.sources, nls.builtins.diagnostics.phpcs) +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.formatting.phpcsfixer) + table.insert(opts.sources, nls.builtins.diagnostics.phpcs) + end, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + php = { "php-cs-fixer" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + php = { "php-cs-fixer" }, + }, + }, +} +``` + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 96d5b47e93..6bdfdf48f0 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -412,6 +412,58 @@ Part of [lazyvim.plugins.extras.editor.dial](/extras/editor/dial) | g<C-a> | Increment | **n**, **v** | | g<C-x> | Decrement | **n**, **v** | +## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) +Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Switch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Commits | **n** | +| <leader>gs | Status | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Auto Commands | **n** | +| <leader>sb | Buffer | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Document Diagnostics | **n** | +| <leader>sD | Workspace Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | +| <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Jump to Mark | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>ss | Goto Symbol | **n** | +| <leader>sS | Goto Symbol (Workspace) | **n** | +| <leader>sw | Word (Root Dir) | **n** | +| <leader>sW | Word (cwd) | **n** | +| <leader>sw | Selection (Root Dir) | **v** | +| <leader>sW | Selection (cwd) | **v** | +| <leader>uC | Colorscheme with Preview | **n** | + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) +Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>st | Todo | **n** | +| <leader>sT | Todo/Fix/Fixme | **n** | + ## [harpoon](https://github.com/ThePrimeagen/harpoon.git) Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 79bea3f775..d00b565f1e 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -42,6 +42,7 @@ opts = { end, desc = "Open with System Application", }, + ["P"] = { "toggle_preview", config = { use_float = false } }, }, }, default_component_configs = { @@ -152,6 +153,7 @@ opts = { end, desc = "Open with System Application", }, + ["P"] = { "toggle_preview", config = { use_float = false } }, }, }, default_component_configs = { @@ -625,12 +627,12 @@ opts = function() local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() - LazyVim.telescope("find_files", { no_ignore = true, default_text = line })() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() end local find_files_with_hidden = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() - LazyVim.telescope("find_files", { hidden = true, default_text = line })() + LazyVim.pick("find_files", { hidden = true, default_text = line })() end return { @@ -710,17 +712,17 @@ end "Telescope buffers sort_mru=true sort_lastused=true", desc = "Switch Buffer", }, - { "/", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" }, + { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { ":", "Telescope command_history", desc = "Command History" }, - { "", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" }, + { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, -- find { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, - { "fc", LazyVim.telescope.config_files(), desc = "Find Config File" }, - { "ff", LazyVim.telescope("files"), desc = "Find Files (Root Dir)" }, - { "fF", LazyVim.telescope("files", { cwd = false }), desc = "Find Files (cwd)" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, { "fr", "Telescope oldfiles", desc = "Recent" }, - { "fR", LazyVim.telescope("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles"), desc = "Recent (cwd)" }, -- git { "gc", "Telescope git_commits", desc = "Commits" }, { "gs", "Telescope git_status", desc = "Status" }, @@ -732,8 +734,8 @@ end { "sC", "Telescope commands", desc = "Commands" }, { "sd", "Telescope diagnostics bufnr=0", desc = "Document Diagnostics" }, { "sD", "Telescope diagnostics", desc = "Workspace Diagnostics" }, - { "sg", LazyVim.telescope("live_grep"), desc = "Grep (Root Dir)" }, - { "sG", LazyVim.telescope("live_grep", { cwd = false }), desc = "Grep (cwd)" }, + { "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" }, { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, { "sj", "Telescope jumplist", desc = "Jumplist" }, @@ -744,11 +746,11 @@ end { "so", "Telescope vim_options", desc = "Options" }, { "sR", "Telescope resume", desc = "Resume" }, { "sq", "Telescope quickfix", desc = "Quickfix List" }, - { "sw", LazyVim.telescope("grep_string", { word_match = "-w" }), desc = "Word (Root Dir)" }, - { "sW", LazyVim.telescope("grep_string", { cwd = false, word_match = "-w" }), desc = "Word (cwd)" }, - { "sw", LazyVim.telescope("grep_string"), mode = "v", desc = "Selection (Root Dir)" }, - { "sW", LazyVim.telescope("grep_string", { cwd = false }), mode = "v", desc = "Selection (cwd)" }, - { "uC", LazyVim.telescope("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, + { "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)" }, + { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, { "ss", function() @@ -777,12 +779,12 @@ end local find_files_no_ignore = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() - LazyVim.telescope("find_files", { no_ignore = true, default_text = line })() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() end local find_files_with_hidden = function() local action_state = require("telescope.actions.state") local line = action_state.get_current_line() - LazyVim.telescope("find_files", { hidden = true, default_text = line })() + LazyVim.pick("find_files", { hidden = true, default_text = line })() end return { diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index e5a5c5aea2..a842709d1a 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -732,11 +732,11 @@ opts = function() header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, + { action = LazyVim.pick(), desc = " Find File", icon = " ", key = "f" }, { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, - { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, - { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, + { action = LazyVim.pick("oldfiles"), desc = " Recent Files", icon = " ", key = "r" }, + { action = LazyVim.pick("live_grep"), desc = " Find Text", icon = " ", key = "g" }, + { action = LazyVim.pick.config_files(), desc = " Config", icon = " ", key = "c" }, { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, @@ -802,11 +802,11 @@ end header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.telescope("files"), desc = " Find File", icon = " ", key = "f" }, + { action = LazyVim.pick(), desc = " Find File", icon = " ", key = "f" }, { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = "Telescope oldfiles", desc = " Recent Files", icon = " ", key = "r" }, - { action = "Telescope live_grep", desc = " Find Text", icon = " ", key = "g" }, - { action = [[lua LazyVim.telescope.config_files()()]], desc = " Config", icon = " ", key = "c" }, + { action = LazyVim.pick("oldfiles"), desc = " Recent Files", icon = " ", key = "r" }, + { action = LazyVim.pick("live_grep"), desc = " Find Text", icon = " ", key = "g" }, + { action = LazyVim.pick.config_files(), desc = " Config", icon = " ", key = "c" }, { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, From 147810a251085daff622e1a225e81334f7d50206 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Jun 2024 22:16:48 +0000 Subject: [PATCH 151/553] chore(build): auto-generate docs --- docs/extras/lang/go.md | 4 ++-- docs/extras/lang/tailwind.md | 4 ++-- docs/plugins/editor.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 42718e4ceb..f0c550ad1d 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -313,7 +313,7 @@ opts = {} ```lua { "leoluz/nvim-dap-go", - config = true, + opts = {}, } ``` @@ -456,7 +456,7 @@ opts = nil }, { "leoluz/nvim-dap-go", - config = true, + opts = {}, }, }, } diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 25ed5c8aed..816177df79 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -142,7 +142,7 @@ end { "hrsh7th/nvim-cmp", dependencies = { - { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, + { "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} }, }, opts = function(_, opts) -- original LazyVim kind icon formatter @@ -175,7 +175,7 @@ opts = {} ```lua -{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true } +{ "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} } ``` diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index d00b565f1e..bb9c95377d 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -588,7 +588,7 @@ opts = {} "folke/todo-comments.nvim", cmd = { "TodoTrouble", "TodoTelescope" }, event = "LazyFile", - config = true, + opts = {}, -- stylua: ignore keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" }, From 112474341ac5e17636a2c6ecd10918648d888d49 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Mon, 10 Jun 2024 22:42:06 -0600 Subject: [PATCH 152/553] Remove TroubleV3 extra since it is no longer present in LazyExtras and is now rolled into the main branch. (#96) --- docs/extras/editor/trouble-v3.md | 261 ------------------------------- 1 file changed, 261 deletions(-) delete mode 100644 docs/extras/editor/trouble-v3.md diff --git a/docs/extras/editor/trouble-v3.md b/docs/extras/editor/trouble-v3.md deleted file mode 100644 index 222b8a213b..0000000000 --- a/docs/extras/editor/trouble-v3.md +++ /dev/null @@ -1,261 +0,0 @@ -# `Trouble-v3` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.trouble-v3" }, - { import = "plugins" }, - }, -}) -``` - -
- -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'; - -## [trouble.nvim](https://github.com/folke/trouble.nvim) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "folke/trouble.nvim", - branch = "dev", - keys = { - { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, - { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, - { "cs", "Trouble symbols toggle focus=false", desc = "Symbols (Trouble)" }, - { - "cS", - "Trouble lsp toggle focus=false win.position=right", - desc = "LSP references/definitions/... (Trouble)", - }, - { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, - { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, - { - "[q", - function() - if require("trouble").is_open() then - require("trouble").prev({ skip_groups = true, jump = true }) - else - local ok, err = pcall(vim.cmd.cprev) - if not ok then - vim.notify(err, vim.log.levels.ERROR) - end - end - end, - desc = "Previous Trouble/Quickfix Item", - }, - }, -} -``` - - - - - -## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ - - lualine integration - - - - - - -```lua -opts = function(_, opts) - local trouble = require("trouble") - if not trouble.statusline then - LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`") - return - end - - local symbols = trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - table.insert(opts.sections.lualine_c, { - symbols.get, - cond = symbols.has, - }) -end -``` - - - - - - -```lua -{ - "nvim-lualine/lualine.nvim", - optional = true, - opts = function(_, opts) - local trouble = require("trouble") - if not trouble.statusline then - LazyVim.error("You have enabled the **trouble-v3** extra,\nbut still need to update it with `:Lazy`") - return - end - - local symbols = trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) - table.insert(opts.sections.lualine_c, { - symbols.get, - cond = symbols.has, - }) - end, -} -``` - - - - - -## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - for _, pos in ipairs({ "top", "bottom", "left", "right" }) do - opts[pos] = opts[pos] or {} - table.insert(opts[pos], { - ft = "trouble", - filter = function(_buf, win) - return vim.w[win].trouble - and vim.w[win].trouble.position == pos - and vim.w[win].trouble.type == "split" - and vim.w[win].trouble.relative == "editor" - and not vim.w[win].trouble_preview - end, - }) - end -end -``` - - - - - - -```lua -{ - "folke/edgy.nvim", - optional = true, - opts = function(_, opts) - for _, pos in ipairs({ "top", "bottom", "left", "right" }) do - opts[pos] = opts[pos] or {} - table.insert(opts[pos], { - ft = "trouble", - filter = function(_buf, win) - return vim.w[win].trouble - and vim.w[win].trouble.position == pos - and vim.w[win].trouble.type == "split" - and vim.w[win].trouble.relative == "editor" - and not vim.w[win].trouble_preview - end, - }) - end - end, -} -``` - - - - - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - - - - -```lua -opts = function(_, opts) - local open_with_trouble = require("trouble.sources.telescope").open - return vim.tbl_deep_extend("force", opts, { - defaults = { - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - }, - }, - }, - }) -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - optional = true, - opts = function(_, opts) - local open_with_trouble = require("trouble.sources.telescope").open - return vim.tbl_deep_extend("force", opts, { - defaults = { - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - }, - }, - }, - }) - end, -} -``` - - - - - - From dba27b88e17a9dc407fc4ea20049dd648fa5a0d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 05:17:16 +0000 Subject: [PATCH 153/553] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 4 ++-- docs/extras/lang/kotlin.md | 4 ++-- docs/extras/lang/typescript.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 924cf599f5..f7a6443c9a 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -300,7 +300,7 @@ opts = function() if not dap.adapters["codelldb"] then require("dap").adapters["codelldb"] = { type = "server", - host = "localhost", + host = "127.0.0.1", port = "${port}", executable = { command = "codelldb", @@ -354,7 +354,7 @@ end if not dap.adapters["codelldb"] then require("dap").adapters["codelldb"] = { type = "server", - host = "localhost", + host = "127.0.0.1", port = "${port}", executable = { command = "codelldb", diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index 98dff3611c..832d5109fb 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -287,7 +287,7 @@ opts = function() port = 5005, args = {}, projectRoot = vim.fn.getcwd, - hostName = "localhost", + hostName = "127.0.0.1", timeout = 2000, }, } @@ -343,7 +343,7 @@ end port = 5005, args = {}, projectRoot = vim.fn.getcwd, - hostName = "localhost", + hostName = "127.0.0.1", timeout = 2000, }, } diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index b6cfc3180c..984fd6cdd0 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -421,7 +421,7 @@ opts = function() if not dap.adapters["pwa-node"] then require("dap").adapters["pwa-node"] = { type = "server", - host = "localhost", + host = "127.0.0.1", port = "${port}", executable = { command = "node", @@ -499,7 +499,7 @@ end if not dap.adapters["pwa-node"] then require("dap").adapters["pwa-node"] = { type = "server", - host = "localhost", + host = "127.0.0.1", port = "${port}", executable = { command = "node", From 7adeaed1c6c99b35c4ec32ba15d6e93f720d9da0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 06:22:55 +0000 Subject: [PATCH 154/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 04db71345b..392ba86752 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -91,6 +91,17 @@ opts = function(_, opts) ["alt-h"] = { actions.toggle_hidden }, }, }, + lsp = { + symbols = { + symbol_hl = function(s) + return "TroubleIcon" .. s + end, + symbol_fmt = function(s) + return s:lower() .. "\t" + end, + child_prefix = false, + }, + }, formatters = { path = { hl = { @@ -171,6 +182,17 @@ end ["alt-h"] = { actions.toggle_hidden }, }, }, + lsp = { + symbols = { + symbol_hl = function(s) + return "TroubleIcon" .. s + end, + symbol_fmt = function(s) + return s:lower() .. "\t" + end, + child_prefix = false, + }, + }, formatters = { path = { hl = { From 2757cd4d7890762fa9cf956bab009934d60a3192 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 07:15:56 +0000 Subject: [PATCH 155/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 44 +++++++++++++++++++++++---------------- docs/extras/lang/sql.md | 4 ++++ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 392ba86752..a9379cc202 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -77,6 +77,14 @@ opts = function(_, opts) return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, + winopts = { + preview = { + scrollchars = { "┃", "" }, + }, + }, files = { cwd_prompt = false, actions = { @@ -168,6 +176,14 @@ end return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, + winopts = { + preview = { + scrollchars = { "┃", "" }, + }, + }, files = { cwd_prompt = false, actions = { @@ -292,16 +308,12 @@ end ```lua opts = function() local Keys = require("lazyvim.plugins.lsp.keymaps").get() + -- stylua: ignore vim.list_extend(Keys, { - { - "gd", - "FzfLua lsp_definitions jump_to_single_result=true", - desc = "Goto Definition", - has = "definition", - }, - { "gr", "FzfLua lsp_references jump_to_single_result=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true", desc = "Goto T[y]pe Definition" }, + { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, }) end ``` @@ -316,16 +328,12 @@ end "neovim/nvim-lspconfig", opts = function() local Keys = require("lazyvim.plugins.lsp.keymaps").get() + -- stylua: ignore vim.list_extend(Keys, { - { - "gd", - "FzfLua lsp_definitions jump_to_single_result=true", - desc = "Goto Definition", - has = "definition", - }, - { "gr", "FzfLua lsp_references jump_to_single_result=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true", desc = "Goto T[y]pe Definition" }, + { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, }) end, } diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index d8f9715c8c..6499ec20f5 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -221,6 +221,7 @@ opts = { ensure_installed = { "sql" } } ```lua opts = function(_, opts) + opts.right = opts.right or {} table.insert(opts.right, { title = "Database", ft = "dbui", @@ -231,6 +232,7 @@ opts = function(_, opts) end, }) + opts.bottom = opts.bottom or {} table.insert(opts.bottom, { title = "DB Query Result", ft = "dbout", @@ -248,6 +250,7 @@ end "folke/edgy.nvim", optional = true, opts = function(_, opts) + opts.right = opts.right or {} table.insert(opts.right, { title = "Database", ft = "dbui", @@ -258,6 +261,7 @@ end end, }) + opts.bottom = opts.bottom or {} table.insert(opts.bottom, { title = "DB Query Result", ft = "dbout", From 500d52ae7e797ee0c6a5bea8015ac03fcfad857b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 12:32:34 +0000 Subject: [PATCH 156/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 2 +- docs/plugins/editor.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index a9379cc202..ae2d833d9d 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -245,7 +245,7 @@ end { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, { "fr", "FzfLua oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { root = false }), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, -- git { "gc", "FzfLua git_commits", desc = "Commits" }, { "gs", "FzfLua git_status", desc = "Status" }, diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index bb9c95377d..4f49ec5ca6 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -722,7 +722,7 @@ end { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, { "fr", "Telescope oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles"), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, -- git { "gc", "Telescope git_commits", desc = "Commits" }, { "gs", "Telescope git_status", desc = "Status" }, From 46acd61764a2ee792f8370d5e4b7613e14ce7ab5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 13:19:19 +0000 Subject: [PATCH 157/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index ae2d833d9d..2685c7da65 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -48,8 +48,10 @@ opts = function(_, opts) config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" + actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + config.set_action_helpstr(config.defaults.actions.files["ctrl-t"].fn, "open-with-trouble") -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) @@ -60,6 +62,7 @@ opts = function(_, opts) LazyVim.pick.open(ctx.__INFO.cmd, o) end config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") -- use the same prompt for all local defaults = require("fzf-lua.profiles.default-title") @@ -147,8 +150,10 @@ end config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" + actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + config.set_action_helpstr(config.defaults.actions.files["ctrl-t"].fn, "open-with-trouble") -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) @@ -159,6 +164,7 @@ end LazyVim.pick.open(ctx.__INFO.cmd, o) end config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") -- use the same prompt for all local defaults = require("fzf-lua.profiles.default-title") From 26e4d635f14a29254984002c4f5679769b59854a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 14:15:50 +0000 Subject: [PATCH 158/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 2685c7da65..7af0766e26 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -51,7 +51,6 @@ opts = function(_, opts) actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open - config.set_action_helpstr(config.defaults.actions.files["ctrl-t"].fn, "open-with-trouble") -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) @@ -153,7 +152,6 @@ end actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open - config.set_action_helpstr(config.defaults.actions.files["ctrl-t"].fn, "open-with-trouble") -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) @@ -291,7 +289,7 @@ end { "sS", function() - require("fzf-lua").lsp_dynamic_workspace_symbols({ + require("fzf-lua").lsp_live_workspace_symbols({ regex_filter = symbols_filter, }) end, From f6e7baaf82c8cea241113ce660526f008fd77dc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 16:21:26 +0000 Subject: [PATCH 159/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 51 ++++++++++++++++++++++++++++++ docs/keymaps.md | 8 +++++ 2 files changed, 59 insertions(+) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index a1aa546387..fec05a1247 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -194,6 +194,57 @@ opts = nil
+## [fzf-lua](https://github.com/ibhagwan/fzf-lua) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "ibhagwan/fzf-lua", + optional = true, + keys = { + -- Show help actions with fzf-lua (if installed in extras) + { + "ad", + function() + local actions = require("CopilotChat.actions") + local help = actions.help_actions() + if not help then + LazyVim.warn("No diagnostics found on the current line") + return + end + require("CopilotChat.integrations.fzflua").pick(help) + end, + desc = "Diagnostic Help (CopilotChat)", + }, + -- Show prompts actions with fzf-lua (if installed in extras) + { + "ap", + function() + local actions = require("CopilotChat.actions") + require("CopilotChat.integrations.fzflua").pick(actions.prompt_actions()) + end, + desc = "Prompt Actions (CopilotChat)", + }, + }, +} +``` + + + + + ## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ Edgy integration diff --git a/docs/keymaps.md b/docs/keymaps.md index 6bdfdf48f0..ffacd2e828 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -304,6 +304,14 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | +## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) +Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>ad | Diagnostic Help (CopilotChat) | **n** | +| <leader>ap | Prompt Actions (CopilotChat) | **n** | + ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) From 8721b1cf492b05e90553af23c9468592a4afe7f6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 17:15:50 +0000 Subject: [PATCH 160/553] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 4 ++-- docs/extras/lang/kotlin.md | 4 ++-- docs/extras/lang/typescript.md | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index f7a6443c9a..924cf599f5 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -300,7 +300,7 @@ opts = function() if not dap.adapters["codelldb"] then require("dap").adapters["codelldb"] = { type = "server", - host = "127.0.0.1", + host = "localhost", port = "${port}", executable = { command = "codelldb", @@ -354,7 +354,7 @@ end if not dap.adapters["codelldb"] then require("dap").adapters["codelldb"] = { type = "server", - host = "127.0.0.1", + host = "localhost", port = "${port}", executable = { command = "codelldb", diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index 832d5109fb..98dff3611c 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -287,7 +287,7 @@ opts = function() port = 5005, args = {}, projectRoot = vim.fn.getcwd, - hostName = "127.0.0.1", + hostName = "localhost", timeout = 2000, }, } @@ -343,7 +343,7 @@ end port = 5005, args = {}, projectRoot = vim.fn.getcwd, - hostName = "127.0.0.1", + hostName = "localhost", timeout = 2000, }, } diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 984fd6cdd0..b6cfc3180c 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -421,7 +421,7 @@ opts = function() if not dap.adapters["pwa-node"] then require("dap").adapters["pwa-node"] = { type = "server", - host = "127.0.0.1", + host = "localhost", port = "${port}", executable = { command = "node", @@ -499,7 +499,7 @@ end if not dap.adapters["pwa-node"] then require("dap").adapters["pwa-node"] = { type = "server", - host = "127.0.0.1", + host = "localhost", port = "${port}", executable = { command = "node", From 6056bc315f4e6f2f657a6071ad41eb48dd84d3ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 18:23:13 +0000 Subject: [PATCH 161/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 7af0766e26..6cad6b3751 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -45,6 +45,9 @@ opts = function(_, opts) -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" + config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" + config.defaults.keymap.fzf["ctrl-x"] = "jump" config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" @@ -146,6 +149,9 @@ end -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" + config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" + config.defaults.keymap.fzf["ctrl-x"] = "jump" config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" From c76d8432ecc88b9eac6c168f0a445d0aba418caa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 19:13:38 +0000 Subject: [PATCH 162/553] chore(build): auto-generate docs --- docs/extras/ui/mini-indentscope.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index 186c90cb14..1d48a7088d 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -69,17 +69,18 @@ opts = { init = function() vim.api.nvim_create_autocmd("FileType", { pattern = { - "help", "alpha", "dashboard", - "neo-tree", - "Trouble", - "trouble", + "fzf", + "help", "lazy", + "lazyterm", "mason", + "neo-tree", "notify", "toggleterm", - "lazyterm", + "Trouble", + "trouble", }, callback = function() vim.b.miniindentscope_disable = true From 853527207faafbb707c1e3ae6107482027f5d640 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 21:56:17 +0000 Subject: [PATCH 163/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 ++++++ docs/plugins/lsp.md | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 6cad6b3751..4a53a1f96f 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -114,6 +114,9 @@ opts = function(_, opts) end, child_prefix = false, }, + code_actions = { + previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, + }, }, formatters = { path = { @@ -218,6 +221,9 @@ end end, child_prefix = false, }, + code_actions = { + previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, + }, }, formatters = { path = { diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 4fa255ea01..19f9453273 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -67,7 +67,7 @@ opts = function() -- provide the inlay hints. inlay_hints = { enabled = true, - exclude = {}, -- filetypes for which you don't want to enable inlay hints + 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 -- Be aware that you also will need to properly configure your LSP server to @@ -190,7 +190,7 @@ end -- provide the inlay hints. inlay_hints = { enabled = true, - exclude = {}, -- filetypes for which you don't want to enable inlay hints + 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 -- Be aware that you also will need to properly configure your LSP server to From f35fdd3dba1703849c372af8339b74d938f27cba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 11 Jun 2024 23:16:08 +0000 Subject: [PATCH 164/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 4a53a1f96f..dd3d0f1f62 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -86,6 +86,10 @@ opts = function(_, opts) ["--no-scrollbar"] = true, }, winopts = { + width = 0.8, + height = 0.8, + row = 0.5, + col = 0.5, preview = { scrollchars = { "┃", "" }, }, @@ -193,6 +197,10 @@ end ["--no-scrollbar"] = true, }, winopts = { + width = 0.8, + height = 0.8, + row = 0.5, + col = 0.5, preview = { scrollchars = { "┃", "" }, }, From 01eebd0d256e3aceb07e926bc92df1b4758f3f7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Jun 2024 06:22:55 +0000 Subject: [PATCH 165/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 13 ++++++++++++- docs/keymaps.md | 2 +- docs/plugins/ui.md | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 314045207f..414cdc5df1 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -61,8 +61,19 @@ opts = { highlight = { timer = 150 }, }, keys = { + { + "p", + function() + local ok, telescope = pcall(require, "telescope") + if ok then + telescope.extensions.yank_history.yank_history({}) + else + vim.cmd([[YankyRingHistory]]) + end + end, + desc = "Open Yank History", + }, -- stylua: ignore - { "p", function() require("telescope").extensions.yank_history.yank_history({ }) end, desc = "Open Yank History" }, { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" }, { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" }, { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index ffacd2e828..169c45e79d 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -196,7 +196,7 @@ possible keymaps starting with ``. | <leader>snd | Dismiss All | **n** | | <leader>snh | Noice History | **n** | | <leader>snl | Noice Last Message | **n** | -| <leader>snt | Noice Telescope | **n** | +| <leader>snt | Noice Picker (Telescope/FzfLua) | **n** | | <S-Enter> | Redirect Cmdline | **c** | ## [nvim-notify](https://github.com/rcarriga/nvim-notify.git) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index a842709d1a..351fffb700 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -639,7 +639,7 @@ opts = { { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, { "snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, - { "snt", function() require("noice").cmd("telescope") end, desc = "Noice Telescope" }, + { "snt", function() require("noice").cmd("pick") end, desc = "Noice Picker (Telescope/FzfLua)" }, { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} }, { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}}, }, From 45762d8611418624ed28e4224036c32743063ad2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Jun 2024 10:17:35 +0000 Subject: [PATCH 166/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 111 ++--------------------------- docs/extras/editor/fzf.md | 82 +++++++++++---------- docs/keymaps.md | 18 +---- 3 files changed, 50 insertions(+), 161 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index fec05a1247..405fbad6dc 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -116,6 +116,10 @@ end desc = "Quick Chat (CopilotChat)", mode = { "n", "v" }, }, + -- Show help actions with telescope + { "ad", M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } }, + -- Show prompts actions with telescope + { "ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } }, }, config = function(_, opts) local chat = require("CopilotChat") @@ -138,113 +142,6 @@ end -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - Telescope integration - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - optional = true, - keys = { - -- Show help actions with telescope - { - "ad", - function() - local actions = require("CopilotChat.actions") - local help = actions.help_actions() - if not help then - LazyVim.warn("No diagnostics found on the current line") - return - end - require("CopilotChat.integrations.telescope").pick(help) - end, - desc = "Diagnostic Help (CopilotChat)", - mode = { "n", "v" }, - }, - -- Show prompts actions with telescope - { - "ap", - function() - local actions = require("CopilotChat.actions") - require("CopilotChat.integrations.telescope").pick(actions.prompt_actions()) - end, - desc = "Prompt Actions (CopilotChat)", - mode = { "n", "v" }, - }, - }, -} -``` - - - - - -## [fzf-lua](https://github.com/ibhagwan/fzf-lua) _(optional)_ - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "ibhagwan/fzf-lua", - optional = true, - keys = { - -- Show help actions with fzf-lua (if installed in extras) - { - "ad", - function() - local actions = require("CopilotChat.actions") - local help = actions.help_actions() - if not help then - LazyVim.warn("No diagnostics found on the current line") - return - end - require("CopilotChat.integrations.fzflua").pick(help) - end, - desc = "Diagnostic Help (CopilotChat)", - }, - -- Show prompts actions with fzf-lua (if installed in extras) - { - "ap", - function() - local actions = require("CopilotChat.actions") - require("CopilotChat.integrations.fzflua").pick(actions.prompt_actions()) - end, - desc = "Prompt Actions (CopilotChat)", - }, - }, -} -``` - - - - - ## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ Edgy integration diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index dd3d0f1f62..f25df67ff0 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -51,7 +51,6 @@ opts = function(_, opts) config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" - actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open @@ -78,13 +77,31 @@ opts = function(_, opts) end fix(defaults) - vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true }) - return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, }, + defaults = { + formatter = "path.filename_first", + }, + -- Custom LazyVim option to configure vim.ui.select + ui_select = function(fzf_opts, items) + local title = vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) + local width, height ---@type number?, number? + if fzf_opts.kind ~= "codeaction" then + width, height = 0.5, math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5) + end + return vim.tbl_deep_extend("force", fzf_opts, { + prompt = " ", + winopts = { + title = " " .. title .. " ", + title_pos = "center", + width = width, + height = height, + }, + }) + end, winopts = { width = 0.8, height = 0.8, @@ -102,7 +119,6 @@ opts = function(_, opts) }, }, grep = { - formatter = "path.hl", actions = { ["alt-i"] = { actions.toggle_ignore }, ["alt-h"] = { actions.toggle_hidden }, @@ -122,21 +138,6 @@ opts = function(_, opts) previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, }, }, - formatters = { - path = { - hl = { - _to = function() - local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo") - return [[ - return function(s, _, m) - return "]] .. (escseq or "") .. [[" - .. s .. m.utils.ansi_escseq.clear - end - ]] - end, - }, - }, - }, }) end ``` @@ -162,7 +163,6 @@ end config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" - actions.open_with_trouble = require("trouble.sources.fzf").actions.open -- Trouble config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open @@ -189,13 +189,31 @@ end end fix(defaults) - vim.api.nvim_set_hl(0, "FzfLuaPath", { link = "Directory", default = true }) - return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, }, + defaults = { + formatter = "path.filename_first", + }, + -- Custom LazyVim option to configure vim.ui.select + ui_select = function(fzf_opts, items) + local title = vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) + local width, height ---@type number?, number? + if fzf_opts.kind ~= "codeaction" then + width, height = 0.5, math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5) + end + return vim.tbl_deep_extend("force", fzf_opts, { + prompt = " ", + winopts = { + title = " " .. title .. " ", + title_pos = "center", + width = width, + height = height, + }, + }) + end, winopts = { width = 0.8, height = 0.8, @@ -213,7 +231,6 @@ end }, }, grep = { - formatter = "path.hl", actions = { ["alt-i"] = { actions.toggle_ignore }, ["alt-h"] = { actions.toggle_hidden }, @@ -233,23 +250,12 @@ end previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, }, }, - formatters = { - path = { - hl = { - _to = function() - local _, escseq = require("fzf-lua.utils").ansi_from_hl("FzfLuaPath", "foo") - return [[ - return function(s, _, m) - return "]] .. (escseq or "") .. [[" - .. s .. m.utils.ansi_escseq.clear - end - ]] - end, - }, - }, - }, }) end, + config = function(_, opts) + require("fzf-lua").setup(opts) + require("fzf-lua").register_ui_select(opts.ui_select or nil) + end, keys = { { "", "close", ft = "fzf", mode = "t", nowait = true }, { "", "", ft = "fzf", mode = "t", nowait = true }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 169c45e79d..7499cb0648 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -301,24 +301,10 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | --- | --- | --- | | <leader>a | +ai | **n**, **v** | | <leader>aa | Toggle (CopilotChat) | **n**, **v** | -| <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | -| <leader>ax | Clear (CopilotChat) | **n**, **v** | - -## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) -Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>ad | Diagnostic Help (CopilotChat) | **n** | -| <leader>ap | Prompt Actions (CopilotChat) | **n** | - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) -Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) - -| Key | Description | Mode | -| --- | --- | --- | | <leader>ad | Diagnostic Help (CopilotChat) | **n**, **v** | | <leader>ap | Prompt Actions (CopilotChat) | **n**, **v** | +| <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | +| <leader>ax | Clear (CopilotChat) | **n**, **v** | ## [mini.surround](https://github.com/echasnovski/mini.surround.git) Part of [lazyvim.plugins.extras.coding.mini-surround](/extras/coding/mini-surround) From 83a7e2a11532a426ebcf9624251801aa836487e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Jun 2024 16:21:18 +0000 Subject: [PATCH 167/553] chore(build): auto-generate docs --- docs/extras/util/project.md | 96 ++++++++++++++++++++----------------- docs/keymaps.md | 9 +++- 2 files changed, 60 insertions(+), 45 deletions(-) diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 69c625f1d6..646be0517c 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -32,14 +32,16 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) +## [project.nvim](https://github.com/ahmedkhalf/project.nvim) ```lua -opts = nil +opts = { + manual_mode = true, +} ``` @@ -49,26 +51,17 @@ opts = nil ```lua { - "telescope.nvim", - dependencies = { - -- project management - { - "ahmedkhalf/project.nvim", - opts = { - manual_mode = true, - }, - event = "VeryLazy", - config = function(_, opts) - require("project_nvim").setup(opts) - LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("projects") - end) - end, - keys = { - { "fp", "Telescope projects", desc = "Projects" }, - }, - }, + "ahmedkhalf/project.nvim", + opts = { + manual_mode = true, }, + event = "VeryLazy", + config = function(_, opts) + require("project_nvim").setup(opts) + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("projects") + end) + end, } ``` @@ -76,19 +69,43 @@ opts = nil -## [project.nvim](https://github.com/ahmedkhalf/project.nvim) +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + - project management + + +```lua +{ + "telescope.nvim", + optional = true, + keys = { + { "fp", pick, desc = "Projects" }, + }, +} +``` + + + + + +## [fzf-lua](https://github.com/ibhagwan/fzf-lua) _(optional)_ ```lua -opts = { - manual_mode = true, -} +opts = nil ``` @@ -98,19 +115,10 @@ opts = { ```lua { - "ahmedkhalf/project.nvim", - opts = { - manual_mode = true, - }, - event = "VeryLazy", - config = function(_, opts) - require("project_nvim").setup(opts) - LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("projects") - end) - end, + "ibhagwan/fzf-lua", + optional = true, keys = { - { "fp", "Telescope projects", desc = "Projects" }, + { "fp", pick, desc = "Projects" }, }, } ``` @@ -127,7 +135,7 @@ opts = { ```lua opts = function(_, dashboard) - local button = dashboard.button("p", " " .. " Projects", ":Telescope projects ") + local button = dashboard.button("p", " " .. " Projects", pick) button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" table.insert(dashboard.section.buttons.val, 4, button) @@ -144,7 +152,7 @@ end "goolord/alpha-nvim", optional = true, opts = function(_, dashboard) - local button = dashboard.button("p", " " .. " Projects", ":Telescope projects ") + local button = dashboard.button("p", " " .. " Projects", pick) button.opts.hl = "AlphaButtons" button.opts.hl_shortcut = "AlphaShortcut" table.insert(dashboard.section.buttons.val, 4, button) @@ -167,7 +175,7 @@ opts = function(_, opts) local items = { { name = "Projects", - action = "Telescope projects", + action = pick, section = string.rep(" ", 22) .. "Telescope", }, } @@ -188,7 +196,7 @@ end local items = { { name = "Projects", - action = "Telescope projects", + action = pick, section = string.rep(" ", 22) .. "Telescope", }, } @@ -210,7 +218,7 @@ end ```lua opts = function(_, opts) local projects = { - action = "Telescope projects", + action = pick, desc = " Projects", icon = " ", key = "p", @@ -234,7 +242,7 @@ end optional = true, opts = function(_, opts) local projects = { - action = "Telescope projects", + action = pick, desc = " Projects", icon = " ", key = "p", diff --git a/docs/keymaps.md b/docs/keymaps.md index 7499cb0648..494b4a3216 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -652,7 +652,14 @@ Part of [lazyvim.plugins.extras.util.octo](/extras/util/octo) | <leader>r | +react (Octo) | **n** | | <leader>v | +review (Octo) | **n** | -## [project.nvim](https://github.com/ahmedkhalf/project.nvim.git) +## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) +Part of [lazyvim.plugins.extras.util.project](/extras/util/project) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>fp | Projects | **n** | + +## [telescope.nvim](nil) Part of [lazyvim.plugins.extras.util.project](/extras/util/project) | Key | Description | Mode | From 901f87fd3a6529482e9ea09e6b8c08c9044c30d3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 12 Jun 2024 20:56:32 +0200 Subject: [PATCH 168/553] docs: fix link --- docs/extras/util/project.md | 2 +- docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 646be0517c..690beacf49 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -86,7 +86,7 @@ opts = nil ```lua { - "telescope.nvim", + "nvim-telescope/telescope.nvim", optional = true, keys = { { "fp", pick, desc = "Projects" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 494b4a3216..38bbabce37 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -659,7 +659,7 @@ Part of [lazyvim.plugins.extras.util.project](/extras/util/project) | --- | --- | --- | | <leader>fp | Projects | **n** | -## [telescope.nvim](nil) +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) Part of [lazyvim.plugins.extras.util.project](/extras/util/project) | Key | Description | Mode | From 29172f4bd519c330b3e5fdfc0fa734bfa2fb8e14 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Jun 2024 04:20:05 +0000 Subject: [PATCH 169/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 5 +- docs/extras/editor/fzf.md | 372 -------------------------------- docs/extras/editor/telescope.md | 35 +++ docs/extras/lang/terraform.md | 87 ++++---- docs/extras/ui/alpha.md | 20 +- docs/extras/ui/mini-starter.md | 36 ++-- docs/keymaps.md | 96 --------- docs/plugins/editor.md | 352 +----------------------------- docs/plugins/ui.md | 41 ---- 9 files changed, 113 insertions(+), 931 deletions(-) create mode 100644 docs/extras/editor/telescope.md diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 414cdc5df1..6b59a86963 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -64,9 +64,8 @@ opts = { { "p", function() - local ok, telescope = pcall(require, "telescope") - if ok then - telescope.extensions.yank_history.yank_history({}) + if LazyVim.pick.picker.name == "telescope" then + require("telescope").extensions.yank_history.yank_history({}) else vim.cmd([[YankyRingHistory]]) end diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index f25df67ff0..56dfcccd39 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -32,376 +32,4 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [fzf-lua](https://github.com/ibhagwan/fzf-lua) - - - - - -```lua -opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") - - -- Quickfix - config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" - config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" - config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" - config.defaults.keymap.fzf["ctrl-x"] = "jump" - config.defaults.keymap.builtin[""] = "preview-page-down" - config.defaults.keymap.builtin[""] = "preview-page-up" - - -- Trouble - config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open - - -- Toggle root dir / cwd - config.defaults.actions.files["ctrl-r"] = function(_, ctx) - local o = vim.deepcopy(ctx.__call_opts) - o.root = o.root == false - o.cwd = nil - o.buf = ctx.__CTX.bufnr - LazyVim.pick.open(ctx.__INFO.cmd, o) - end - config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] - config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") - - -- use the same prompt for all - local defaults = require("fzf-lua.profiles.default-title") - local function fix(t) - t.prompt = t.prompt ~= nil and " " or nil - for _, v in pairs(t) do - if type(v) == "table" then - fix(v) - end - end - end - fix(defaults) - - return vim.tbl_deep_extend("force", opts, defaults, { - fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, - defaults = { - formatter = "path.filename_first", - }, - -- Custom LazyVim option to configure vim.ui.select - ui_select = function(fzf_opts, items) - local title = vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) - local width, height ---@type number?, number? - if fzf_opts.kind ~= "codeaction" then - width, height = 0.5, math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5) - end - return vim.tbl_deep_extend("force", fzf_opts, { - prompt = " ", - winopts = { - title = " " .. title .. " ", - title_pos = "center", - width = width, - height = height, - }, - }) - end, - winopts = { - width = 0.8, - height = 0.8, - row = 0.5, - col = 0.5, - preview = { - scrollchars = { "┃", "" }, - }, - }, - files = { - cwd_prompt = false, - actions = { - ["alt-i"] = { actions.toggle_ignore }, - ["alt-h"] = { actions.toggle_hidden }, - }, - }, - grep = { - actions = { - ["alt-i"] = { actions.toggle_ignore }, - ["alt-h"] = { actions.toggle_hidden }, - }, - }, - lsp = { - symbols = { - symbol_hl = function(s) - return "TroubleIcon" .. s - end, - symbol_fmt = function(s) - return s:lower() .. "\t" - end, - child_prefix = false, - }, - code_actions = { - previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, - }, - }, - }) -end -``` - - - - - - -```lua -{ - "ibhagwan/fzf-lua", - event = "VeryLazy", - opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") - - -- Quickfix - config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" - config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" - config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" - config.defaults.keymap.fzf["ctrl-x"] = "jump" - config.defaults.keymap.builtin[""] = "preview-page-down" - config.defaults.keymap.builtin[""] = "preview-page-up" - - -- Trouble - config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open - - -- Toggle root dir / cwd - config.defaults.actions.files["ctrl-r"] = function(_, ctx) - local o = vim.deepcopy(ctx.__call_opts) - o.root = o.root == false - o.cwd = nil - o.buf = ctx.__CTX.bufnr - LazyVim.pick.open(ctx.__INFO.cmd, o) - end - config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] - config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") - - -- use the same prompt for all - local defaults = require("fzf-lua.profiles.default-title") - local function fix(t) - t.prompt = t.prompt ~= nil and " " or nil - for _, v in pairs(t) do - if type(v) == "table" then - fix(v) - end - end - end - fix(defaults) - - return vim.tbl_deep_extend("force", opts, defaults, { - fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, - defaults = { - formatter = "path.filename_first", - }, - -- Custom LazyVim option to configure vim.ui.select - ui_select = function(fzf_opts, items) - local title = vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) - local width, height ---@type number?, number? - if fzf_opts.kind ~= "codeaction" then - width, height = 0.5, math.floor(math.min(vim.o.lines * 0.8, #items + 2) + 0.5) - end - return vim.tbl_deep_extend("force", fzf_opts, { - prompt = " ", - winopts = { - title = " " .. title .. " ", - title_pos = "center", - width = width, - height = height, - }, - }) - end, - winopts = { - width = 0.8, - height = 0.8, - row = 0.5, - col = 0.5, - preview = { - scrollchars = { "┃", "" }, - }, - }, - files = { - cwd_prompt = false, - actions = { - ["alt-i"] = { actions.toggle_ignore }, - ["alt-h"] = { actions.toggle_hidden }, - }, - }, - grep = { - actions = { - ["alt-i"] = { actions.toggle_ignore }, - ["alt-h"] = { actions.toggle_hidden }, - }, - }, - lsp = { - symbols = { - symbol_hl = function(s) - return "TroubleIcon" .. s - end, - symbol_fmt = function(s) - return s:lower() .. "\t" - end, - child_prefix = false, - }, - code_actions = { - previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, - }, - }, - }) - end, - config = function(_, opts) - require("fzf-lua").setup(opts) - require("fzf-lua").register_ui_select(opts.ui_select or nil) - end, - keys = { - { "", "close", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, - { - ",", - "FzfLua buffers sort_mru=true sort_lastused=true", - desc = "Switch Buffer", - }, - { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, - { ":", "FzfLua command_history", desc = "Command History" }, - { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - -- find - { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, - { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, - { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, - { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, - { "fr", "FzfLua oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, - -- git - { "gc", "FzfLua git_commits", desc = "Commits" }, - { "gs", "FzfLua git_status", desc = "Status" }, - -- search - { 's"', "FzfLua registers", desc = "Registers" }, - { "sa", "FzfLua autocmds", desc = "Auto Commands" }, - { "sb", "FzfLua grep_curbuf", desc = "Buffer" }, - { "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" }, - { "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" }, - { "sH", "FzfLua highlights", desc = "Search Highlight Groups" }, - { "sj", "FzfLua jumps", desc = "Jumplist" }, - { "sk", "FzfLua keymaps", desc = "Key Maps" }, - { "sl", "FzfLua loclist", desc = "Location List" }, - { "sM", "FzfLua man_pages", desc = "Man Pages" }, - { "sm", "FzfLua marks", desc = "Jump to Mark" }, - { "sR", "FzfLua resume", desc = "Resume" }, - { "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)" }, - { "uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" }, - { - "ss", - function() - require("fzf-lua").lsp_document_symbols({ - regex_filter = symbols_filter, - }) - end, - desc = "Goto Symbol", - }, - { - "sS", - function() - require("fzf-lua").lsp_live_workspace_symbols({ - regex_filter = symbols_filter, - }) - end, - desc = "Goto Symbol (Workspace)", - }, - }, -} -``` - - - - - -## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - - - - - -```lua -opts = function() - local Keys = require("lazyvim.plugins.lsp.keymaps").get() - -- stylua: ignore - vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, - }) -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 jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, - }) - end, -} -``` - - - - - -## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) _(optional)_ - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "folke/todo-comments.nvim", - optional = true, - -- stylua: ignore - keys = { - { "st", function() require("todo-comments.fzf").todo() end, desc = "Todo" }, - { "sT", function () require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, - }, -} -``` - - - - - diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md new file mode 100644 index 0000000000..0aa90d20aa --- /dev/null +++ b/docs/extras/editor/telescope.md @@ -0,0 +1,35 @@ +# `Telescope` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.telescope" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + + diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index f17234b60a..6376fabe2a 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -121,49 +121,6 @@ opts = { ensure_installed = { "tflint" } }
-## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - dependencies = { - { - "ANGkeith/telescope-terraform-doc.nvim", - config = function() - LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("terraform_doc") - end) - end, - }, - { - "cappyzawa/telescope-terraform.nvim", - config = function() - LazyVim.on_load("telescope.nvim", function() - require("telescope").load_extension("terraform") - end) - end, - }, - }, -} -``` - - - - - ## [telescope-terraform-doc.nvim](https://github.com/ANGkeith/telescope-terraform-doc.nvim) @@ -339,4 +296,48 @@ opts = { +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + optional = true, + dependencies = { + { + "ANGkeith/telescope-terraform-doc.nvim", + config = function() + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform_doc") + end) + end, + }, + { + "cappyzawa/telescope-terraform.nvim", + config = function() + LazyVim.on_load("telescope.nvim", function() + require("telescope").load_extension("terraform") + end) + end, + }, + }, +} +``` + + + + + diff --git a/docs/extras/ui/alpha.md b/docs/extras/ui/alpha.md index 9aefa6e8e1..73fb44dad1 100644 --- a/docs/extras/ui/alpha.md +++ b/docs/extras/ui/alpha.md @@ -57,11 +57,11 @@ opts = function() dashboard.section.header.val = vim.split(logo, "\n") -- stylua: ignore dashboard.section.buttons.val = { - dashboard.button("f", " " .. " Find file", " Telescope find_files "), - dashboard.button("n", " " .. " New file", " ene startinsert "), - dashboard.button("r", " " .. " Recent files", " Telescope oldfiles "), - dashboard.button("g", " " .. " Find text", " Telescope live_grep "), - dashboard.button("c", " " .. " Config", " lua require('lazyvim.util').telescope.config_files()() "), + dashboard.button("f", " " .. " Find file", LazyVim.pick()), + dashboard.button("n", " " .. " New file", [[ ene startinsert ]]), + dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")), + dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")), + dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()), dashboard.button("s", " " .. " Restore Session", [[ lua require("persistence").load() ]]), dashboard.button("x", " " .. " Lazy Extras", " LazyExtras "), dashboard.button("l", "󰒲 " .. " Lazy", " Lazy "), @@ -104,11 +104,11 @@ end dashboard.section.header.val = vim.split(logo, "\n") -- stylua: ignore dashboard.section.buttons.val = { - dashboard.button("f", " " .. " Find file", " Telescope find_files "), - dashboard.button("n", " " .. " New file", " ene startinsert "), - dashboard.button("r", " " .. " Recent files", " Telescope oldfiles "), - dashboard.button("g", " " .. " Find text", " Telescope live_grep "), - dashboard.button("c", " " .. " Config", " lua require('lazyvim.util').telescope.config_files()() "), + dashboard.button("f", " " .. " Find file", LazyVim.pick()), + dashboard.button("n", " " .. " New file", [[ ene startinsert ]]), + dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")), + dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")), + dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()), dashboard.button("s", " " .. " Restore Session", [[ lua require("persistence").load() ]]), dashboard.button("x", " " .. " Lazy Extras", " LazyExtras "), dashboard.button("l", "󰒲 " .. " Lazy", " Lazy "), diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index fbc05f3bda..e09dc1f9a4 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -62,15 +62,15 @@ opts = function() evaluate_single = true, header = logo, items = { - new_section("Find file", "Telescope find_files", "Telescope"), - new_section("Recent files", "Telescope oldfiles", "Telescope"), - new_section("Grep text", "Telescope live_grep", "Telescope"), - new_section("Config", "lua require('lazyvim.util').telescope.config_files()()", "Config"), - new_section("Extras", "LazyExtras", "Config"), - new_section("Lazy", "Lazy", "Config"), - new_section("New file", "ene | startinsert", "Built-in"), - new_section("Quit", "qa", "Built-in"), - new_section("Session restore", [[lua require("persistence").load()]], "Session"), + new_section("Find file", LazyVim.pick(), "Telescope"), + new_section("New file", "ene | startinsert", "Built-in"), + new_section("Recent files", LazyVim.pick("oldfiles"), "Telescope"), + new_section("Find text", LazyVim.pick("live_grep"), "Telescope"), + new_section("Config", LazyVim.pick.config_files(), "Config"), + new_section("Restore session", [[lua require("persistence").load()]], "Session"), + new_section("Lazy Extras", "LazyExtras", "Config"), + new_section("Lazy", "Lazy", "Config"), + new_section("Quit", "qa", "Built-in"), }, content_hooks = { starter.gen_hook.adding_bullet(pad .. "░ ", false), @@ -111,15 +111,15 @@ end evaluate_single = true, header = logo, items = { - new_section("Find file", "Telescope find_files", "Telescope"), - new_section("Recent files", "Telescope oldfiles", "Telescope"), - new_section("Grep text", "Telescope live_grep", "Telescope"), - new_section("Config", "lua require('lazyvim.util').telescope.config_files()()", "Config"), - new_section("Extras", "LazyExtras", "Config"), - new_section("Lazy", "Lazy", "Config"), - new_section("New file", "ene | startinsert", "Built-in"), - new_section("Quit", "qa", "Built-in"), - new_section("Session restore", [[lua require("persistence").load()]], "Session"), + new_section("Find file", LazyVim.pick(), "Telescope"), + new_section("New file", "ene | startinsert", "Built-in"), + new_section("Recent files", LazyVim.pick("oldfiles"), "Telescope"), + new_section("Find text", LazyVim.pick("live_grep"), "Telescope"), + new_section("Config", LazyVim.pick.config_files(), "Config"), + new_section("Restore session", [[lua require("persistence").load()]], "Session"), + new_section("Lazy Extras", "LazyExtras", "Config"), + new_section("Lazy", "Lazy", "Config"), + new_section("Quit", "qa", "Built-in"), }, content_hooks = { starter.gen_hook.adding_bullet(pad .. "░ ", false), diff --git a/docs/keymaps.md b/docs/keymaps.md index 38bbabce37..a72533a5ca 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -226,50 +226,6 @@ possible keymaps starting with ``. | <leader>ql | Restore Last Session | **n** | | <leader>qs | Restore Session | **n** | -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>so | Options | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - ## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) | Key | Description | Mode | @@ -406,58 +362,6 @@ Part of [lazyvim.plugins.extras.editor.dial](/extras/editor/dial) | g<C-a> | Increment | **n**, **v** | | g<C-x> | Decrement | **n**, **v** | -## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) -Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - -## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) -Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>st | Todo | **n** | -| <leader>sT | Todo/Fix/Fixme | **n** | - ## [harpoon](https://github.com/ThePrimeagen/harpoon.git) Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4f49ec5ca6..c2db08bfc7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -5,6 +5,10 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +### Includes the following extras + +- [editor.fzf](/extras/editor/fzf) + ## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) file explorer @@ -234,50 +238,6 @@ opts = { open_cmd = "noswapfile vnew" } -## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "nvim-telescope/telescope-fzf-native.nvim", - build = have_make and "make" - or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = have_make or have_cmake, - config = function(plugin) - LazyVim.on_load("telescope.nvim", function() - local ok, err = pcall(require("telescope").load_extension, "fzf") - if not ok then - local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") - if not vim.uv.fs_stat(lib) then - LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") - require("lazy").build({ plugins = { plugin }, show = false }):wait(function() - LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") - end) - else - LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) - end - end - end) - end, -} -``` - - - - - ## [flash.nvim](https://github.com/folke/flash.nvim) Flash enhances the built-in search functionality by showing labels @@ -605,308 +565,4 @@ opts = {} -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - Fuzzy finder. - The default key bindings to find files will use Telescope's - `find_files` or `git_files` depending on whether the - directory is a git repo. - - - - - - -```lua -opts = function() - local actions = require("telescope.actions") - - local open_with_trouble = function(...) - return require("trouble.sources.telescope").open(...) - end - local find_files_no_ignore = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { no_ignore = true, default_text = line })() - end - local find_files_with_hidden = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { hidden = true, default_text = line })() - end - - return { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - -- open files in the first window that is an actual file. - -- use the current window if no other window is available. - get_selection_window = function() - local wins = vim.api.nvim_list_wins() - table.insert(wins, 1, vim.api.nvim_get_current_win()) - for _, win in ipairs(wins) do - local buf = vim.api.nvim_win_get_buf(win) - if vim.bo[buf].buftype == "" then - return win - end - end - return 0 - end, - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - [""] = find_files_no_ignore, - [""] = find_files_with_hidden, - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - [""] = actions.preview_scrolling_down, - [""] = actions.preview_scrolling_up, - }, - n = { - ["q"] = actions.close, - }, - }, - }, - } -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - version = false, -- telescope did only one release, so use HEAD for now - dependencies = { - { - "nvim-telescope/telescope-fzf-native.nvim", - build = have_make and "make" - or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = have_make or have_cmake, - config = function(plugin) - LazyVim.on_load("telescope.nvim", function() - local ok, err = pcall(require("telescope").load_extension, "fzf") - if not ok then - local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") - if not vim.uv.fs_stat(lib) then - LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") - require("lazy").build({ plugins = { plugin }, show = false }):wait(function() - LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") - end) - else - LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) - end - end - end) - end, - }, - }, - keys = { - { - ",", - "Telescope buffers sort_mru=true sort_lastused=true", - desc = "Switch Buffer", - }, - { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, - { ":", "Telescope command_history", desc = "Command History" }, - { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - -- find - { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, - { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, - { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, - { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, - { "fr", "Telescope oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, - -- git - { "gc", "Telescope git_commits", desc = "Commits" }, - { "gs", "Telescope git_status", desc = "Status" }, - -- search - { 's"', "Telescope registers", desc = "Registers" }, - { "sa", "Telescope autocommands", desc = "Auto Commands" }, - { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, - { "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" }, - { "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" }, - { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, - { "sj", "Telescope jumplist", desc = "Jumplist" }, - { "sk", "Telescope keymaps", desc = "Key Maps" }, - { "sl", "Telescope loclist", desc = "Location List" }, - { "sM", "Telescope man_pages", desc = "Man Pages" }, - { "sm", "Telescope marks", desc = "Jump to Mark" }, - { "so", "Telescope vim_options", desc = "Options" }, - { "sR", "Telescope resume", desc = "Resume" }, - { "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)" }, - { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, - { - "ss", - function() - require("telescope.builtin").lsp_document_symbols({ - symbols = require("lazyvim.config").get_kind_filter(), - }) - end, - desc = "Goto Symbol", - }, - { - "sS", - function() - require("telescope.builtin").lsp_dynamic_workspace_symbols({ - symbols = require("lazyvim.config").get_kind_filter(), - }) - end, - desc = "Goto Symbol (Workspace)", - }, - }, - opts = function() - local actions = require("telescope.actions") - - local open_with_trouble = function(...) - return require("trouble.sources.telescope").open(...) - end - local find_files_no_ignore = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { no_ignore = true, default_text = line })() - end - local find_files_with_hidden = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { hidden = true, default_text = line })() - end - - return { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - -- open files in the first window that is an actual file. - -- use the current window if no other window is available. - get_selection_window = function() - local wins = vim.api.nvim_list_wins() - table.insert(wins, 1, vim.api.nvim_get_current_win()) - for _, win in ipairs(wins) do - local buf = vim.api.nvim_win_get_buf(win) - if vim.bo[buf].buftype == "" then - return win - end - end - return 0 - end, - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - [""] = find_files_no_ignore, - [""] = find_files_with_hidden, - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - [""] = actions.preview_scrolling_down, - [""] = actions.preview_scrolling_up, - }, - n = { - ["q"] = actions.close, - }, - }, - }, - } - end, -} -``` - - - - - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - Flash Telescope config - - - - - - -```lua -opts = function(_, opts) - if not LazyVim.has("flash.nvim") then - return - end - local function flash(prompt_bufnr) - require("flash").jump({ - pattern = "^", - label = { after = { 0, 0 } }, - search = { - mode = "search", - exclude = { - function(win) - return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" - end, - }, - }, - action = function(match) - local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) - picker:set_selection(match.pos[1] - 1) - end, - }) - end - opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { - mappings = { n = { s = flash }, i = { [""] = flash } }, - }) -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - optional = true, - opts = function(_, opts) - if not LazyVim.has("flash.nvim") then - return - end - local function flash(prompt_bufnr) - require("flash").jump({ - pattern = "^", - label = { after = { 0, 0 } }, - search = { - mode = "search", - exclude = { - function(win) - return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" - end, - }, - }, - action = function(match) - local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) - picker:set_selection(match.pos[1] - 1) - end, - }) - end - opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { - mappings = { n = { s = flash }, i = { [""] = flash } }, - }) - end, -} -``` - - - - - diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 351fffb700..cbf88236b0 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -75,47 +75,6 @@ opts = { -## [dressing.nvim](https://github.com/stevearc/dressing.nvim) - - better vim.ui - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "stevearc/dressing.nvim", - lazy = true, - init = function() - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.select = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.select(...) - end - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.input = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.input(...) - end - end, -} -``` - - - - - ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) This is what powers LazyVim's fancy-looking From f004cec3ec615c604d94196b639eecacaa336f35 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Jun 2024 05:17:12 +0000 Subject: [PATCH 170/553] chore(build): auto-generate docs --- docs/keymaps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index a72533a5ca..208c541ec0 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -113,9 +113,9 @@ possible keymaps starting with ``. | <leader>cl | Lsp Info | **n** | | gd | Goto Definition | **n** | | gr | References | **n** | -| gD | Goto Declaration | **n** | | gI | Goto Implementation | **n** | | gy | Goto T[y]pe Definition | **n** | +| gD | Goto Declaration | **n** | | K | Hover | **n** | | gK | Signature Help | **n** | | <c-k> | Signature Help | **i** | From 09a249f1e1a1b9cdd6764cb99934d507b17893fb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Jun 2024 13:19:04 +0000 Subject: [PATCH 171/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index cbf88236b0..302e480674 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -691,11 +691,11 @@ opts = function() header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.pick(), desc = " Find File", icon = " ", key = "f" }, + { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = LazyVim.pick("oldfiles"), desc = " Recent Files", icon = " ", key = "r" }, - { action = LazyVim.pick("live_grep"), desc = " Find Text", icon = " ", key = "g" }, - { action = LazyVim.pick.config_files(), desc = " Config", icon = " ", key = "c" }, + { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, + { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, + { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, @@ -761,11 +761,11 @@ end header = vim.split(logo, "\n"), -- stylua: ignore center = { - { action = LazyVim.pick(), desc = " Find File", icon = " ", key = "f" }, + { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = LazyVim.pick("oldfiles"), desc = " Recent Files", icon = " ", key = "r" }, - { action = LazyVim.pick("live_grep"), desc = " Find Text", icon = " ", key = "g" }, - { action = LazyVim.pick.config_files(), desc = " Config", icon = " ", key = "c" }, + { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, + { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, + { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, From d851467ce67e92ab6dec0fdf61c9d49e74c16517 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 10:00:48 +0200 Subject: [PATCH 172/553] fix: docgen --- docs/extras/editor/telescope.md | 433 ++++++++++++++++++++++++++++++++ docs/extras/lang/python.md | 3 + docs/keymaps.md | 89 +++++++ docs/plugins/editor.md | 1 + lua/build.lua | 12 +- 5 files changed, 536 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 0aa90d20aa..96ccf8cec3 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -32,4 +32,437 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "nvim-telescope/telescope-fzf-native.nvim", + build = have_make and "make" + or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + enabled = have_make or have_cmake, + config = function(plugin) + LazyVim.on_load("telescope.nvim", function() + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end + end) + end, +} +``` + + + + + +## [dressing.nvim](https://github.com/stevearc/dressing.nvim) + + better vim.ui with telescope + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "stevearc/dressing.nvim", + lazy = true, + init = function() + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.select = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.select(...) + end + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.input = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.input(...) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```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 +``` + + + + + + +```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, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + Fuzzy finder. + The default key bindings to find files will use Telescope's + `find_files` or `git_files` depending on whether the + directory is a git repo. + + + + + + +```lua +opts = function() + local actions = require("telescope.actions") + + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end + local find_files_no_ignore = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() + end + local find_files_with_hidden = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { hidden = true, default_text = line })() + end + + return { + defaults = { + prompt_prefix = " ", + selection_caret = " ", + -- open files in the first window that is an actual file. + -- use the current window if no other window is available. + get_selection_window = function() + local wins = vim.api.nvim_list_wins() + table.insert(wins, 1, vim.api.nvim_get_current_win()) + for _, win in ipairs(wins) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.bo[buf].buftype == "" then + return win + end + end + return 0 + end, + mappings = { + i = { + [""] = open_with_trouble, + [""] = open_with_trouble, + [""] = find_files_no_ignore, + [""] = find_files_with_hidden, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + }, + n = { + ["q"] = actions.close, + }, + }, + }, + } +end +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + version = false, -- telescope did only one release, so use HEAD for now + dependencies = { + { + "nvim-telescope/telescope-fzf-native.nvim", + build = have_make and "make" + or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + enabled = have_make or have_cmake, + config = function(plugin) + LazyVim.on_load("telescope.nvim", function() + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end + end) + end, + }, + }, + keys = { + { + ",", + "Telescope buffers sort_mru=true sort_lastused=true", + desc = "Switch Buffer", + }, + { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { ":", "Telescope command_history", desc = "Command History" }, + { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, + { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, + { "fr", "Telescope oldfiles", desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, + -- git + { "gc", "Telescope git_commits", desc = "Commits" }, + { "gs", "Telescope git_status", desc = "Status" }, + -- search + { 's"', "Telescope registers", desc = "Registers" }, + { "sa", "Telescope autocommands", desc = "Auto Commands" }, + { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, + { "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" }, + { "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" }, + { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, + { "sj", "Telescope jumplist", desc = "Jumplist" }, + { "sk", "Telescope keymaps", desc = "Key Maps" }, + { "sl", "Telescope loclist", desc = "Location List" }, + { "sM", "Telescope man_pages", desc = "Man Pages" }, + { "sm", "Telescope marks", desc = "Jump to Mark" }, + { "so", "Telescope vim_options", desc = "Options" }, + { "sR", "Telescope resume", desc = "Resume" }, + { "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)" }, + { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, + { + "ss", + function() + require("telescope.builtin").lsp_document_symbols({ + symbols = require("lazyvim.config").get_kind_filter(), + }) + end, + desc = "Goto Symbol", + }, + { + "sS", + function() + require("telescope.builtin").lsp_dynamic_workspace_symbols({ + symbols = require("lazyvim.config").get_kind_filter(), + }) + end, + desc = "Goto Symbol (Workspace)", + }, + }, + opts = function() + local actions = require("telescope.actions") + + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end + local find_files_no_ignore = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() + end + local find_files_with_hidden = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { hidden = true, default_text = line })() + end + + return { + defaults = { + prompt_prefix = " ", + selection_caret = " ", + -- open files in the first window that is an actual file. + -- use the current window if no other window is available. + get_selection_window = function() + local wins = vim.api.nvim_list_wins() + table.insert(wins, 1, vim.api.nvim_get_current_win()) + for _, win in ipairs(wins) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.bo[buf].buftype == "" then + return win + end + end + return 0 + end, + mappings = { + i = { + [""] = open_with_trouble, + [""] = open_with_trouble, + [""] = find_files_no_ignore, + [""] = find_files_with_hidden, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + }, + n = { + ["q"] = actions.close, + }, + }, + }, + } + end, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ + + Flash Telescope config + + + + + + +```lua +opts = function(_, opts) + if not LazyVim.has("flash.nvim") then + return + end + local function flash(prompt_bufnr) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" + end, + }, + }, + action = function(match) + local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) + picker:set_selection(match.pos[1] - 1) + end, + }) + end + opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { + mappings = { n = { s = flash }, i = { [""] = flash } }, + }) +end +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + optional = true, + opts = function(_, opts) + if not LazyVim.has("flash.nvim") then + return + end + local function flash(prompt_bufnr) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" + end, + }, + }, + action = function(match) + local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) + picker:set_selection(match.pos[1] - 1) + end, + }) + end + opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { + mappings = { n = { s = flash }, i = { [""] = flash } }, + }) + end, +} +``` + + + + + diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 8e222d1494..0737221210 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -249,6 +249,9 @@ opts = { "linux-cultist/venv-selector.nvim", branch = "regexp", -- Use this branch for the new version cmd = "VenvSelect", + enabled = function() + return LazyVim.has("telescope.nvim") + end, opts = { settings = { options = { diff --git a/docs/keymaps.md b/docs/keymaps.md index 208c541ec0..17b7ae24d9 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -226,6 +226,50 @@ possible keymaps starting with ``. | <leader>ql | Restore Last Session | **n** | | <leader>qs | Restore Session | **n** | +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Switch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Commits | **n** | +| <leader>gs | Status | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Auto Commands | **n** | +| <leader>sb | Buffer | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Document Diagnostics | **n** | +| <leader>sD | Workspace Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | +| <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Jump to Mark | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>so | Options | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>ss | Goto Symbol | **n** | +| <leader>sS | Goto Symbol (Workspace) | **n** | +| <leader>sw | Word (Root Dir) | **n** | +| <leader>sW | Word (cwd) | **n** | +| <leader>sw | Selection (Root Dir) | **v** | +| <leader>sW | Selection (cwd) | **v** | +| <leader>uC | Colorscheme with Preview | **n** | + ## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) | Key | Description | Mode | @@ -448,6 +492,51 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) +Part of [lazyvim.plugins.extras.editor.telescope](/extras/editor/telescope) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Switch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Commits | **n** | +| <leader>gs | Status | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Auto Commands | **n** | +| <leader>sb | Buffer | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Document Diagnostics | **n** | +| <leader>sD | Workspace Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | +| <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Jump to Mark | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>so | Options | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>ss | Goto Symbol | **n** | +| <leader>sS | Goto Symbol (Workspace) | **n** | +| <leader>sw | Word (Root Dir) | **n** | +| <leader>sW | Word (cwd) | **n** | +| <leader>sw | Selection (Root Dir) | **v** | +| <leader>sW | Selection (cwd) | **v** | +| <leader>uC | Colorscheme with Preview | **n** | + ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c2db08bfc7..4d24eb05bf 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -8,6 +8,7 @@ import TabItem from '@theme/TabItem'; ### Includes the following extras - [editor.fzf](/extras/editor/fzf) +- [editor.telescope](/extras/editor/telescope) ## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) diff --git a/lua/build.lua b/lua/build.lua index edcf9a2e9a..e4bac6fa38 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -371,12 +371,20 @@ function M.plugins(path) local test = rootLazyVim .. "/lua/lazyvim/plugins/" .. path local mod = dofile(test) local imports = {} - for k, v in pairs(mod) do + for _, v in pairs(mod) do if type(v) == "table" and v.import then table.insert(imports, v.import) - table.remove(mod, k) end end + if #imports > 0 then + local nmod = {} + for _, v in ipairs(mod) do + if not (type(v) == "table" and v.import) then + table.insert(nmod, v) + end + end + mod = nmod + end local spec = require("lazy.core.plugin").Spec.new(mod, { optional = true }) local source = Util.read_file(test) local parser = vim.treesitter.get_string_parser(source, "lua") From 2d85cac1dac08d4572d4de76587d878dd07d50c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 08:20:15 +0000 Subject: [PATCH 173/553] chore(build): auto-generate docs --- docs/configuration/lazy.nvim.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/configuration/lazy.nvim.md b/docs/configuration/lazy.nvim.md index c71b9cc7fb..570770f998 100644 --- a/docs/configuration/lazy.nvim.md +++ b/docs/configuration/lazy.nvim.md @@ -55,10 +55,6 @@ require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import any extras modules here - -- { import = "lazyvim.plugins.extras.lang.typescript" }, - -- { import = "lazyvim.plugins.extras.lang.json" }, - -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins { import = "plugins" }, }, From cc930f5395120bb7f8847fe88c0596363d0af188 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 09:17:40 +0000 Subject: [PATCH 174/553] chore(build): auto-generate docs --- docs/extras/ui/edgy.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 23faeba359..fbe21383a4 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,7 +112,14 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width @@ -240,7 +247,14 @@ end pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width From 113f8defbccc7a20c56367720a964a8b5622f72f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 11:20:09 +0200 Subject: [PATCH 175/553] fix: hack to get proper fzf docs --- docs/extras/editor/fzf.md | 394 ++++++++++++++++++++++++++++++++++++++ lua/build.lua | 1 + 2 files changed, 395 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 56dfcccd39..186666dbc3 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -32,4 +32,398 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [fzf-lua](https://github.com/ibhagwan/fzf-lua) + + + + + +```lua +opts = function(_, opts) + local config = require("fzf-lua.config") + local actions = require("fzf-lua.actions") + + -- Quickfix + config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" + config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" + config.defaults.keymap.fzf["ctrl-x"] = "jump" + config.defaults.keymap.builtin[""] = "preview-page-down" + config.defaults.keymap.builtin[""] = "preview-page-up" + + -- Trouble + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + + -- Toggle root dir / cwd + config.defaults.actions.files["ctrl-r"] = function(_, ctx) + local o = vim.deepcopy(ctx.__call_opts) + o.root = o.root == false + o.cwd = nil + o.buf = ctx.__CTX.bufnr + LazyVim.pick.open(ctx.__INFO.cmd, o) + end + config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") + + -- use the same prompt for all + local defaults = require("fzf-lua.profiles.default-title") + local function fix(t) + t.prompt = t.prompt ~= nil and " " or nil + for _, v in pairs(t) do + if type(v) == "table" then + fix(v) + end + end + end + fix(defaults) + + return vim.tbl_deep_extend("force", defaults, { + fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, + defaults = { + -- formatter = "path.filename_first", + formatter = "path.dirname_first", + }, + -- Custom LazyVim option to configure vim.ui.select + ui_select = function(fzf_opts, items) + return vim.tbl_deep_extend("force", fzf_opts, { + prompt = " ", + winopts = { + title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", + title_pos = "center", + }, + }, fzf_opts.kind == "codeaction" and { + 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, + width = 0.5, + preview = { + layout = "vertical", + vertical = "down:15,border-top", + }, + }, + } or { + 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), + }, + }) + end, + winopts = { + width = 0.8, + height = 0.8, + row = 0.5, + col = 0.5, + preview = { + scrollchars = { "┃", "" }, + }, + }, + files = { + cwd_prompt = false, + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + grep = { + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + lsp = { + symbols = { + symbol_hl = function(s) + return "TroubleIcon" .. s + end, + symbol_fmt = function(s) + return s:lower() .. "\t" + end, + child_prefix = false, + }, + code_actions = { + previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, + }, + }, + }) +end +``` + + + + + + +```lua +{ + "ibhagwan/fzf-lua", + event = "VeryLazy", + opts = function(_, opts) + local config = require("fzf-lua.config") + local actions = require("fzf-lua.actions") + + -- Quickfix + config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" + config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" + config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" + config.defaults.keymap.fzf["ctrl-x"] = "jump" + config.defaults.keymap.builtin[""] = "preview-page-down" + config.defaults.keymap.builtin[""] = "preview-page-up" + + -- Trouble + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + + -- Toggle root dir / cwd + config.defaults.actions.files["ctrl-r"] = function(_, ctx) + local o = vim.deepcopy(ctx.__call_opts) + o.root = o.root == false + o.cwd = nil + o.buf = ctx.__CTX.bufnr + LazyVim.pick.open(ctx.__INFO.cmd, o) + end + config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] + config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") + + -- use the same prompt for all + local defaults = require("fzf-lua.profiles.default-title") + local function fix(t) + t.prompt = t.prompt ~= nil and " " or nil + for _, v in pairs(t) do + if type(v) == "table" then + fix(v) + end + end + end + fix(defaults) + + return vim.tbl_deep_extend("force", defaults, { + fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, + defaults = { + -- formatter = "path.filename_first", + formatter = "path.dirname_first", + }, + -- Custom LazyVim option to configure vim.ui.select + ui_select = function(fzf_opts, items) + return vim.tbl_deep_extend("force", fzf_opts, { + prompt = " ", + winopts = { + title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", + title_pos = "center", + }, + }, fzf_opts.kind == "codeaction" and { + 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, + width = 0.5, + preview = { + layout = "vertical", + vertical = "down:15,border-top", + }, + }, + } or { + 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), + }, + }) + end, + winopts = { + width = 0.8, + height = 0.8, + row = 0.5, + col = 0.5, + preview = { + scrollchars = { "┃", "" }, + }, + }, + files = { + cwd_prompt = false, + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + grep = { + actions = { + ["alt-i"] = { actions.toggle_ignore }, + ["alt-h"] = { actions.toggle_hidden }, + }, + }, + lsp = { + symbols = { + symbol_hl = function(s) + return "TroubleIcon" .. s + end, + symbol_fmt = function(s) + return s:lower() .. "\t" + end, + child_prefix = false, + }, + code_actions = { + previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, + }, + }, + }) + end, + config = function(_, opts) + require("fzf-lua").setup(opts) + require("fzf-lua").register_ui_select(opts.ui_select or nil) + end, + keys = { + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { + ",", + "FzfLua buffers sort_mru=true sort_lastused=true", + desc = "Switch Buffer", + }, + { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { ":", "FzfLua command_history", desc = "Command History" }, + { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, + { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, + { "fr", "FzfLua oldfiles", desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, + -- git + { "gc", "FzfLua git_commits", desc = "Commits" }, + { "gs", "FzfLua git_status", desc = "Status" }, + -- search + { 's"', "FzfLua registers", desc = "Registers" }, + { "sa", "FzfLua autocmds", desc = "Auto Commands" }, + { "sb", "FzfLua grep_curbuf", desc = "Buffer" }, + { "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" }, + { "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" }, + { "sH", "FzfLua highlights", desc = "Search Highlight Groups" }, + { "sj", "FzfLua jumps", desc = "Jumplist" }, + { "sk", "FzfLua keymaps", desc = "Key Maps" }, + { "sl", "FzfLua loclist", desc = "Location List" }, + { "sM", "FzfLua man_pages", desc = "Man Pages" }, + { "sm", "FzfLua marks", desc = "Jump to Mark" }, + { "sR", "FzfLua resume", desc = "Resume" }, + { "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)" }, + { "uC", LazyVim.pick("colorschemes"), desc = "Colorscheme with Preview" }, + { + "ss", + function() + require("fzf-lua").lsp_document_symbols({ + regex_filter = symbols_filter, + }) + end, + desc = "Goto Symbol", + }, + { + "sS", + function() + require("fzf-lua").lsp_live_workspace_symbols({ + regex_filter = symbols_filter, + }) + end, + desc = "Goto Symbol (Workspace)", + }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function() + local Keys = require("lazyvim.plugins.lsp.keymaps").get() + -- stylua: ignore + vim.list_extend(Keys, { + { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + }) +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 jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + }) + end, +} +``` + + + + + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/todo-comments.nvim", + optional = true, + -- stylua: ignore + keys = { + { "st", function() require("todo-comments.fzf").todo() end, desc = "Todo" }, + { "sT", function () require("todo-comments.fzf").todo({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + }, +} +``` + + + + + diff --git a/lua/build.lua b/lua/build.lua index e4bac6fa38..d1222a1937 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -368,6 +368,7 @@ They are only shown here for reference. end function M.plugins(path) + LazyVim.pick.picker = nil local test = rootLazyVim .. "/lua/lazyvim/plugins/" .. path local mod = dofile(test) local imports = {} From b45bb75befa69ae3856a2a04120b9dd601770483 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 16:28:40 +0200 Subject: [PATCH 176/553] fix: keymaps --- docs/keymaps.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ lua/build.lua | 2 ++ 2 files changed, 54 insertions(+) diff --git a/docs/keymaps.md b/docs/keymaps.md index 17b7ae24d9..033fb3958b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -406,6 +406,58 @@ Part of [lazyvim.plugins.extras.editor.dial](/extras/editor/dial) | g<C-a> | Increment | **n**, **v** | | g<C-x> | Decrement | **n**, **v** | +## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) +Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Switch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Commits | **n** | +| <leader>gs | Status | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Auto Commands | **n** | +| <leader>sb | Buffer | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Document Diagnostics | **n** | +| <leader>sD | Workspace Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | +| <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Jump to Mark | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>ss | Goto Symbol | **n** | +| <leader>sS | Goto Symbol (Workspace) | **n** | +| <leader>sw | Word (Root Dir) | **n** | +| <leader>sW | Word (cwd) | **n** | +| <leader>sw | Selection (Root Dir) | **v** | +| <leader>sW | Selection (cwd) | **v** | +| <leader>uC | Colorscheme with Preview | **n** | + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) +Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>st | Todo | **n** | +| <leader>sT | Todo/Fix/Fixme | **n** | + ## [harpoon](https://github.com/ThePrimeagen/harpoon.git) Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) diff --git a/lua/build.lua b/lua/build.lua index d1222a1937..22da4f5338 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -59,6 +59,7 @@ function M.keymaps() mode = mode == nil and { "n", "v", "o" } or type(mode) == "string" and { mode } or mode local desc = opts and opts.desc or "" local key = lhs .. desc .. group + -- print(group, lhs, desc) if keymaps[key] then vim.list_extend(keymaps[key].mode, mode) else @@ -94,6 +95,7 @@ function M.keymaps() if t == "file" and name:find("%.lua$") then local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "") local extra_doc = "/extras/" .. modname:gsub("lazyvim%.plugins%.extras%.", ""):gsub("%.", "/") + LazyVim.pick.picker = nil local extra = require("lazy.core.plugin").Spec.new({ import = modname }, { optional = true }) local orig_spec = require("lazy.core.config").spec require("lazy.core.config").spec = extra From 1c3b3f944b80c47e1fe959640eaf091ebca09ca5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 16:47:33 +0200 Subject: [PATCH 177/553] fix: cleanup old extras --- docs/extras/coding/mini-ai.md | 187 --------------------------- docs/extras/lang/python-semshi.md | 90 ------------- docs/extras/ui/treesitter-rewrite.md | 156 ---------------------- docs/plugins/editor.md | 6 +- lua/build.lua | 21 ++- scripts/build_docs.lua | 4 +- 6 files changed, 24 insertions(+), 440 deletions(-) delete mode 100644 docs/extras/coding/mini-ai.md delete mode 100644 docs/extras/lang/python-semshi.md delete mode 100644 docs/extras/ui/treesitter-rewrite.md diff --git a/docs/extras/coding/mini-ai.md b/docs/extras/coding/mini-ai.md deleted file mode 100644 index 2a2e3e3cd0..0000000000 --- a/docs/extras/coding/mini-ai.md +++ /dev/null @@ -1,187 +0,0 @@ -# `Mini-ai` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.mini-ai" }, - { import = "plugins" }, - }, -}) -``` - -
- -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'; - -## [mini.ai](https://github.com/echasnovski/mini.ai) - - - - - -```lua -opts = function() - local ai = require("mini.ai") - return { - n_lines = 500, - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { "@block.outer", "@conditional.outer", "@loop.outer" }, - i = { "@block.inner", "@conditional.inner", "@loop.inner" }, - }, {}), - f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), - c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), - t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, - d = { "%f[%d]%d+" }, -- digits - e = { -- Word with case - { - "%u[%l%d]+%f[^%l%d]", - "%f[%S][%l%d]+%f[^%l%d]", - "%f[%P][%l%d]+%f[^%l%d]", - "^[%l%d]+%f[^%l%d]", - }, - "^().*()$", - }, - g = function() -- Whole buffer, similar to `gg` and 'G' motion - local from = { line = 1, col = 1 } - local to = { - line = vim.fn.line("$"), - col = math.max(vim.fn.getline("$"):len(), 1), - } - return { from = from, to = to } - end, - u = ai.gen_spec.function_call(), -- u for "Usage" - U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name - }, - } -end -``` - - - - - - -```lua -{ - "echasnovski/mini.ai", - desc = "Enhanced text objects", - recommended = true, - -- keys = { - -- { "a", mode = { "x", "o" } }, - -- { "i", mode = { "x", "o" } }, - -- }, - event = "VeryLazy", - opts = function() - local ai = require("mini.ai") - return { - n_lines = 500, - custom_textobjects = { - o = ai.gen_spec.treesitter({ - a = { "@block.outer", "@conditional.outer", "@loop.outer" }, - i = { "@block.inner", "@conditional.inner", "@loop.inner" }, - }, {}), - f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }, {}), - c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }, {}), - t = { "<([%p%w]-)%f[^<%w][^<>]->.-", "^<.->().*()$" }, - d = { "%f[%d]%d+" }, -- digits - e = { -- Word with case - { - "%u[%l%d]+%f[^%l%d]", - "%f[%S][%l%d]+%f[^%l%d]", - "%f[%P][%l%d]+%f[^%l%d]", - "^[%l%d]+%f[^%l%d]", - }, - "^().*()$", - }, - g = function() -- Whole buffer, similar to `gg` and 'G' motion - local from = { line = 1, col = 1 } - local to = { - line = vim.fn.line("$"), - col = math.max(vim.fn.getline("$"):len(), 1), - } - return { from = from, to = to } - end, - u = ai.gen_spec.function_call(), -- u for "Usage" - U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name - }, - } - end, - config = function(_, opts) - require("mini.ai").setup(opts) - -- register all text objects with which-key - LazyVim.on_load("which-key.nvim", function() - ---@type table - local i = { - [" "] = "Whitespace", - ['"'] = 'Balanced "', - ["'"] = "Balanced '", - ["`"] = "Balanced `", - ["("] = "Balanced (", - [")"] = "Balanced ) including white-space", - [">"] = "Balanced > including white-space", - [""] = "Balanced <", - ["]"] = "Balanced ] including white-space", - ["["] = "Balanced [", - ["}"] = "Balanced } including white-space", - ["{"] = "Balanced {", - ["?"] = "User Prompt", - _ = "Underscore", - a = "Argument", - b = "Balanced ), ], }", - c = "Class", - d = "Digit(s)", - e = "Word in CamelCase & snake_case", - f = "Function", - g = "Entire file", - o = "Block, conditional, loop", - q = "Quote `, \", '", - t = "Tag", - u = "Use/call function & method", - U = "Use/call without dot in name", - } - local a = vim.deepcopy(i) - for k, v in pairs(a) do - a[k] = v:gsub(" including.*", "") - end - - local ic = vim.deepcopy(i) - local ac = vim.deepcopy(a) - for key, name in pairs({ n = "Next", l = "Last" }) do - i[key] = vim.tbl_extend("force", { name = "Inside " .. name .. " textobject" }, ic) - a[key] = vim.tbl_extend("force", { name = "Around " .. name .. " textobject" }, ac) - end - require("which-key").register({ - mode = { "o", "x" }, - i = i, - a = a, - }) - end) - end, -} -``` - - - - - - diff --git a/docs/extras/lang/python-semshi.md b/docs/extras/lang/python-semshi.md deleted file mode 100644 index f5c5aa8bfb..0000000000 --- a/docs/extras/lang/python-semshi.md +++ /dev/null @@ -1,90 +0,0 @@ -# Python Semshi - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.python-semshi" }, - { import = "plugins" }, - }, -}) -``` - -
- -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'; - -## [semshi](https://github.com/wookayin/semshi) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - -- "numiras/semshi", - "wookayin/semshi", -- use a maintained fork - ft = "python", - build = ":UpdateRemotePlugins", - init = function() - -- Disabled these features better provided by LSP or other more general plugins - vim.g["semshi#error_sign"] = false - vim.g["semshi#simplify_markup"] = false - vim.g["semshi#mark_selected_nodes"] = false - vim.g["semshi#update_delay_factor"] = 0.001 - - -- This autocmd must be defined in init to take effect - vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, { - group = vim.api.nvim_create_augroup("SemanticHighlight", {}), - callback = function() - -- Only add style, inherit or link to the LSP's colors - vim.cmd([[ - highlight! link semshiGlobal @none - highlight! link semshiImported @none - highlight! link semshiParameter @lsp.type.parameter - highlight! link semshiBuiltin @function.builtin - highlight! link semshiAttribute @field - highlight! link semshiSelf @lsp.type.selfKeyword - highlight! link semshiUnresolved @none - highlight! link semshiFree @none - highlight! link semshiAttribute @none - highlight! link semshiParameterUnused @none - ]]) - end, - }) - end, -} -``` - - - - - - diff --git a/docs/extras/ui/treesitter-rewrite.md b/docs/extras/ui/treesitter-rewrite.md deleted file mode 100644 index 86fa2257ea..0000000000 --- a/docs/extras/ui/treesitter-rewrite.md +++ /dev/null @@ -1,156 +0,0 @@ -# `Treesitter-rewrite` - - - -:::info -You can enable the extra with the `:LazyExtras` command. -Plugins marked as optional will only be configured if they are installed. -::: - -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.treesitter-rewrite" }, - { import = "plugins" }, - }, -}) -``` - -
- -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 = function() - patch() - return { - highlight = { enable = true }, - indent = { enable = true }, - ensure_install = { - "bash", - "c", - "diff", - "html", - "javascript", - "jsdoc", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "xml", - "yaml", - }, - } -end -``` - - - - - - -```lua -{ - "nvim-treesitter/nvim-treesitter", - version = false, -- last release is way too old and doesn't work on Windows - branch = "main", - build = ":TSUpdate", - lazy = false, - cmd = {}, - opts = function() - patch() - return { - highlight = { enable = true }, - indent = { enable = true }, - ensure_install = { - "bash", - "c", - "diff", - "html", - "javascript", - "jsdoc", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "xml", - "yaml", - }, - } - end, - init = function() end, - ---@param opts TSConfig - config = function(_, opts) - ---@return string[] - local function norm(ensure) - return ensure == nil and {} or type(ensure) == "string" and { ensure } or ensure - end - - -- ensure_installed is deprecated, but still supported - opts.ensure_install = LazyVim.dedup(vim.list_extend(norm(opts.ensure_install), norm(opts.ensure_installed))) - - require("nvim-treesitter").setup(opts) - patch() - - -- 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, -} -``` - - - - - - diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4d24eb05bf..c703b513d7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = { use_diagnostic_signs = true } +opts = {} ``` @@ -476,8 +476,8 @@ opts = { use_diagnostic_signs = true } ```lua { "folke/trouble.nvim", - cmd = { "TroubleToggle", "Trouble" }, - opts = { use_diagnostic_signs = true }, + cmd = { "Trouble" }, + opts = {}, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, diff --git a/lua/build.lua b/lua/build.lua index 22da4f5338..4be0ed610b 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -6,7 +6,7 @@ Handler.init() local M = {} local root = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h:h") -local rootLazyVim = root .. "/.nvim/plugins/LazyVim" +local rootLazyVim = require("lazy.core.config").plugins.LazyVim.dir local rootStarter = root .. "/.nvim/plugins/starter" ---@generic V @@ -279,6 +279,7 @@ function M.update() keymaps = M.keymaps(), }, docs .. "/keymaps.md") + local keep = {} ---@type string[] Util.walk(rootLazyVim .. "/lua/lazyvim/plugins/extras", function(path, name, type) if type == "file" and name:find("%.lua$") then local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "") @@ -333,6 +334,7 @@ They are only shown here for reference. "", }) local md_file = docs .. "/extras/" .. modname:gsub(".*extras%.", ""):gsub("%.", "/", 1) .. ".md" + keep[#keep + 1] = "docs" .. md_file:sub(#docs + 1) if not vim.loop.fs_stat(md_file) then local dir = vim.fn.fnamemodify(md_file, ":h") vim.fn.mkdir(dir, "p") @@ -353,6 +355,17 @@ They are only shown here for reference. end end) + -- vim.print(keep) + Util.walk("docs/extras", function(path, name, type) + if name == "index.md" or not name:find("%.md$") then + return + end + if type == "file" and not vim.tbl_contains(keep, path) then + print("del: " .. path) + vim.loop.fs_unlink(path) + end + end) + local examples = vim.fn.fnamemodify(rootStarter .. "/lua/plugins/example.lua", ":p") Docs.save({ examples = Util.read_file(examples):gsub("^[^\n]+\n[^\n]+\n[^\n]+\n", ""), @@ -442,7 +455,11 @@ function M.plugins(path) local plugin = spec.plugins[name] if plugin then - local url = plugin.url or require("lazy.core.config").plugins[name].url + local url = plugin.url + if not url then + local p = require("lazy.core.config").plugins[name] + url = p and p.url + end if not url then error("Missing url for plugin " .. name) end diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index 820746f387..d75cafc01b 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -17,8 +17,7 @@ vim.opt.runtimepath:prepend(lazypath) -- install plugins local plugins = { "LazyVim/starter", - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { "LazyVim/LazyVim", version = false }, + { "LazyVim/LazyVim", import = "lazyvim.plugins", dev = true, version = false }, { "folke/lazy.nvim", version = false }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, } @@ -27,6 +26,7 @@ local function main() print("Installing plugins") require("lazy").setup(plugins, { root = root .. "/plugins", + dev = { fallback = true }, }) if vim.o.filetype == "lazy" then From 46dde2960bb7ad6cdd69d8116265a8d40f742dd8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 14:47:56 +0000 Subject: [PATCH 178/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 +++--- docs/extras/ui/edgy.md | 18 ++---------------- docs/plugins/editor.md | 6 +++--- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 186666dbc3..65bdd0c58e 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -77,7 +77,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -200,7 +200,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -279,7 +279,7 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "close", ft = "fzf", mode = "t", nowait = true }, { "", "", ft = "fzf", mode = "t", nowait = true }, { "", "", ft = "fzf", mode = "t", nowait = true }, { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index fbe21383a4..23faeba359 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,14 +112,7 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width @@ -247,14 +240,7 @@ end pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c703b513d7..4d24eb05bf 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = {} +opts = { use_diagnostic_signs = true } ``` @@ -476,8 +476,8 @@ opts = {} ```lua { "folke/trouble.nvim", - cmd = { "Trouble" }, - opts = {}, + cmd = { "TroubleToggle", "Trouble" }, + opts = { use_diagnostic_signs = true }, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From d0be052b930c670fc683753a76a9337d748656e2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 17:56:06 +0200 Subject: [PATCH 179/553] docs: update --- docs/configuration/general.md | 6 ++++++ docs/extras/editor/fzf.md | 19 ++++++++++++++----- docs/extras/editor/telescope.md | 22 ++++++++++++++++++++++ docs/extras/ui/edgy.md | 18 ++++++++++++++++-- docs/plugins/editor.md | 6 +++--- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index af2fbfb84e..38f10cec53 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,6 +57,12 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true +-- LazyVim picker to use. +-- Can be one of: telescope, fzf +-- Leave it to "auto" to automatically use the picker +-- enabled with `:LazyExtras` +vim.g.lazyvim_picker = "auto" + -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 65bdd0c58e..779ac4e99c 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "fzf" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -77,7 +87,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -200,7 +210,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -279,9 +289,8 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "close", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, { ",", "FzfLua buffers sort_mru=true sort_lastused=true", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 96ccf8cec3..8098932cd5 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "telescope" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -98,6 +108,9 @@ opts = nil { "stevearc/dressing.nvim", lazy = true, + enabled = function() + return LazyVim.pick.want() == "telescope" + end, init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) @@ -125,6 +138,9 @@ opts = nil ```lua opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -145,6 +161,9 @@ end { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -237,6 +256,9 @@ end { "nvim-telescope/telescope.nvim", cmd = "Telescope", + enabled = function() + return LazyVim.pick.want() == "telescope" + end, version = false, -- telescope did only one release, so use HEAD for now dependencies = { { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 23faeba359..fbe21383a4 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,7 +112,14 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width @@ -240,7 +247,14 @@ end pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4d24eb05bf..c703b513d7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = { use_diagnostic_signs = true } +opts = {} ``` @@ -476,8 +476,8 @@ opts = { use_diagnostic_signs = true } ```lua { "folke/trouble.nvim", - cmd = { "TroubleToggle", "Trouble" }, - opts = { use_diagnostic_signs = true }, + cmd = { "Trouble" }, + opts = {}, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From 190e996c2d864439e802123013b1529aed153af6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 15:56:26 +0000 Subject: [PATCH 180/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 ------ docs/extras/editor/fzf.md | 19 +++++-------------- docs/extras/editor/telescope.md | 22 ---------------------- docs/extras/ui/edgy.md | 18 ++---------------- docs/plugins/editor.md | 6 +++--- 5 files changed, 10 insertions(+), 61 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 38f10cec53..af2fbfb84e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,12 +57,6 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true --- LazyVim picker to use. --- Can be one of: telescope, fzf --- Leave it to "auto" to automatically use the picker --- enabled with `:LazyExtras` -vim.g.lazyvim_picker = "auto" - -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 779ac4e99c..65bdd0c58e 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -22,16 +22,6 @@ require("lazy").setup({ -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "fzf" -``` - Below you can find a list of included plugins and their default settings. :::caution @@ -87,7 +77,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -210,7 +200,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -289,8 +279,9 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "close", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, { ",", "FzfLua buffers sort_mru=true sort_lastused=true", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 8098932cd5..96ccf8cec3 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -22,16 +22,6 @@ require("lazy").setup({ -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "telescope" -``` - Below you can find a list of included plugins and their default settings. :::caution @@ -108,9 +98,6 @@ opts = nil { "stevearc/dressing.nvim", lazy = true, - enabled = function() - return LazyVim.pick.want() == "telescope" - end, init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) @@ -138,9 +125,6 @@ opts = nil ```lua opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -161,9 +145,6 @@ end { "neovim/nvim-lspconfig", opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -256,9 +237,6 @@ end { "nvim-telescope/telescope.nvim", cmd = "Telescope", - enabled = function() - return LazyVim.pick.want() == "telescope" - end, version = false, -- telescope did only one release, so use HEAD for now dependencies = { { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index fbe21383a4..23faeba359 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,14 +112,7 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width @@ -247,14 +240,7 @@ end pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c703b513d7..4d24eb05bf 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = {} +opts = { use_diagnostic_signs = true } ``` @@ -476,8 +476,8 @@ opts = {} ```lua { "folke/trouble.nvim", - cmd = { "Trouble" }, - opts = {}, + cmd = { "TroubleToggle", "Trouble" }, + opts = { use_diagnostic_signs = true }, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From 394c851a886a961b8e31aa02ff56b30d81c7c41b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 18:00:56 +0200 Subject: [PATCH 181/553] docs: udpate --- docs/configuration/general.md | 6 ++++++ docs/extras/editor/fzf.md | 19 ++++++++++++++----- docs/extras/editor/telescope.md | 22 ++++++++++++++++++++++ docs/extras/ui/edgy.md | 18 ++++++++++++++++-- docs/plugins/editor.md | 6 +++--- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index af2fbfb84e..38f10cec53 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,6 +57,12 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true +-- LazyVim picker to use. +-- Can be one of: telescope, fzf +-- Leave it to "auto" to automatically use the picker +-- enabled with `:LazyExtras` +vim.g.lazyvim_picker = "auto" + -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 65bdd0c58e..779ac4e99c 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "fzf" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -77,7 +87,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -200,7 +210,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -279,9 +289,8 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "close", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, { ",", "FzfLua buffers sort_mru=true sort_lastused=true", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 96ccf8cec3..8098932cd5 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "telescope" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -98,6 +108,9 @@ opts = nil { "stevearc/dressing.nvim", lazy = true, + enabled = function() + return LazyVim.pick.want() == "telescope" + end, init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) @@ -125,6 +138,9 @@ opts = nil ```lua opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -145,6 +161,9 @@ end { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -237,6 +256,9 @@ end { "nvim-telescope/telescope.nvim", cmd = "Telescope", + enabled = function() + return LazyVim.pick.want() == "telescope" + end, version = false, -- telescope did only one release, so use HEAD for now dependencies = { { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 23faeba359..fbe21383a4 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,7 +112,14 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width @@ -240,7 +247,14 @@ end pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4d24eb05bf..c703b513d7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = { use_diagnostic_signs = true } +opts = {} ``` @@ -476,8 +476,8 @@ opts = { use_diagnostic_signs = true } ```lua { "folke/trouble.nvim", - cmd = { "TroubleToggle", "Trouble" }, - opts = { use_diagnostic_signs = true }, + cmd = { "Trouble" }, + opts = {}, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From 50aa632970d4f0d4728c230b534ae5989e0b3a21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 16:01:17 +0000 Subject: [PATCH 182/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 ------ docs/extras/editor/fzf.md | 19 +++++-------------- docs/extras/editor/telescope.md | 22 ---------------------- docs/extras/ui/edgy.md | 18 ++---------------- docs/plugins/editor.md | 6 +++--- 5 files changed, 10 insertions(+), 61 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 38f10cec53..af2fbfb84e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,12 +57,6 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true --- LazyVim picker to use. --- Can be one of: telescope, fzf --- Leave it to "auto" to automatically use the picker --- enabled with `:LazyExtras` -vim.g.lazyvim_picker = "auto" - -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 779ac4e99c..65bdd0c58e 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -22,16 +22,6 @@ require("lazy").setup({ -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "fzf" -``` - Below you can find a list of included plugins and their default settings. :::caution @@ -87,7 +77,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -210,7 +200,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", defaults, { + return vim.tbl_deep_extend("force", opts, defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -289,8 +279,9 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "close", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, { ",", "FzfLua buffers sort_mru=true sort_lastused=true", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 8098932cd5..96ccf8cec3 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -22,16 +22,6 @@ require("lazy").setup({ -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "telescope" -``` - Below you can find a list of included plugins and their default settings. :::caution @@ -108,9 +98,6 @@ opts = nil { "stevearc/dressing.nvim", lazy = true, - enabled = function() - return LazyVim.pick.want() == "telescope" - end, init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) @@ -138,9 +125,6 @@ opts = nil ```lua opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -161,9 +145,6 @@ end { "neovim/nvim-lspconfig", opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -256,9 +237,6 @@ end { "nvim-telescope/telescope.nvim", cmd = "Telescope", - enabled = function() - return LazyVim.pick.want() == "telescope" - end, version = false, -- telescope did only one release, so use HEAD for now dependencies = { { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index fbe21383a4..23faeba359 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,14 +112,7 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width @@ -247,14 +240,7 @@ end pinned = true, open = "Neotree position=top buffers", }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, - -- "neo-tree", + "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c703b513d7..4d24eb05bf 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = {} +opts = { use_diagnostic_signs = true } ``` @@ -476,8 +476,8 @@ opts = {} ```lua { "folke/trouble.nvim", - cmd = { "Trouble" }, - opts = {}, + cmd = { "TroubleToggle", "Trouble" }, + opts = { use_diagnostic_signs = true }, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From 6bbbf0a4662faaaf5bfa50b5f1b85339c411c289 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 14 Jun 2024 18:06:29 +0200 Subject: [PATCH 183/553] fix: build docs based on main --- scripts/build_docs.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index d75cafc01b..27f4089a41 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -18,6 +18,7 @@ vim.opt.runtimepath:prepend(lazypath) local plugins = { "LazyVim/starter", { "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 = {} } }, } From 07ab09ecddd87d718a22b9a29719753c8a8232d2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 16:06:49 +0000 Subject: [PATCH 184/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 ++++++ docs/extras/editor/fzf.md | 19 ++++++++++++++----- docs/extras/editor/telescope.md | 22 ++++++++++++++++++++++ docs/extras/ui/edgy.md | 18 ++++++++++++++++-- docs/plugins/editor.md | 6 +++--- 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index af2fbfb84e..38f10cec53 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,6 +57,12 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true +-- LazyVim picker to use. +-- Can be one of: telescope, fzf +-- Leave it to "auto" to automatically use the picker +-- enabled with `:LazyExtras` +vim.g.lazyvim_picker = "auto" + -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 65bdd0c58e..779ac4e99c 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "fzf" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -77,7 +87,7 @@ opts = function(_, opts) end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -200,7 +210,7 @@ end end fix(defaults) - return vim.tbl_deep_extend("force", opts, defaults, { + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -279,9 +289,8 @@ end require("fzf-lua").register_ui_select(opts.ui_select or nil) end, keys = { - { "", "close", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, - { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, + { "", "", ft = "fzf", mode = "t", nowait = true }, { ",", "FzfLua buffers sort_mru=true sort_lastused=true", diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 96ccf8cec3..8098932cd5 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "telescope" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -98,6 +108,9 @@ opts = nil { "stevearc/dressing.nvim", lazy = true, + enabled = function() + return LazyVim.pick.want() == "telescope" + end, init = function() ---@diagnostic disable-next-line: duplicate-set-field vim.ui.select = function(...) @@ -125,6 +138,9 @@ opts = nil ```lua opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -145,6 +161,9 @@ end { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -237,6 +256,9 @@ end { "nvim-telescope/telescope.nvim", cmd = "Telescope", + enabled = function() + return LazyVim.pick.want() == "telescope" + end, version = false, -- telescope did only one release, so use HEAD for now dependencies = { { diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 23faeba359..fbe21383a4 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -112,7 +112,14 @@ opts = function() pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width @@ -240,7 +247,14 @@ end pinned = true, open = "Neotree position=top buffers", }, - "neo-tree", + { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }, + -- "neo-tree", }, keys = { -- increase width diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 4d24eb05bf..c703b513d7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -465,7 +465,7 @@ opts = { ```lua -opts = { use_diagnostic_signs = true } +opts = {} ``` @@ -476,8 +476,8 @@ opts = { use_diagnostic_signs = true } ```lua { "folke/trouble.nvim", - cmd = { "TroubleToggle", "Trouble" }, - opts = { use_diagnostic_signs = true }, + cmd = { "Trouble" }, + opts = {}, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, From 20f07ff974f254998c7a8e6352a73205643929cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 21:16:55 +0000 Subject: [PATCH 185/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 12 ++---------- docs/extras/lang/vue.md | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 6e5dfb2092..7e4a56d1e8 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -171,11 +171,7 @@ opts = { }, }, -- Add clippy lints for Rust. - checkOnSave = { - allFeatures = true, - command = "clippy", - extraArgs = { "--no-deps" }, - }, + checkOnSave = true, procMacro = { enable = true, ignored = { @@ -221,11 +217,7 @@ opts = { }, }, -- Add clippy lints for Rust. - checkOnSave = { - allFeatures = true, - command = "clippy", - extraArgs = { "--no-deps" }, - }, + checkOnSave = true, procMacro = { enable = true, ignored = { diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 4a73a32a9a..019db33d55 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -74,7 +74,13 @@ opts = { ensure_installed = { "vue" } } ```lua opts = { servers = { - volar = {}, + volar = { + init_options = { + vue = { + hybridMode = false, + }, + }, + }, vtsls = {}, }, } @@ -90,7 +96,13 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - volar = {}, + volar = { + init_options = { + vue = { + hybridMode = false, + }, + }, + }, vtsls = {}, }, }, From 74f85d6e11a7965ed3bc1838d775c26b3ebe5a43 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Jun 2024 23:16:25 +0000 Subject: [PATCH 186/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 779ac4e99c..24a97fb153 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -62,7 +62,9 @@ opts = function(_, opts) config.defaults.keymap.builtin[""] = "preview-page-up" -- Trouble - config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + if LazyVim.has("trouble.nvim") then + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + end -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) @@ -185,7 +187,9 @@ end config.defaults.keymap.builtin[""] = "preview-page-up" -- Trouble - config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + if LazyVim.has("trouble.nvim") then + config.defaults.actions.files["ctrl-t"] = require("trouble.sources.fzf").actions.open + end -- Toggle root dir / cwd config.defaults.actions.files["ctrl-r"] = function(_, ctx) From 3a1042e210c77a81bd4e4f80825b68e14ff64650 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 08:19:49 +0000 Subject: [PATCH 187/553] chore(build): auto-generate docs --- docs/extras/lang/elixir.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index e1326be418..62eb5b6e53 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -32,6 +32,40 @@ 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 = { + elixirls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + elixirls = {}, + }, + }, +} +``` + + + + + ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) From 7f92497f5c6ac3265e809deb9c91a1ee5cdb02fe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 09:16:28 +0000 Subject: [PATCH 188/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 124 +++++++++++++++++++++------------------- docs/extras/lang/php.md | 36 ------------ 2 files changed, 66 insertions(+), 94 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 08699e9f46..9d116e1e43 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -54,33 +54,7 @@ opts = {} desc = "Debugging support. Requires language specific adapters to be configured. (see lang extras)", dependencies = { - - -- fancy UI for the debugger - { - "rcarriga/nvim-dap-ui", - dependencies = { "nvim-neotest/nvim-nio" }, - -- stylua: ignore - keys = { - { "du", function() require("dapui").toggle({ }) end, desc = "Dap UI" }, - { "de", function() require("dapui").eval() end, desc = "Eval", mode = {"n", "v"} }, - }, - opts = {}, - config = function(_, opts) - local dap = require("dap") - local dapui = require("dapui") - dapui.setup(opts) - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open({}) - end - dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close({}) - end - dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close({}) - end - end, - }, - + "rcarriga/nvim-dap-ui", -- virtual text for the debugger { "theHamsta/nvim-dap-virtual-text", @@ -111,10 +85,12 @@ opts = {} }, config = function() - local Config = require("lazyvim.config") + -- load mason-nvim-dap here, after all adapters have been setup + require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) - for name, sign in pairs(Config.icons.dap) do + for name, sign in pairs(LazyVim.config.icons.dap) do sign = type(sign) == "table" and sign or { sign } vim.fn.sign_define( "Dap" .. name, @@ -136,6 +112,65 @@ opts = {} +## [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "rcarriga/nvim-dap-ui", + -- virtual text for the debugger + { + "theHamsta/nvim-dap-virtual-text", + opts = {}, + }, +} +``` + + + + + +## [nvim-dap-virtual-text](https://github.com/theHamsta/nvim-dap-virtual-text) + + virtual text for the debugger + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "theHamsta/nvim-dap-virtual-text", + opts = {}, +} +``` + + + + + ## [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui) fancy UI for the debugger @@ -208,35 +243,6 @@ opts = nil -## [nvim-dap-virtual-text](https://github.com/theHamsta/nvim-dap-virtual-text) - - virtual text for the debugger - - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "theHamsta/nvim-dap-virtual-text", - opts = {}, -} -``` - - - - - ## [mason-nvim-dap.nvim](https://github.com/jay-babu/mason-nvim-dap.nvim) mason.nvim integration @@ -289,6 +295,8 @@ opts = { -- Update this to ensure that you have the debuggers for the langs you want }, }, + -- mason-nvim-dap is loaded when nvim-dap loads + config = function() end, } ``` diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 5054fe3f21..81c232b0d0 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -128,36 +128,6 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) - - - - - -```lua -opts = { ensure_installed = { - "php-debug-adapter", -} } -``` - - - - - - -```lua -{ - "williamboman/mason.nvim", - opts = { ensure_installed = { - "php-debug-adapter", - } }, -} -``` - - - - - ## [nvim-lint](https://github.com/mfussenegger/nvim-lint) @@ -229,12 +199,6 @@ end { "mfussenegger/nvim-dap", optional = true, - dependencies = { - "williamboman/mason.nvim", - opts = { ensure_installed = { - "php-debug-adapter", - } }, - }, opts = function() local dap = require("dap") local path = require("mason-registry").get_package("php-debug-adapter"):get_install_path() From 0cc4b7306116782ac7dfe5d1bec3c209f5443eb4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 10:18:01 +0000 Subject: [PATCH 189/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 46 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 9214ea110b..92b5951f2a 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -380,9 +380,13 @@ opts = nil ```lua opts = { - mappings = { - ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } }, - }, + -- skip autopair when next character is one of these + skip_next = [=[[%w%%%'%[%"%.%`%$]]=], + -- skip autopair when next character is closing pair + -- and there are more closing pairs than opening pairs + skip_unbalanced = true, + -- better deal with markdown code blocks + markdown = true, } ``` @@ -396,9 +400,13 @@ opts = { "echasnovski/mini.pairs", event = "VeryLazy", opts = { - mappings = { - ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\`].", register = { cr = false } }, - }, + -- skip autopair when next character is one of these + skip_next = [=[[%w%%%'%[%"%.%`%$]]=], + -- skip autopair when next character is closing pair + -- and there are more closing pairs than opening pairs + skip_unbalanced = true, + -- better deal with markdown code blocks + markdown = true, }, keys = { { @@ -414,6 +422,32 @@ opts = { desc = "Toggle Auto Pairs", }, }, + config = function(_, opts) + local pairs = require("mini.pairs") + pairs.setup(opts) + local open = pairs.open + pairs.open = function(pair, neigh_pattern) + local o, c = pair:sub(1, 1), pair:sub(2, 2) + local line = vim.api.nvim_get_current_line() + local cursor = vim.api.nvim_win_get_cursor(0) + local next = line:sub(cursor[2] + 1, cursor[2] + 1) + local before = line:sub(1, cursor[2]) + if opts.markdown and o == "`" and vim.bo.filetype == "markdown" and before:match("^%s*``") then + return "`\n```" .. vim.api.nvim_replace_termcodes("", true, true, true) + end + if opts.skip_next and next ~= "" and next:match(opts.skip_next) then + return o + end + if opts.skip_unbalanced and next == c and c ~= o then + local _, count_open = line:gsub(vim.pesc(pair:sub(1, 1)), "") + local _, count_close = line:gsub(vim.pesc(pair:sub(2, 2)), "") + if count_close > count_open then + return o + end + end + return open(pair, neigh_pattern) + end + end, } ``` From 1f5badb33530c438f721d6a40b4a93b2ed440ee1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 13:17:05 +0000 Subject: [PATCH 190/553] chore(build): auto-generate docs --- docs/extras/ui/edgy.md | 88 +++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index fbe21383a4..decd0da37e 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -94,24 +94,6 @@ opts = function() size = { height = 0.5 }, }, { title = "Neotest Summary", ft = "neotest-summary" }, - { - title = "Neo-Tree Git", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "git_status" - end, - pinned = true, - open = "Neotree position=right git_status", - }, - { - title = "Neo-Tree Buffers", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "buffers" - end, - pinned = true, - open = "Neotree position=top buffers", - }, { title = "Neo-Tree Other", ft = "neo-tree", @@ -140,6 +122,32 @@ opts = function() end, }, } + + -- only add neo-tree sources if they are enabled in config + if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then + table.insert(opts.left, 3, { + title = "Neo-Tree Buffers", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "buffers" + end, + pinned = true, + open = "Neotree position=top buffers", + }) + end + + if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then + table.insert(opts.left, 3, { + title = "Neo-Tree Git", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "git_status" + end, + pinned = true, + open = "Neotree position=right git_status", + }) + end + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do opts[pos] = opts[pos] or {} table.insert(opts[pos], { @@ -229,24 +237,6 @@ end size = { height = 0.5 }, }, { title = "Neotest Summary", ft = "neotest-summary" }, - { - title = "Neo-Tree Git", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "git_status" - end, - pinned = true, - open = "Neotree position=right git_status", - }, - { - title = "Neo-Tree Buffers", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "buffers" - end, - pinned = true, - open = "Neotree position=top buffers", - }, { title = "Neo-Tree Other", ft = "neo-tree", @@ -275,6 +265,32 @@ end end, }, } + + -- only add neo-tree sources if they are enabled in config + if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then + table.insert(opts.left, 3, { + title = "Neo-Tree Buffers", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "buffers" + end, + pinned = true, + open = "Neotree position=top buffers", + }) + end + + if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then + table.insert(opts.left, 3, { + title = "Neo-Tree Git", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "git_status" + end, + pinned = true, + open = "Neotree position=right git_status", + }) + end + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do opts[pos] = opts[pos] or {} table.insert(opts[pos], { From f5a46256ac355d1437c59292dfa4dc2f7f9ae0b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 14:14:37 +0000 Subject: [PATCH 191/553] chore(build): auto-generate docs --- docs/extras/ui/edgy.md | 70 +++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index decd0da37e..2c1d11b63b 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -124,28 +124,21 @@ opts = function() } -- only add neo-tree sources if they are enabled in config - if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then - table.insert(opts.left, 3, { - title = "Neo-Tree Buffers", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "buffers" - end, - pinned = true, - open = "Neotree position=top buffers", - }) - end + local neotree_opts = LazyVim.opts("neo-tree.nvim") + local neotree_sources = { buffers = "top", git_status = "right" } - if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then - table.insert(opts.left, 3, { - title = "Neo-Tree Git", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "git_status" - end, - pinned = true, - open = "Neotree position=right git_status", - }) + for source, pos in pairs(neotree_sources) do + if vim.list_contains(neotree_opts.sources, source) then + table.insert(opts.left, 3, { + title = "Neo-Tree " .. source:gsub("_", " "), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == source + end, + pinned = true, + open = "Neotree position=" .. pos .. " " .. source, + }) + end end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do @@ -267,28 +260,21 @@ end } -- only add neo-tree sources if they are enabled in config - if vim.list_contains(LazyVim.opts("neo-tree").sources, "buffers") then - table.insert(opts.left, 3, { - title = "Neo-Tree Buffers", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "buffers" - end, - pinned = true, - open = "Neotree position=top buffers", - }) - end + local neotree_opts = LazyVim.opts("neo-tree.nvim") + local neotree_sources = { buffers = "top", git_status = "right" } - if vim.list_contains(LazyVim.opts("neo-tree").sources, "git_status") then - table.insert(opts.left, 3, { - title = "Neo-Tree Git", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "git_status" - end, - pinned = true, - open = "Neotree position=right git_status", - }) + for source, pos in pairs(neotree_sources) do + if vim.list_contains(neotree_opts.sources, source) then + table.insert(opts.left, 3, { + title = "Neo-Tree " .. source:gsub("_", " "), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == source + end, + pinned = true, + open = "Neotree position=" .. pos .. " " .. source, + }) + end end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do From 4b69c79e4345e523b790d67b7f2425b8f00dc0b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Jun 2024 17:14:39 +0000 Subject: [PATCH 192/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 92b5951f2a..b801701bb0 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -382,6 +382,8 @@ opts = nil opts = { -- skip autopair when next character is one of these skip_next = [=[[%w%%%'%[%"%.%`%$]]=], + -- skip autopair when the cursor is inside these treesitter nodes + skip_ts = { "string" }, -- skip autopair when next character is closing pair -- and there are more closing pairs than opening pairs skip_unbalanced = true, @@ -402,6 +404,8 @@ opts = { opts = { -- skip autopair when next character is one of these skip_next = [=[[%w%%%'%[%"%.%`%$]]=], + -- skip autopair when the cursor is inside these treesitter nodes + skip_ts = { "string" }, -- skip autopair when next character is closing pair -- and there are more closing pairs than opening pairs skip_unbalanced = true, @@ -423,30 +427,7 @@ opts = { }, }, config = function(_, opts) - local pairs = require("mini.pairs") - pairs.setup(opts) - local open = pairs.open - pairs.open = function(pair, neigh_pattern) - local o, c = pair:sub(1, 1), pair:sub(2, 2) - local line = vim.api.nvim_get_current_line() - local cursor = vim.api.nvim_win_get_cursor(0) - local next = line:sub(cursor[2] + 1, cursor[2] + 1) - local before = line:sub(1, cursor[2]) - if opts.markdown and o == "`" and vim.bo.filetype == "markdown" and before:match("^%s*``") then - return "`\n```" .. vim.api.nvim_replace_termcodes("", true, true, true) - end - if opts.skip_next and next ~= "" and next:match(opts.skip_next) then - return o - end - if opts.skip_unbalanced and next == c and c ~= o then - local _, count_open = line:gsub(vim.pesc(pair:sub(1, 1)), "") - local _, count_close = line:gsub(vim.pesc(pair:sub(2, 2)), "") - if count_close > count_open then - return o - end - end - return open(pair, neigh_pattern) - end + LazyVim.mini.pairs(opts) end, } ``` From 24056678eeed931e7ca4c70c1692d7c52933480e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Jun 2024 07:16:06 +0000 Subject: [PATCH 193/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 24a97fb153..f372ffb5af 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -89,6 +89,18 @@ opts = function(_, opts) end fix(defaults) + local img_previewer ---@type string[]? + for _, v in ipairs({ + { cmd = "ueberzug", args = {} }, + { cmd = "chafa", args = { "{file}", "--format=symbols" } }, + { cmd = "viu", args = { "-b" } }, + }) do + if vim.fn.executable(v.cmd) == 1 then + img_previewer = vim.list_extend({ v.cmd }, v.args) + break + end + end + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { @@ -98,6 +110,18 @@ opts = function(_, opts) -- formatter = "path.filename_first", formatter = "path.dirname_first", }, + previewers = { + builtin = { + extensions = { + ["png"] = img_previewer, + ["jpg"] = img_previewer, + ["jpeg"] = img_previewer, + ["gif"] = img_previewer, + ["webp"] = img_previewer, + }, + ueberzug_scaler = "fit_contain", + }, + }, -- Custom LazyVim option to configure vim.ui.select ui_select = function(fzf_opts, items) return vim.tbl_deep_extend("force", fzf_opts, { @@ -214,6 +238,18 @@ end end fix(defaults) + local img_previewer ---@type string[]? + for _, v in ipairs({ + { cmd = "ueberzug", args = {} }, + { cmd = "chafa", args = { "{file}", "--format=symbols" } }, + { cmd = "viu", args = { "-b" } }, + }) do + if vim.fn.executable(v.cmd) == 1 then + img_previewer = vim.list_extend({ v.cmd }, v.args) + break + end + end + return vim.tbl_deep_extend("force", defaults, { fzf_colors = true, fzf_opts = { @@ -223,6 +259,18 @@ end -- formatter = "path.filename_first", formatter = "path.dirname_first", }, + previewers = { + builtin = { + extensions = { + ["png"] = img_previewer, + ["jpg"] = img_previewer, + ["jpeg"] = img_previewer, + ["gif"] = img_previewer, + ["webp"] = img_previewer, + }, + ueberzug_scaler = "fit_contain", + }, + }, -- Custom LazyVim option to configure vim.ui.select ui_select = function(fzf_opts, items) return vim.tbl_deep_extend("force", fzf_opts, { From faf736f86990d74cad15b9e1ece42368deed129e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Jun 2024 09:18:09 +0000 Subject: [PATCH 194/553] chore(build): auto-generate docs --- docs/extras/editor/outline.md | 8 ++++++++ docs/plugins/coding.md | 2 ++ 2 files changed, 10 insertions(+) diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index cc3e132aca..d299507fe5 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -45,6 +45,10 @@ opts = function() local opts = { symbols = {}, symbol_blacklist = {}, + keymaps = { + up_and_jump = "", + down_and_jump = "", + }, } local filter = Config.kind_filter @@ -82,6 +86,10 @@ end local opts = { symbols = {}, symbol_blacklist = {}, + keymaps = { + up_and_jump = "", + down_and_jump = "", + }, } local filter = Config.kind_filter diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index b801701bb0..413819cf41 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -380,6 +380,7 @@ opts = nil ```lua opts = { + modes = { insert = true, command = true, terminal = false }, -- skip autopair when next character is one of these skip_next = [=[[%w%%%'%[%"%.%`%$]]=], -- skip autopair when the cursor is inside these treesitter nodes @@ -402,6 +403,7 @@ opts = { "echasnovski/mini.pairs", event = "VeryLazy", opts = { + modes = { insert = true, command = true, terminal = false }, -- skip autopair when next character is one of these skip_next = [=[[%w%%%'%[%"%.%`%$]]=], -- skip autopair when the cursor is inside these treesitter nodes From 6cbbb633544b8c950c7ebb85f2c007fd06631b07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Jun 2024 14:14:13 +0000 Subject: [PATCH 195/553] chore(build): auto-generate docs --- docs/extras/coding/copilot.md | 4 +-- docs/extras/coding/tabnine.md | 4 +-- docs/extras/editor/aerial.md | 12 ++++---- docs/extras/editor/navic.md | 4 +-- docs/extras/editor/outline.md | 10 +++---- docs/extras/editor/telescope.md | 4 +-- docs/plugins/coding.md | 51 +++++++++------------------------ docs/plugins/lsp.md | 2 +- docs/plugins/ui.md | 8 +++--- 9 files changed, 36 insertions(+), 63 deletions(-) diff --git a/docs/extras/coding/copilot.md b/docs/extras/coding/copilot.md index d949b42aa7..a7e5afd4e6 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/coding/copilot.md @@ -187,7 +187,7 @@ opts = function(_, opts) } table.insert(opts.sections.lualine_x, 2, { function() - local icon = require("lazyvim.config").icons.kinds.Copilot + local icon = LazyVim.config.icons.kinds.Copilot local status = require("copilot.api").status.data return icon .. (status.message or "") end, @@ -231,7 +231,7 @@ end } table.insert(opts.sections.lualine_x, 2, { function() - local icon = require("lazyvim.config").icons.kinds.Copilot + local icon = LazyVim.config.icons.kinds.Copilot local status = require("copilot.api").status.data return icon .. (status.message or "") end, diff --git a/docs/extras/coding/tabnine.md b/docs/extras/coding/tabnine.md index cfa148d590..5778ff30c3 100644 --- a/docs/extras/coding/tabnine.md +++ b/docs/extras/coding/tabnine.md @@ -159,7 +159,7 @@ opts = { ```lua opts = function(_, opts) - local icon = require("lazyvim.config").icons.kinds.TabNine + local icon = LazyVim.config.icons.kinds.TabNine table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon)) end ``` @@ -175,7 +175,7 @@ end optional = true, event = "VeryLazy", opts = function(_, opts) - local icon = require("lazyvim.config").icons.kinds.TabNine + local icon = LazyVim.config.icons.kinds.TabNine table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("cmp_tabnine", icon)) end, } diff --git a/docs/extras/editor/aerial.md b/docs/extras/editor/aerial.md index 997733a831..c992153478 100644 --- a/docs/extras/editor/aerial.md +++ b/docs/extras/editor/aerial.md @@ -40,7 +40,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() - local icons = vim.deepcopy(Config.icons.kinds) + local icons = vim.deepcopy(LazyVim.config.icons.kinds) -- HACK: fix lua's weird choice for `Package` for control -- structures like if/else/for/etc. @@ -48,8 +48,8 @@ opts = function() ---@type table|false local filter_kind = false - if Config.kind_filter then - filter_kind = assert(vim.deepcopy(Config.kind_filter)) + if LazyVim.config.kind_filter then + filter_kind = assert(vim.deepcopy(LazyVim.config.kind_filter)) filter_kind._ = filter_kind.default filter_kind.default = nil end @@ -90,7 +90,7 @@ end "stevearc/aerial.nvim", event = "LazyFile", opts = function() - local icons = vim.deepcopy(Config.icons.kinds) + local icons = vim.deepcopy(LazyVim.config.icons.kinds) -- HACK: fix lua's weird choice for `Package` for control -- structures like if/else/for/etc. @@ -98,8 +98,8 @@ end ---@type table|false local filter_kind = false - if Config.kind_filter then - filter_kind = assert(vim.deepcopy(Config.kind_filter)) + if LazyVim.config.kind_filter then + filter_kind = assert(vim.deepcopy(LazyVim.config.kind_filter)) filter_kind._ = filter_kind.default filter_kind.default = nil end diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index c7a905169f..482c542449 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -49,7 +49,7 @@ opts = function() separator = " ", highlight = true, depth_limit = 5, - icons = require("lazyvim.config").icons.kinds, + icons = LazyVim.config.icons.kinds, lazy_update_context = true, } end @@ -77,7 +77,7 @@ end separator = " ", highlight = true, depth_limit = 5, - icons = require("lazyvim.config").icons.kinds, + icons = LazyVim.config.icons.kinds, lazy_update_context = true, } end, diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index d299507fe5..32fcdf92aa 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -40,7 +40,6 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() - local Config = require("lazyvim.config") local defaults = require("outline.config").defaults local opts = { symbols = {}, @@ -50,14 +49,14 @@ opts = function() down_and_jump = "", }, } - local filter = Config.kind_filter + local filter = LazyVim.config.kind_filter if type(filter) == "table" then filter = filter.default if type(filter) == "table" then for kind, symbol in pairs(defaults.symbols) do opts.symbols[kind] = { - icon = Config.icons.kinds[kind] or symbol.icon, + icon = LazyVim.config.icons.kinds[kind] or symbol.icon, hl = symbol.hl, } if not vim.tbl_contains(filter, kind) then @@ -81,7 +80,6 @@ end keys = { { "cs", "Outline", desc = "Toggle Outline" } }, cmd = "Outline", opts = function() - local Config = require("lazyvim.config") local defaults = require("outline.config").defaults local opts = { symbols = {}, @@ -91,14 +89,14 @@ end down_and_jump = "", }, } - local filter = Config.kind_filter + local filter = LazyVim.config.kind_filter if type(filter) == "table" then filter = filter.default if type(filter) == "table" then for kind, symbol in pairs(defaults.symbols) do opts.symbols[kind] = { - icon = Config.icons.kinds[kind] or symbol.icon, + icon = LazyVim.config.icons.kinds[kind] or symbol.icon, hl = symbol.hl, } if not vim.tbl_contains(filter, kind) then diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 8098932cd5..fb318951ca 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -333,7 +333,7 @@ end "ss", function() require("telescope.builtin").lsp_document_symbols({ - symbols = require("lazyvim.config").get_kind_filter(), + symbols = LazyVim.config.get_kind_filter(), }) end, desc = "Goto Symbol", @@ -342,7 +342,7 @@ end "sS", function() require("telescope.builtin").lsp_dynamic_workspace_symbols({ - symbols = require("lazyvim.config").get_kind_filter(), + symbols = LazyVim.config.get_kind_filter(), }) end, desc = "Goto Symbol (Workspace)", diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 413819cf41..949622b056 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -19,19 +19,19 @@ opts = function() vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") local defaults = require("cmp.config.default")() + local auto_select = true return { auto_brackets = {}, -- configure any filetype to auto add brackets completion = { - completeopt = "menu,menuone,noinsert", + completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), }, + preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = LazyVim.cmp.confirm(), + [""] = LazyVim.cmp.confirm({ select = auto_select }), + [""] = LazyVim.cmp.confirm({ select = true }), [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. [""] = function(fallback) cmp.abort() @@ -46,7 +46,7 @@ opts = function() }), formatting = { format = function(_, item) - local icons = require("lazyvim.config").icons.kinds + local icons = LazyVim.config.icons.kinds if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end @@ -91,19 +91,19 @@ end vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) local cmp = require("cmp") local defaults = require("cmp.config.default")() + local auto_select = true return { auto_brackets = {}, -- configure any filetype to auto add brackets completion = { - completeopt = "menu,menuone,noinsert", + completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), }, + preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), - [""] = cmp.mapping.abort(), - [""] = LazyVim.cmp.confirm(), + [""] = LazyVim.cmp.confirm({ select = auto_select }), + [""] = LazyVim.cmp.confirm({ select = true }), [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. [""] = function(fallback) cmp.abort() @@ -118,7 +118,7 @@ end }), formatting = { format = function(_, item) - local icons = require("lazyvim.config").icons.kinds + local icons = LazyVim.config.icons.kinds if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end @@ -133,32 +133,7 @@ end sorting = defaults.sorting, } end, - ---@param opts cmp.ConfigSchema | {auto_brackets?: string[]} - config = function(_, opts) - for _, source in ipairs(opts.sources) do - source.group_index = source.group_index or 1 - end - - local parse = require("cmp.utils.snippet").parse - require("cmp.utils.snippet").parse = function(input) - local ok, ret = pcall(parse, input) - if ok then - return ret - end - return LazyVim.cmp.snippet_preview(input) - end - - local cmp = require("cmp") - cmp.setup(opts) - cmp.event:on("confirm_done", function(event) - if vim.tbl_contains(opts.auto_brackets or {}, vim.bo.filetype) then - LazyVim.cmp.auto_brackets(event.entry) - end - end) - cmp.event:on("menu_opened", function(event) - LazyVim.cmp.add_missing_snippet_docs(event.window) - end) - end, + main = "lazyvim.util.cmp", } ``` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 19f9453273..6e4f18b1d8 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -322,7 +322,7 @@ 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 = require("lazyvim.config").icons.diagnostics + local icons = LazyVim.config.icons.diagnostics for d, icon in pairs(icons) do if diagnostic.severity == vim.diagnostic.severity[d:upper()] then return icon diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 302e480674..a54857fde3 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -95,7 +95,7 @@ opts = { diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) - local icons = require("lazyvim.config").icons.diagnostics + local icons = LazyVim.config.icons.diagnostics local ret = (diag.error and icons.Error .. diag.error .. " " or "") .. (diag.warning and icons.Warn .. diag.warning or "") return vim.trim(ret) @@ -147,7 +147,7 @@ opts = { diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) - local icons = require("lazyvim.config").icons.diagnostics + local icons = LazyVim.config.icons.diagnostics local ret = (diag.error and icons.Error .. diag.error .. " " or "") .. (diag.warning and icons.Warn .. diag.warning or "") return vim.trim(ret) @@ -199,7 +199,7 @@ opts = function() local lualine_require = require("lualine_require") lualine_require.require = require - local icons = require("lazyvim.config").icons + local icons = LazyVim.config.icons vim.o.laststatus = vim.g.lualine_laststatus @@ -330,7 +330,7 @@ end local lualine_require = require("lualine_require") lualine_require.require = require - local icons = require("lazyvim.config").icons + local icons = LazyVim.config.icons vim.o.laststatus = vim.g.lualine_laststatus From 9eb9c032021013e89f33d3014c9fff19dc7266aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Jun 2024 18:21:54 +0000 Subject: [PATCH 196/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 1 + docs/keymaps.md | 1 + docs/plugins/treesitter.md | 16 ++++++++-------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 405fbad6dc..7a93d089a4 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -88,6 +88,7 @@ end } end, keys = { + { "", "", ft = "copilot-chat", desc = "Submit Prompt", remap = true }, { "a", "", desc = "+ai", mode = { "n", "v" } }, { "aa", diff --git a/docs/keymaps.md b/docs/keymaps.md index 033fb3958b..03434ee3b0 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -299,6 +299,7 @@ Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat | Key | Description | Mode | | --- | --- | --- | +| <c-s> | Submit Prompt | **n** | | <leader>a | +ai | **n**, **v** | | <leader>aa | Toggle (CopilotChat) | **n**, **v** | | <leader>ad | Diagnostic Help (CopilotChat) | **n**, **v** | diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index b43d931de8..ecfdc1fae1 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -58,10 +58,10 @@ opts = { textobjects = { move = { enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, + 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" }, }, }, } @@ -137,10 +137,10 @@ opts = { textobjects = { move = { enable = true, - goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer" }, - goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer" }, - goto_previous_start = { ["[f"] = "@function.outer", ["[c"] = "@class.outer" }, - goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer" }, + 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" }, }, }, }, From e6ab2c72885dff33ac302faf8981a4079c2db9b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 17 Jun 2024 05:19:52 +0000 Subject: [PATCH 197/553] chore(build): auto-generate docs --- docs/extras/lang/php.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 81c232b0d0..b879cc6f83 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -22,6 +22,16 @@ require("lazy").setup({ +### 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" +-- LSP Server to use for PHP. +-- Set to "intelephense" to use intelephense instead of phpactor. +vim.g.lazyvim_php_lsp = "intelephense" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -67,7 +77,15 @@ opts = { ensure_installed = { "php" } } ```lua opts = { servers = { - phpactor = {}, + phpactor = { + enabled = lsp == "phpactor", + }, + intelephense = { + enabled = lsp == "intelephense", + }, + [lsp] = { + enabled = true, + }, }, } ``` @@ -82,7 +100,15 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - phpactor = {}, + phpactor = { + enabled = lsp == "phpactor", + }, + intelephense = { + enabled = lsp == "intelephense", + }, + [lsp] = { + enabled = true, + }, }, }, } From 66306e37b4b14189a942d264739dfd86a03a9550 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 17 Jun 2024 18:22:14 +0000 Subject: [PATCH 198/553] chore(build): auto-generate docs --- docs/extras/ui/edgy.md | 138 +++++++++++++++++++------------------ docs/plugins/formatting.md | 4 +- 2 files changed, 73 insertions(+), 69 deletions(-) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 2c1d11b63b..3b6576add1 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -81,26 +81,7 @@ opts = function() { title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } }, }, left = { - { - title = "Neo-Tree", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "filesystem" - end, - pinned = true, - open = function() - require("neo-tree.command").execute({ dir = LazyVim.root() }) - end, - size = { height = 0.5 }, - }, { title = "Neotest Summary", ft = "neotest-summary" }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, -- "neo-tree", }, keys = { @@ -123,22 +104,43 @@ opts = function() }, } - -- only add neo-tree sources if they are enabled in config - local neotree_opts = LazyVim.opts("neo-tree.nvim") - local neotree_sources = { buffers = "top", git_status = "right" } + if LazyVim.has("neo-tree.nvim") then + table.insert(opts.left, 1, { + title = "Neo-Tree", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "filesystem" + end, + pinned = true, + open = function() + require("neo-tree.command").execute({ dir = LazyVim.root() }) + end, + size = { height = 0.5 }, + }) + -- only add neo-tree sources if they are enabled in config + local neotree_opts = LazyVim.opts("neo-tree.nvim") + local neotree_sources = { buffers = "top", git_status = "right" } - for source, pos in pairs(neotree_sources) do - if vim.list_contains(neotree_opts.sources, source) then - table.insert(opts.left, 3, { - title = "Neo-Tree " .. source:gsub("_", " "), - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == source - end, - pinned = true, - open = "Neotree position=" .. pos .. " " .. source, - }) + for source, pos in pairs(neotree_sources) do + if vim.list_contains(neotree_opts.sources or {}, source) then + table.insert(opts.left, { + title = "Neo-Tree " .. source:gsub("_", " "), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == source + end, + pinned = true, + open = "Neotree position=" .. pos .. " " .. source, + }) + end end + table.insert(opts.left, { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }) end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do @@ -217,26 +219,7 @@ end { title = "Neotest Output", ft = "neotest-output-panel", size = { height = 15 } }, }, left = { - { - title = "Neo-Tree", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "filesystem" - end, - pinned = true, - open = function() - require("neo-tree.command").execute({ dir = LazyVim.root() }) - end, - size = { height = 0.5 }, - }, { title = "Neotest Summary", ft = "neotest-summary" }, - { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }, -- "neo-tree", }, keys = { @@ -259,22 +242,43 @@ end }, } - -- only add neo-tree sources if they are enabled in config - local neotree_opts = LazyVim.opts("neo-tree.nvim") - local neotree_sources = { buffers = "top", git_status = "right" } - - for source, pos in pairs(neotree_sources) do - if vim.list_contains(neotree_opts.sources, source) then - table.insert(opts.left, 3, { - title = "Neo-Tree " .. source:gsub("_", " "), - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == source - end, - pinned = true, - open = "Neotree position=" .. pos .. " " .. source, - }) + if LazyVim.has("neo-tree.nvim") then + table.insert(opts.left, 1, { + title = "Neo-Tree", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == "filesystem" + end, + pinned = true, + open = function() + require("neo-tree.command").execute({ dir = LazyVim.root() }) + end, + size = { height = 0.5 }, + }) + -- only add neo-tree sources if they are enabled in config + local neotree_opts = LazyVim.opts("neo-tree.nvim") + local neotree_sources = { buffers = "top", git_status = "right" } + + for source, pos in pairs(neotree_sources) do + if vim.list_contains(neotree_opts.sources or {}, source) then + table.insert(opts.left, { + title = "Neo-Tree " .. source:gsub("_", " "), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == source + end, + pinned = true, + open = "Neotree position=" .. pos .. " " .. source, + }) + end end + table.insert(opts.left, { + title = "Neo-Tree Other", + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source ~= nil + end, + }) end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index 330ff9441f..333f1c365d 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -42,7 +42,7 @@ opts = function() timeout_ms = 3000, async = false, -- not recommended to change quiet = false, -- not recommended to change - lsp_fallback = true, -- not recommended to change + lsp_format = "fallback", -- not recommended to change }, ---@type table formatters_by_ft = { @@ -130,7 +130,7 @@ end timeout_ms = 3000, async = false, -- not recommended to change quiet = false, -- not recommended to change - lsp_fallback = true, -- not recommended to change + lsp_format = "fallback", -- not recommended to change }, ---@type table formatters_by_ft = { From 33a718eeb2d57250bedbe5df7c6aecf57a88942c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Jun 2024 05:16:49 +0000 Subject: [PATCH 199/553] chore(build): auto-generate docs --- docs/configuration/examples.md | 45 ---------------------------------- docs/plugins/coding.md | 2 +- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/docs/configuration/examples.md b/docs/configuration/examples.md index fee689707b..866fad0487 100644 --- a/docs/configuration/examples.md +++ b/docs/configuration/examples.md @@ -195,51 +195,6 @@ return { }, }, }, - - -- Use for completion and snippets (supertab) - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-emoji", - }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - local has_words_before = function() - unpack = unpack or table.unpack - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil - end - - local cmp = require("cmp") - - opts.mapping = vim.tbl_extend("force", opts.mapping, { - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.snippet.active({ direction = 1 }) then - vim.schedule(function() - vim.snippet.jump(1) - end) - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif vim.snippet.active({ direction = -1 }) then - vim.schedule(function() - vim.snippet.jump(-1) - end) - else - fallback() - end - end, { "i", "s" }), - }) - end, - }, } ``` diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 949622b056..a001a20d77 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -276,7 +276,7 @@ end { "", function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" + return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" end, expr = true, silent = true, From 5302aeea2b8942f1bfe756a0dbf23ad12e477127 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Jun 2024 17:17:46 +0000 Subject: [PATCH 200/553] chore(build): auto-generate docs --- docs/extras/lang/prisma.md | 99 ++++++++++++++++++++++++++++++++++++++ docs/extras/lang/python.md | 12 ++++- 2 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 docs/extras/lang/prisma.md diff --git a/docs/extras/lang/prisma.md b/docs/extras/lang/prisma.md new file mode 100644 index 0000000000..eead6c0eaf --- /dev/null +++ b/docs/extras/lang/prisma.md @@ -0,0 +1,99 @@ +# `Prisma` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.prisma" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = { "prisma" }, +} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "prisma" }, + }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + prismals = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + prismals = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 0737221210..6e40c8ec48 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -214,7 +214,11 @@ opts = {} { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) + if vim.fn.has("win32") == 1 then + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/python.exe")) + else + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) + end end, } ``` @@ -374,7 +378,11 @@ opts = nil { "dPc", function() require('dap-python').test_class() end, desc = "Debug Class", ft = "python" }, }, config = function() - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) + if vim.fn.has("win32") == 1 then + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/python.exe")) + else + require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/bin/python")) + end end, }, } From e9a6f6678cfb43c788b7772f0c1cef669af69d53 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Jun 2024 20:17:49 +0000 Subject: [PATCH 201/553] chore(build): auto-generate docs --- docs/extras/lang/python.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 6e40c8ec48..8c6b1bdbeb 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -215,7 +215,7 @@ opts = {} }, config = function() if vim.fn.has("win32") == 1 then - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/python.exe")) + 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 @@ -379,7 +379,7 @@ opts = nil }, config = function() if vim.fn.has("win32") == 1 then - require("dap-python").setup(LazyVim.get_pkg_path("debugpy", "/venv/Scripts/python.exe")) + 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 From 3cbbf47bb09caee44dfee0300a2b25ed5c6f5cc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Jun 2024 20:18:09 +0000 Subject: [PATCH 202/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/plugins/editor.md | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 38f10cec53..96620c04e7 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -474,6 +474,7 @@ vim.api.nvim_create_autocmd("FileType", { "neotest-summary", "neotest-output-panel", "dbout", + "gitsigns.blame", }, callback = function(event) vim.bo[event.buf].buflisted = false diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c703b513d7..c1a5eec420 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -306,7 +306,7 @@ opts = { ["c"] = { name = "+code" }, ["f"] = { name = "+file/find" }, ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks" }, + ["gh"] = { name = "+hunks", ["_"] = "which_key_ignore" }, ["q"] = { name = "+quit/session" }, ["s"] = { name = "+search" }, ["u"] = { name = "+ui" }, @@ -339,7 +339,7 @@ opts = { ["c"] = { name = "+code" }, ["f"] = { name = "+file/find" }, ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks" }, + ["gh"] = { name = "+hunks", ["_"] = "which_key_ignore" }, ["q"] = { name = "+quit/session" }, ["s"] = { name = "+search" }, ["u"] = { name = "+ui" }, @@ -399,6 +399,7 @@ opts = { map("n", "ghR", gs.reset_buffer, "Reset Buffer") map("n", "ghp", gs.preview_hunk_inline, "Preview Hunk Inline") map("n", "ghb", function() gs.blame_line({ full = true }) end, "Blame Line") + map("n", "ghB", function() gs.blame() end, "Blame Buffer") map("n", "ghd", gs.diffthis, "Diff This") map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns Select Hunk") @@ -443,6 +444,7 @@ opts = { map("n", "ghR", gs.reset_buffer, "Reset Buffer") map("n", "ghp", gs.preview_hunk_inline, "Preview Hunk Inline") map("n", "ghb", function() gs.blame_line({ full = true }) end, "Blame Line") + map("n", "ghB", function() gs.blame() end, "Blame Buffer") map("n", "ghd", gs.diffthis, "Diff This") map("n", "ghD", function() gs.diffthis("~") end, "Diff This ~") map({ "o", "x" }, "ih", ":Gitsigns select_hunk", "GitSigns Select Hunk") From 33a0c280e67b7f3111540f385bb7c724af210ada Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Jun 2024 05:15:29 +0000 Subject: [PATCH 203/553] chore(build): auto-generate docs --- docs/extras/editor/refactoring.md | 4 +- docs/extras/lang/go.md | 30 +++----- docs/extras/test/core.md | 14 ++-- docs/extras/ui/edgy.md | 110 +++++++++++------------------- docs/plugins/editor.md | 36 ++++++++-- 5 files changed, 90 insertions(+), 104 deletions(-) diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index 19c5fd6838..785d90ca7f 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -82,9 +82,7 @@ opts = { { "r", "", desc = "+refactor", mode = { "n", "v" } }, { "rs", - function() - require("telescope").extensions.refactoring.refactors() - end, + pick, mode = "v", desc = "Refactor", }, diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index f0c550ad1d..d740914c87 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -68,10 +68,6 @@ opts = { ensure_installed = { "go", "gomod", "gowork", "gosum" } } opts = { servers = { gopls = { - keys = { - -- Workaround for the lack of a DAP strategy in neotest-go: https://github.com/nvim-neotest/neotest-go/issues/12 - { "td", "lua require('dap-go').debug_test()", desc = "Debug Nearest (Go)" }, - }, settings = { gopls = { gofumpt = true, @@ -144,10 +140,6 @@ opts = { opts = { servers = { gopls = { - keys = { - -- Workaround for the lack of a DAP strategy in neotest-go: https://github.com/nvim-neotest/neotest-go/issues/12 - { "td", "lua require('dap-go').debug_test()", desc = "Debug Nearest (Go)" }, - }, settings = { gopls = { gofumpt = true, @@ -321,7 +313,7 @@ opts = {}
-## [neotest-go](https://github.com/nvim-neotest/neotest-go) +## [neotest-golang](https://github.com/fredrikaverpil/neotest-golang) @@ -338,7 +330,7 @@ opts = nil ```lua { - "nvim-neotest/neotest-go", + "fredrikaverpil/neotest-golang", } ``` @@ -475,10 +467,10 @@ opts = nil ```lua opts = { adapters = { - ["neotest-go"] = { - -- Here we can set options for neotest-go, e.g. - -- args = { "-tags=integration" } - recursive_run = true, + ["neotest-golang"] = { + -- Here we can set options for neotest-golang, e.g. + -- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" }, + dap_go_enabled = true, -- requires leoluz/nvim-dap-go }, }, } @@ -494,14 +486,14 @@ opts = { "nvim-neotest/neotest", optional = true, dependencies = { - "nvim-neotest/neotest-go", + "fredrikaverpil/neotest-golang", }, opts = { adapters = { - ["neotest-go"] = { - -- Here we can set options for neotest-go, e.g. - -- args = { "-tags=integration" } - recursive_run = true, + ["neotest-golang"] = { + -- Here we can set options for neotest-golang, e.g. + -- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" }, + dap_go_enabled = true, -- requires leoluz/nvim-dap-go }, }, }, diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index e55d0833fb..ac907c8c1a 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -59,10 +59,11 @@ opts = { -- or a table of adapter names, mapped to adapter configs. -- The adapter will then be automatically loaded with the config. adapters = {}, - -- Example for loading neotest-go with a custom config + -- Example for loading neotest-golang with a custom config -- adapters = { - -- ["neotest-go"] = { - -- args = { "-tags=integration" }, + -- ["neotest-golang"] = { + -- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" }, + -- dap_go_enabled = true, -- }, -- }, status = { virtual_text = true }, @@ -94,10 +95,11 @@ opts = { -- or a table of adapter names, mapped to adapter configs. -- The adapter will then be automatically loaded with the config. adapters = {}, - -- Example for loading neotest-go with a custom config + -- Example for loading neotest-golang with a custom config -- adapters = { - -- ["neotest-go"] = { - -- args = { "-tags=integration" }, + -- ["neotest-golang"] = { + -- go_test_args = { "-v", "-race", "-count=1", "-timeout=60s" }, + -- dap_go_enabled = true, -- }, -- }, status = { virtual_text = true }, diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 3b6576add1..9178c79000 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -105,42 +105,27 @@ opts = function() } if LazyVim.has("neo-tree.nvim") then - table.insert(opts.left, 1, { - title = "Neo-Tree", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "filesystem" - end, - pinned = true, - open = function() - require("neo-tree.command").execute({ dir = LazyVim.root() }) - end, - size = { height = 0.5 }, - }) - -- only add neo-tree sources if they are enabled in config - local neotree_opts = LazyVim.opts("neo-tree.nvim") - local neotree_sources = { buffers = "top", git_status = "right" } - - for source, pos in pairs(neotree_sources) do - if vim.list_contains(neotree_opts.sources or {}, source) then - table.insert(opts.left, { - title = "Neo-Tree " .. source:gsub("_", " "), - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == source - end, - pinned = true, - open = "Neotree position=" .. pos .. " " .. source, - }) - end + local pos = { + filesystem = "left", + buffers = "top", + git_status = "right", + document_symbols = "bottom", + diagnostics = "bottom", + } + local sources = LazyVim.opts("neo-tree.nvim").sources or {} + for i, v in ipairs(sources) do + table.insert(opts.left, i, { + title = "Neo-Tree " .. v:gsub("_", " "):gsub("^%l", string.upper), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == v + end, + pinned = true, + open = function() + vim.cmd(("Neotree show position=%s %s dir=%s"):format(pos[v] or "bottom", v, LazyVim.root())) + end, + }) end - table.insert(opts.left, { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }) end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do @@ -243,42 +228,27 @@ end } if LazyVim.has("neo-tree.nvim") then - table.insert(opts.left, 1, { - title = "Neo-Tree", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "filesystem" - end, - pinned = true, - open = function() - require("neo-tree.command").execute({ dir = LazyVim.root() }) - end, - size = { height = 0.5 }, - }) - -- only add neo-tree sources if they are enabled in config - local neotree_opts = LazyVim.opts("neo-tree.nvim") - local neotree_sources = { buffers = "top", git_status = "right" } - - for source, pos in pairs(neotree_sources) do - if vim.list_contains(neotree_opts.sources or {}, source) then - table.insert(opts.left, { - title = "Neo-Tree " .. source:gsub("_", " "), - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == source - end, - pinned = true, - open = "Neotree position=" .. pos .. " " .. source, - }) - end + local pos = { + filesystem = "left", + buffers = "top", + git_status = "right", + document_symbols = "bottom", + diagnostics = "bottom", + } + local sources = LazyVim.opts("neo-tree.nvim").sources or {} + for i, v in ipairs(sources) do + table.insert(opts.left, i, { + title = "Neo-Tree " .. v:gsub("_", " "):gsub("^%l", string.upper), + ft = "neo-tree", + filter = function(buf) + return vim.b[buf].neo_tree_source == v + end, + pinned = true, + open = function() + vim.cmd(("Neotree show position=%s %s dir=%s"):format(pos[v] or "bottom", v, LazyVim.root())) + end, + }) end - table.insert(opts.left, { - title = "Neo-Tree Other", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source ~= nil - end, - }) end for _, pos in ipairs({ "top", "bottom", "left", "right" }) do diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c1a5eec420..9f4712535a 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -21,7 +21,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - sources = { "filesystem", "buffers", "git_status", "document_symbols" }, + sources = { "filesystem", "buffers", "git_status" }, open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, filesystem = { bind_to_cwd = false, @@ -132,7 +132,7 @@ opts = { }) end, opts = { - sources = { "filesystem", "buffers", "git_status", "document_symbols" }, + sources = { "filesystem", "buffers", "git_status" }, open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, filesystem = { bind_to_cwd = false, @@ -388,8 +388,20 @@ opts = { end -- stylua: ignore start - map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk") - map("n", "[h", function() gs.nav_hunk("prev") end, "Prev Hunk") + map("n", "]h", function() + if vim.wo.diff then + vim.cmd.normal({ "]c", bang = true }) + else + gs.nav_hunk("next") + end + end, "Next Hunk") + map("n", "[h", function() + if vim.wo.diff then + vim.cmd.normal({ "[c", bang = true }) + else + gs.nav_hunk("prev") + end + 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") @@ -433,8 +445,20 @@ opts = { end -- stylua: ignore start - map("n", "]h", function() gs.nav_hunk("next") end, "Next Hunk") - map("n", "[h", function() gs.nav_hunk("prev") end, "Prev Hunk") + map("n", "]h", function() + if vim.wo.diff then + vim.cmd.normal({ "]c", bang = true }) + else + gs.nav_hunk("next") + end + end, "Next Hunk") + map("n", "[h", function() + if vim.wo.diff then + vim.cmd.normal({ "[c", bang = true }) + else + gs.nav_hunk("prev") + end + 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") From c7cb1f80d37c01b03f654f8be5e01d7d00384719 Mon Sep 17 00:00:00 2001 From: Marcin Jahn <10273406+marcinjahn@users.noreply.github.com> Date: Sun, 23 Jun 2024 07:36:31 +0200 Subject: [PATCH 204/553] fix: rename Omnisharp to C# (#98) --- docs/extras/lang/{omnisharp.md => csharp.md} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename docs/extras/lang/{omnisharp.md => csharp.md} (99%) diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/csharp.md similarity index 99% rename from docs/extras/lang/omnisharp.md rename to docs/extras/lang/csharp.md index 1ff585e08b..7f8034afa6 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/csharp.md @@ -1,4 +1,8 @@ -# OmniSharp +--- +title: C# +--- + +# C# From 05c7db91ba6cd9f15d82ba348c933d4bf65be809 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Jun 2024 05:36:49 +0000 Subject: [PATCH 205/553] chore(build): auto-generate docs --- docs/extras/lang/{csharp.md => omnisharp.md} | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) rename docs/extras/lang/{csharp.md => omnisharp.md} (99%) diff --git a/docs/extras/lang/csharp.md b/docs/extras/lang/omnisharp.md similarity index 99% rename from docs/extras/lang/csharp.md rename to docs/extras/lang/omnisharp.md index 7f8034afa6..2919d3758b 100644 --- a/docs/extras/lang/csharp.md +++ b/docs/extras/lang/omnisharp.md @@ -1,8 +1,4 @@ ---- -title: C# ---- - -# C# +# `Omnisharp` From 6c63a19331997e80c8afae8fd89744b67426f9df Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 23 Jun 2024 18:20:29 +0000 Subject: [PATCH 206/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 9d116e1e43..c29e1603e6 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -86,7 +86,9 @@ opts = {} config = function() -- load mason-nvim-dap here, after all adapters have been setup - require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + if LazyVim.has("mason-nvim-dap.nvim") then + require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + end vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) From ff49782788ac96f3d196e5181d5d36788dd8cadb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 24 Jun 2024 17:33:54 +0200 Subject: [PATCH 207/553] fix: docgen --- docs/extras/dap/core.md | 4 +- docs/extras/editor/telescope.md | 280 ++++++++++++++++---------------- docs/extras/lang/haskell.md | 48 +++--- docs/extras/lsp/none-ls.md | 23 +++ docs/plugins/formatting.md | 23 +++ lua/build.lua | 2 +- scripts/build_docs.lua | 1 + 7 files changed, 213 insertions(+), 168 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index c29e1603e6..9d116e1e43 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -86,9 +86,7 @@ opts = {} config = function() -- load mason-nvim-dap here, after all adapters have been setup - if LazyVim.has("mason-nvim-dap.nvim") then - require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) - end + require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index fb318951ca..cd2fe7c006 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -42,145 +42,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "nvim-telescope/telescope-fzf-native.nvim", - build = have_make and "make" - or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = have_make or have_cmake, - config = function(plugin) - LazyVim.on_load("telescope.nvim", function() - local ok, err = pcall(require("telescope").load_extension, "fzf") - if not ok then - local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") - if not vim.uv.fs_stat(lib) then - LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") - require("lazy").build({ plugins = { plugin }, show = false }):wait(function() - LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") - end) - else - LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) - end - end - end) - end, -} -``` - - - - - -## [dressing.nvim](https://github.com/stevearc/dressing.nvim) - - better vim.ui with telescope - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "stevearc/dressing.nvim", - lazy = true, - enabled = function() - return LazyVim.pick.want() == "telescope" - end, - init = function() - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.select = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.select(...) - end - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.input = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.input(...) - end - end, -} -``` - - - - - -## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - - - - - -```lua -opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end - 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 -``` - - - - - - -```lua -{ - "neovim/nvim-lspconfig", - opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end - 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, -} -``` - - - - - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) Fuzzy finder. The default key bindings to find files will use Telescope's @@ -407,7 +269,51 @@ end -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ +## [dressing.nvim](https://github.com/stevearc/dressing.nvim) + + better vim.ui with telescope + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "stevearc/dressing.nvim", + lazy = true, + enabled = function() + return LazyVim.pick.want() == "telescope" + end, + init = function() + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.select = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.select(...) + end + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.input = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.input(...) + end + end, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) Flash Telescope config @@ -487,4 +393,98 @@ end +## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "nvim-telescope/telescope-fzf-native.nvim", + build = have_make and "make" + or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + enabled = have_make or have_cmake, + config = function(plugin) + LazyVim.on_load("telescope.nvim", function() + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end + end) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end + 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 +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function() + if LazyVim.pick.want() ~= "telescope" then + return + end + 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, +} +``` + + + + + diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 78f99f64dd..0c38698abb 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -303,7 +303,7 @@ opts = { -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) @@ -326,6 +326,29 @@ 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)_ @@ -396,27 +419,4 @@ opts = { -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) _(optional)_ - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "nvim-telescope/telescope.nvim" } -``` - - - - - diff --git a/docs/extras/lsp/none-ls.md b/docs/extras/lsp/none-ls.md index c8d6bffc28..63f324dd58 100644 --- a/docs/extras/lsp/none-ls.md +++ b/docs/extras/lsp/none-ls.md @@ -107,4 +107,27 @@ end +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "mason.nvim" } +``` + + + + + diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index 333f1c365d..75f52ceeaa 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -166,4 +166,27 @@ end +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "mason.nvim" } +``` + + + + + diff --git a/lua/build.lua b/lua/build.lua index 4be0ed610b..4add8b4234 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -487,7 +487,7 @@ function M.plugins(path) end for name in pairs(spec.plugins) do if not found[name] then - error("Missing plugins in " .. path .. ": " .. name) + print("Missing plugins in " .. path .. ": " .. name) end end diff --git a/scripts/build_docs.lua b/scripts/build_docs.lua index 27f4089a41..8a39d8232c 100644 --- a/scripts/build_docs.lua +++ b/scripts/build_docs.lua @@ -28,6 +28,7 @@ local function main() require("lazy").setup(plugins, { root = root .. "/plugins", dev = { fallback = true }, + pkg = { enabled = false }, }) if vim.o.filetype == "lazy" then From 1ff5c3f7b7e58503cdd2eb8cf70300dec09c4772 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jun 2024 15:34:14 +0000 Subject: [PATCH 208/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 9d116e1e43..c29e1603e6 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -86,7 +86,9 @@ opts = {} config = function() -- load mason-nvim-dap here, after all adapters have been setup - require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + if LazyVim.has("mason-nvim-dap.nvim") then + require("mason-nvim-dap").setup(LazyVim.opts("mason-nvim-dap.nvim")) + end vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) From 76d2316e32d5039b4e1feda7c1195a07a46c0daf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jun 2024 20:17:03 +0000 Subject: [PATCH 209/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index f372ffb5af..5e2eef9290 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -136,7 +136,11 @@ 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 = { + preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + layout = "vertical", + vertical = "down:15,border-top", + hidden = "hidden", + } or { layout = "vertical", vertical = "down:15,border-top", }, @@ -285,7 +289,11 @@ 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 = { + preview = not vim.tbl_isempty(LazyVim.lsp.get_clients({ bufnr = 0, name = "vtsls" })) and { + layout = "vertical", + vertical = "down:15,border-top", + hidden = "hidden", + } or { layout = "vertical", vertical = "down:15,border-top", }, From bc003a7d7ac8fe5ac3a9e7529b01c3d5267c4e89 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 24 Jun 2024 23:19:00 +0000 Subject: [PATCH 210/553] chore(build): auto-generate docs --- docs/extras/util/octo.md | 5 ++--- docs/plugins/ui.md | 33 +++++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 38255b675a..662a55fa14 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -64,9 +64,6 @@ opts = { "pwntester/octo.nvim", cmd = "Octo", event = { { event = "BufReadCmd", pattern = "octo://*" } }, - init = function() - vim.treesitter.language.register("markdown", "octo") - end, opts = { enable_builtin = true, default_to_projects_v2 = true, @@ -109,6 +106,7 @@ opts = { ```lua opts = function(_, opts) + vim.treesitter.language.register("markdown", "octo") if LazyVim.has("telescope.nvim") then opts.picker = "telescope" elseif LazyVim.has("fzf-lua") then @@ -142,6 +140,7 @@ end { "pwntester/octo.nvim", opts = function(_, opts) + vim.treesitter.language.register("markdown", "octo") if LazyVim.has("telescope.nvim") then opts.picker = "telescope" elseif LazyVim.has("fzf-lua") then diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index a54857fde3..65d3f7be79 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -602,6 +602,15 @@ opts = { { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} }, { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}}, }, + config = function(_, opts) + -- HACK: noice shows messages from before it was enabled, + -- but this is not ideal when Lazy is installing plugins, + -- so clear the messages in this case. + if vim.o.filetype == "lazy" then + vim.cmd([[messages clear]]) + end + require("noice").setup(opts) + end, } ``` @@ -714,13 +723,15 @@ opts = function() button.key_format = " %s" end - -- close Lazy and re-open when the dashboard is ready + -- open dashboard after closing lazy if vim.o.filetype == "lazy" then - vim.cmd.close() - vim.api.nvim_create_autocmd("User", { - pattern = "DashboardLoaded", + vim.api.nvim_create_autocmd("WinClosed", { + pattern = tostring(vim.api.nvim_get_current_win()), + once = true, callback = function() - require("lazy").show() + vim.schedule(function() + vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) + end) end, }) end @@ -784,13 +795,15 @@ end button.key_format = " %s" end - -- close Lazy and re-open when the dashboard is ready + -- open dashboard after closing lazy if vim.o.filetype == "lazy" then - vim.cmd.close() - vim.api.nvim_create_autocmd("User", { - pattern = "DashboardLoaded", + vim.api.nvim_create_autocmd("WinClosed", { + pattern = tostring(vim.api.nvim_get_current_win()), + once = true, callback = function() - require("lazy").show() + vim.schedule(function() + vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) + end) end, }) end From d2ab1a5d6aa0d23caa22d7a5a4a803029693c352 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Jun 2024 19:14:21 +0000 Subject: [PATCH 211/553] chore(build): auto-generate docs --- docs/configuration/general.md | 28 ++++++++++++++++++++++++ docs/extras/lang/elixir.md | 40 +++++++++++++++++++++++------------ 2 files changed, 54 insertions(+), 14 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 96620c04e7..6377835670 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -92,6 +92,12 @@ vim.g.lazyvim_statuscolumn = { -- Hide deprecation warnings vim.g.deprecation_warnings = false +-- Set filetype to `bigfile` for files larger than 1.5 MB +-- Only vim syntax will be enabled (with the correct filetype) +-- LSP, treesitter and other ft plugins will be disabled. +-- mini.animate will also be disabled. +vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB + -- Show the current document symbols location from Trouble in lualine vim.g.trouble_lualine = true @@ -522,6 +528,28 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { end, }) +vim.filetype.add({ + pattern = { + [".*"] = { + function(path, buf) + return vim.bo[buf].filetype ~= "bigfile" and path and vim.fn.getfsize(path) > vim.g.bigfile_size and "bigfile" + or nil + end, + }, + }, +}) + +vim.api.nvim_create_autocmd({ "FileType" }, { + group = augroup("bigfile"), + pattern = "bigfile", + callback = function(ev) + vim.b.minianimate_disable = true + vim.schedule(function() + vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or "" + end) + end, +}) + ``` diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index 62eb5b6e53..e27a1cb41e 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -163,12 +163,13 @@ opts = { ```lua opts = function(_, opts) - if vim.fn.executable("credo") == 0 then - return - end local nls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { - nls.builtins.diagnostics.credo, + nls.builtins.diagnostics.credo.with({ + condition = function(utils) + return utils.root_has_file(".credo.exs") + end, + }), }) end ``` @@ -183,12 +184,13 @@ end "nvimtools/none-ls.nvim", optional = true, opts = function(_, opts) - if vim.fn.executable("credo") == 0 then - return - end local nls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { - nls.builtins.diagnostics.credo, + nls.builtins.diagnostics.credo.with({ + condition = function(utils) + return utils.root_has_file(".credo.exs") + end, + }), }) end, } @@ -206,12 +208,17 @@ end ```lua opts = function(_, opts) - if vim.fn.executable("credo") == 0 then - return - end opts.linters_by_ft = { elixir = { "credo" }, } + + opts.linters = { + credo = { + condition = function(ctx) + return vim.fs.find({ ".credo.exs" }, { path = ctx.filename, upward = true })[1] + end, + }, + } end ``` @@ -225,12 +232,17 @@ end "mfussenegger/nvim-lint", optional = true, opts = function(_, opts) - if vim.fn.executable("credo") == 0 then - return - end opts.linters_by_ft = { elixir = { "credo" }, } + + opts.linters = { + credo = { + condition = function(ctx) + return vim.fs.find({ ".credo.exs" }, { path = ctx.filename, upward = true })[1] + end, + }, + } end, } ``` From 6740478ddea3dc8466360e567e6f9b787e783c6a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 25 Jun 2024 20:17:01 +0000 Subject: [PATCH 212/553] chore(build): auto-generate docs --- docs/extras/lang/sql.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 6499ec20f5..1915e5a830 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -22,6 +22,38 @@ require("lazy").setup({ +### 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" +-- The setup below will automatically configure connections without the need for manual input each time. + +-- Example configuration using dictionary with keys: +-- vim.g.dbs = { +-- dev = "Replace with your database connection URL.", +-- staging = "Replace with your database connection URL.", +-- } +-- or +-- Example configuration using a list of dictionaries: +-- vim.g.dbs = { +-- { name = "dev", url = "Replace with your database connection URL." }, +-- { name = "staging", url = "Replace with your database connection URL." }, +-- } + +-- or +-- Create a `.lazy.lua` file in your project and set your connections like this: +-- ```lua +-- vim.g.dbs = {...} +-- +-- return {} +-- ``` + +-- Alternatively, you can also use other methods to inject your environment variables. + +-- Finally, please make sure to add `.lazy.lua` to your `.gitignore` file to protect your secrets. +``` + Below you can find a list of included plugins and their default settings. :::caution From d8f5c30d2270074397d0330c2a243e82b623a93c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Jun 2024 15:18:51 +0000 Subject: [PATCH 213/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 6377835670..4b7e6ba12e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -532,7 +532,11 @@ vim.filetype.add({ pattern = { [".*"] = { function(path, buf) - return vim.bo[buf].filetype ~= "bigfile" and path and vim.fn.getfsize(path) > vim.g.bigfile_size and "bigfile" + return vim.bo[buf] + and vim.bo[buf].filetype ~= "bigfile" + and path + and vim.fn.getfsize(path) > vim.g.bigfile_size + and "bigfile" or nil end, }, From d94ae48791fdedc955f7892b5dd2c4aca27d8f94 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Jun 2024 14:15:38 +0000 Subject: [PATCH 214/553] chore(build): auto-generate docs --- docs/extras/test/core.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index ac907c8c1a..6bd42d1b1e 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -171,6 +171,9 @@ opts = { local meta = getmetatable(adapter) if adapter.setup then adapter.setup(config) + elseif adapter.adapter then + adapter.adapter(config) + adapter = adapter.adapter elseif meta and meta.__call then adapter(config) else From 39ad2923628826ac5e4283f0db32f94106a3e3d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Jun 2024 16:21:10 +0000 Subject: [PATCH 215/553] chore(build): auto-generate docs --- docs/plugins/linting.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/plugins/linting.md b/docs/plugins/linting.md index 9c4329149d..b0bfc8ece5 100644 --- a/docs/plugins/linting.md +++ b/docs/plugins/linting.md @@ -81,6 +81,7 @@ opts = { if type(linter) == "table" and type(lint.linters[name]) == "table" then lint.linters[name] = vim.tbl_deep_extend("force", lint.linters[name], linter) if type(linter.prepend_args) == "table" then + lint.linters[name].args = lint.linters[name].args or {} vim.list_extend(lint.linters[name].args, linter.prepend_args) end else From 449cadf1aafb62a882aa9236beb7e68bacb80d75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Jun 2024 18:20:56 +0000 Subject: [PATCH 216/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 9f4712535a..6cf1af8283 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -380,6 +380,13 @@ opts = { changedelete = { text = "▎" }, untracked = { text = "▎" }, }, + signs_staged = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + }, on_attach = function(buffer) local gs = package.loaded.gitsigns @@ -437,6 +444,13 @@ opts = { changedelete = { text = "▎" }, untracked = { text = "▎" }, }, + signs_staged = { + add = { text = "▎" }, + change = { text = "▎" }, + delete = { text = "" }, + topdelete = { text = "" }, + changedelete = { text = "▎" }, + }, on_attach = function(buffer) local gs = package.loaded.gitsigns From 256e0719acb0240b2f2af1f9b4760e084b7b4a2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 08:19:59 +0000 Subject: [PATCH 217/553] chore(build): auto-generate docs --- docs/extras/editor/overseer.md | 309 +++++++++++++++++++++++++++++++++ docs/keymaps.md | 13 ++ 2 files changed, 322 insertions(+) create mode 100644 docs/extras/editor/overseer.md diff --git a/docs/extras/editor/overseer.md b/docs/extras/editor/overseer.md new file mode 100644 index 0000000000..2a37aa3ac5 --- /dev/null +++ b/docs/extras/editor/overseer.md @@ -0,0 +1,309 @@ +# `Overseer` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.editor.overseer" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [overseer.nvim](https://github.com/stevearc/overseer.nvim) + + + + + +```lua +opts = { + dap = false, + task_list = { + bindings = { + [""] = false, + [""] = false, + [""] = false, + [""] = false, + }, + }, + form = { + win_opts = { + winblend = 0, + }, + }, + confirm = { + win_opts = { + winblend = 0, + }, + }, + task_win = { + win_opts = { + winblend = 0, + }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/overseer.nvim", + cmd = { + "OverseerOpen", + "OverseerClose", + "OverseerToggle", + "OverseerSaveBundle", + "OverseerLoadBundle", + "OverseerDeleteBundle", + "OverseerRunCmd", + "OverseerRun", + "OverseerInfo", + "OverseerBuild", + "OverseerQuickAction", + "OverseerTaskAction", + "OverseerClearCache", + }, + opts = { + dap = false, + task_list = { + bindings = { + [""] = false, + [""] = false, + [""] = false, + [""] = false, + }, + }, + form = { + win_opts = { + winblend = 0, + }, + }, + confirm = { + win_opts = { + winblend = 0, + }, + }, + task_win = { + win_opts = { + winblend = 0, + }, + }, + }, + -- stylua: ignore + keys = { + { "ow", "OverseerToggle", desc = "Task list" }, + { "oo", "OverseerRun", desc = "Run task" }, + { "oq", "OverseerQuickAction", desc = "Action recent task" }, + { "oi", "OverseerInfo", desc = "Overseer Info" }, + { "ob", "OverseerBuild", desc = "Task builder" }, + { "ot", "OverseerTaskAction", desc = "Task action" }, + { "oc", "OverseerClearCache", desc = "Clear cache" }, + }, +} +``` + + + + + +## [catppuccin](https://github.com/catppuccin/nvim) _(optional)_ + + + + + +```lua +opts = { + integrations = { overseer = true }, +} +``` + + + + + + +```lua +{ + "catppuccin", + optional = true, + opts = { + integrations = { overseer = true }, + }, +} +``` + + + + + +## [which-key.nvim](https://github.com/folke/which-key.nvim) _(optional)_ + + + + + +```lua +opts = { + defaults = { ["o"] = { name = "+overseer" } }, +} +``` + + + + + + +```lua +{ + "folke/which-key.nvim", + optional = true, + opts = { + defaults = { ["o"] = { name = "+overseer" } }, + }, +} +``` + + + + + +## [edgy.nvim](https://github.com/folke/edgy.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, { + title = "Overseer", + ft = "OverseerList", + open = function() + require("overseer").open() + end, + }) +end +``` + + + + + + +```lua +{ + "folke/edgy.nvim", + optional = true, + opts = function(_, opts) + opts.right = opts.right or {} + table.insert(opts.right, { + title = "Overseer", + ft = "OverseerList", + open = function() + require("overseer").open() + end, + }) + end, +} +``` + + + + + +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts = opts or {} + opts.consumers = opts.consumers or {} + opts.consumers.overseer = require("neotest.consumers.overseer") +end +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + opts = function(_, opts) + opts = opts or {} + opts.consumers = opts.consumers or {} + opts.consumers.overseer = require("neotest.consumers.overseer") + end, +} +``` + + + + + +## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ + + + + + +```lua +opts = function() + require("overseer").enable_dap() +end +``` + + + + + + +```lua +{ + "mfussenegger/nvim-dap", + optional = true, + opts = function() + require("overseer").enable_dap() + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 03434ee3b0..df97b98916 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -528,6 +528,19 @@ Part of [lazyvim.plugins.extras.editor.outline](/extras/editor/outline) | --- | --- | --- | | <leader>cs | Toggle Outline | **n** | +## [overseer.nvim](https://github.com/stevearc/overseer.nvim.git) +Part of [lazyvim.plugins.extras.editor.overseer](/extras/editor/overseer) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>ob | Task builder | **n** | +| <leader>oc | Clear cache | **n** | +| <leader>oi | Overseer Info | **n** | +| <leader>oo | Run task | **n** | +| <leader>oq | Action recent task | **n** | +| <leader>ot | Task action | **n** | +| <leader>ow | Task list | **n** | + ## [refactoring.nvim](https://github.com/ThePrimeagen/refactoring.nvim.git) Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) From 3f186c61f0fad097930cdd0910b5957a4c411d2d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 09:18:08 +0000 Subject: [PATCH 218/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 20 ++-- docs/extras/ui/edgy.md | 18 ++-- docs/extras/util/chezmoi.md | 200 +++++++++++++++++++++++++++++++++++ docs/keymaps.md | 7 ++ 4 files changed, 229 insertions(+), 16 deletions(-) create mode 100644 docs/extras/util/chezmoi.md diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 5ba125df38..d4b7a6ca85 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -39,7 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { ensure_installed = { "markdownlint", "markdown-toc" } } +opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } } ``` @@ -50,7 +50,7 @@ opts = { ensure_installed = { "markdownlint", "markdown-toc" } } ```lua { "williamboman/mason.nvim", - opts = { ensure_installed = { "markdownlint", "markdown-toc" } }, + opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } }, } ``` @@ -208,8 +208,8 @@ end ```lua opts = { formatters_by_ft = { - ["markdown"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, - ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, + ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, }, } ``` @@ -225,8 +225,8 @@ opts = { optional = true, opts = { formatters_by_ft = { - ["markdown"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, - ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint", "markdown-toc" }, + ["markdown"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, + ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, }, }, } @@ -246,7 +246,7 @@ opts = { opts = function(_, opts) local nls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { - nls.builtins.diagnostics.markdownlint, + nls.builtins.diagnostics.markdownlint_cli2, }) end ``` @@ -263,7 +263,7 @@ end opts = function(_, opts) local nls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { - nls.builtins.diagnostics.markdownlint, + nls.builtins.diagnostics.markdownlint_cli2, }) end, } @@ -282,7 +282,7 @@ end ```lua opts = { linters_by_ft = { - markdown = { "markdownlint" }, + markdown = { "markdownlint-cli2" }, }, } ``` @@ -298,7 +298,7 @@ opts = { optional = true, opts = { linters_by_ft = { - markdown = { "markdownlint" }, + markdown = { "markdownlint-cli2" }, }, }, } diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 9178c79000..e441617855 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -371,14 +371,17 @@ opts = function() local get = Offset.get Offset.get = function() if package.loaded.edgy then + local old_offset = get() local layout = require("edgy.config").layout local ret = { left = "", left_size = 0, right = "", right_size = 0 } for _, pos in ipairs({ "left", "right" }) do local sb = layout[pos] + local title = " Sidebar" .. string.rep(" ", sb.bounds.width - 8) if sb and #sb.wins > 0 then - local title = " Sidebar" .. string.rep(" ", sb.bounds.width - 8) - ret[pos] = "%#EdgyTitle#" .. title .. "%*" .. "%#WinSeparator#│%*" - ret[pos .. "_size"] = sb.bounds.width + ret[pos] = old_offset[pos .. "_size"] > 0 and old_offset[pos] + or pos == "left" and ("%#Bold#" .. title .. "%*" .. "%#BufferLineOffsetSeparator#│%*") + or pos == "right" and ("%#BufferLineOffsetSeparator#│%*" .. "%#Bold#" .. title .. "%*") + ret[pos .. "_size"] = old_offset[pos .. "_size"] > 0 and old_offset[pos .. "_size"] or sb.bounds.width end end ret.total_size = ret.left_size + ret.right_size @@ -408,14 +411,17 @@ end local get = Offset.get Offset.get = function() if package.loaded.edgy then + local old_offset = get() local layout = require("edgy.config").layout local ret = { left = "", left_size = 0, right = "", right_size = 0 } for _, pos in ipairs({ "left", "right" }) do local sb = layout[pos] + local title = " Sidebar" .. string.rep(" ", sb.bounds.width - 8) if sb and #sb.wins > 0 then - local title = " Sidebar" .. string.rep(" ", sb.bounds.width - 8) - ret[pos] = "%#EdgyTitle#" .. title .. "%*" .. "%#WinSeparator#│%*" - ret[pos .. "_size"] = sb.bounds.width + ret[pos] = old_offset[pos .. "_size"] > 0 and old_offset[pos] + or pos == "left" and ("%#Bold#" .. title .. "%*" .. "%#BufferLineOffsetSeparator#│%*") + or pos == "right" and ("%#BufferLineOffsetSeparator#│%*" .. "%#Bold#" .. title .. "%*") + ret[pos .. "_size"] = old_offset[pos .. "_size"] > 0 and old_offset[pos .. "_size"] or sb.bounds.width end end ret.total_size = ret.left_size + ret.right_size diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md new file mode 100644 index 0000000000..be2eb07c96 --- /dev/null +++ b/docs/extras/util/chezmoi.md @@ -0,0 +1,200 @@ +# `Chezmoi` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.util.chezmoi" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [chezmoi.vim](https://github.com/alker0/chezmoi.vim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + -- highlighting for chezmoi files template files + "alker0/chezmoi.vim", + init = function() + vim.g["chezmoi#use_tmp_buffer"] = 1 + vim.g["chezmoi#source_dir_path"] = os.getenv("HOME") .. "/.local/share/chezmoi" + end, +} +``` + + + + + +## [chezmoi.nvim](https://github.com/xvzc/chezmoi.nvim) + + + + + +```lua +opts = { + edit = { + watch = false, + force = false, + }, + notification = { + on_open = true, + on_apply = true, + on_watch = false, + }, + telescope = { + select = { "" }, + }, +} +``` + + + + + + +```lua +{ + "xvzc/chezmoi.nvim", + keys = { + { + "sz", + function() + require("telescope").extensions.chezmoi.find_files() + end, + desc = "Chezmoi", + }, + }, + opts = { + edit = { + watch = false, + force = false, + }, + notification = { + on_open = true, + on_apply = true, + on_watch = false, + }, + telescope = { + select = { "" }, + }, + }, + init = function() + -- run chezmoi edit on file enter + vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, + callback = function() + vim.schedule(require("chezmoi.commands.__edit").watch) + end, + }) + end, +} +``` + + + + + +## [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + local projects = { + action = "Telescope chezmoi find_files", + desc = " Config", + icon = "", + key = "c", + } + + projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) + projects.key_format = " %s" + + -- remove lazyvim config property + for i = #opts.config.center, 1, -1 do + if opts.config.center[i].key == "c" then + table.remove(opts.config.center, i) + end + end + + table.insert(opts.config.center, 5, projects) +end +``` + + + + + + +```lua +{ + "nvimdev/dashboard-nvim", + optional = true, + opts = function(_, opts) + local projects = { + action = "Telescope chezmoi find_files", + desc = " Config", + icon = "", + key = "c", + } + + projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) + projects.key_format = " %s" + + -- remove lazyvim config property + for i = #opts.config.center, 1, -1 do + if opts.config.center[i].key == "c" then + table.remove(opts.config.center, i) + end + end + + table.insert(opts.config.center, 5, projects) + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index df97b98916..48fa5dc886 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -684,6 +684,13 @@ Part of [lazyvim.plugins.extras.ui.treesitter-context](/extras/ui/treesitter-con | --- | --- | --- | | <leader>ut | Toggle Treesitter Context | **n** | +## [chezmoi.nvim](https://github.com/xvzc/chezmoi.nvim.git) +Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>sz | Chezmoi | **n** | + ## [mason.nvim](https://github.com/williamboman/mason.nvim.git) Part of [lazyvim.plugins.extras.util.gitui](/extras/util/gitui) From 93cef6f21d84ae4e4c5d24aa7b65597642fa332b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 10:16:17 +0000 Subject: [PATCH 219/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index aeb1b36034..f354c8a5b5 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -148,6 +148,8 @@ opts = { ```lua opts = function() + local mason_registry = require("mason-registry") + local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" return { -- How to find the root dir for a given filename. The default comes from -- lspconfig which provides a function specifically for java projects. @@ -168,7 +170,10 @@ opts = function() -- How to run jdtls. This can be overridden to a full java command-line -- if the Python wrapper script doesn't suffice. - cmd = { vim.fn.exepath("jdtls") }, + cmd = { + vim.fn.exepath("jdtls"), + string.format("--jvm-arg=-javaagent:%s", lombok_jar), + }, full_cmd = function(opts) local fname = vim.api.nvim_buf_get_name(0) local root_dir = opts.root_dir(fname) @@ -213,6 +218,8 @@ end dependencies = { "folke/which-key.nvim" }, ft = java_filetypes, opts = function() + local mason_registry = require("mason-registry") + local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" return { -- How to find the root dir for a given filename. The default comes from -- lspconfig which provides a function specifically for java projects. @@ -233,7 +240,10 @@ end -- How to run jdtls. This can be overridden to a full java command-line -- if the Python wrapper script doesn't suffice. - cmd = { vim.fn.exepath("jdtls") }, + cmd = { + vim.fn.exepath("jdtls"), + string.format("--jvm-arg=-javaagent:%s", lombok_jar), + }, full_cmd = function(opts) local fname = vim.api.nvim_buf_get_name(0) local root_dir = opts.root_dir(fname) From f0dee4bb785c1a6322d97faac86a3a47fe84f062 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 14:15:41 +0000 Subject: [PATCH 220/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index d4b7a6ca85..1610d89faa 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -207,9 +207,20 @@ end ```lua opts = { + formatters = { + ["markdown-toc"] = { + condition = function(_, ctx) + for _, line in ipairs(vim.api.nvim_buf_get_lines(ctx.buf, 0, -1, false)) do + if line:find("") then + return true + end + end + end, + }, + }, formatters_by_ft = { - ["markdown"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, - ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, + ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, + ["markdown.mdx"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, }, } ``` @@ -224,9 +235,20 @@ opts = { "stevearc/conform.nvim", optional = true, opts = { + formatters = { + ["markdown-toc"] = { + condition = function(_, ctx) + for _, line in ipairs(vim.api.nvim_buf_get_lines(ctx.buf, 0, -1, false)) do + if line:find("") then + return true + end + end + end, + }, + }, formatters_by_ft = { - ["markdown"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, - ["markdown.mdx"] = { { "prettierd", "prettier" }, "markdownlint-cli2", "markdown-toc" }, + ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, + ["markdown.mdx"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, }, }, } From 8fedea596482de36ebfc41b1eee2c2883cca7f28 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 19:12:25 +0000 Subject: [PATCH 221/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 10 ++++++++-- docs/plugins/lsp.md | 8 ++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index a001a20d77..b426a4586a 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -45,11 +45,14 @@ opts = function() { name = "buffer" }, }), formatting = { - format = function(_, item) + format = function(entry, item) local icons = LazyVim.config.icons.kinds if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end + if entry.context.filetype == "rust" then + item.menu = nil + end return item end, }, @@ -117,11 +120,14 @@ end { name = "buffer" }, }), formatting = { - format = function(_, item) + format = function(entry, item) local icons = LazyVim.config.icons.kinds if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end + if entry.context.filetype == "rust" then + item.menu = nil + end return item end, }, diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 6e4f18b1d8..ae503ad7a3 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -157,7 +157,7 @@ end event = "LazyFile", dependencies = { "mason.nvim", - "williamboman/mason-lspconfig.nvim", + { "williamboman/mason-lspconfig.nvim", config = function() end }, }, ---@class PluginLspOpts opts = function() @@ -429,7 +429,7 @@ opts = nil ```lua { "mason.nvim", - "williamboman/mason-lspconfig.nvim", + { "williamboman/mason-lspconfig.nvim", config = function() end }, } ``` @@ -444,7 +444,7 @@ opts = nil ```lua -opts = nil +opts = {} ``` @@ -453,7 +453,7 @@ opts = nil ```lua -"williamboman/mason-lspconfig.nvim" +{ "williamboman/mason-lspconfig.nvim", config = function() end } ``` From ee7202d3e497c4f612193bb4f08651b0d10ab34c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 29 Jun 2024 21:19:27 +0200 Subject: [PATCH 222/553] docs: custom lazyvim.json --- docs/configuration/general.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 4b7e6ba12e..48b3c9d99e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -180,6 +180,19 @@ vim.g.markdown_recommended_style = 0 +:::info`lazyvim.json` + +**LazyVim** stores some configuration like the enabled **extras** in the `lazyvim.json` file. + +This can be configured with `vim.g.lazyvim_json`, but you need to do this **before** +loading `lazy.nvim`, so **not** in your `options.lua`. + +```lua title="lua/init.lua" +vim.g.lazyvim_json = vim.fn.stdpath("config") .. "/lazyvim.json" +``` + +::: + ## Keymaps From f7b498e37151d59af358d192fc1644656d50643b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 29 Jun 2024 19:19:56 +0000 Subject: [PATCH 223/553] chore(build): auto-generate docs --- docs/configuration/general.md | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 48b3c9d99e..4b7e6ba12e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -180,19 +180,6 @@ vim.g.markdown_recommended_style = 0 -:::info`lazyvim.json` - -**LazyVim** stores some configuration like the enabled **extras** in the `lazyvim.json` file. - -This can be configured with `vim.g.lazyvim_json`, but you need to do this **before** -loading `lazy.nvim`, so **not** in your `options.lua`. - -```lua title="lua/init.lua" -vim.g.lazyvim_json = vim.fn.stdpath("config") .. "/lazyvim.json" -``` - -::: - ## Keymaps From aac833dad388840a965bfd34a03eed06b584ad75 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 06:22:22 +0000 Subject: [PATCH 224/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 6cf1af8283..8b71a8c166 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -27,6 +27,11 @@ opts = { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, + filtered_items = { + hide_dotfiles = false, + hide_gitignored = true, + hide_by_name = { ".git" }, + }, }, window = { mappings = { @@ -138,6 +143,11 @@ opts = { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, + filtered_items = { + hide_dotfiles = false, + hide_gitignored = true, + hide_by_name = { ".git" }, + }, }, window = { mappings = { From 833addd7e5def3dfaae16d1c980e6f51f3989e0b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 09:20:07 +0000 Subject: [PATCH 225/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 1610d89faa..469789b1f8 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -217,6 +217,14 @@ opts = { end end, }, + ["markdownlint-cli2"] = { + condition = function(_, ctx) + local diag = vim.tbl_filter(function(d) + return d.source == "markdownlint" + end, vim.diagnostic.get(ctx.buf)) + return #diag > 0 + end, + }, }, formatters_by_ft = { ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, @@ -245,6 +253,14 @@ opts = { end end, }, + ["markdownlint-cli2"] = { + condition = function(_, ctx) + local diag = vim.tbl_filter(function(d) + return d.source == "markdownlint" + end, vim.diagnostic.get(ctx.buf)) + return #diag > 0 + end, + }, }, formatters_by_ft = { ["markdown"] = { "prettier", "markdownlint-cli2", "markdown-toc" }, From 045466f381ce95d46fde65820b1a23f93b927dd1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 16:20:53 +0000 Subject: [PATCH 226/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 8b71a8c166..6cf1af8283 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -27,11 +27,6 @@ opts = { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, - filtered_items = { - hide_dotfiles = false, - hide_gitignored = true, - hide_by_name = { ".git" }, - }, }, window = { mappings = { @@ -143,11 +138,6 @@ opts = { bind_to_cwd = false, follow_current_file = { enabled = true }, use_libuv_file_watcher = true, - filtered_items = { - hide_dotfiles = false, - hide_gitignored = true, - hide_by_name = { ".git" }, - }, }, window = { mappings = { From c0c626dfd9301b23a6162b2b818aba4fc6f90ed7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 18:22:28 +0000 Subject: [PATCH 227/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 6cf1af8283..c2d86407f7 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -75,7 +75,6 @@ opts = { ```lua { "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", cmd = "Neotree", keys = { { From 7fe694c117823fc4918a16a5c49410b1aa7516e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 21:17:18 +0000 Subject: [PATCH 228/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index b426a4586a..d2bb973d66 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -50,9 +50,18 @@ opts = function() if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end - if entry.context.filetype == "rust" then - item.menu = nil + + local widths = { + abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, + menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, + } + + for key, width in pairs(widths) do + if item[key] and vim.fn.strdisplaywidth(item[key]) > width then + item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" + end end + return item end, }, @@ -125,9 +134,18 @@ end if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end - if entry.context.filetype == "rust" then - item.menu = nil + + local widths = { + abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, + menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, + } + + for key, width in pairs(widths) do + if item[key] and vim.fn.strdisplaywidth(item[key]) > width then + item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" + end end + return item end, }, From 4b59e1070f02b7503a9ce495696fe81ccccacd40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 06:25:14 +0000 Subject: [PATCH 229/553] chore(build): auto-generate docs --- docs/extras/util/chezmoi.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index be2eb07c96..2b960b48c6 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -96,9 +96,7 @@ opts = { keys = { { "sz", - function() - require("telescope").extensions.chezmoi.find_files() - end, + pick_chezmoi, desc = "Chezmoi", }, }, @@ -141,7 +139,7 @@ opts = { ```lua opts = function(_, opts) local projects = { - action = "Telescope chezmoi find_files", + action = pick_chezmoi, desc = " Config", icon = "", key = "c", @@ -172,7 +170,7 @@ end optional = true, opts = function(_, opts) local projects = { - action = "Telescope chezmoi find_files", + action = pick_chezmoi, desc = " Config", icon = "", key = "c", From 53f654e97c7fbe2030e9f3223cef961ec940280f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 08:21:23 +0000 Subject: [PATCH 230/553] chore(build): auto-generate docs --- docs/configuration/lazy.nvim.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/configuration/lazy.nvim.md b/docs/configuration/lazy.nvim.md index 570770f998..2fba8b4d9f 100644 --- a/docs/configuration/lazy.nvim.md +++ b/docs/configuration/lazy.nvim.md @@ -43,11 +43,18 @@ be forced to install the latest development version. To override that, specify ```lua title="lua/config/lazy.lua" local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" - if not (vim.uv or vim.loop).fs_stat(lazypath) then - -- bootstrap lazy.nvim - -- stylua: ignore - vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end end vim.opt.rtp:prepend(lazypath) From 66cb2d307d628e40da832cef40b1ca5f693f8ebf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 15:18:24 +0000 Subject: [PATCH 231/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 4b7e6ba12e..b710695f57 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -127,6 +127,7 @@ opt.grepformat = "%f:%l:%c:%m" opt.grepprg = "rg --vimgrep" opt.ignorecase = true -- Ignore case opt.inccommand = "nosplit" -- preview incremental substitute +opt.jumpoptions = "view" opt.laststatus = 3 -- global statusline opt.linebreak = true -- Wrap lines at convenient points opt.list = true -- Show some invisible characters (tabs... From a6f0e673c59d422197acb15066a210e99d19c15d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 16:21:39 +0000 Subject: [PATCH 232/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 5e2eef9290..a1149596e0 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -201,7 +201,7 @@ end ```lua { "ibhagwan/fzf-lua", - event = "VeryLazy", + cmd = "FzfLua", opts = function(_, opts) local config = require("fzf-lua.config") local actions = require("fzf-lua.actions") From 64793dc6e163f42e5a0496a5485d7f20743ffbbd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 17:14:39 +0000 Subject: [PATCH 233/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index b6b6406cb2..4c2e364b0d 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -348,7 +348,7 @@ end end, config = function(_, opts) require("dial.config").augends:register_group(opts.groups) - M.dials_by_ft = opts.dials_by_ft + vim.g.dials_by_ft = opts.dials_by_ft end, } ``` From 93a3a866770790d33d1623faa0979b9dc89a0f7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Jul 2024 20:17:27 +0000 Subject: [PATCH 234/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index a1149596e0..9f02d404ae 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -58,6 +58,8 @@ opts = function(_, opts) config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" config.defaults.keymap.fzf["ctrl-x"] = "jump" + config.defaults.keymap.fzf["ctrl-f"] = "preview-page-down" + config.defaults.keymap.fzf["ctrl-b"] = "preview-page-up" config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" @@ -211,6 +213,8 @@ end config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" config.defaults.keymap.fzf["ctrl-x"] = "jump" + config.defaults.keymap.fzf["ctrl-f"] = "preview-page-down" + config.defaults.keymap.fzf["ctrl-b"] = "preview-page-up" config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up" From 847538d6c327c111ce716dfd50a9bdbbf8096673 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Jul 2024 14:15:23 +0000 Subject: [PATCH 235/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 9f02d404ae..878ba148e9 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -352,6 +352,14 @@ end require("fzf-lua").setup(opts) require("fzf-lua").register_ui_select(opts.ui_select or nil) end, + init = function() + LazyVim.on_very_lazy(function() + vim.ui.select = function(...) + require("fzf-lua") + return vim.ui.select(...) + end + end) + end, keys = { { "", "", ft = "fzf", mode = "t", nowait = true }, { "", "", ft = "fzf", mode = "t", nowait = true }, From 4126a6a73f38dbb4dfdfa81bba20b46d82fec128 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Jul 2024 16:20:17 +0000 Subject: [PATCH 236/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 65d3f7be79..58d8ab0ae3 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -618,7 +618,7 @@ opts = { -## [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) +## [mini.icons](https://github.com/echasnovski/mini.icons) icons @@ -628,7 +628,7 @@ opts = { ```lua -opts = nil +opts = {} ``` @@ -637,7 +637,17 @@ opts = nil ```lua -{ "nvim-tree/nvim-web-devicons", lazy = true } +{ + "echasnovski/mini.icons", + lazy = true, + opts = {}, + init = function() + package.preload["nvim-web-devicons"] = function() + require("mini.icons").mock_nvim_web_devicons() + return package.loaded["nvim-web-devicons"] + end + end, +} ``` From 8399974211c5bb8105e10de1a559c8c3955ef7db Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 4 Jul 2024 19:14:32 +0000 Subject: [PATCH 237/553] chore(build): auto-generate docs --- docs/extras/lang/erlang.md | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 docs/extras/lang/erlang.md diff --git a/docs/extras/lang/erlang.md b/docs/extras/lang/erlang.md new file mode 100644 index 0000000000..464cc9a018 --- /dev/null +++ b/docs/extras/lang/erlang.md @@ -0,0 +1,95 @@ +# `Erlang` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.erlang" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = { + erlangls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + erlangls = {}, + }, + }, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { ensure_installed = { "erlang" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "erlang" } }, +} +``` + + + + + + From 9779452bf38a6383a9b1989af6b1eefd5c53c143 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 06:24:39 +0000 Subject: [PATCH 238/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c2d86407f7..e798e8e17e 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -504,7 +504,13 @@ opts = { ```lua -opts = {} +opts = { + modes = { + lsp = { + win = { position = "right" }, + }, + }, +} ``` @@ -516,16 +522,18 @@ opts = {} { "folke/trouble.nvim", cmd = { "Trouble" }, - opts = {}, + opts = { + modes = { + lsp = { + win = { position = "right" }, + }, + }, + }, keys = { { "xx", "Trouble diagnostics toggle", desc = "Diagnostics (Trouble)" }, { "xX", "Trouble diagnostics toggle filter.buf=0", desc = "Buffer Diagnostics (Trouble)" }, - { "cs", "Trouble symbols toggle focus=false", desc = "Symbols (Trouble)" }, - { - "cS", - "Trouble lsp toggle focus=false win.position=right", - desc = "LSP references/definitions/... (Trouble)", - }, + { "cs", "Trouble symbols toggle", desc = "Symbols (Trouble)" }, + { "cS", "Trouble lsp toggle", desc = "LSP references/definitions/... (Trouble)" }, { "xL", "Trouble loclist toggle", desc = "Location List (Trouble)" }, { "xQ", "Trouble qflist toggle", desc = "Quickfix List (Trouble)" }, { From af4a36da74df5bd98668b1e388da153f30a16c02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 08:20:44 +0000 Subject: [PATCH 239/553] chore(build): auto-generate docs --- docs/extras/util/rest.md | 99 ++++++++++++++++++++++++++++++++++++++++ docs/keymaps.md | 11 +++++ 2 files changed, 110 insertions(+) create mode 100644 docs/extras/util/rest.md diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md new file mode 100644 index 0000000000..670b7867db --- /dev/null +++ b/docs/extras/util/rest.md @@ -0,0 +1,99 @@ +# `Rest` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.util.rest" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [kulala.nvim](https://github.com/mistweaverco/kulala.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "mistweaverco/kulala.nvim", + ft = "http", + keys = { + { "R", "", desc = "+Rest" }, + { "Rs", "lua require('kulala').run()", desc = "Send the request" }, + { "Rt", "lua require('kulala').toggle_view()", desc = "Toggle headers/body" }, + { "Rp", "lua require('kulala').jump_prev()", desc = "Jump to previous request" }, + { "Rn", "lua require('kulala').jump_next()", desc = "Jump to next request" }, + }, + opts = {}, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { + ensure_installed = { "http", "graphql" }, +} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "http", "graphql" }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 48fa5dc886..3ddb39605c 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -732,4 +732,15 @@ Part of [lazyvim.plugins.extras.util.project](/extras/util/project) | --- | --- | --- | | <leader>fp | Projects | **n** | +## [kulala.nvim](https://github.com/mistweaverco/kulala.nvim.git) +Part of [lazyvim.plugins.extras.util.rest](/extras/util/rest) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>R | +Rest | **n** | +| <leader>Rn | Jump to next request | **n** | +| <leader>Rp | Jump to previous request | **n** | +| <leader>Rs | Send the request | **n** | +| <leader>Rt | Toggle headers/body | **n** | + From 94042ad2ceef4c1c9596a41045bb514b29f6261e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 13:18:49 +0000 Subject: [PATCH 240/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 4c2e364b0d..c84e3c2a78 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -125,6 +125,7 @@ opts = function() scss = "css", typescript = "typescript", typescriptreact = "typescript", + yaml = "yaml", }, groups = { default = { @@ -141,6 +142,11 @@ opts = function() weekdays, months, }, + yaml = { + augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.constant.alias.bool, -- boolean value (true <-> false) + ordinal_numbers, + }, css = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.hexcolor.new({ @@ -288,6 +294,7 @@ end scss = "css", typescript = "typescript", typescriptreact = "typescript", + yaml = "yaml", }, groups = { default = { @@ -304,6 +311,11 @@ end weekdays, months, }, + yaml = { + augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.constant.alias.bool, -- boolean value (true <-> false) + ordinal_numbers, + }, css = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.hexcolor.new({ From b224501831f56b3779c34ae24689ab412028fcf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 14:16:08 +0000 Subject: [PATCH 241/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 32 ++++----------------- docs/extras/editor/outline.md | 54 +++++++++++++---------------------- docs/extras/lang/vue.md | 4 +-- 3 files changed, 28 insertions(+), 62 deletions(-) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index c84e3c2a78..6b551b6849 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -132,20 +132,19 @@ opts = function() augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...) augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.) augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.) + ordinal_numbers, + weekdays, + months, }, typescript = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, augend.constant.new({ elements = { "let", "const" } }), - ordinal_numbers, - weekdays, - months, }, yaml = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) - ordinal_numbers, }, css = { augend.integer.alias.decimal, -- nonnegative and negative decimal number @@ -158,9 +157,6 @@ opts = function() }, markdown = { augend.misc.alias.markdown_header, - ordinal_numbers, - weekdays, - months, }, json = { augend.integer.alias.decimal, -- nonnegative and negative decimal number @@ -174,17 +170,11 @@ opts = function() word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. cyclic = true, -- "or" is incremented into "and". }), - ordinal_numbers, - weekdays, - months, }, python = { augend.integer.alias.decimal, -- nonnegative and negative decimal number capitalized_boolean, logical_alias, - ordinal_numbers, - weekdays, - months, }, }, } @@ -301,20 +291,19 @@ end augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...) augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.) augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.) + ordinal_numbers, + weekdays, + months, }, typescript = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, augend.constant.new({ elements = { "let", "const" } }), - ordinal_numbers, - weekdays, - months, }, yaml = { augend.integer.alias.decimal, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) - ordinal_numbers, }, css = { augend.integer.alias.decimal, -- nonnegative and negative decimal number @@ -327,9 +316,6 @@ end }, markdown = { augend.misc.alias.markdown_header, - ordinal_numbers, - weekdays, - months, }, json = { augend.integer.alias.decimal, -- nonnegative and negative decimal number @@ -343,17 +329,11 @@ end word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. cyclic = true, -- "or" is incremented into "and". }), - ordinal_numbers, - weekdays, - months, }, python = { augend.integer.alias.decimal, -- nonnegative and negative decimal number capitalized_boolean, logical_alias, - ordinal_numbers, - weekdays, - months, }, }, } diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index 32fcdf92aa..424fe21fe4 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -42,28 +42,21 @@ import TabItem from '@theme/TabItem'; opts = function() local defaults = require("outline.config").defaults local opts = { - symbols = {}, - symbol_blacklist = {}, + symbols = { + icons = {}, + filter = LazyVim.config.kind_filter, + }, keymaps = { up_and_jump = "", down_and_jump = "", }, } - local filter = LazyVim.config.kind_filter - - if type(filter) == "table" then - filter = filter.default - if type(filter) == "table" then - for kind, symbol in pairs(defaults.symbols) do - opts.symbols[kind] = { - icon = LazyVim.config.icons.kinds[kind] or symbol.icon, - hl = symbol.hl, - } - if not vim.tbl_contains(filter, kind) then - table.insert(opts.symbol_blacklist, kind) - end - end - end + + for kind, symbol in pairs(defaults.symbols.icons) do + opts.symbols.icons[kind] = { + icon = LazyVim.config.icons.kinds[kind] or symbol.icon, + hl = symbol.hl, + } end return opts end @@ -82,28 +75,21 @@ end opts = function() local defaults = require("outline.config").defaults local opts = { - symbols = {}, - symbol_blacklist = {}, + symbols = { + icons = {}, + filter = LazyVim.config.kind_filter, + }, keymaps = { up_and_jump = "", down_and_jump = "", }, } - local filter = LazyVim.config.kind_filter - - if type(filter) == "table" then - filter = filter.default - if type(filter) == "table" then - for kind, symbol in pairs(defaults.symbols) do - opts.symbols[kind] = { - icon = LazyVim.config.icons.kinds[kind] or symbol.icon, - hl = symbol.hl, - } - if not vim.tbl_contains(filter, kind) then - table.insert(opts.symbol_blacklist, kind) - end - end - end + + for kind, symbol in pairs(defaults.symbols.icons) do + opts.symbols.icons[kind] = { + icon = LazyVim.config.icons.kinds[kind] or symbol.icon, + hl = symbol.hl, + } end return opts end, diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 019db33d55..4aa9c8129b 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -77,7 +77,7 @@ opts = { volar = { init_options = { vue = { - hybridMode = false, + hybridMode = true, }, }, }, @@ -99,7 +99,7 @@ opts = { volar = { init_options = { vue = { - hybridMode = false, + hybridMode = true, }, }, }, From 443e8cb01e5fc39feecbf33f458005658bbca718 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 5 Jul 2024 18:22:12 +0000 Subject: [PATCH 242/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 58d8ab0ae3..b49eb7c347 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -207,7 +207,7 @@ opts = function() options = { theme = "auto", globalstatus = vim.o.laststatus == 3, - disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } }, + disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter" } }, }, sections = { lualine_a = { "mode" }, @@ -338,7 +338,7 @@ end options = { theme = "auto", globalstatus = vim.o.laststatus == 3, - disabled_filetypes = { statusline = { "dashboard", "alpha", "starter" } }, + disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter" } }, }, sections = { lualine_a = { "mode" }, From 7555b3db9021c0816b1b49b80ec4cc46a9c50502 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 6 Jul 2024 08:21:09 +0000 Subject: [PATCH 243/553] chore(build): auto-generate docs --- docs/extras/ui/mini-starter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index e09dc1f9a4..c7215538ec 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -151,7 +151,7 @@ end 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!!!) - if vim.bo[ev.buf].filetype == "starter" then + if vim.bo[ev.buf].filetype == "ministarter" then pcall(starter.refresh) end end, From f0459bbd93e6b023488e5c226f4890ad64d015dc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 07:15:39 +0000 Subject: [PATCH 244/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index b49eb7c347..b67bd4999d 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -285,7 +285,7 @@ opts = function() } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine then + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({ @@ -416,7 +416,7 @@ end } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine then + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({ From cc9fd4dc5bac73f6fe7771423a167562cdc8f9e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 16:19:08 +0000 Subject: [PATCH 245/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 878ba148e9..d4d333fd7c 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -350,12 +350,13 @@ end end, config = function(_, opts) require("fzf-lua").setup(opts) - require("fzf-lua").register_ui_select(opts.ui_select or nil) end, init = function() LazyVim.on_very_lazy(function() vim.ui.select = function(...) - require("fzf-lua") + require("lazy").load({ plugins = { "fzf-lua" } }) + local opts = LazyVim.opts("fzf-lua") or {} + require("fzf-lua").register_ui_select(opts.ui_select or nil) return vim.ui.select(...) end end) @@ -432,6 +433,29 @@ end +## [fzf-lua](https://github.com/ibhagwan/fzf-lua) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "fzf-lua" } +``` + + + + + ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) From 2e3876e267a346986224a4da98b190c0ce4f3049 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 18:20:59 +0000 Subject: [PATCH 246/553] chore(build): auto-generate docs --- docs/extras/lang/go.md | 43 +++++++++++++++++++++++++ docs/extras/lang/typescript.md | 53 +++++++++++++++++++++++++++++++ docs/extras/util/chezmoi.md | 57 ++++++++++++++++++++++++++++++++++ docs/plugins/ui.md | 22 +++++++++++-- 4 files changed, 173 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index d740914c87..8c06a72708 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -338,6 +338,49 @@ opts = nil +## [mini.icons](https://github.com/echasnovski/mini.icons) + + Filetype icons + + + + + + +```lua +opts = { + file = { + [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, + }, + filetype = { + gotmpl = { glyph = "󰟓", hl = "MiniIconsGrey" }, + }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.icons", + opts = { + file = { + [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, + }, + filetype = { + gotmpl = { glyph = "󰟓", hl = "MiniIconsGrey" }, + }, + }, +} +``` + + + + + ## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index b6cfc3180c..9c35707817 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -409,6 +409,59 @@ end +## [mini.icons](https://github.com/echasnovski/mini.icons) + + Filetype icons + + + + + + +```lua +opts = { + file = { + [".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, + [".node-version"] = { glyph = "", hl = "MiniIconsGreen" }, + [".prettierrc"] = { glyph = "", hl = "MiniIconsPurple" }, + [".yarnrc.yml"] = { glyph = "", hl = "MiniIconsBlue" }, + ["eslint.config.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, + ["package.json"] = { glyph = "", hl = "MiniIconsGreen" }, + ["tsconfig.json"] = { glyph = "", hl = "MiniIconsAzure" }, + ["tsconfig.build.json"] = { glyph = "", hl = "MiniIconsAzure" }, + ["yarn.lock"] = { glyph = "", hl = "MiniIconsBlue" }, + }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.icons", + opts = { + file = { + [".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, + [".node-version"] = { glyph = "", hl = "MiniIconsGreen" }, + [".prettierrc"] = { glyph = "", hl = "MiniIconsPurple" }, + [".yarnrc.yml"] = { glyph = "", hl = "MiniIconsBlue" }, + ["eslint.config.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, + ["package.json"] = { glyph = "", hl = "MiniIconsGreen" }, + ["tsconfig.json"] = { glyph = "", hl = "MiniIconsAzure" }, + ["tsconfig.build.json"] = { glyph = "", hl = "MiniIconsAzure" }, + ["yarn.lock"] = { glyph = "", hl = "MiniIconsBlue" }, + }, + }, +} +``` + + + + + ## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index 2b960b48c6..ddad046f1b 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -130,6 +130,63 @@ opts = { +## [mini.icons](https://github.com/echasnovski/mini.icons) + + Filetype icons + + + + + + +```lua +opts = { + file = { + [".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiremove"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiroot"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiversion"] = { glyph = "", hl = "MiniIconsGrey" }, + ["bash.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["json.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["ps1.tmpl"] = { glyph = "󰨊", hl = "MiniIconsGrey" }, + ["sh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["toml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["yaml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["zsh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.icons", + opts = { + file = { + [".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiremove"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiroot"] = { glyph = "", hl = "MiniIconsGrey" }, + [".chezmoiversion"] = { glyph = "", hl = "MiniIconsGrey" }, + ["bash.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["json.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["ps1.tmpl"] = { glyph = "󰨊", hl = "MiniIconsGrey" }, + ["sh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["toml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["yaml.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + ["zsh.tmpl"] = { glyph = "", hl = "MiniIconsGrey" }, + }, + }, +} +``` + + + + + ## [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) _(optional)_ diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index b67bd4999d..cf71bd7eb4 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -628,7 +628,16 @@ opts = { ```lua -opts = {} +opts = { + file = { + [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, + ["CODEOWNERS"] = { glyph = "", hl = "MiniIconsGreen" }, + ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, + }, + filetype = { + dotenv = { glyph = "", hl = "MiniIconsYellow" }, + }, +} ``` @@ -640,7 +649,16 @@ opts = {} { "echasnovski/mini.icons", lazy = true, - opts = {}, + opts = { + file = { + [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, + ["CODEOWNERS"] = { glyph = "", hl = "MiniIconsGreen" }, + ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, + }, + filetype = { + dotenv = { glyph = "", hl = "MiniIconsYellow" }, + }, + }, init = function() package.preload["nvim-web-devicons"] = function() require("mini.icons").mock_nvim_web_devicons() From a25aa5d3b51527c4b3501c4c092f2c4566de07ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 7 Jul 2024 19:13:19 +0000 Subject: [PATCH 247/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 14 ++++++++++++-- docs/plugins/ui.md | 2 -- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index f354c8a5b5..3ffac2e726 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -372,8 +372,18 @@ end -- custom keymaps for Java test runner (not yet compatible with neotest) wk.register({ ["t"] = { name = "+test" }, - ["tt"] = { require("jdtls.dap").test_class, "Run All Test" }, - ["tr"] = { require("jdtls.dap").test_nearest_method, "Run Nearest Test" }, + ["tt"] = { + function() + require("jdtls.dap").test_class({ config_overrides = opts.test.config_overrides }) + end, + "Run All Test", + }, + ["tr"] = { + function() + require("jdtls.dap").test_nearest_method({ config_overrides = opts.test.config_overrides }) + end, + "Run Nearest Test", + }, ["tT"] = { require("jdtls.dap").pick_test, "Run Test" }, }, { mode = "n", buffer = args.buf }) end diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index cf71bd7eb4..fd1e9314e4 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -631,7 +631,6 @@ opts = { opts = { file = { [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, - ["CODEOWNERS"] = { glyph = "", hl = "MiniIconsGreen" }, ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, }, filetype = { @@ -652,7 +651,6 @@ opts = { opts = { file = { [".keep"] = { glyph = "󰊢", hl = "MiniIconsGrey" }, - ["CODEOWNERS"] = { glyph = "", hl = "MiniIconsGreen" }, ["devcontainer.json"] = { glyph = "", hl = "MiniIconsAzure" }, }, filetype = { From 53f7a51cab821f1ec5f02d4526fc01dd4159e17f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 9 Jul 2024 15:17:43 +0000 Subject: [PATCH 248/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 3ffac2e726..1a711f4189 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -374,13 +374,17 @@ end ["t"] = { name = "+test" }, ["tt"] = { function() - require("jdtls.dap").test_class({ config_overrides = opts.test.config_overrides }) + require("jdtls.dap").test_class({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) end, "Run All Test", }, ["tr"] = { function() - require("jdtls.dap").test_nearest_method({ config_overrides = opts.test.config_overrides }) + require("jdtls.dap").test_nearest_method({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) end, "Run Nearest Test", }, From 296eafb1657e19a3a1d8e68a0b378f1c55d1783a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 10 Jul 2024 07:17:33 +0000 Subject: [PATCH 249/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index b710695f57..ef69e736b3 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -501,7 +501,7 @@ vim.api.nvim_create_autocmd("FileType", { -- wrap and check for spell in text filetypes vim.api.nvim_create_autocmd("FileType", { group = augroup("wrap_spell"), - pattern = { "*.txt", "*.tex", "*.typ", "gitcommit", "markdown" }, + pattern = { "text", "plaintex", "typst", "gitcommit", "markdown" }, callback = function() vim.opt_local.wrap = true vim.opt_local.spell = true From 25677f6b8b11cdd28d09a5944049c891163d53ac Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Jul 2024 16:20:44 +0000 Subject: [PATCH 250/553] chore(build): auto-generate docs --- docs/extras/lang/php.md | 83 ++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 46 deletions(-) diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index b879cc6f83..a1f2f09997 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -154,50 +154,6 @@ opts = { -## [nvim-lint](https://github.com/mfussenegger/nvim-lint) - - - - - -```lua -opts = { - linters_by_ft = { - php = { "phpcs" }, - }, -} -``` - - - - - - -```lua -{ - "mfussenegger/nvim-lint", - optional = true, - opts = { - linters_by_ft = { - php = { "phpcs" }, - }, - }, - { - "stevearc/conform.nvim", - optional = true, - opts = { - formatters_by_ft = { - php = { "php-cs-fixer" }, - }, - }, - }, -} -``` - - - - - ## [nvim-dap](https://github.com/mfussenegger/nvim-dap) _(optional)_ @@ -278,6 +234,41 @@ end +## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ + + + + + +```lua +opts = { + linters_by_ft = { + php = { "phpcs" }, + }, +} +``` + + + + + + +```lua +{ + "mfussenegger/nvim-lint", + optional = true, + opts = { + linters_by_ft = { + php = { "phpcs" }, + }, + }, +} +``` + + + + + ## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ @@ -287,7 +278,7 @@ end ```lua opts = { formatters_by_ft = { - php = { "php-cs-fixer" }, + php = { "php_cs_fixer" }, }, } ``` @@ -303,7 +294,7 @@ opts = { optional = true, opts = { formatters_by_ft = { - php = { "php-cs-fixer" }, + php = { "php_cs_fixer" }, }, }, } From afe20fdf3a759ffce6526e0523e92598bdcd6809 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 12 Jul 2024 20:17:53 +0000 Subject: [PATCH 251/553] chore(build): auto-generate docs --- docs/extras/editor/outline.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index 424fe21fe4..65a4d82435 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -44,7 +44,7 @@ opts = function() local opts = { symbols = { icons = {}, - filter = LazyVim.config.kind_filter, + filter = vim.deepcopy(LazyVim.config.kind_filter), }, keymaps = { up_and_jump = "", @@ -77,7 +77,7 @@ end local opts = { symbols = { icons = {}, - filter = LazyVim.config.kind_filter, + filter = vim.deepcopy(LazyVim.config.kind_filter), }, keymaps = { up_and_jump = "", From 5887100f4cc528647dac857b11adcba5b43de811 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 12 Jul 2024 21:17:34 +0000 Subject: [PATCH 252/553] chore(build): auto-generate docs --- docs/extras/editor/overseer.md | 8 ++- docs/extras/lang/markdown.md | 2 + docs/extras/lang/r.md | 58 ++++++++++----------- docs/keymaps.md | 6 +++ docs/plugins/editor.md | 95 ++++++++++++++++++++-------------- 5 files changed, 96 insertions(+), 73 deletions(-) diff --git a/docs/extras/editor/overseer.md b/docs/extras/editor/overseer.md index 2a37aa3ac5..0228fbaa7b 100644 --- a/docs/extras/editor/overseer.md +++ b/docs/extras/editor/overseer.md @@ -172,7 +172,9 @@ opts = { ```lua opts = { - defaults = { ["o"] = { name = "+overseer" } }, + spec = { + { "o", group = "overseer" }, + }, } ``` @@ -186,7 +188,9 @@ opts = { "folke/which-key.nvim", optional = true, opts = { - defaults = { ["o"] = { name = "+overseer" } }, + spec = { + { "o", group = "overseer" }, + }, }, } ``` diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 469789b1f8..db4a8be96b 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -149,6 +149,7 @@ opts = function() headline_highlights = {}, -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 bullets = {}, + quote_string = false, } for i = 1, 6 do local hl = "Headline" .. i @@ -175,6 +176,7 @@ end headline_highlights = {}, -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 bullets = {}, + quote_string = false, } for i = 1, 6 do local hl = "Headline" .. i diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 6345f95aa1..9e00c9c033 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -52,22 +52,19 @@ opts = { -- Increase the width of which-key to handle the longer r-nvim descriptions local wk = require("which-key") - -- Workaround from https://github.com/folke/which-key.nvim/issues/514#issuecomment-1987286901 - wk.register({ - [""] = { - a = { name = "+(a)ll", ["🚫"] = "which_key_ignore" }, - b = { name = "+(b)etween marks", ["🚫"] = "which_key_ignore" }, - c = { name = "+(c)hunks", ["🚫"] = "which_key_ignore" }, - f = { name = "+(f)unctions", ["🚫"] = "which_key_ignore" }, - g = { name = "+(g)oto", ["🚫"] = "which_key_ignore" }, - k = { name = "+(k)nit", ["🚫"] = "which_key_ignore" }, - p = { name = "+(p)aragraph", ["🚫"] = "which_key_ignore" }, - q = { name = "+(q)uarto", ["🚫"] = "which_key_ignore" }, - r = { name = "+(r) general", ["🚫"] = "which_key_ignore" }, - s = { name = "+(s)plit or (s)end", ["🚫"] = "which_key_ignore" }, - t = { name = "+(t)erminal", ["🚫"] = "which_key_ignore" }, - v = { name = "+(v)iew", ["🚫"] = "which_key_ignore" }, - }, + wk.add({ + { "a", group = "all" }, + { "b", group = "between marks" }, + { "c", group = "chunks" }, + { "f", group = "functions" }, + { "g", group = "goto" }, + { "k", group = "knit" }, + { "p", group = "paragraph" }, + { "q", group = "quarto" }, + { "r", group = "r general" }, + { "s", group = "split or send" }, + { "t", group = "terminal" }, + { "v", group = "view" }, }) end, }, @@ -97,22 +94,19 @@ opts = { -- Increase the width of which-key to handle the longer r-nvim descriptions local wk = require("which-key") - -- Workaround from https://github.com/folke/which-key.nvim/issues/514#issuecomment-1987286901 - wk.register({ - [""] = { - a = { name = "+(a)ll", ["🚫"] = "which_key_ignore" }, - b = { name = "+(b)etween marks", ["🚫"] = "which_key_ignore" }, - c = { name = "+(c)hunks", ["🚫"] = "which_key_ignore" }, - f = { name = "+(f)unctions", ["🚫"] = "which_key_ignore" }, - g = { name = "+(g)oto", ["🚫"] = "which_key_ignore" }, - k = { name = "+(k)nit", ["🚫"] = "which_key_ignore" }, - p = { name = "+(p)aragraph", ["🚫"] = "which_key_ignore" }, - q = { name = "+(q)uarto", ["🚫"] = "which_key_ignore" }, - r = { name = "+(r) general", ["🚫"] = "which_key_ignore" }, - s = { name = "+(s)plit or (s)end", ["🚫"] = "which_key_ignore" }, - t = { name = "+(t)erminal", ["🚫"] = "which_key_ignore" }, - v = { name = "+(v)iew", ["🚫"] = "which_key_ignore" }, - }, + wk.add({ + { "a", group = "all" }, + { "b", group = "between marks" }, + { "c", group = "chunks" }, + { "f", group = "functions" }, + { "g", group = "goto" }, + { "k", group = "knit" }, + { "p", group = "paragraph" }, + { "q", group = "quarto" }, + { "r", group = "r general" }, + { "s", group = "split or send" }, + { "t", group = "terminal" }, + { "v", group = "view" }, }) end, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 3ddb39605c..472a6f4bdd 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -294,6 +294,12 @@ possible keymaps starting with ``. | [q | Previous Trouble/Quickfix Item | **n** | | ]q | Next Trouble/Quickfix Item | **n** | +## [which-key.nvim](https://github.com/folke/which-key.nvim.git) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>? | Buffer Local Keymaps (which-key) | **n** | + ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index e798e8e17e..93eb772e15 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -292,25 +292,27 @@ opts = {} ```lua opts = { - plugins = { spelling = true }, - defaults = { - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["gs"] = { name = "+surround" }, - ["z"] = { name = "+fold" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - [""] = { name = "+tabs" }, - ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, - ["f"] = { name = "+file/find" }, - ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks", ["_"] = "which_key_ignore" }, - ["q"] = { name = "+quit/session" }, - ["s"] = { name = "+search" }, - ["u"] = { name = "+ui" }, - ["w"] = { name = "+windows" }, - ["x"] = { name = "+diagnostics/quickfix" }, + defaults = {}, + spec = { + { + mode = { "n", "v" }, + { "", group = "tabs" }, + { "b", group = "buffer" }, + { "c", group = "code" }, + { "f", group = "file/find" }, + { "g", group = "git" }, + { "gh", group = "hunks" }, + { "q", group = "quit/session" }, + { "s", group = "search" }, + { "u", group = "ui" }, + { "w", group = "windows" }, + { "x", group = "diagnostics/quickfix" }, + { "[", group = "prev" }, + { "]", group = "next" }, + { "g", group = "goto" }, + { "gs", group = "surround" }, + { "z", group = "fold" }, + }, }, } ``` @@ -324,32 +326,47 @@ opts = { { "folke/which-key.nvim", event = "VeryLazy", + opts_extend = { "spec" }, opts = { - plugins = { spelling = true }, - defaults = { - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["gs"] = { name = "+surround" }, - ["z"] = { name = "+fold" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - [""] = { name = "+tabs" }, - ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, - ["f"] = { name = "+file/find" }, - ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks", ["_"] = "which_key_ignore" }, - ["q"] = { name = "+quit/session" }, - ["s"] = { name = "+search" }, - ["u"] = { name = "+ui" }, - ["w"] = { name = "+windows" }, - ["x"] = { name = "+diagnostics/quickfix" }, + defaults = {}, + spec = { + { + mode = { "n", "v" }, + { "", group = "tabs" }, + { "b", group = "buffer" }, + { "c", group = "code" }, + { "f", group = "file/find" }, + { "g", group = "git" }, + { "gh", group = "hunks" }, + { "q", group = "quit/session" }, + { "s", group = "search" }, + { "u", group = "ui" }, + { "w", group = "windows" }, + { "x", group = "diagnostics/quickfix" }, + { "[", group = "prev" }, + { "]", group = "next" }, + { "g", group = "goto" }, + { "gs", group = "surround" }, + { "z", group = "fold" }, + }, + }, + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", }, }, config = function(_, opts) local wk = require("which-key") wk.setup(opts) - wk.register(opts.defaults) + if not vim.tbl_isempty(opts.defaults) then + LazyVim.warn("which-key: opts.defaults is deprecated. Please use opts.spec instead.") + wk.register(opts.defaults) + end end, } ``` From 85627073a0e5fe1d63e8668e3732849bf3beee32 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 13 Jul 2024 08:19:14 +0000 Subject: [PATCH 253/553] chore(build): auto-generate docs --- docs/extras/editor/leap.md | 4 +- docs/extras/lang/java.md | 98 ++++++++++++++++++++++---------------- docs/keymaps.md | 10 ---- 3 files changed, 59 insertions(+), 53 deletions(-) diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index af8fe1366a..e6e6b8fa7a 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -55,10 +55,10 @@ opts = { labeled_modes = "nx" } "ggandor/flit.nvim", enabled = true, keys = function() - ---@type LazyKeys[] + ---@type LazyKeysSpec[] local ret = {} for _, key in ipairs({ "f", "F", "t", "T" }) do - ret[#ret + 1] = { key, mode = { "n", "x", "o" }, desc = key } + ret[#ret + 1] = { key, mode = { "n", "x", "o" } } end return ret end, diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 1a711f4189..78558b68cc 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -337,30 +337,40 @@ end local client = vim.lsp.get_client_by_id(args.data.client_id) if client and client.name == "jdtls" then local wk = require("which-key") - wk.register({ - ["cx"] = { name = "+extract" }, - ["cxv"] = { require("jdtls").extract_variable_all, "Extract Variable" }, - ["cxc"] = { require("jdtls").extract_constant, "Extract Constant" }, - ["gs"] = { require("jdtls").super_implementation, "Goto Super" }, - ["gS"] = { require("jdtls.tests").goto_subjects, "Goto Subjects" }, - ["co"] = { require("jdtls").organize_imports, "Organize Imports" }, - }, { mode = "n", buffer = args.buf }) - wk.register({ - ["c"] = { name = "+code" }, - ["cx"] = { name = "+extract" }, - ["cxm"] = { - [[lua require('jdtls').extract_method(true)]], - "Extract Method", + wk.add({ + { + mode = "n", + buffer = args.buf, + { "cx", group = "extract" }, + { "cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" }, + { "cxc", require("jdtls").extract_constant, desc = "Extract Constant" }, + { "gs", require("jdtls").super_implementation, desc = "Goto Super" }, + { "gS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" }, + { "co", require("jdtls").organize_imports, desc = "Organize Imports" }, }, - ["cxv"] = { - [[lua require('jdtls').extract_variable_all(true)]], - "Extract Variable", - }, - ["cxc"] = { - [[lua require('jdtls').extract_constant(true)]], - "Extract Constant", + }) + wk.add({ + { + mode = "v", + buffer = args.buf, + { "cx", group = "extract" }, + { + "cxm", + [[lua require('jdtls').extract_method(true)]], + desc = "Extract Method", + }, + { + "cxv", + [[lua require('jdtls').extract_variable_all(true)]], + desc = "Extract Variable", + }, + { + "cxc", + [[lua require('jdtls').extract_constant(true)]], + desc = "Extract Constant", + }, }, - }, { mode = "v", buffer = args.buf }) + }) if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then -- custom init for Java debugger @@ -370,26 +380,32 @@ end -- Java Test require Java debugger to work if opts.test and mason_registry.is_installed("java-test") then -- custom keymaps for Java test runner (not yet compatible with neotest) - wk.register({ - ["t"] = { name = "+test" }, - ["tt"] = { - function() - require("jdtls.dap").test_class({ - config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, - }) - end, - "Run All Test", - }, - ["tr"] = { - function() - require("jdtls.dap").test_nearest_method({ - config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, - }) - end, - "Run Nearest Test", + wk.add({ + { + mode = "n", + buffer = args.buf, + { "t", group = "test" }, + { + "tt", + function() + require("jdtls.dap").test_class({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) + end, + desc = "Run All Test", + }, + { + "tr", + function() + require("jdtls.dap").test_nearest_method({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) + end, + desc = "Run Nearest Test", + }, + { "tT", require("jdtls.dap").pick_test, desc = "Run Test" }, }, - ["tT"] = { require("jdtls.dap").pick_test, "Run Test" }, - }, { mode = "n", buffer = args.buf }) + }) end end diff --git a/docs/keymaps.md b/docs/keymaps.md index 472a6f4bdd..6e7438338c 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -486,16 +486,6 @@ Part of [lazyvim.plugins.extras.editor.illuminate](/extras/editor/illuminate) | [[ | Prev Reference | **n** | | ]] | Next Reference | **n** | -## [flit.nvim](https://github.com/ggandor/flit.nvim.git) -Part of [lazyvim.plugins.extras.editor.leap](/extras/editor/leap) - -| Key | Description | Mode | -| --- | --- | --- | -| f | f | **n**, **o**, **x** | -| F | F | **n**, **o**, **x** | -| t | t | **n**, **o**, **x** | -| T | T | **n**, **o**, **x** | - ## [leap.nvim](https://github.com/ggandor/leap.nvim.git) Part of [lazyvim.plugins.extras.editor.leap](/extras/editor/leap) From a0234b05b41ea2db72911df986a9e34ed008c721 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 14 Jul 2024 05:18:30 +0000 Subject: [PATCH 254/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 8 ++++---- docs/keymaps.md | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index 6b59a86963..c53cb75b8c 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -74,10 +74,10 @@ opts = { }, -- stylua: ignore { "y", "(YankyYank)", mode = { "n", "x" }, desc = "Yank Text" }, - { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Cursor" }, - { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Cursor" }, - { "gp", "(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Yanked Text After Selection" }, - { "gP", "(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Yanked Text Before Selection" }, + { "p", "(YankyPutAfter)", mode = { "n", "x" }, desc = "Put Text After Cursor" }, + { "P", "(YankyPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Cursor" }, + { "gp", "(YankyGPutAfter)", mode = { "n", "x" }, desc = "Put Text After Selection" }, + { "gP", "(YankyGPutBefore)", mode = { "n", "x" }, desc = "Put Text Before Selection" }, { "[y", "(YankyCycleForward)", desc = "Cycle Forward Through Yank History" }, { "]y", "(YankyCycleBackward)", desc = "Cycle Backward Through Yank History" }, { "]p", "(YankyPutIndentAfterLinewise)", desc = "Put Indented After Cursor (Linewise)" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 6e7438338c..a4e50f6a41 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -351,10 +351,10 @@ Part of [lazyvim.plugins.extras.coding.yanky](/extras/coding/yanky) | ]p | Put Indented After Cursor (Linewise) | **n** | | ]P | Put Indented After Cursor (Linewise) | **n** | | ]y | Cycle Backward Through Yank History | **n** | -| gp | Put Yanked Text After Selection | **n**, **x** | -| gP | Put Yanked Text Before Selection | **n**, **x** | -| p | Put Yanked Text After Cursor | **n**, **x** | -| P | Put Yanked Text Before Cursor | **n**, **x** | +| gp | Put Text After Selection | **n**, **x** | +| gP | Put Text Before Selection | **n**, **x** | +| p | Put Text After Cursor | **n**, **x** | +| P | Put Text Before Cursor | **n**, **x** | | y | Yank Text | **n**, **x** | ## [nvim-dap](https://github.com/mfussenegger/nvim-dap.git) From 12f5055a68a4a6e22cfd3d94d8cad6a758486c6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 14 Jul 2024 06:25:44 +0000 Subject: [PATCH 255/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 +++--- docs/extras/editor/telescope.md | 18 +++++++++++++++--- docs/extras/lang/omnisharp.md | 6 ++++++ docs/extras/lang/tailwind.md | 22 ++++++++++++++++++++++ 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index d4d333fd7c..672cc42750 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -371,12 +371,12 @@ end }, { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { ":", "FzfLua command_history", desc = "Command History" }, - { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", "FzfLua buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, - { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, + { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", "FzfLua git_files", desc = "Find Files (git-files)" }, { "fr", "FzfLua oldfiles", desc = "Recent" }, { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index cd2fe7c006..475fcfeadd 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -105,6 +105,12 @@ opts = function() }, }, }, + pickers = { + find_files = { + find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" }, + hidden = true, + }, + }, } end ``` @@ -154,12 +160,12 @@ end }, { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { ":", "Telescope command_history", desc = "Command History" }, - { "", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, - { "ff", LazyVim.pick("auto"), desc = "Find Files (Root Dir)" }, - { "fF", LazyVim.pick("auto", { root = false }), desc = "Find Files (cwd)" }, + { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, { "fr", "Telescope oldfiles", desc = "Recent" }, { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, @@ -260,6 +266,12 @@ end }, }, }, + pickers = { + find_files = { + find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" }, + hidden = true, + }, + }, } end, } diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index 2919d3758b..f6a620cd80 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -298,6 +298,9 @@ opts = function() type = "executable", command = vim.fn.exepath("netcoredbg"), args = { "--interpreter=vscode" }, + options = { + detached = false, + }, } end for _, lang in ipairs({ "cs", "fsharp", "vb" }) do @@ -335,6 +338,9 @@ end type = "executable", command = vim.fn.exepath("netcoredbg"), args = { "--interpreter=vscode" }, + options = { + detached = false, + }, } end for _, lang in ipairs({ "cs", "fsharp", "vb" }) do diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 816177df79..79f1592d2c 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -64,6 +64,17 @@ 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, @@ -104,6 +115,17 @@ 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, From d2312de32367bac6fca251213dc5c5d5c2ed4b47 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 14 Jul 2024 16:32:34 +0000 Subject: [PATCH 256/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 1 + docs/extras/editor/telescope.md | 32 ++++++++++++++++++++++++++++++-- docs/plugins/util.md | 4 ++-- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 96069b7ed2..c813e56fcd 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -53,6 +53,7 @@ opts = { ```lua { "L3MON4D3/LuaSnip", + lazy = true, build = (not LazyVim.is_win()) and "echo 'NOTE: jsregexp is optional, so not a big deal if it fails to build'; make install_jsregexp" or nil, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 475fcfeadd..e7c5b3404d 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -72,6 +72,20 @@ opts = function() LazyVim.pick("find_files", { hidden = true, default_text = line })() end + local function find_command() + if 1 == vim.fn.executable("rg") then + return { "rg", "--files", "--color", "never", "-g", "!.git" } + elseif 1 == vim.fn.executable("fd") then + return { "fd", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("fdfind") then + return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then + return { "find", ".", "-type", "f" } + elseif 1 == vim.fn.executable("where") then + return { "where", "/r", ".", "*" } + end + end + return { defaults = { prompt_prefix = " ", @@ -107,7 +121,7 @@ opts = function() }, pickers = { find_files = { - find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" }, + find_command = find_command, hidden = true, }, }, @@ -233,6 +247,20 @@ end LazyVim.pick("find_files", { hidden = true, default_text = line })() end + local function find_command() + if 1 == vim.fn.executable("rg") then + return { "rg", "--files", "--color", "never", "-g", "!.git" } + elseif 1 == vim.fn.executable("fd") then + return { "fd", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("fdfind") then + return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then + return { "find", ".", "-type", "f" } + elseif 1 == vim.fn.executable("where") then + return { "where", "/r", ".", "*" } + end + end + return { defaults = { prompt_prefix = " ", @@ -268,7 +296,7 @@ end }, pickers = { find_files = { - find_command = { "fd", "--type", "f", "--color", "never", "-E", ".git" }, + find_command = find_command, hidden = true, }, }, diff --git a/docs/plugins/util.md b/docs/plugins/util.md index 30c28143b8..321af74847 100644 --- a/docs/plugins/util.md +++ b/docs/plugins/util.md @@ -17,7 +17,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { options = vim.opt.sessionoptions:get() } +opts = {} ``` @@ -29,7 +29,7 @@ opts = { options = vim.opt.sessionoptions:get() } { "folke/persistence.nvim", event = "BufReadPre", - opts = { options = vim.opt.sessionoptions:get() }, + opts = {}, -- stylua: ignore keys = { { "qs", function() require("persistence").load() end, desc = "Restore Session" }, From 0a692c5d803552e7cc2242651958d67326d576d5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jul 2024 07:16:16 +0000 Subject: [PATCH 257/553] chore(build): auto-generate docs --- docs/plugins/coding.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index d2bb973d66..c404c9c6ea 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -478,9 +478,6 @@ opts = {} ```lua opts = function() - LazyVim.on_load("which-key.nvim", function() - vim.schedule(LazyVim.mini.ai_whichkey) - end) local ai = require("mini.ai") return { n_lines = 500, @@ -516,9 +513,6 @@ end "echasnovski/mini.ai", event = "VeryLazy", opts = function() - LazyVim.on_load("which-key.nvim", function() - vim.schedule(LazyVim.mini.ai_whichkey) - end) local ai = require("mini.ai") return { n_lines = 500, @@ -542,6 +536,14 @@ end }, } end, + config = function(_, opts) + require("mini.ai").setup(opts) + LazyVim.on_load("which-key.nvim", function() + vim.schedule(function() + LazyVim.mini.ai_whichkey(opts) + end) + end) + end, } ``` From 1b6085f0008cea9a843507b62c8bdc5157ac1f09 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jul 2024 10:18:45 +0000 Subject: [PATCH 258/553] chore(build): auto-generate docs --- docs/extras/coding/yanky.md | 1 + docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index c53cb75b8c..d59d2ac426 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -70,6 +70,7 @@ opts = { vim.cmd([[YankyRingHistory]]) end end, + mode = { "n", "x" }, desc = "Open Yank History", }, -- stylua: ignore diff --git a/docs/keymaps.md b/docs/keymaps.md index a4e50f6a41..8d4bb2a8c4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -338,7 +338,7 @@ Part of [lazyvim.plugins.extras.coding.yanky](/extras/coding/yanky) | Key | Description | Mode | | --- | --- | --- | -| <leader>p | Open Yank History | **n** | +| <leader>p | Open Yank History | **n**, **x** | | <p | Put and Indent Left | **n** | | <P | Put Before and Indent Left | **n** | | =p | Put After Applying a Filter | **n** | From 8269c808ee989ec6dc303a9c5a9495d7a52ccb7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jul 2024 14:14:40 +0000 Subject: [PATCH 259/553] chore(build): auto-generate docs --- docs/configuration/general.md | 27 ++++++++++++------------- docs/extras/ui/mini-animate.md | 20 +++++++++++++++++++ docs/keymaps.md | 32 ++++++++++++------------------ docs/plugins/coding.md | 14 ------------- docs/plugins/editor.md | 10 +++++----- docs/plugins/lsp.md | 11 +++++++---- docs/plugins/treesitter.md | 36 ++++++++++++++++++++++++++++++++++ 7 files changed, 94 insertions(+), 56 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index ef69e736b3..cde57d120c 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -314,20 +314,19 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" }) -- stylua: ignore start -- toggle options -map("n", "uf", function() LazyVim.format.toggle() end, { desc = "Toggle Auto Format (Global)" }) -map("n", "uF", function() LazyVim.format.toggle(true) end, { desc = "Toggle Auto Format (Buffer)" }) -map("n", "us", function() LazyVim.toggle("spell") end, { desc = "Toggle Spelling" }) -map("n", "uw", function() LazyVim.toggle("wrap") end, { desc = "Toggle Word Wrap" }) -map("n", "uL", function() LazyVim.toggle("relativenumber") end, { desc = "Toggle Relative Line Numbers" }) -map("n", "ul", function() LazyVim.toggle.number() end, { desc = "Toggle Line Numbers" }) -map("n", "ud", function() LazyVim.toggle.diagnostics() end, { desc = "Toggle Diagnostics" }) -local conceallevel = vim.o.conceallevel > 0 and vim.o.conceallevel or 3 -map("n", "uc", function() LazyVim.toggle("conceallevel", false, {0, conceallevel}) end, { desc = "Toggle Conceal" }) -if vim.lsp.buf.inlay_hint or vim.lsp.inlay_hint then - map( "n", "uh", function() LazyVim.toggle.inlay_hints() end, { desc = "Toggle Inlay Hints" }) +LazyVim.toggle.map("uf", LazyVim.toggle.format()) +LazyVim.toggle.map("uF", LazyVim.toggle.format(true)) +LazyVim.toggle.map("us", LazyVim.toggle("spell", { name = "Spelling" })) +LazyVim.toggle.map("uw", LazyVim.toggle("wrap", { name = "Wrap" })) +LazyVim.toggle.map("uL", LazyVim.toggle("relativenumber", { name = "Relative Number" })) +LazyVim.toggle.map("ud", LazyVim.toggle.diagnostics) +LazyVim.toggle.map("ul", LazyVim.toggle.number) +LazyVim.toggle.map( "uc", LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } })) +LazyVim.toggle.map("uT", LazyVim.toggle.treesitter) +LazyVim.toggle.map("ub", LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" })) +if vim.lsp.inlay_hint then + LazyVim.toggle.map("uh", LazyVim.toggle.inlay_hints) end -map("n", "uT", function() if vim.b.ts_highlight then vim.treesitter.stop() else vim.treesitter.start() end end, { desc = "Toggle Treesitter Highlight" }) -map("n", "ub", function() LazyVim.toggle("background", false, {"light", "dark"}) end, { desc = "Toggle Background" }) -- lazygit map("n", "gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) @@ -380,7 +379,7 @@ map("n", "w-", "s", { desc = "Split Window Below", remap = true }) map("n", "w|", "v", { desc = "Split Window Right", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) -map("n", "wm", function() LazyVim.toggle.maximize() end, { desc = "Maximize Toggle" }) +LazyVim.toggle.map("wm", LazyVim.toggle.maximize) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 0d6327f5d0..d8a31b5c53 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -50,6 +50,16 @@ opts = function() end, { expr = true }) end + LazyVim.toggle.map("ua", { + name = "Mini Animate", + get = function() + return not vim.g.minianimate_disable + end, + set = function(state) + vim.g.minianimate_disable = not state + end, + }) + local animate = require("mini.animate") return { resize = { @@ -92,6 +102,16 @@ end end, { expr = true }) end + LazyVim.toggle.map("ua", { + name = "Mini Animate", + get = function() + return not vim.g.minianimate_disable + end, + set = function(state) + vim.g.minianimate_disable = not state + end, + }) + local animate = require("mini.animate") return { resize = { diff --git a/docs/keymaps.md b/docs/keymaps.md index 8d4bb2a8c4..7719177df6 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -63,17 +63,17 @@ possible keymaps starting with ``. | [e | Prev Error | **n** | | ]w | Next Warning | **n** | | [w | Prev Warning | **n** | -| <leader>uf | Toggle Auto Format (Global) | **n** | -| <leader>uF | Toggle Auto Format (Buffer) | **n** | -| <leader>us | Toggle Spelling | **n** | -| <leader>uw | Toggle Word Wrap | **n** | -| <leader>uL | Toggle Relative Line Numbers | **n** | -| <leader>ul | Toggle Line Numbers | **n** | -| <leader>ud | Toggle Diagnostics | **n** | -| <leader>uc | Toggle Conceal | **n** | -| <leader>uh | Toggle Inlay Hints | **n** | -| <leader>uT | Toggle Treesitter Highlight | **n** | -| <leader>ub | Toggle Background | **n** | +| <leader>uf | ToggleAuto Format (Global) | **n** | +| <leader>uF | ToggleAuto Format (Buffer) | **n** | +| <leader>us | ToggleSpelling | **n** | +| <leader>uw | ToggleWrap | **n** | +| <leader>uL | ToggleRelative Number | **n** | +| <leader>ud | ToggleDiagnostics | **n** | +| <leader>ul | ToggleLine Numbers | **n** | +| <leader>uc | Toggleconceallevel | **n** | +| <leader>uT | ToggleTreesitter Highlight | **n** | +| <leader>ub | ToggleBackground | **n** | +| <leader>uh | ToggleInlay Hints | **n** | | <leader>gg | Lazygit (Root Dir) | **n** | | <leader>gG | Lazygit (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | @@ -97,7 +97,7 @@ possible keymaps starting with ``. | <leader>w| | Split Window Right | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | -| <leader>wm | Maximize Toggle | **n** | +| <leader>wm | ToggleMaximize | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | @@ -168,12 +168,6 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>cm | Mason | **n** | -## [mini.pairs](https://github.com/echasnovski/mini.pairs.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>up | Toggle Auto Pairs | **n** | - ## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) | Key | Description | Mode | @@ -298,7 +292,7 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | -| <leader>? | Buffer Local Keymaps (which-key) | **n** | +| <leader>? | Buffer Keymaps (which-key) | **n** | ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index c404c9c6ea..d11f3f2121 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -413,20 +413,6 @@ opts = { -- better deal with markdown code blocks markdown = true, }, - keys = { - { - "up", - function() - vim.g.minipairs_disable = not vim.g.minipairs_disable - if vim.g.minipairs_disable then - LazyVim.warn("Disabled auto pairs", { title = "Option" }) - else - LazyVim.info("Enabled auto pairs", { title = "Option" }) - end - end, - desc = "Toggle Auto Pairs", - }, - }, config = function(_, opts) LazyVim.mini.pairs(opts) end, diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 93eb772e15..5a5abe9f3f 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -304,9 +304,9 @@ opts = { { "gh", group = "hunks" }, { "q", group = "quit/session" }, { "s", group = "search" }, - { "u", group = "ui" }, + { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, { "w", group = "windows" }, - { "x", group = "diagnostics/quickfix" }, + { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, { "[", group = "prev" }, { "]", group = "next" }, { "g", group = "goto" }, @@ -340,9 +340,9 @@ opts = { { "gh", group = "hunks" }, { "q", group = "quit/session" }, { "s", group = "search" }, - { "u", group = "ui" }, + { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, { "w", group = "windows" }, - { "x", group = "diagnostics/quickfix" }, + { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, { "[", group = "prev" }, { "]", group = "next" }, { "g", group = "goto" }, @@ -357,7 +357,7 @@ opts = { function() require("which-key").show({ global = false }) end, - desc = "Buffer Local Keymaps (which-key)", + desc = "Buffer Keymaps (which-key)", }, }, config = function(_, opts) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index ae503ad7a3..7ace12e853 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -38,7 +38,8 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() - return { + ---@class PluginLspOpts + local ret = { -- options for vim.diagnostic.config() ---@type vim.diagnostic.Opts diagnostics = { @@ -143,6 +144,7 @@ opts = function() -- ["*"] = function(server, opts) end, }, } + return ret end ``` @@ -159,9 +161,9 @@ end "mason.nvim", { "williamboman/mason-lspconfig.nvim", config = function() end }, }, - ---@class PluginLspOpts opts = function() - return { + ---@class PluginLspOpts + local ret = { -- options for vim.diagnostic.config() ---@type vim.diagnostic.Opts diagnostics = { @@ -266,6 +268,7 @@ end -- ["*"] = function(server, opts) end, }, } + return ret end, ---@param opts PluginLspOpts config = function(_, opts) @@ -302,7 +305,7 @@ end and vim.bo[buffer].buftype == "" and not vim.tbl_contains(opts.inlay_hints.exclude, vim.bo[buffer].filetype) then - LazyVim.toggle.inlay_hints(buffer, true) + vim.lsp.inlay_hint.enable(true, { bufnr = buffer }) end end) end diff --git a/docs/plugins/treesitter.md b/docs/plugins/treesitter.md index ecfdc1fae1..32d65ccc9b 100644 --- a/docs/plugins/treesitter.md +++ b/docs/plugins/treesitter.md @@ -5,6 +5,42 @@ 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 From 9110afd9041aa20a2ef34fd6a72541aa0ea28128 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jul 2024 21:16:52 +0000 Subject: [PATCH 260/553] chore(build): auto-generate docs --- docs/extras/ui/treesitter-context.md | 47 +++++++++++++++++++--------- docs/keymaps.md | 7 ----- 2 files changed, 32 insertions(+), 22 deletions(-) diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md index bdb3238642..37675b53f0 100644 --- a/docs/extras/ui/treesitter-context.md +++ b/docs/extras/ui/treesitter-context.md @@ -39,7 +39,23 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { mode = "cursor", max_lines = 3 } +opts = function() + local tsc = require("treesitter-context") + + LazyVim.toggle.map("ut", { + name = "Treesitter Context", + get = tsc.enabled, + set = function(state) + if state then + tsc.enable() + else + tsc.disable() + end + end, + }) + + return { mode = "cursor", max_lines = 3 } +end ``` @@ -50,23 +66,24 @@ opts = { mode = "cursor", max_lines = 3 } ```lua { "nvim-treesitter/nvim-treesitter-context", - event = "LazyFile", - opts = { mode = "cursor", max_lines = 3 }, - keys = { - { - "ut", - function() - local tsc = require("treesitter-context") - tsc.toggle() - if LazyVim.inject.get_upvalue(tsc.toggle, "enabled") then - LazyVim.info("Enabled Treesitter Context", { title = "Option" }) + event = "VeryLazy", + opts = function() + local tsc = require("treesitter-context") + + LazyVim.toggle.map("ut", { + name = "Treesitter Context", + get = tsc.enabled, + set = function(state) + if state then + tsc.enable() else - LazyVim.warn("Disabled Treesitter Context", { title = "Option" }) + tsc.disable() end end, - desc = "Toggle Treesitter Context", - }, - }, + }) + + return { mode = "cursor", max_lines = 3 } + end, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 7719177df6..e6eac07665 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -667,13 +667,6 @@ Part of [lazyvim.plugins.extras.ui.edgy](/extras/ui/edgy) | <leader>ue | Edgy Toggle | **n** | | <leader>uE | Edgy Select Window | **n** | -## [nvim-treesitter-context](https://github.com/nvim-treesitter/nvim-treesitter-context.git) -Part of [lazyvim.plugins.extras.ui.treesitter-context](/extras/ui/treesitter-context) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>ut | Toggle Treesitter Context | **n** | - ## [chezmoi.nvim](https://github.com/xvzc/chezmoi.nvim.git) Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) From 90f3965f74a4ffc0690b64c7c6ff854e5257a75a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Jul 2024 22:16:13 +0000 Subject: [PATCH 261/553] chore(build): auto-generate docs --- docs/keymaps.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/keymaps.md b/docs/keymaps.md index e6eac07665..7fb7922cee 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -63,17 +63,17 @@ possible keymaps starting with ``. | [e | Prev Error | **n** | | ]w | Next Warning | **n** | | [w | Prev Warning | **n** | -| <leader>uf | ToggleAuto Format (Global) | **n** | -| <leader>uF | ToggleAuto Format (Buffer) | **n** | -| <leader>us | ToggleSpelling | **n** | -| <leader>uw | ToggleWrap | **n** | -| <leader>uL | ToggleRelative Number | **n** | -| <leader>ud | ToggleDiagnostics | **n** | -| <leader>ul | ToggleLine Numbers | **n** | -| <leader>uc | Toggleconceallevel | **n** | -| <leader>uT | ToggleTreesitter Highlight | **n** | -| <leader>ub | ToggleBackground | **n** | -| <leader>uh | ToggleInlay Hints | **n** | +| <leader>uf | Toggle Auto Format (Global) | **n** | +| <leader>uF | Toggle Auto Format (Buffer) | **n** | +| <leader>us | Toggle Spelling | **n** | +| <leader>uw | Toggle Wrap | **n** | +| <leader>uL | Toggle Relative Number | **n** | +| <leader>ud | Toggle Diagnostics | **n** | +| <leader>ul | Toggle Line Numbers | **n** | +| <leader>uc | Toggle conceallevel | **n** | +| <leader>uT | Toggle Treesitter Highlight | **n** | +| <leader>ub | Toggle Background | **n** | +| <leader>uh | Toggle Inlay Hints | **n** | | <leader>gg | Lazygit (Root Dir) | **n** | | <leader>gG | Lazygit (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | @@ -97,7 +97,7 @@ possible keymaps starting with ``. | <leader>w| | Split Window Right | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | -| <leader>wm | ToggleMaximize | **n** | +| <leader>wm | Toggle Maximize | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | From aa3f89dbbcc135ebd020c2691e8c4fa383694a40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 16 Jul 2024 17:14:56 +0000 Subject: [PATCH 262/553] chore(build): auto-generate docs --- docs/extras/lang/r.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 9e00c9c033..a00f2e38c1 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -50,14 +50,15 @@ opts = { vim.keymap.set("n", "", "RDSendLine", { buffer = true }) vim.keymap.set("v", "", "RSendSelection", { buffer = true }) - -- Increase the width of which-key to handle the longer r-nvim descriptions local wk = require("which-key") wk.add({ + buffer = true, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, { "f", group = "functions" }, { "g", group = "goto" }, + { "i", group = "install" }, { "k", group = "knit" }, { "p", group = "paragraph" }, { "q", group = "quarto" }, @@ -92,14 +93,15 @@ opts = { vim.keymap.set("n", "", "RDSendLine", { buffer = true }) vim.keymap.set("v", "", "RSendSelection", { buffer = true }) - -- Increase the width of which-key to handle the longer r-nvim descriptions local wk = require("which-key") wk.add({ + buffer = true, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, { "f", group = "functions" }, { "g", group = "goto" }, + { "i", group = "install" }, { "k", group = "knit" }, { "p", group = "paragraph" }, { "q", group = "quarto" }, From bfb7e8cb46bc2f1bd4488acecc2bd0728fbd0e73 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Jul 2024 11:14:51 +0000 Subject: [PATCH 263/553] chore(build): auto-generate docs --- docs/configuration/general.md | 8 +++---- docs/keymaps.md | 9 ++++---- docs/plugins/editor.md | 41 +++++++++++++++++++++++++++++++---- 3 files changed, 44 insertions(+), 14 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index cde57d120c..ada17bce40 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -373,13 +373,11 @@ map("t", "", "close", { desc = "Hide Terminal" }) map("t", "", "close", { desc = "which_key_ignore" }) -- windows -map("n", "ww", "p", { desc = "Other Window", remap = true }) -map("n", "wd", "c", { desc = "Delete Window", remap = true }) -map("n", "w-", "s", { desc = "Split Window Below", remap = true }) -map("n", "w|", "v", { desc = "Split Window Right", remap = true }) +map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) -LazyVim.toggle.map("wm", LazyVim.toggle.maximize) +map("n", "d", "c", { desc = "Delete Window", remap = true }) +LazyVim.toggle.map("m", LazyVim.toggle.maximize) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 7fb7922cee..c60b17b9f4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -91,13 +91,11 @@ possible keymaps starting with ``. | <c-_> | which_key_ignore | **n**, **t** | | <esc><esc> | Enter Normal Mode | **t** | | <C-/> | Hide Terminal | **t** | -| <leader>ww | Other Window | **n** | -| <leader>wd | Delete Window | **n** | -| <leader>w- | Split Window Below | **n** | -| <leader>w| | Split Window Right | **n** | +| <leader>w | Windows | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | -| <leader>wm | Toggle Maximize | **n** | +| <c-w>d | Delete Window | **n** | +| <c-w>m | Toggle Maximize | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | @@ -292,6 +290,7 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | +| <c-w><space> | Window Hydra Mode (which-key) | **n** | | <leader>? | Buffer Keymaps (which-key) | **n** | ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 5a5abe9f3f..407ff106c1 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -297,7 +297,13 @@ opts = { { mode = { "n", "v" }, { "", group = "tabs" }, - { "b", group = "buffer" }, + { + "b", + group = "buffer", + expand = function() + return require("which-key.extras").expand.buf() + end, + }, { "c", group = "code" }, { "f", group = "file/find" }, { "g", group = "git" }, @@ -305,7 +311,14 @@ opts = { { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "w", group = "windows" }, + { + "w", + group = "windows", + proxy = "", + expand = function() + return require("which-key.extras").expand.win() + end, + }, { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, { "[", group = "prev" }, { "]", group = "next" }, @@ -333,7 +346,13 @@ opts = { { mode = { "n", "v" }, { "", group = "tabs" }, - { "b", group = "buffer" }, + { + "b", + group = "buffer", + expand = function() + return require("which-key.extras").expand.buf() + end, + }, { "c", group = "code" }, { "f", group = "file/find" }, { "g", group = "git" }, @@ -341,7 +360,14 @@ opts = { { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, - { "w", group = "windows" }, + { + "w", + group = "windows", + proxy = "", + expand = function() + return require("which-key.extras").expand.win() + end, + }, { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, { "[", group = "prev" }, { "]", group = "next" }, @@ -359,6 +385,13 @@ opts = { end, desc = "Buffer Keymaps (which-key)", }, + { + "", + function() + require("which-key").show({ keys = "", loop = true }) + end, + desc = "Window Hydra Mode (which-key)", + }, }, config = function(_, opts) local wk = require("which-key") From 35d6c9193842da4144e5d4df5760ee7f458d2c49 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Jul 2024 23:18:02 +0000 Subject: [PATCH 264/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 +++++- docs/extras/ui/edgy.md | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index ada17bce40..bd224aece6 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -482,7 +482,11 @@ vim.api.nvim_create_autocmd("FileType", { }, callback = function(event) vim.bo[event.buf].buflisted = false - vim.keymap.set("n", "q", "close", { buffer = event.buf, silent = true }) + vim.keymap.set("n", "q", "close", { + buffer = event.buf, + silent = true, + desc = "Quit buffer", + }) end, }) diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index e441617855..cfb1953879 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -84,6 +84,9 @@ opts = function() { title = "Neotest Summary", ft = "neotest-summary" }, -- "neo-tree", }, + right = { + { title = "Grug Far", ft = "grug-far", size = { width = 0.4 } }, + }, keys = { -- increase width [""] = function(win) @@ -207,6 +210,9 @@ end { title = "Neotest Summary", ft = "neotest-summary" }, -- "neo-tree", }, + right = { + { title = "Grug Far", ft = "grug-far", size = { width = 0.4 } }, + }, keys = { -- increase width [""] = function(win) From d9cd0af3e53e17a84cb1b6ec4e3717b8b3156eaa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jul 2024 06:24:19 +0000 Subject: [PATCH 265/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index fd1e9314e4..015bfe1e2a 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -285,7 +285,12 @@ opts = function() } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then + -- And allow it to be overriden for some buffer types (see autocmds) + if + vim.g.trouble_luline_enabed ~= false + and vim.b.trouble_lualine_enabled ~= false + and LazyVim.has("trouble.nvim") + then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({ @@ -416,7 +421,12 @@ end } -- do not add trouble symbols if aerial is enabled - if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then + -- And allow it to be overriden for some buffer types (see autocmds) + if + vim.g.trouble_luline_enabed ~= false + and vim.b.trouble_lualine_enabled ~= false + and LazyVim.has("trouble.nvim") + then local trouble = require("trouble") local symbols = trouble.statusline and trouble.statusline({ From 657a16d700f329220d544378617329867154ef67 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jul 2024 08:21:26 +0000 Subject: [PATCH 266/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 015bfe1e2a..e25a9f322a 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -287,7 +287,7 @@ opts = function() -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) if - vim.g.trouble_luline_enabed ~= false + vim.g.trouble_lualine_enabed ~= false and vim.b.trouble_lualine_enabled ~= false and LazyVim.has("trouble.nvim") then @@ -423,7 +423,7 @@ end -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) if - vim.g.trouble_luline_enabed ~= false + vim.g.trouble_lualine_enabed ~= false and vim.b.trouble_lualine_enabled ~= false and LazyVim.has("trouble.nvim") then From 6ff67e9aaa8dbee6cf025884fd5c7a43deb1e643 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jul 2024 09:18:00 +0000 Subject: [PATCH 267/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index e25a9f322a..7491d1d93a 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -287,7 +287,7 @@ opts = function() -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) if - vim.g.trouble_lualine_enabed ~= false + vim.g.trouble_lualine_enabled ~= false and vim.b.trouble_lualine_enabled ~= false and LazyVim.has("trouble.nvim") then @@ -423,7 +423,7 @@ end -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) if - vim.g.trouble_lualine_enabed ~= false + vim.g.trouble_lualine_enabled ~= false and vim.b.trouble_lualine_enabled ~= false and LazyVim.has("trouble.nvim") then From 7ae72cf6fbb1f310fbf75a09797986506a1ea49e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jul 2024 14:16:25 +0000 Subject: [PATCH 268/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/plugins/ui.md | 54 ++++++++++++++++------------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index bd224aece6..eeb8705fdc 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -99,6 +99,7 @@ vim.g.deprecation_warnings = false vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB -- Show the current document symbols location from Trouble in lualine +-- You can disable this for a buffer by setting `vim.b.trouble_lualine = false` vim.g.trouble_lualine = true local opt = vim.opt diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 7491d1d93a..f14158b90d 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -286,24 +286,21 @@ opts = function() -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) - if - vim.g.trouble_lualine_enabled ~= false - and vim.b.trouble_lualine_enabled ~= false - and LazyVim.has("trouble.nvim") - then + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then local trouble = require("trouble") - local symbols = trouble.statusline - and trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) + local symbols = trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) table.insert(opts.sections.lualine_c, { symbols and symbols.get, - cond = symbols and symbols.has, + cond = function() + return vim.b.trouble_lualine ~= false and symbols.has() + end, }) end @@ -422,24 +419,21 @@ end -- do not add trouble symbols if aerial is enabled -- And allow it to be overriden for some buffer types (see autocmds) - if - vim.g.trouble_lualine_enabled ~= false - and vim.b.trouble_lualine_enabled ~= false - and LazyVim.has("trouble.nvim") - then + if vim.g.trouble_lualine and LazyVim.has("trouble.nvim") then local trouble = require("trouble") - local symbols = trouble.statusline - and trouble.statusline({ - mode = "symbols", - groups = {}, - title = false, - filter = { range = true }, - format = "{kind_icon}{symbol.name:Normal}", - hl_group = "lualine_c_normal", - }) + local symbols = trouble.statusline({ + mode = "symbols", + groups = {}, + title = false, + filter = { range = true }, + format = "{kind_icon}{symbol.name:Normal}", + hl_group = "lualine_c_normal", + }) table.insert(opts.sections.lualine_c, { symbols and symbols.get, - cond = symbols and symbols.has, + cond = function() + return vim.b.trouble_lualine ~= false and symbols.has() + end, }) end From 3d67ef62fc9a464f7edecb06df2c360a21ebb227 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Jul 2024 08:21:09 +0000 Subject: [PATCH 269/553] chore(build): auto-generate docs --- docs/extras/lang/lean.md | 83 ++++++++++++++++++++++++ docs/extras/lang/ocaml.md | 133 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 docs/extras/lang/lean.md create mode 100644 docs/extras/lang/ocaml.md diff --git a/docs/extras/lang/lean.md b/docs/extras/lang/lean.md new file mode 100644 index 0000000000..1475e1400c --- /dev/null +++ b/docs/extras/lang/lean.md @@ -0,0 +1,83 @@ +# `Lean` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.lean" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [lean.nvim](https://github.com/Julian/lean.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"Julian/lean.nvim" +``` + + + + + +## [plenary.nvim](https://github.com/nvim-lua/plenary.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "nvim-lua/plenary.nvim", +} +``` + + + + + + diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md new file mode 100644 index 0000000000..ff0484ad28 --- /dev/null +++ b/docs/extras/lang/ocaml.md @@ -0,0 +1,133 @@ +# `Ocaml` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.ocaml" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "ocaml" }) + end +end +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "ocaml" }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + ocamllsp = { + get_language_id = function(_, ftype) + return language_id_of[ftype] + end, + root_dir = function(fname) + return require("lspconfig.util").root_pattern( + "*.opam", + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + "*.ml" + )(fname) + end, + }, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + ocamllsp = { + get_language_id = function(_, ftype) + return language_id_of[ftype] + end, + root_dir = function(fname) + return require("lspconfig.util").root_pattern( + "*.opam", + "esy.json", + "package.json", + ".git", + "dune-project", + "dune-workspace", + "*.ml" + )(fname) + end, + }, + }, + }, +} +``` + + + + + + From 116d2d3d1189cf25e52aa4c136cba05e4e3ce09a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 19 Jul 2024 09:17:56 +0000 Subject: [PATCH 270/553] chore(build): auto-generate docs --- docs/extras/lang/ruby.md | 103 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index 097d2a12cc..b36438e2e7 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -22,6 +22,17 @@ require("lazy").setup({ +### 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" +-- LSP Server to use for Ruby. +-- Set to "solargraph" to use solargraph instead of ruby_lsp. +vim.g.lazyvim_ruby_lsp = "ruby_lsp" +vim.g.lazyvim_ruby_formatter = "rubocop" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -66,8 +77,20 @@ opts = { ensure_installed = { "ruby" } } ```lua opts = { + ---@type lspconfig.options servers = { - solargraph = {}, + ruby_lsp = { + enabled = lsp == "ruby_lsp", + }, + solargraph = { + enabled = lsp == "solargraph", + }, + rubocop = { + enabled = formatter == "rubocop", + }, + standardrb = { + enabled = formatter == "standardrb", + }, }, } ``` @@ -80,9 +103,22 @@ opts = { ```lua { "neovim/nvim-lspconfig", + ---@class PluginLspOpts opts = { + ---@type lspconfig.options servers = { - solargraph = {}, + ruby_lsp = { + enabled = lsp == "ruby_lsp", + }, + solargraph = { + enabled = lsp == "solargraph", + }, + rubocop = { + enabled = formatter == "rubocop", + }, + standardrb = { + enabled = formatter == "standardrb", + }, }, }, } @@ -92,6 +128,32 @@ opts = {
+## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = { ensure_installed = { "erb-formatter", "erb-lint" } } +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = { ensure_installed = { "erb-formatter", "erb-lint" } }, +} +``` + + + + + ## [nvim-dap-ruby](https://github.com/suketa/nvim-dap-ruby) @@ -177,6 +239,43 @@ opts = nil +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = { + formatters_by_ft = { + ruby = { formatter }, + eruby = { "erb-format" }, + }, +} +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + ruby = { formatter }, + eruby = { "erb-format" }, + }, + }, +} +``` + + + + + ## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ From 0dd3e653d52e07f94b360d676ef95dc39c66bd71 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Jul 2024 15:16:21 +0000 Subject: [PATCH 271/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 56 ++++++++++++++++++++------------------ docs/plugins/formatting.md | 15 ++++------ 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 407ff106c1..a27f43d583 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -297,13 +297,6 @@ opts = { { mode = { "n", "v" }, { "", group = "tabs" }, - { - "b", - group = "buffer", - expand = function() - return require("which-key.extras").expand.buf() - end, - }, { "c", group = "code" }, { "f", group = "file/find" }, { "g", group = "git" }, @@ -311,6 +304,19 @@ opts = { { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, + { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, + { "[", group = "prev" }, + { "]", group = "next" }, + { "g", group = "goto" }, + { "gs", group = "surround" }, + { "z", group = "fold" }, + { + "b", + group = "buffer", + expand = function() + return require("which-key.extras").expand.buf() + end, + }, { "w", group = "windows", @@ -319,12 +325,8 @@ opts = { return require("which-key.extras").expand.win() end, }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, - { "[", group = "prev" }, - { "]", group = "next" }, - { "g", group = "goto" }, - { "gs", group = "surround" }, - { "z", group = "fold" }, + -- better descriptions + { "gx", desc = "Open with system app" }, }, }, } @@ -346,13 +348,6 @@ opts = { { mode = { "n", "v" }, { "", group = "tabs" }, - { - "b", - group = "buffer", - expand = function() - return require("which-key.extras").expand.buf() - end, - }, { "c", group = "code" }, { "f", group = "file/find" }, { "g", group = "git" }, @@ -360,6 +355,19 @@ opts = { { "q", group = "quit/session" }, { "s", group = "search" }, { "u", group = "ui", icon = { icon = "󰙵 ", color = "cyan" } }, + { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, + { "[", group = "prev" }, + { "]", group = "next" }, + { "g", group = "goto" }, + { "gs", group = "surround" }, + { "z", group = "fold" }, + { + "b", + group = "buffer", + expand = function() + return require("which-key.extras").expand.buf() + end, + }, { "w", group = "windows", @@ -368,12 +376,8 @@ opts = { return require("which-key.extras").expand.win() end, }, - { "x", group = "diagnostics/quickfix", icon = { icon = "󱖫 ", color = "green" } }, - { "[", group = "prev" }, - { "]", group = "next" }, - { "g", group = "goto" }, - { "gs", group = "surround" }, - { "z", group = "fold" }, + -- better descriptions + { "gx", desc = "Open with system app" }, }, }, }, diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index 75f52ceeaa..db151eeb05 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -35,16 +35,14 @@ opts = function() "Please refer to the docs at https://www.lazyvim.org/plugins/formatting", }, { title = "LazyVim" }) end - ---@class ConformOpts + ---@type conform.setupOpts local opts = { - -- LazyVim will use these options when formatting with the conform.nvim formatter - format = { + default_format_opts = { timeout_ms = 3000, async = false, -- not recommended to change quiet = false, -- not recommended to change lsp_format = "fallback", -- not recommended to change }, - ---@type table formatters_by_ft = { lua = { "stylua" }, fish = { "fish_indent" }, @@ -101,8 +99,7 @@ end priority = 100, primary = true, format = function(buf) - local opts = LazyVim.opts("conform.nvim") - require("conform").format(LazyVim.merge({}, opts.format, { bufnr = buf })) + require("conform").format({ bufnr = buf }) end, sources = function(buf) local ret = require("conform").list_formatters(buf) @@ -123,16 +120,14 @@ end "Please refer to the docs at https://www.lazyvim.org/plugins/formatting", }, { title = "LazyVim" }) end - ---@class ConformOpts + ---@type conform.setupOpts local opts = { - -- LazyVim will use these options when formatting with the conform.nvim formatter - format = { + default_format_opts = { timeout_ms = 3000, async = false, -- not recommended to change quiet = false, -- not recommended to change lsp_format = "fallback", -- not recommended to change }, - ---@type table formatters_by_ft = { lua = { "stylua" }, fish = { "fish_indent" }, From 4fb3ce2cf5ec6148fc38ca46fa3cb4f4baf7a0b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Jul 2024 20:16:43 +0000 Subject: [PATCH 272/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/ui/mini-animate.md | 14 ++++++ docs/keymaps.md | 12 ++--- docs/news.md | 3 ++ docs/plugins/editor.md | 28 ++++++++--- docs/plugins/ui.md | 92 +++++++++++++++++++++------------- 6 files changed, 102 insertions(+), 48 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index eeb8705fdc..53c6ec754e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -467,6 +467,7 @@ vim.api.nvim_create_autocmd("FileType", { group = augroup("close_with_q"), pattern = { "PlenaryTestPopup", + "grug-far", "help", "lspinfo", "notify", diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index d8a31b5c53..71a5f6bb70 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -50,6 +50,13 @@ opts = function() end, { expr = true }) end + vim.api.nvim_create_autocmd("FileType", { + pattern = "grug-far", + callback = function() + vim.b.minianimate_disable = true + end, + }) + LazyVim.toggle.map("ua", { name = "Mini Animate", get = function() @@ -102,6 +109,13 @@ end end, { expr = true }) end + vim.api.nvim_create_autocmd("FileType", { + pattern = "grug-far", + callback = function() + vim.b.minianimate_disable = true + end, + }) + LazyVim.toggle.map("ua", { name = "Mini Animate", get = function() diff --git a/docs/keymaps.md b/docs/keymaps.md index c60b17b9f4..171552eb66 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -160,6 +160,12 @@ possible keymaps starting with ``. | s | Flash | **n**, **o**, **x** | | S | Flash Treesitter | **n**, **o**, **x** | +## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim.git) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>sr | Search and Replace | **n**, **v** | + ## [mason.nvim](https://github.com/williamboman/mason.nvim.git) | Key | Description | Mode | @@ -197,12 +203,6 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>un | Dismiss All Notifications | **n** | -## [nvim-spectre](https://github.com/nvim-pack/nvim-spectre.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>sr | Replace in Files (Spectre) | **n** | - ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git) | Key | Description | Mode | diff --git a/docs/news.md b/docs/news.md index c14b25d9fa..1015407e03 100644 --- a/docs/news.md +++ b/docs/news.md @@ -6,6 +6,9 @@ sidebar_position: 2 ## 12.x +- [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) has been removed in favor of [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim). + **grug-far.nvim** has a great UI and feels more intuitive to use. + - This **news** is now also available on the website at [https://www.lazyvim.org/news](https://www.lazyvim.org/news) - **prettier** extra now works for all prettier supported filetypes diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index a27f43d583..112d4c682b 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -203,7 +203,7 @@ opts = { -## [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) +## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim) search/replace in multiple files @@ -213,7 +213,7 @@ opts = { ```lua -opts = { open_cmd = "noswapfile vnew" } +opts = { headerMaxWidth = 80 } ``` @@ -223,13 +223,25 @@ opts = { open_cmd = "noswapfile vnew" } ```lua { - "nvim-pack/nvim-spectre", - build = false, - cmd = "Spectre", - opts = { open_cmd = "noswapfile vnew" }, - -- stylua: ignore + "MagicDuck/grug-far.nvim", + opts = { headerMaxWidth = 80 }, + cmd = "GrugFar", keys = { - { "sr", function() require("spectre").open() end, desc = "Replace in Files (Spectre)" }, + { + "sr", + function() + local is_visual = vim.fn.mode():lower():find("v") + if is_visual then -- needed to make visual selection work + vim.cmd([[normal! v]]) + end + local grug = require("grug-far"); + (is_visual and grug.with_visual_selection or grug.grug_far)({ + prefills = { filesFilter = "*." .. vim.fn.expand("%:e") }, + }) + end, + mode = { "n", "v" }, + desc = "Search and Replace", + }, }, } ``` diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index f14158b90d..3585104785 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -456,40 +456,18 @@ end ```lua -opts = { - indent = { - char = "│", - tab_char = "│", - }, - scope = { show_start = false, show_end = false }, - exclude = { - filetypes = { - "help", - "alpha", - "dashboard", - "neo-tree", - "Trouble", - "trouble", - "lazy", - "mason", - "notify", - "toggleterm", - "lazyterm", - }, - }, -} -``` - - - - - +opts = function() + LazyVim.toggle.map("ug", { + name = "Indention Guides", + get = function() + return require("ibl.config").get_config(0).enabled + end, + set = function(state) + require("ibl").setup_buffer(0, { enabled = state }) + end, + }) -```lua -{ - "lukas-reineke/indent-blankline.nvim", - event = "LazyFile", - opts = { + return { indent = { char = "│", tab_char = "│", @@ -510,7 +488,53 @@ opts = { "lazyterm", }, }, - }, + } +end +``` + + + + + + +```lua +{ + "lukas-reineke/indent-blankline.nvim", + event = "LazyFile", + opts = function() + LazyVim.toggle.map("ug", { + name = "Indention Guides", + get = function() + return require("ibl.config").get_config(0).enabled + end, + set = function(state) + require("ibl").setup_buffer(0, { enabled = state }) + end, + }) + + return { + indent = { + char = "│", + tab_char = "│", + }, + scope = { show_start = false, show_end = false }, + exclude = { + filetypes = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + }, + } + end, main = "ibl", } ``` From e6fa1119489349281a55a553586b783e7f925809 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 20 Jul 2024 22:15:46 +0000 Subject: [PATCH 273/553] chore(build): auto-generate docs --- docs/configuration/lazy.nvim.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/configuration/lazy.nvim.md b/docs/configuration/lazy.nvim.md index 2fba8b4d9f..38e8dd63eb 100644 --- a/docs/configuration/lazy.nvim.md +++ b/docs/configuration/lazy.nvim.md @@ -75,7 +75,10 @@ require("lazy").setup({ -- version = "*", -- try installing the latest stable version for plugins that support semver }, install = { colorscheme = { "tokyonight", "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates + checker = { + enabled = true, -- check for plugin updates periodically + notify = false, -- notify on update + }, -- automatically check for plugin updates performance = { rtp = { -- disable some rtp plugins From 16e5da4d721f89dad24c91ac315cdffaedab7757 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Jul 2024 11:13:38 +0000 Subject: [PATCH 274/553] chore(build): auto-generate docs --- docs/extras/lang/python.md | 97 ++++++++++++++++++++++++++------------ docs/plugins/lsp.md | 3 ++ 2 files changed, 71 insertions(+), 29 deletions(-) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 8c6b1bdbeb..59b480b01a 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -30,7 +30,8 @@ Additional options for this extra can be configured in your [lua/config/options. -- LSP Server to use for Python. -- Set to "basedpyright" to use basedpyright instead of pyright. vim.g.lazyvim_python_lsp = "pyright" -vim.g.lazyvim_python_ruff = "ruff_lsp" +-- Set to "ruff_lsp" to use the old LSP implementation version. +vim.g.lazyvim_python_ruff = "ruff" ``` Below you can find a list of included plugins and their default settings. @@ -78,22 +79,22 @@ opts = { ensure_installed = { "ninja", "rst" } } ```lua opts = { servers = { - pyright = { - enabled = lsp == "pyright", - }, - basedpyright = { - enabled = lsp == "basedpyright", - }, - [lsp] = { - enabled = true, - }, - ruff_lsp = { - enabled = ruff == "ruff_lsp", - }, ruff = { - enabled = ruff == "ruff", + cmd_env = { RUFF_TRACE = "messages" }, + init_options = { + settings = { + logLevel = "error", + }, + }, + keys = { + { + "co", + LazyVim.lsp.action["source.organizeImports"], + desc = "Organize Imports", + }, + }, }, - [ruff] = { + ruff_lsp = { keys = { { "co", @@ -124,22 +125,22 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - pyright = { - enabled = lsp == "pyright", - }, - basedpyright = { - enabled = lsp == "basedpyright", - }, - [lsp] = { - enabled = true, - }, - ruff_lsp = { - enabled = ruff == "ruff_lsp", - }, ruff = { - enabled = ruff == "ruff", + cmd_env = { RUFF_TRACE = "messages" }, + init_options = { + settings = { + logLevel = "error", + }, + }, + keys = { + { + "co", + LazyVim.lsp.action["source.organizeImports"], + desc = "Organize Imports", + }, + }, }, - [ruff] = { + ruff_lsp = { keys = { { "co", @@ -165,6 +166,44 @@ opts = { +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function(_, opts) + local servers = { "pyright", "basedpyright", "ruff", "ruff_lsp", ruff, lsp } + for _, server in ipairs(servers) do + opts.servers[server] = opts.servers[server] or {} + opts.servers[server].enabled = server == lsp or server == ruff + end +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function(_, opts) + local servers = { "pyright", "basedpyright", "ruff", "ruff_lsp", ruff, lsp } + for _, server in ipairs(servers) do + opts.servers[server] = opts.servers[server] or {} + opts.servers[server].enabled = server == lsp or server == ruff + end + end, +} +``` + + + + + ## [neotest-python](https://github.com/nvim-neotest/neotest-python) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 7ace12e853..d4483c5419 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -350,6 +350,9 @@ end 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 From dabd34a3294fb3089ed40b108fac3f1fceb61e17 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 21 Jul 2024 16:22:09 +0000 Subject: [PATCH 275/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 112d4c682b..66186701af 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -234,9 +234,11 @@ opts = { headerMaxWidth = 80 } if is_visual then -- needed to make visual selection work vim.cmd([[normal! v]]) end - local grug = require("grug-far"); + local grug = require("grug-far") + local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") + local filesFilter = ext and ext ~= "" and "*." .. ext or nil; (is_visual and grug.with_visual_selection or grug.grug_far)({ - prefills = { filesFilter = "*." .. vim.fn.expand("%:e") }, + prefills = { filesFilter = filesFilter }, }) end, mode = { "n", "v" }, From de0abf86103fee10ad57f3bdb0449b69d39fb155 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jul 2024 07:16:40 +0000 Subject: [PATCH 276/553] chore(build): auto-generate docs --- docs/plugins/editor.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 66186701af..0fea79d157 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -230,15 +230,12 @@ opts = { headerMaxWidth = 80 } { "sr", function() - local is_visual = vim.fn.mode():lower():find("v") - if is_visual then -- needed to make visual selection work - vim.cmd([[normal! v]]) - end local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") - local filesFilter = ext and ext ~= "" and "*." .. ext or nil; - (is_visual and grug.with_visual_selection or grug.grug_far)({ - prefills = { filesFilter = filesFilter }, + grug.grug_far({ + prefills = { + filesFilter = ext and ext ~= "" and "*." .. ext or nil, + }, }) end, mode = { "n", "v" }, From d482c86cb77de00dabdbdf52deae4d8eae3417e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 22 Jul 2024 22:16:08 +0000 Subject: [PATCH 277/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/extras/lang/elixir.md | 54 +++++++++++++++++++++++++++++++++-- docs/plugins/editor.md | 1 + 3 files changed, 53 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 53c6ec754e..eeb8705fdc 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -467,7 +467,6 @@ vim.api.nvim_create_autocmd("FileType", { group = augroup("close_with_q"), pattern = { "PlenaryTestPopup", - "grug-far", "help", "lspinfo", "notify", diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index e27a1cb41e..8d62c9f09b 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -41,7 +41,32 @@ import TabItem from '@theme/TabItem'; ```lua opts = { servers = { - elixirls = {}, + elixirls = { + keys = { + { + "cp", + function() + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "manipulatePipes:serverid", + arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character }, + }) + end, + desc = "To Pipe", + }, + { + "cP", + function() + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "manipulatePipes:serverid", + arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character }, + }) + end, + desc = "From Pipe", + }, + }, + }, }, } ``` @@ -56,7 +81,32 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - elixirls = {}, + elixirls = { + keys = { + { + "cp", + function() + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "manipulatePipes:serverid", + arguments = { "toPipe", params.textDocument.uri, params.position.line, params.position.character }, + }) + end, + desc = "To Pipe", + }, + { + "cP", + function() + local params = vim.lsp.util.make_position_params() + LazyVim.lsp.execute({ + command = "manipulatePipes:serverid", + arguments = { "fromPipe", params.textDocument.uri, params.position.line, params.position.character }, + }) + end, + desc = "From Pipe", + }, + }, + }, }, }, } diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 0fea79d157..f88bbdbda0 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -233,6 +233,7 @@ opts = { headerMaxWidth = 80 } local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") grug.grug_far({ + transient = true, prefills = { filesFilter = ext and ext ~= "" and "*." .. ext or nil, }, From 93ed9aa96c8f03e08e711565b6afebe9efcee20f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 07:16:01 +0000 Subject: [PATCH 278/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index eeb8705fdc..cbd5f5f7d1 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -377,7 +377,7 @@ map("t", "", "close", { desc = "which_key_ignore" }) map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) -map("n", "d", "c", { desc = "Delete Window", remap = true }) +map("n", "wd", "c", { desc = "Delete Window", remap = true }) LazyVim.toggle.map("m", LazyVim.toggle.maximize) -- tabs diff --git a/docs/keymaps.md b/docs/keymaps.md index 171552eb66..494f735ca3 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -94,7 +94,7 @@ possible keymaps starting with ``. | <leader>w | Windows | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | -| <c-w>d | Delete Window | **n** | +| <leader>wd | Delete Window | **n** | | <c-w>m | Toggle Maximize | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | From da0c6a74ea58e0c68ef5ff5a7b95e378e3a76dda Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 15:19:05 +0000 Subject: [PATCH 279/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index c29e1603e6..a44f6fcb3f 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -106,6 +106,11 @@ opts = {} vscode.json_decode = function(str) return vim.json.decode(json.json_strip_comments(str)) end + + -- Extends dap.configurations with entries read from .vscode/launch.json + if vim.fn.filereadable(".vscode/launch.json") then + vscode.load_launchjs() + end end, } ``` From c1547bcfcc159fa6bb7d9c0349bf7c14b11a3687 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 23 Jul 2024 20:18:02 +0000 Subject: [PATCH 280/553] chore(build): auto-generate docs --- docs/extras/lang/python.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 59b480b01a..f254573039 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -431,4 +431,42 @@ opts = nil +## [mason-nvim-dap.nvim](https://github.com/jay-babu/mason-nvim-dap.nvim) _(optional)_ + + Don't mess up DAP adapters provided by nvim-dap-python + + + + + + +```lua +opts = { + handlers = { + python = function() end, + }, +} +``` + + + + + + +```lua +{ + "jay-babu/mason-nvim-dap.nvim", + optional = true, + opts = { + handlers = { + python = function() end, + }, + }, +} +``` + + + + + From c5403bf692068b2d8b99412785f11caf3e9418f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Jul 2024 05:17:04 +0000 Subject: [PATCH 281/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/keymaps.md | 2 +- docs/plugins/colorscheme.md | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index cbd5f5f7d1..a3bb05a38e 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -378,7 +378,7 @@ map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wd", "c", { desc = "Delete Window", remap = true }) -LazyVim.toggle.map("m", LazyVim.toggle.maximize) +LazyVim.toggle.map("wm", LazyVim.toggle.maximize) -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 494f735ca3..fe34ba0e69 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -95,7 +95,7 @@ possible keymaps starting with ``. | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | | <leader>wd | Delete Window | **n** | -| <c-w>m | Toggle Maximize | **n** | +| <leader>wm | Toggle Maximize | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index d7e125c652..16a8c5891f 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -69,6 +69,7 @@ opts = { cmp = true, dashboard = true, flash = true, + grug_far = true, gitsigns = true, headlines = true, illuminate = true, @@ -118,6 +119,7 @@ opts = { cmp = true, dashboard = true, flash = true, + grug_far = true, gitsigns = true, headlines = true, illuminate = true, From 15b3d4fe0dbfaf7a689f420650aedac90b9aa1f5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Jul 2024 06:24:43 +0000 Subject: [PATCH 282/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 82 ++++++++++++++++++------------------ docs/news.md | 3 ++ 2 files changed, 44 insertions(+), 41 deletions(-) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index db4a8be96b..ff4b80b01e 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -135,30 +135,25 @@ opts = {} -## [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) +## [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim) ```lua -opts = function() - local opts = {} - for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do - opts[ft] = { - headline_highlights = {}, - -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 - bullets = {}, - quote_string = false, - } - for i = 1, 6 do - local hl = "Headline" .. i - vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true }) - table.insert(opts[ft].headline_highlights, hl) - end - end - return opts -end +opts = { + file_types = { "markdown", "norg", "rmd", "org" }, + code = { + sign = false, + width = "block", + right_pad = 1, + }, + heading = { + sign = false, + icons = {}, + }, +} ``` @@ -168,31 +163,36 @@ end ```lua { - "lukas-reineke/headlines.nvim", - opts = function() - local opts = {} - for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do - opts[ft] = { - headline_highlights = {}, - -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 - bullets = {}, - quote_string = false, - } - for i = 1, 6 do - local hl = "Headline" .. i - vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true }) - table.insert(opts[ft].headline_highlights, hl) - end - end - return opts - end, + "MeanderingProgrammer/markdown.nvim", + opts = { + file_types = { "markdown", "norg", "rmd", "org" }, + code = { + sign = false, + width = "block", + right_pad = 1, + }, + heading = { + sign = false, + icons = {}, + }, + }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) - -- PERF: schedule to prevent headlines slowing down opening a file - vim.schedule(function() - require("headlines").setup(opts) - require("headlines").refresh() - end) + require("render-markdown").setup(opts) + LazyVim.toggle.map("um", { + 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, + }) end, } ``` diff --git a/docs/news.md b/docs/news.md index 1015407e03..eb9298a5d3 100644 --- a/docs/news.md +++ b/docs/news.md @@ -6,6 +6,9 @@ sidebar_position: 2 ## 12.x +- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim) + to spice up your markdown files. + - [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) has been removed in favor of [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim). **grug-far.nvim** has a great UI and feels more intuitive to use. From 8ee6299bcb2a1a5fcd637cce463f1583a9b44432 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Jul 2024 16:21:32 +0000 Subject: [PATCH 283/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index a3bb05a38e..0fcbd64023 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -467,6 +467,7 @@ vim.api.nvim_create_autocmd("FileType", { group = augroup("close_with_q"), pattern = { "PlenaryTestPopup", + "grug-far", "help", "lspinfo", "notify", From cc5ced70b2277271222b8c2b8b60b359041d9da0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 31 Aug 2024 09:31:59 +0200 Subject: [PATCH 284/553] docs: typo. Fixes #85 --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 0fcbd64023..421b873a4d 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -21,7 +21,7 @@ so you don't need to require those files manually. │   ├── spec1.lua │   ├── ** │   └── spec2.lua -└── init.toml +└── init.lua ``` :::danger From 66ecf9dc9a2c30118ff3190fd0a10e9d64b5bf19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 Aug 2024 07:32:25 +0000 Subject: [PATCH 285/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 ++++- docs/extras/lang/markdown.md | 4 ++-- docs/keymaps.md | 1 + docs/plugins/util.md | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 421b873a4d..36c200e9a1 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -72,9 +72,12 @@ vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } -- LazyVim automatically configures lazygit: -- * theme, based on the active colorscheme. --- * editorPreset to nvim-remote +-- * editPreset to nvim-remote -- * enables nerd font icons -- Set to false to disable. +-- Set the options you want to override in `~/.config/lazygit/custom.yml` +-- WARN: on Windows you might want to set `editPreset: "nvim"` due to +-- this issue https://github.com/jesseduffield/lazygit/issues/3467 vim.g.lazygit_config = true -- Options for the LazyVim statuscolumn diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index ff4b80b01e..b1b81579a4 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -135,7 +135,7 @@ opts = {} -## [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim) +## [render-markdown.nvim](https://github.com/MeanderingProgrammer/render-markdown.nvim) @@ -163,7 +163,7 @@ opts = { ```lua { - "MeanderingProgrammer/markdown.nvim", + "MeanderingProgrammer/render-markdown.nvim", opts = { file_types = { "markdown", "norg", "rmd", "org" }, code = { diff --git a/docs/keymaps.md b/docs/keymaps.md index fe34ba0e69..d8f5353e7c 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -217,6 +217,7 @@ possible keymaps starting with ``. | <leader>qd | Don't Save Current Session | **n** | | <leader>ql | Restore Last Session | **n** | | <leader>qs | Restore Session | **n** | +| <leader>qS | Select Session | **n** | ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) diff --git a/docs/plugins/util.md b/docs/plugins/util.md index 321af74847..74dff515d4 100644 --- a/docs/plugins/util.md +++ b/docs/plugins/util.md @@ -33,6 +33,7 @@ opts = {} -- stylua: ignore keys = { { "qs", function() require("persistence").load() end, desc = "Restore Session" }, + { "qS", function() require("persistence").select() end,desc = "Select Session" }, { "ql", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" }, { "qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" }, }, From 5fcee9e8f11c7e68ac3f906a681c7e1140e57b50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 31 Aug 2024 08:22:48 +0000 Subject: [PATCH 286/553] chore(build): auto-generate docs --- docs/extras/lang/markdown.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index b1b81579a4..87a5dae6c1 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -115,6 +115,7 @@ opts = {} "iamcco/markdown-preview.nvim", cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, build = function() + require("lazy").load({ plugins = { "markdown-preview.nvim" } }) vim.fn["mkdp#util#install"]() end, keys = { @@ -135,6 +136,29 @@ opts = {} +## [markdown-preview.nvim](https://github.com/iamcco/markdown-preview.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "markdown-preview.nvim" } +``` + + + + + ## [render-markdown.nvim](https://github.com/MeanderingProgrammer/render-markdown.nvim) From c53f4c15fbe9afcfa9ad6000ac26dae9fbd109fa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Sep 2024 07:18:00 +0000 Subject: [PATCH 287/553] chore(build): auto-generate docs --- docs/extras/coding/copilot-chat.md | 2 -- docs/plugins/editor.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index 7a93d089a4..cd03aa43f2 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -43,7 +43,6 @@ opts = function() local user = vim.env.USER or "User" user = user:sub(1, 1):upper() .. user:sub(2) return { - model = "gpt-4", auto_insert_mode = true, show_help = true, question_header = " " .. user .. " ", @@ -73,7 +72,6 @@ end local user = vim.env.USER or "User" user = user:sub(1, 1):upper() .. user:sub(2) return { - model = "gpt-4", auto_insert_mode = true, show_help = true, question_header = " " .. user .. " ", diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index f88bbdbda0..044ac4b6db 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -232,7 +232,7 @@ opts = { headerMaxWidth = 80 } function() local grug = require("grug-far") local ext = vim.bo.buftype == "" and vim.fn.expand("%:e") - grug.grug_far({ + grug.open({ transient = true, prefills = { filesFilter = ext and ext ~= "" and "*." .. ext or nil, From cfb8baecfa4ef136abe8a40d807ade3a9d3be438 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Sep 2024 06:26:58 +0000 Subject: [PATCH 288/553] chore(build): auto-generate docs --- docs/extras/lang/astro.md | 4 ++-- docs/extras/lang/ocaml.md | 22 ++++++++++++++++------ docs/extras/lang/omnisharp.md | 8 ++++++-- docs/extras/lang/vue.md | 4 ++-- docs/plugins/coding.md | 4 ++++ 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index fc869d7388..83e938ca21 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -43,7 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { ensure_installed = { "astro" } } +opts = { ensure_installed = { "astro", "css" } } ``` @@ -54,7 +54,7 @@ opts = { ensure_installed = { "astro" } } ```lua { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "astro" } }, + opts = { ensure_installed = { "astro", "css" } }, } ``` diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index ff0484ad28..04ccaf4348 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -76,9 +76,14 @@ end opts = { servers = { ocamllsp = { - get_language_id = function(_, ftype) - return language_id_of[ftype] - end, + filetypes = { + "ocaml", + "ocaml.menhir", + "ocaml.interface", + "ocaml.ocamllex", + "reason", + "dune", + }, root_dir = function(fname) return require("lspconfig.util").root_pattern( "*.opam", @@ -106,9 +111,14 @@ opts = { opts = { servers = { ocamllsp = { - get_language_id = function(_, ftype) - return language_id_of[ftype] - end, + filetypes = { + "ocaml", + "ocaml.menhir", + "ocaml.interface", + "ocaml.ocamllex", + "reason", + "dune", + }, root_dir = function(fname) return require("lspconfig.util").root_pattern( "*.opam", diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index f6a620cd80..795bbd1464 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -125,8 +125,10 @@ opts = { keys = { { "gd", - function() + LazyVim.has("telescope.nvim") and function() require("omnisharp_extended").telescope_lsp_definitions() + end or function() + require("omnisharp_extended").lsp_definitions() end, desc = "Goto Definition", }, @@ -158,8 +160,10 @@ opts = { keys = { { "gd", - function() + LazyVim.has("telescope.nvim") and function() require("omnisharp_extended").telescope_lsp_definitions() + end or function() + require("omnisharp_extended").lsp_definitions() end, desc = "Goto Definition", }, diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 4aa9c8129b..109ec0d107 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -43,7 +43,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { ensure_installed = { "vue" } } +opts = { ensure_installed = { "vue", "css" } } ``` @@ -54,7 +54,7 @@ opts = { ensure_installed = { "vue" } } ```lua { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "vue" } }, + opts = { ensure_installed = { "vue", "css" } }, } ``` diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index d11f3f2121..b79e26daff 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -29,6 +29,8 @@ opts = function() mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.complete(), [""] = LazyVim.cmp.confirm({ select = auto_select }), [""] = LazyVim.cmp.confirm({ select = true }), @@ -113,6 +115,8 @@ end mapping = cmp.mapping.preset.insert({ [""] = cmp.mapping.scroll_docs(-4), [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), [""] = cmp.mapping.complete(), [""] = LazyVim.cmp.confirm({ select = auto_select }), [""] = LazyVim.cmp.confirm({ select = true }), From ad557d18e0a1609f880598674d626cffc3fb35bd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Oct 2024 08:25:00 +0000 Subject: [PATCH 289/553] chore(build): auto-generate docs --- docs/extras/editor/mini-files.md | 2 +- docs/extras/lang/java.md | 4 ++-- docs/extras/lang/markdown.md | 2 -- docs/extras/lang/tailwind.md | 4 ++-- docs/extras/lang/typescript.md | 22 ++++++++++++++++++++++ 5 files changed, 27 insertions(+), 7 deletions(-) diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 7a7fb3d33f..6db54c1820 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -109,7 +109,7 @@ opts = { local map_split = function(buf_id, lhs, direction, close_on_file) local rhs = function() local new_target_window - local cur_target_window = require("mini.files").get_target_window() + local cur_target_window = require("mini.files").get_explorer_state().target_window if cur_target_window ~= nil then vim.api.nvim_win_call(cur_target_window, function() vim.cmd("belowright " .. direction .. " split") diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 78558b68cc..a8f9ff2864 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -153,7 +153,7 @@ opts = function() 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 = require("lspconfig.server_configurations.jdtls").default_config.root_dir, + 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) @@ -223,7 +223,7 @@ 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 = require("lspconfig.server_configurations.jdtls").default_config.root_dir, + 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) diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 87a5dae6c1..27b4c206fc 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -167,7 +167,6 @@ opts = nil ```lua opts = { - file_types = { "markdown", "norg", "rmd", "org" }, code = { sign = false, width = "block", @@ -189,7 +188,6 @@ opts = { { "MeanderingProgrammer/render-markdown.nvim", opts = { - file_types = { "markdown", "norg", "rmd", "org" }, code = { sign = false, width = "block", diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 79f1592d2c..672808d6d0 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -52,7 +52,7 @@ opts = { }, setup = { tailwindcss = function(_, opts) - local tw = require("lspconfig.server_configurations.tailwindcss") + local tw = LazyVim.lsp.get_raw_config("tailwindcss") opts.filetypes = opts.filetypes or {} -- Add default filetypes @@ -103,7 +103,7 @@ opts = { }, setup = { tailwindcss = function(_, opts) - local tw = require("lspconfig.server_configurations.tailwindcss") + local tw = LazyVim.lsp.get_raw_config("tailwindcss") opts.filetypes = opts.filetypes or {} -- Add default filetypes diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 9c35707817..517d0ebc83 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -45,9 +45,14 @@ import TabItem from '@theme/TabItem'; opts = { -- make sure mason installs the server servers = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = { enabled = false, }, + ts_ls = { + enabled = false, + }, vtsls = { -- explicitly add default filetypes, so that we can extend -- them in related extras @@ -140,10 +145,16 @@ opts = { }, }, setup = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = function() -- disable tsserver return true end, + ts_ls = function() + -- disable tsserver + return true + end, vtsls = function(_, opts) LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) @@ -214,9 +225,14 @@ opts = { opts = { -- make sure mason installs the server servers = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = { enabled = false, }, + ts_ls = { + enabled = false, + }, vtsls = { -- explicitly add default filetypes, so that we can extend -- them in related extras @@ -309,10 +325,16 @@ opts = { }, }, setup = { + --- @deprecated -- tsserver renamed to ts_ls but not yet released, so keep this for now + --- the proper approach is to check the nvim-lspconfig release version when it's released to determine the server name dynamically tsserver = function() -- disable tsserver return true end, + ts_ls = function() + -- disable tsserver + return true + end, vtsls = function(_, opts) LazyVim.lsp.on_attach(function(client, buffer) client.commands["_typescript.moveToFileRefactoring"] = function(command, ctx) From 65dde8e01fdc07189c0994e96d01f0fdc37ed702 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 2 Oct 2024 09:20:14 +0000 Subject: [PATCH 290/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 7e4a56d1e8..b1d3ded2f0 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -194,7 +194,7 @@ opts = { ```lua { "mrcjkb/rustaceanvim", - version = "^4", -- Recommended + version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false, ft = { "rust" }, opts = { server = { From 1642002eea6e4cf60e7267a2dc276c1507710396 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 3 Oct 2024 14:18:33 +0000 Subject: [PATCH 291/553] chore(build): auto-generate docs --- docs/configuration/general.md | 6 +++++- docs/extras/lang/tex.md | 2 +- docs/keymaps.md | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 36c200e9a1..f5c7ee4807 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -92,6 +92,10 @@ vim.g.lazyvim_statuscolumn = { -- * powershell -- LazyVim.terminal.setup("pwsh") +-- Set LSP servers to be ignored when used with `util.root.detectors.lsp` +-- for detecting the LSP root +vim.g.root_lsp_ignore = { "copilot" } + -- Hide deprecation warnings vim.g.deprecation_warnings = false @@ -483,7 +487,7 @@ vim.api.nvim_create_autocmd("FileType", { "neotest-summary", "neotest-output-panel", "dbout", - "gitsigns.blame", + "gitsigns-blame", }, callback = function(event) vim.bo[event.buf].buflisted = false diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index 44247b2a52..03a76a6d1b 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -105,7 +105,7 @@ opts = {} vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" end, keys = { - { "l", "", desc = "+vimtext" }, + { "l", "", desc = "+vimtex" }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index d8f5353e7c..7175e314e1 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -634,7 +634,7 @@ Part of [lazyvim.plugins.extras.lang.tex](/extras/lang/tex) | Key | Description | Mode | | --- | --- | --- | -| <localLeader>l | +vimtext | **n** | +| <localLeader>l | +vimtex | **n** | ## [neotest](https://github.com/nvim-neotest/neotest.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) From 25af26046a30be110f0aa19c87ad2a1a1e53ce45 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 4 Oct 2024 22:17:25 +0000 Subject: [PATCH 292/553] chore(build): auto-generate docs --- docs/extras/test/core.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 6bd42d1b1e..aeb4e96ce0 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -175,7 +175,7 @@ opts = { adapter.adapter(config) adapter = adapter.adapter elseif meta and meta.__call then - adapter(config) + adapter = adapter(config) else error("Adapter " .. name .. " does not support setup") end From 11c4307fb9d4775008d2919d4fac25f82d113974 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 22 Oct 2024 09:20:23 +0000 Subject: [PATCH 293/553] chore(build): auto-generate docs --- docs/configuration/examples.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/configuration/examples.md b/docs/configuration/examples.md index 866fad0487..e6e35290d8 100644 --- a/docs/configuration/examples.md +++ b/docs/configuration/examples.md @@ -162,7 +162,11 @@ return { "nvim-lualine/lualine.nvim", event = "VeryLazy", opts = function(_, opts) - table.insert(opts.sections.lualine_x, "😄") + table.insert(opts.sections.lualine_x, { + function() + return "😄" + end, + }) end, }, From a577757821a47f46aec50ea27e786ce4322a2304 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Oct 2024 10:20:12 +0000 Subject: [PATCH 294/553] chore(build): auto-generate docs --- docs/configuration/general.md | 8 +- docs/extras/coding/tabnine.md | 1 + docs/extras/lang/python.md | 65 +++++++------- docs/extras/lang/rust.md | 95 ++++++++++----------- docs/extras/lang/tailwind.md | 49 +++++------ docs/plugins/coding.md | 154 +++++++++++++++++----------------- docs/plugins/colorscheme.md | 46 ++++++++++ 7 files changed, 235 insertions(+), 183 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index f5c7ee4807..5289d70411 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -230,12 +230,12 @@ map("n", "", "vertical resize -2", { desc = "Decrease Window Wi map("n", "", "vertical resize +2", { desc = "Increase Window Width" }) -- Move Lines -map("n", "", "m .+1==", { desc = "Move Down" }) -map("n", "", "m .-2==", { desc = "Move Up" }) +map("n", "", "execute 'move .+' . v:count1==", { desc = "Move Down" }) +map("n", "", "execute 'move .-' . (v:count1 + 1)==", { desc = "Move Up" }) map("i", "", "m .+1==gi", { desc = "Move Down" }) map("i", "", "m .-2==gi", { desc = "Move Up" }) -map("v", "", ":m '>+1gv=gv", { desc = "Move Down" }) -map("v", "", ":m '<-2gv=gv", { desc = "Move Up" }) +map("v", "", ":execute \"'<,'>move '>+\" . v:count1gv=gv", { desc = "Move Down" }) +map("v", "", ":execute \"'<,'>move '<-\" . (v:count1 + 1)gv=gv", { desc = "Move Up" }) -- buffers map("n", "", "bprevious", { desc = "Prev Buffer" }) diff --git a/docs/extras/coding/tabnine.md b/docs/extras/coding/tabnine.md index 5778ff30c3..cdba24d111 100644 --- a/docs/extras/coding/tabnine.md +++ b/docs/extras/coding/tabnine.md @@ -66,6 +66,7 @@ end ```lua { "nvim-cmp", + optional = true, dependencies = { { "tzachar/cmp-tabnine", diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index f254573039..7f611d75ba 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -312,38 +312,6 @@ opts = { -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - - - - -```lua -opts = function(_, opts) - opts.auto_brackets = opts.auto_brackets or {} - table.insert(opts.auto_brackets, "python") -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - opts = function(_, opts) - opts.auto_brackets = opts.auto_brackets or {} - table.insert(opts.auto_brackets, "python") - end, -} -``` - - - - - ## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ @@ -431,6 +399,39 @@ opts = nil +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.auto_brackets = opts.auto_brackets or {} + table.insert(opts.auto_brackets, "python") +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + opts = function(_, opts) + opts.auto_brackets = opts.auto_brackets or {} + table.insert(opts.auto_brackets, "python") + end, +} +``` + + + + + ## [mason-nvim-dap.nvim](https://github.com/jay-babu/mason-nvim-dap.nvim) _(optional)_ Don't mess up DAP adapters provided by nvim-dap-python diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index b1d3ded2f0..adcdaf7353 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -32,53 +32,6 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - Extend auto completion - - - - - - -```lua -opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { name = "crates" }) -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - dependencies = { - { - "Saecki/crates.nvim", - event = { "BufRead Cargo.toml" }, - opts = { - completion = { - cmp = { enabled = true }, - }, - }, - }, - }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { name = "crates" }) - end, -} -``` - - - - - ## [crates.nvim](https://github.com/Saecki/crates.nvim) @@ -311,6 +264,54 @@ opts = { +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + Extend auto completion + + + + + + +```lua +opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { name = "crates" }) +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { + { + "Saecki/crates.nvim", + event = { "BufRead Cargo.toml" }, + opts = { + completion = { + cmp = { enabled = true }, + }, + }, + }, + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { name = "crates" }) + end, +} +``` + + + + + ## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ Ensure Rust debugger is installed diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 672808d6d0..9eeb232328 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -138,7 +138,30 @@ opts = { -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [tailwindcss-colorizer-cmp.nvim](https://github.com/roobert/tailwindcss-colorizer-cmp.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} } +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ @@ -163,6 +186,7 @@ end ```lua { "hrsh7th/nvim-cmp", + optional = true, dependencies = { { "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} }, }, @@ -181,27 +205,4 @@ end -## [tailwindcss-colorizer-cmp.nvim](https://github.com/roobert/tailwindcss-colorizer-cmp.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ "roobert/tailwindcss-colorizer-cmp.nvim", opts = {} } -``` - - - - - diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index b79e26daff..c064d280a7 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -242,82 +242,6 @@ opts = nil -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - snippets - - - - - - -```lua -opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end -end -``` - - - - - - -```lua -{ - "nvim-cmp", - dependencies = { - { - "garymjr/nvim-snippets", - opts = { - friendly_snippets = true, - }, - dependencies = { "rafamadriz/friendly-snippets" }, - }, - }, - opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end - end, - keys = { - { - "", - function() - return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - { - "", - function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - }, -} -``` - - - - - ## [nvim-snippets](https://github.com/garymjr/nvim-snippets) @@ -607,6 +531,83 @@ opts = nil +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + snippets + + + + + + +```lua +opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end +end +``` + + + + + + +```lua +{ + "nvim-cmp", + optional = true, + dependencies = { + { + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + }, + dependencies = { "rafamadriz/friendly-snippets" }, + }, + }, + opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end + end, + keys = { + { + "", + function() + return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" + end, + expr = true, + silent = true, + mode = { "i", "s" }, + }, + { + "", + function() + return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" + end, + expr = true, + silent = true, + mode = { "i", "s" }, + }, + }, +} +``` + + + + + ## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) Add lazydev source to cmp @@ -630,6 +631,7 @@ end ```lua { "hrsh7th/nvim-cmp", + optional = true, opts = function(_, opts) table.insert(opts.sources, { name = "lazydev", group_index = 0 }) end, diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index 16a8c5891f..71d745ab1e 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -150,6 +150,52 @@ opts = { which_key = true, }, }, + specs = { + { + "akinsho/bufferline.nvim", + optional = true, + opts = function(_, opts) + if vim.g.colors_name:find("catppuccin") then + opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + end + end, + }, + }, +} +``` + + + + + +## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + if vim.g.colors_name:find("catppuccin") then + opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + end +end +``` + + + + + + +```lua +{ + "akinsho/bufferline.nvim", + optional = true, + opts = function(_, opts) + if vim.g.colors_name:find("catppuccin") then + opts.highlights = require("catppuccin.groups.integrations.bufferline").get() + end + end, } ``` From 68cdf233906f696b7d2b86f96b8a49cddeb64bf3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 23 Oct 2024 14:18:07 +0000 Subject: [PATCH 295/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index a44f6fcb3f..c29e1603e6 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -106,11 +106,6 @@ opts = {} vscode.json_decode = function(str) return vim.json.decode(json.json_strip_comments(str)) end - - -- Extends dap.configurations with entries read from .vscode/launch.json - if vim.fn.filereadable(".vscode/launch.json") then - vscode.load_launchjs() - end end, } ``` From 52035fed6663c70ebb0569eda56dc1ce651ed673 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Oct 2024 06:28:03 +0000 Subject: [PATCH 296/553] chore(build): auto-generate docs --- docs/plugins/colorscheme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index 71d745ab1e..68f26ef78b 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -155,7 +155,7 @@ opts = { "akinsho/bufferline.nvim", optional = true, opts = function(_, opts) - if vim.g.colors_name:find("catppuccin") then + if (vim.g.colors_name or ""):find("catppuccin") then opts.highlights = require("catppuccin.groups.integrations.bufferline").get() end end, @@ -176,7 +176,7 @@ opts = { ```lua opts = function(_, opts) - if vim.g.colors_name:find("catppuccin") then + if (vim.g.colors_name or ""):find("catppuccin") then opts.highlights = require("catppuccin.groups.integrations.bufferline").get() end end @@ -192,7 +192,7 @@ end "akinsho/bufferline.nvim", optional = true, opts = function(_, opts) - if vim.g.colors_name:find("catppuccin") then + if (vim.g.colors_name or ""):find("catppuccin") then opts.highlights = require("catppuccin.groups.integrations.bufferline").get() end end, From a10f824899cc35cdcef49a0ae471ba93426afb30 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Oct 2024 07:18:14 +0000 Subject: [PATCH 297/553] chore(build): auto-generate docs --- docs/configuration/general.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 5289d70411..1d97dc0150 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -491,11 +491,13 @@ vim.api.nvim_create_autocmd("FileType", { }, callback = function(event) vim.bo[event.buf].buflisted = false - vim.keymap.set("n", "q", "close", { - buffer = event.buf, - silent = true, - desc = "Quit buffer", - }) + vim.schedule(function() + vim.keymap.set("n", "q", ":bd", { + buffer = event.buf, + silent = true, + desc = "Quit buffer", + }) + end) end, }) From f65087d021f6cb81572b447e944e6ba700ff2d04 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Oct 2024 08:25:15 +0000 Subject: [PATCH 298/553] chore(build): auto-generate docs --- docs/configuration/general.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 1d97dc0150..5ba06214a6 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -492,7 +492,9 @@ vim.api.nvim_create_autocmd("FileType", { callback = function(event) vim.bo[event.buf].buflisted = false vim.schedule(function() - vim.keymap.set("n", "q", ":bd", { + vim.keymap.set("n", "q", function() + vim.api.nvim_buf_delete(event.buf, { force = true }) + end, { buffer = event.buf, silent = true, desc = "Quit buffer", From 549a56022df3f432c2d6ac6c70897f14f2658f4b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 24 Oct 2024 15:20:19 +0000 Subject: [PATCH 299/553] chore(build): auto-generate docs --- docs/configuration/general.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 5ba06214a6..d8cd9aad93 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -493,7 +493,8 @@ vim.api.nvim_create_autocmd("FileType", { vim.bo[event.buf].buflisted = false vim.schedule(function() vim.keymap.set("n", "q", function() - vim.api.nvim_buf_delete(event.buf, { force = true }) + vim.cmd("close") + pcall(vim.api.nvim_buf_delete, event.buf, { force = true }) end, { buffer = event.buf, silent = true, From 7d19b50d01cea5c2878d77bd2bc74bc76eda9be7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 1 Nov 2024 22:17:49 +0000 Subject: [PATCH 300/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index d8cd9aad93..be203e1bcf 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -344,7 +344,7 @@ map("n", "gB", LazyVim.lazygit.browse, { desc = "Git Browse" }) map("n", "gf", function() local git_path = vim.api.nvim_buf_get_name(0) - LazyVim.lazygit({args = { "-f", vim.trim(git_path) }}) + LazyVim.lazygit({args = { "-f", vim.trim(git_path) }, cwd = LazyVim.root.git()}) end, { desc = "Lazygit Current File History" }) map("n", "gl", function() From b04cd0ff0f46a30952a35d98c24489f4a38a89e6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 2 Nov 2024 09:18:17 +0000 Subject: [PATCH 301/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 282 ++++++++++++++++++++++++++++++++++ docs/extras/coding/copilot.md | 121 +++++++++++++++ docs/extras/lang/rust.md | 103 +++---------- docs/plugins/lsp.md | 2 + 4 files changed, 428 insertions(+), 80 deletions(-) create mode 100644 docs/extras/coding/blink.md diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md new file mode 100644 index 0000000000..370eee3d23 --- /dev/null +++ b/docs/extras/coding/blink.md @@ -0,0 +1,282 @@ +# `Blink` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.blink" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [blink.cmp](https://github.com/saghen/blink.cmp) + + + + + +```lua +opts = { + fuzzy = { + prebuilt_binaries = { + download = true, + force_version = "v0.5.0", + }, + }, + highlight = { + -- sets the fallback highlight groups to nvim-cmp's highlight groups + -- useful for when your theme doesn't support blink.cmp + -- will be removed in a future release, assuming themes add support + use_nvim_cmp_as_default = false, + }, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + windows = { + autocomplete = { + draw = "reversed", + }, + documentation = { + auto_show = true, + }, + ghost_text = { + enabled = true, + }, + }, + + -- experimental auto-brackets support + accept = { auto_brackets = { enabled = true } }, + + -- experimental signature help support + -- trigger = { signature_help = { enabled = true } } + sources = { + completion = { + -- remember to enable your providers here + enabled_providers = { "lsp", "path", "snippets", "buffer" }, + }, + }, + + keymap = { + preset = "enter", + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + -- TODO: use release version + -- version = "*", + opts_extend = { "sources.completion.enabled_providers" }, + dependencies = { + "rafamadriz/friendly-snippets", + -- add blink.compat to dependencies + -- { "saghen/blink.compat", opts = {} }, + }, + event = "InsertEnter", + + ---@module 'blink.cmp' + ---@type blink.cmp.Config + opts = { + fuzzy = { + prebuilt_binaries = { + download = true, + force_version = "v0.5.0", + }, + }, + highlight = { + -- sets the fallback highlight groups to nvim-cmp's highlight groups + -- useful for when your theme doesn't support blink.cmp + -- will be removed in a future release, assuming themes add support + use_nvim_cmp_as_default = false, + }, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + windows = { + autocomplete = { + draw = "reversed", + }, + documentation = { + auto_show = true, + }, + ghost_text = { + enabled = true, + }, + }, + + -- experimental auto-brackets support + accept = { auto_brackets = { enabled = true } }, + + -- experimental signature help support + -- trigger = { signature_help = { enabled = true } } + sources = { + completion = { + -- remember to enable your providers here + enabled_providers = { "lsp", "path", "snippets", "buffer" }, + }, + }, + + keymap = { + preset = "enter", + }, + }, +} +``` + + + + + +## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "rafamadriz/friendly-snippets", + -- add blink.compat to dependencies + -- { "saghen/blink.compat", opts = {} }, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) + + add icons + + + + + + +```lua +opts = function(_, opts) + opts.kind_icons = LazyVim.config.icons.kinds +end +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + opts = function(_, opts) + opts.kind_icons = LazyVim.config.icons.kinds + end, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) + + lazydev + + + + + + +```lua +opts = { + sources = { + completion = { + -- add lazydev to your completion providers + enabled_providers = { "lazydev" }, + }, + providers = { + lsp = { + -- dont show LuaLS require statements when lazydev has items + fallback_for = { "lazydev" }, + }, + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + }, + }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + opts = { + sources = { + completion = { + -- add lazydev to your completion providers + enabled_providers = { "lazydev" }, + }, + providers = { + lsp = { + -- dont show LuaLS require statements when lazydev has items + fallback_for = { "lazydev" }, + }, + lazydev = { + name = "LazyDev", + module = "lazydev.integrations.blink", + }, + }, + }, + }, +} +``` + + + + + + diff --git a/docs/extras/coding/copilot.md b/docs/extras/coding/copilot.md index a7e5afd4e6..bdb744252c 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/coding/copilot.md @@ -171,6 +171,45 @@ opts = {}
+## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) + + + + + +```lua +opts = { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { accept = false }, + }, +} +``` + + + + + + +```lua +{ + "zbirenbaum/copilot.lua", + event = "InsertEnter", + opts = { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { accept = false }, + }, + }, +} +``` + + + + + ## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ @@ -261,4 +300,86 @@ end +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + + + + +```lua +opts = { + windows = { + ghost_text = { + enabled = false, + }, + }, + keymap = { + [""] = { + function(cmp) + if cmp.is_in_snippet() then + return cmp.accept() + elseif require("copilot.suggestion").is_visible() then + require("copilot.suggestion").accept() + else + return cmp.select_and_accept() + end + end, + "snippet_forward", + "fallback", + }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + specs = { + { + "zbirenbaum/copilot.lua", + event = "InsertEnter", + opts = { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { accept = false }, + }, + }, + }, + }, + opts = { + windows = { + ghost_text = { + enabled = false, + }, + }, + keymap = { + [""] = { + function(cmp) + if cmp.is_in_snippet() then + return cmp.accept() + elseif require("copilot.suggestion").is_visible() then + require("copilot.suggestion").accept() + else + return cmp.select_and_accept() + end + end, + "snippet_forward", + "fallback", + }, + }, + }, +} +``` + + + + + diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index adcdaf7353..f97ab3ea11 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -34,6 +34,9 @@ import TabItem from '@theme/TabItem'; ## [crates.nvim](https://github.com/Saecki/crates.nvim) + LSP for Cargo.toml + + @@ -41,7 +44,15 @@ import TabItem from '@theme/TabItem'; ```lua opts = { completion = { - cmp = { enabled = true }, + crates = { + enabled = true, + }, + }, + lsp = { + enabled = true, + actions = true, + completion = true, + hover = true, }, } ``` @@ -57,7 +68,15 @@ opts = { event = { "BufRead Cargo.toml" }, opts = { completion = { - cmp = { enabled = true }, + crates = { + enabled = true, + }, + }, + lsp = { + enabled = true, + actions = true, + completion = true, + hover = true, }, }, } @@ -211,21 +230,7 @@ opts = { ```lua opts = { servers = { - taplo = { - keys = { - { - "K", - function() - if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then - require("crates").show_popup() - else - vim.lsp.buf.hover() - end - end, - desc = "Show Crate Documentation", - }, - }, - }, + rust_analyzer = { enabled = false }, }, } ``` @@ -240,71 +245,9 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - taplo = { - keys = { - { - "K", - function() - if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then - require("crates").show_popup() - else - vim.lsp.buf.hover() - end - end, - desc = "Show Crate Documentation", - }, - }, - }, - }, - }, -} -``` - - - - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ - - Extend auto completion - - - - - - -```lua -opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { name = "crates" }) -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - optional = true, - dependencies = { - { - "Saecki/crates.nvim", - event = { "BufRead Cargo.toml" }, - opts = { - completion = { - cmp = { enabled = true }, - }, - }, + rust_analyzer = { enabled = false }, }, }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { name = "crates" }) - end, } ``` diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index d4483c5419..845228fe9f 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -338,11 +338,13 @@ end 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 {}, opts.capabilities or {} ) From a9a4f8b3d34eef512fd801a029e20ad97a4ef835 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 2 Nov 2024 17:15:30 +0000 Subject: [PATCH 302/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 3 +++ docs/extras/coding/copilot.md | 2 ++ 2 files changed, 5 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 370eee3d23..29eb99ad7d 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -58,6 +58,7 @@ opts = { windows = { autocomplete = { draw = "reversed", + winblend = vim.o.pumblend, }, documentation = { auto_show = true, @@ -95,6 +96,7 @@ opts = { "saghen/blink.cmp", -- TODO: use release version -- version = "*", + version = false, opts_extend = { "sources.completion.enabled_providers" }, dependencies = { "rafamadriz/friendly-snippets", @@ -124,6 +126,7 @@ opts = { windows = { autocomplete = { draw = "reversed", + winblend = vim.o.pumblend, }, documentation = { auto_show = true, diff --git a/docs/extras/coding/copilot.md b/docs/extras/coding/copilot.md index bdb744252c..ece06a1778 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/coding/copilot.md @@ -319,6 +319,7 @@ opts = { if cmp.is_in_snippet() then return cmp.accept() elseif require("copilot.suggestion").is_visible() then + LazyVim.create_undo() require("copilot.suggestion").accept() else return cmp.select_and_accept() @@ -365,6 +366,7 @@ opts = { if cmp.is_in_snippet() then return cmp.accept() elseif require("copilot.suggestion").is_visible() then + LazyVim.create_undo() require("copilot.suggestion").accept() else return cmp.select_and_accept() From f28e4fba1cd9a7e320d41512664ef4ca8f945558 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 2 Nov 2024 18:23:52 +0000 Subject: [PATCH 303/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index be203e1bcf..bb5580909c 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -437,7 +437,7 @@ vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { vim.api.nvim_create_autocmd("TextYankPost", { group = augroup("highlight_yank"), callback = function() - vim.highlight.on_yank() + (vim.hl or vim.highlight).on_yank() end, }) From 617d1beac8f120e7d6b4d0016a420004eff25d45 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 3 Nov 2024 12:34:41 +0000 Subject: [PATCH 304/553] chore(build): auto-generate docs --- docs/extras/coding/copilot.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/copilot.md b/docs/extras/coding/copilot.md index ece06a1778..ae692a3a7b 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/coding/copilot.md @@ -321,6 +321,7 @@ opts = { elseif require("copilot.suggestion").is_visible() then LazyVim.create_undo() require("copilot.suggestion").accept() + return true else return cmp.select_and_accept() end @@ -368,6 +369,7 @@ opts = { elseif require("copilot.suggestion").is_visible() then LazyVim.create_undo() require("copilot.suggestion").accept() + return true else return cmp.select_and_accept() end From 75d317792790c59df5eb919fb8becbfab1ceecdb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 3 Nov 2024 15:18:20 +0000 Subject: [PATCH 305/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 29eb99ad7d..4dc8ee123f 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -40,12 +40,6 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - fuzzy = { - prebuilt_binaries = { - download = true, - force_version = "v0.5.0", - }, - }, highlight = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp @@ -94,9 +88,7 @@ opts = { ```lua { "saghen/blink.cmp", - -- TODO: use release version - -- version = "*", - version = false, + version = "*", opts_extend = { "sources.completion.enabled_providers" }, dependencies = { "rafamadriz/friendly-snippets", @@ -108,12 +100,6 @@ opts = { ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { - fuzzy = { - prebuilt_binaries = { - download = true, - force_version = "v0.5.0", - }, - }, highlight = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp From 5b81eac2c851ca45d0a0d670035ea0c8e4f3bff3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 15:19:43 +0000 Subject: [PATCH 306/553] chore(build): auto-generate docs --- docs/configuration/general.md | 128 +++++++-------------------- docs/extras/coding/copilot-chat.md | 4 +- docs/extras/editor/dial.md | 24 ++--- docs/extras/editor/mini-files.md | 2 +- docs/extras/editor/telescope.md | 8 +- docs/extras/formatting/prettier.md | 6 +- docs/extras/lang/markdown.md | 4 +- docs/extras/lang/nushell.md | 58 +----------- docs/extras/ui/edgy.md | 50 +++++++---- docs/extras/ui/mini-animate.md | 8 +- docs/extras/ui/mini-indentscope.md | 6 +- docs/extras/ui/treesitter-context.md | 12 +-- docs/extras/util/gitui.md | 4 +- docs/keymaps.md | 25 +++--- docs/news.md | 14 +++ docs/plugins/coding.md | 2 + docs/plugins/editor.md | 2 +- docs/plugins/lsp.md | 2 - docs/plugins/ui.md | 110 +++++------------------ 19 files changed, 161 insertions(+), 308 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index bb5580909c..78950f1891 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -70,22 +70,6 @@ vim.g.lazyvim_picker = "auto" -- * a function with signature `function(buf) -> string|string[]` vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" } --- LazyVim automatically configures lazygit: --- * theme, based on the active colorscheme. --- * editPreset to nvim-remote --- * enables nerd font icons --- Set to false to disable. --- Set the options you want to override in `~/.config/lazygit/custom.yml` --- WARN: on Windows you might want to set `editPreset: "nvim"` due to --- this issue https://github.com/jesseduffield/lazygit/issues/3467 -vim.g.lazygit_config = true - --- Options for the LazyVim statuscolumn -vim.g.lazyvim_statuscolumn = { - folds_open = false, -- show fold sign when fold is open - folds_githl = false, -- highlight fold sign with git sign color -} - -- Optionally setup the terminal to use -- This sets `vim.o.shell` and does some additional configuration for: -- * pwsh @@ -99,12 +83,6 @@ vim.g.root_lsp_ignore = { "copilot" } -- Hide deprecation warnings vim.g.deprecation_warnings = false --- Set filetype to `bigfile` for files larger than 1.5 MB --- Only vim syntax will be enabled (with the correct filetype) --- LSP, treesitter and other ft plugins will be disabled. --- mini.animate will also be disabled. -vim.g.bigfile_size = 1024 * 1024 * 1.5 -- 1.5 MB - -- Show the current document symbols location from Trouble in lualine -- You can disable this for a buffer by setting `vim.b.trouble_lualine = false` vim.g.trouble_lualine = true @@ -159,7 +137,6 @@ opt.spelloptions:append("noplainbuffer") 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'lazyvim.util'.ui.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 @@ -244,7 +221,9 @@ map("n", "[b", "bprevious", { desc = "Prev Buffer" }) map("n", "]b", "bnext", { desc = "Next Buffer" }) map("n", "bb", "e #", { desc = "Switch to Other Buffer" }) map("n", "`", "e #", { desc = "Switch to Other Buffer" }) -map("n", "bd", LazyVim.ui.bufremove, { desc = "Delete Buffer" }) +map("n", "bd", function() + Snacks.bufdelete() +end, { desc = "Delete Buffer" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) -- Clear search with @@ -322,37 +301,28 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" }) -- stylua: ignore start -- toggle options -LazyVim.toggle.map("uf", LazyVim.toggle.format()) -LazyVim.toggle.map("uF", LazyVim.toggle.format(true)) -LazyVim.toggle.map("us", LazyVim.toggle("spell", { name = "Spelling" })) -LazyVim.toggle.map("uw", LazyVim.toggle("wrap", { name = "Wrap" })) -LazyVim.toggle.map("uL", LazyVim.toggle("relativenumber", { name = "Relative Number" })) -LazyVim.toggle.map("ud", LazyVim.toggle.diagnostics) -LazyVim.toggle.map("ul", LazyVim.toggle.number) -LazyVim.toggle.map( "uc", LazyVim.toggle("conceallevel", { values = { 0, vim.o.conceallevel > 0 and vim.o.conceallevel or 2 } })) -LazyVim.toggle.map("uT", LazyVim.toggle.treesitter) -LazyVim.toggle.map("ub", LazyVim.toggle("background", { values = { "light", "dark" }, name = "Background" })) +LazyVim.format.snacks_toggle():map("uf") +LazyVim.format.snacks_toggle(true):map("uF") +Snacks.toggle.option("spell", { name = "Spelling"}):map("us") +Snacks.toggle.option("wrap", {name = "Wrap"}):map("uw") +Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("uL") +Snacks.toggle.diagnostics():map("ud") +Snacks.toggle.line_number():map("ul") +Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("uc") +Snacks.toggle.treesitter():map("uT") +Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("ub") if vim.lsp.inlay_hint then - LazyVim.toggle.map("uh", LazyVim.toggle.inlay_hints) + Snacks.toggle.inlay_hints():map("uh") end -- lazygit -map("n", "gg", function() LazyVim.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) -map("n", "gG", function() LazyVim.lazygit() end, { desc = "Lazygit (cwd)" }) -map("n", "gb", LazyVim.lazygit.blame_line, { desc = "Git Blame Line" }) -map("n", "gB", LazyVim.lazygit.browse, { desc = "Git Browse" }) - -map("n", "gf", function() - local git_path = vim.api.nvim_buf_get_name(0) - LazyVim.lazygit({args = { "-f", vim.trim(git_path) }, cwd = LazyVim.root.git()}) -end, { desc = "Lazygit Current File History" }) - -map("n", "gl", function() - LazyVim.lazygit({ args = { "log" }, cwd = LazyVim.root.git() }) -end, { desc = "Lazygit Log" }) -map("n", "gL", function() - LazyVim.lazygit({ args = { "log" } }) -end, { desc = "Lazygit Log (cwd)" }) +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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map("n", "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) +map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) +map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) +map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) -- quit map("n", "qq", "qa", { desc = "Quit All" }) @@ -365,18 +335,12 @@ map("n", "uI", "InspectTree", { desc = "Inspect Tree" }) map("n", "L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" }) -- floating terminal -local lazyterm = function() LazyVim.terminal(nil, { cwd = LazyVim.root() }) end -map("n", "ft", lazyterm, { desc = "Terminal (Root Dir)" }) -map("n", "fT", function() LazyVim.terminal() end, { desc = "Terminal (cwd)" }) -map("n", "", lazyterm, { desc = "Terminal (Root Dir)" }) -map("n", "", lazyterm, { desc = "which_key_ignore" }) +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", "", "", { desc = "Enter Normal Mode" }) -map("t", "", "wincmd h", { desc = "Go to Left Window" }) -map("t", "", "wincmd j", { desc = "Go to Lower Window" }) -map("t", "", "wincmd k", { desc = "Go to Upper Window" }) -map("t", "", "wincmd l", { desc = "Go to Right Window" }) map("t", "", "close", { desc = "Hide Terminal" }) map("t", "", "close", { desc = "which_key_ignore" }) @@ -385,7 +349,7 @@ map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wd", "c", { desc = "Delete Window", remap = true }) -LazyVim.toggle.map("wm", LazyVim.toggle.maximize) +LazyVim.ui.maximize():map("wm") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) @@ -474,20 +438,22 @@ vim.api.nvim_create_autocmd("FileType", { group = augroup("close_with_q"), pattern = { "PlenaryTestPopup", + "checkhealth", + "dbout", + "gitsigns-blame", "grug-far", "help", "lspinfo", + "neotest-output", + "neotest-output-panel", + "neotest-summary", "notify", "qf", + "snacks_win", + "snacks_notif", "spectre_panel", "startuptime", "tsplayground", - "neotest-output", - "checkhealth", - "neotest-summary", - "neotest-output-panel", - "dbout", - "gitsigns-blame", }, callback = function(event) vim.bo[event.buf].buflisted = false @@ -544,32 +510,6 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { end, }) -vim.filetype.add({ - pattern = { - [".*"] = { - function(path, buf) - return vim.bo[buf] - and vim.bo[buf].filetype ~= "bigfile" - and path - and vim.fn.getfsize(path) > vim.g.bigfile_size - and "bigfile" - or nil - end, - }, - }, -}) - -vim.api.nvim_create_autocmd({ "FileType" }, { - group = augroup("bigfile"), - pattern = "bigfile", - callback = function(ev) - vim.b.minianimate_disable = true - vim.schedule(function() - vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or "" - end) - end, -}) - ``` diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/coding/copilot-chat.md index cd03aa43f2..324df5103a 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/coding/copilot-chat.md @@ -122,7 +122,9 @@ end }, config = function(_, opts) local chat = require("CopilotChat") - require("CopilotChat.integrations.cmp").setup() + if pcall(require, "cmp") then + require("CopilotChat.integrations.cmp").setup() + end vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 6b551b6849..43abea790b 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -137,17 +137,17 @@ opts = function() months, }, typescript = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, augend.constant.new({ elements = { "let", "const" } }), }, yaml = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) }, css = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.hexcolor.new({ case = "lower", }), @@ -159,11 +159,11 @@ opts = function() augend.misc.alias.markdown_header, }, json = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.semver.alias.semver, -- versioning (v1.1.2) }, lua = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) augend.constant.new({ elements = { "and", "or" }, @@ -172,7 +172,7 @@ opts = function() }), }, python = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number capitalized_boolean, logical_alias, }, @@ -296,17 +296,17 @@ end months, }, typescript = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, augend.constant.new({ elements = { "let", "const" } }), }, yaml = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) }, css = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.hexcolor.new({ case = "lower", }), @@ -318,11 +318,11 @@ end augend.misc.alias.markdown_header, }, json = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.semver.alias.semver, -- versioning (v1.1.2) }, lua = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) augend.constant.new({ elements = { "and", "or" }, @@ -331,7 +331,7 @@ end }), }, python = { - augend.integer.alias.decimal, -- nonnegative and negative decimal number + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number capitalized_boolean, logical_alias, }, diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 6db54c1820..0c5a95b0dd 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -165,7 +165,7 @@ opts = { vim.api.nvim_create_autocmd("User", { pattern = "MiniFilesActionRename", callback = function(event) - LazyVim.lsp.on_rename(event.data.from, event.data.to) + Snacks.rename.on_rename_file(event.data.from, event.data.to) end, }) end, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index e7c5b3404d..20c9b6e7db 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -145,9 +145,9 @@ end dependencies = { { "nvim-telescope/telescope-fzf-native.nvim", - build = have_make and "make" + build = (build_cmd ~= "cmake") and "make" or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = have_make or have_cmake, + enabled = build_cmd ~= nil, config = function(plugin) LazyVim.on_load("telescope.nvim", function() local ok, err = pcall(require("telescope").load_extension, "fzf") @@ -451,9 +451,9 @@ opts = {} ```lua { "nvim-telescope/telescope-fzf-native.nvim", - build = have_make and "make" + build = (build_cmd ~= "cmake") and "make" or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = have_make or have_cmake, + enabled = build_cmd ~= nil, config = function(plugin) LazyVim.on_load("telescope.nvim", function() local ok, err = pcall(require("telescope").load_extension, "fzf") diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index 4568b35f25..7a24a9ab17 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -81,7 +81,8 @@ opts = { ensure_installed = { "prettier" } } opts = function(_, opts) opts.formatters_by_ft = opts.formatters_by_ft or {} for _, ft in ipairs(supported) do - opts.formatters_by_ft[ft] = { "prettier" } + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "prettier") end opts.formatters = opts.formatters or {} @@ -106,7 +107,8 @@ end opts = function(_, opts) opts.formatters_by_ft = opts.formatters_by_ft or {} for _, ft in ipairs(supported) do - opts.formatters_by_ft[ft] = { "prettier" } + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "prettier") end opts.formatters = opts.formatters or {} diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 27b4c206fc..3106ee4578 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -201,7 +201,7 @@ opts = { ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) require("render-markdown").setup(opts) - LazyVim.toggle.map("um", { + Snacks.toggle({ name = "Render Markdown", get = function() return require("render-markdown.state").enabled @@ -214,7 +214,7 @@ opts = { m.disable() end end, - }) + }):map("um") end, } ``` diff --git a/docs/extras/lang/nushell.md b/docs/extras/lang/nushell.md index 2df522800e..5e42108889 100644 --- a/docs/extras/lang/nushell.md +++ b/docs/extras/lang/nushell.md @@ -73,21 +73,7 @@ opts = { ```lua -opts = function(_, opts) - ---@diagnostic disable-next-line: inject-field - require("nvim-treesitter.parsers").get_parser_configs().nu = { - install_info = { - url = "https://github.com/nushell/tree-sitter-nu", - files = { "src/parser.c" }, - branch = "main", - }, - filetype = "nu", - } - - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "nu" }) - end -end +opts = { ensure_installed = { "nu" } } ``` @@ -98,24 +84,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter", - dependencies = { - { "nushell/tree-sitter-nu" }, - }, - opts = function(_, opts) - ---@diagnostic disable-next-line: inject-field - require("nvim-treesitter.parsers").get_parser_configs().nu = { - install_info = { - url = "https://github.com/nushell/tree-sitter-nu", - files = { "src/parser.c" }, - branch = "main", - }, - filetype = "nu", - } - - if type(opts.ensure_installed) == "table" then - vim.list_extend(opts.ensure_installed, { "nu" }) - end - end, + opts = { ensure_installed = { "nu" } }, } ``` @@ -123,27 +92,4 @@ end -## [tree-sitter-nu](https://github.com/nushell/tree-sitter-nu) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "nushell/tree-sitter-nu" } -``` - - - - - diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index cfb1953879..42c3e4a04d 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -59,14 +59,6 @@ opts = function() return vim.api.nvim_win_get_config(win).relative == "" end, }, - { - ft = "lazyterm", - title = "LazyTerm", - size = { height = 0.4 }, - filter = function(buf) - return not vim.b[buf].lazyterm_cmd - end, - }, "Trouble", { ft = "qf", title = "QuickFix" }, { @@ -131,6 +123,7 @@ opts = function() end end + -- trouble for _, pos in ipairs({ "top", "bottom", "left", "right" }) do opts[pos] = opts[pos] or {} table.insert(opts[pos], { @@ -144,6 +137,22 @@ opts = function() end, }) end + + -- snacks terminal + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do + opts[pos] = opts[pos] or {} + table.insert(opts[pos], { + ft = "snacks_terminal", + size = { height = 0.4 }, + title = "%{b:snacks_terminal.id}: %{b:term_title}", + filter = function(_buf, win) + return vim.w[win].snacks_win + and vim.w[win].snacks_win.position == pos + and vim.w[win].snacks_win.relative == "editor" + and not vim.w[win].trouble_preview + end, + }) + end return opts end ``` @@ -185,14 +194,6 @@ end return vim.api.nvim_win_get_config(win).relative == "" end, }, - { - ft = "lazyterm", - title = "LazyTerm", - size = { height = 0.4 }, - filter = function(buf) - return not vim.b[buf].lazyterm_cmd - end, - }, "Trouble", { ft = "qf", title = "QuickFix" }, { @@ -257,6 +258,7 @@ end end end + -- trouble for _, pos in ipairs({ "top", "bottom", "left", "right" }) do opts[pos] = opts[pos] or {} table.insert(opts[pos], { @@ -270,6 +272,22 @@ end end, }) end + + -- snacks terminal + for _, pos in ipairs({ "top", "bottom", "left", "right" }) do + opts[pos] = opts[pos] or {} + table.insert(opts[pos], { + ft = "snacks_terminal", + size = { height = 0.4 }, + title = "%{b:snacks_terminal.id}: %{b:term_title}", + filter = function(_buf, win) + return vim.w[win].snacks_win + and vim.w[win].snacks_win.position == pos + and vim.w[win].snacks_win.relative == "editor" + and not vim.w[win].trouble_preview + end, + }) + end return opts end, } diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 71a5f6bb70..51d82dc615 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -57,7 +57,7 @@ opts = function() end, }) - LazyVim.toggle.map("ua", { + Snacks.toggle({ name = "Mini Animate", get = function() return not vim.g.minianimate_disable @@ -65,7 +65,7 @@ opts = function() set = function(state) vim.g.minianimate_disable = not state end, - }) + }):map("ua") local animate = require("mini.animate") return { @@ -116,7 +116,7 @@ end end, }) - LazyVim.toggle.map("ua", { + Snacks.toggle({ name = "Mini Animate", get = function() return not vim.g.minianimate_disable @@ -124,7 +124,7 @@ end set = function(state) vim.g.minianimate_disable = not state end, - }) + }):map("ua") local animate = require("mini.animate") return { diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index 1d48a7088d..4ba85547af 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -69,17 +69,19 @@ opts = { init = function() vim.api.nvim_create_autocmd("FileType", { pattern = { + "Trouble", "alpha", "dashboard", "fzf", "help", "lazy", - "lazyterm", "mason", "neo-tree", "notify", + "snacks_notif", + "snacks_terminal", + "snacks_win", "toggleterm", - "Trouble", "trouble", }, callback = function() diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md index 37675b53f0..ad54af8263 100644 --- a/docs/extras/ui/treesitter-context.md +++ b/docs/extras/ui/treesitter-context.md @@ -41,8 +41,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() local tsc = require("treesitter-context") - - LazyVim.toggle.map("ut", { + Snacks.toggle({ name = "Treesitter Context", get = tsc.enabled, set = function(state) @@ -52,8 +51,7 @@ opts = function() tsc.disable() end end, - }) - + }):map("ut") return { mode = "cursor", max_lines = 3 } end ``` @@ -69,8 +67,7 @@ end event = "VeryLazy", opts = function() local tsc = require("treesitter-context") - - LazyVim.toggle.map("ut", { + Snacks.toggle({ name = "Treesitter Context", get = tsc.enabled, set = function(state) @@ -80,8 +77,7 @@ end tsc.disable() end end, - }) - + }):map("ut") return { mode = "cursor", max_lines = 3 } end, } diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index c35275a218..424daffa82 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -58,14 +58,14 @@ opts = { ensure_installed = { "gitui" } } { "gG", function() - LazyVim.terminal.open({ "gitui" }, { esc_esc = false, ctrl_hjkl = false }) + Snacks.terminal({ "gitui" }) end, desc = "GitUi (cwd)", }, { "gg", function() - LazyVim.terminal.open({ "gitui" }, { cwd = LazyVim.root.get(), esc_esc = false, ctrl_hjkl = false }) + Snacks.terminal({ "gitui" }, { cwd = LazyVim.root.get() }) end, desc = "GitUi (Root Dir)", }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 7175e314e1..b142a722a9 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -23,10 +23,10 @@ possible keymaps starting with ``. | <Down> | Down | **n**, **x** | | k | Up | **n**, **x** | | <Up> | Up | **n**, **x** | -| <C-h> | Go to Left Window | **n**, **t** | -| <C-j> | Go to Lower Window | **n**, **t** | -| <C-k> | Go to Upper Window | **n**, **t** | -| <C-l> | Go to Right Window | **n**, **t** | +| <C-h> | Go to Left Window | **n** | +| <C-j> | Go to Lower Window | **n** | +| <C-k> | Go to Upper Window | **n** | +| <C-l> | Go to Right Window | **n** | | <C-Up> | Increase Window Height | **n** | | <C-Down> | Decrease Window Height | **n** | | <C-Left> | Decrease Window Width | **n** | @@ -72,7 +72,7 @@ possible keymaps starting with ``. | <leader>ul | Toggle Line Numbers | **n** | | <leader>uc | Toggle conceallevel | **n** | | <leader>uT | Toggle Treesitter Highlight | **n** | -| <leader>ub | Toggle Background | **n** | +| <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | | <leader>gg | Lazygit (Root Dir) | **n** | | <leader>gG | Lazygit (cwd) | **n** | @@ -85,11 +85,10 @@ possible keymaps starting with ``. | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | | <leader>L | LazyVim Changelog | **n** | -| <leader>ft | Terminal (Root Dir) | **n** | | <leader>fT | Terminal (cwd) | **n** | +| <leader>ft | Terminal (Root Dir) | **n** | | <c-/> | Terminal (Root Dir) | **n** | | <c-_> | which_key_ignore | **n**, **t** | -| <esc><esc> | Enter Normal Mode | **t** | | <C-/> | Hide Terminal | **t** | | <leader>w | Windows | **n** | | <leader>- | Split Window Below | **n** | @@ -197,12 +196,6 @@ possible keymaps starting with ``. | <leader>snt | Noice Picker (Telescope/FzfLua) | **n** | | <S-Enter> | Redirect Cmdline | **c** | -## [nvim-notify](https://github.com/rcarriga/nvim-notify.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>un | Dismiss All Notifications | **n** | - ## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git) | Key | Description | Mode | @@ -219,6 +212,12 @@ possible keymaps starting with ``. | <leader>qs | Restore Session | **n** | | <leader>qS | Select Session | **n** | +## [snacks.nvim](https://github.com/folke/snacks.nvim.git) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>un | Dismiss All Notifications | **n** | + ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) | Key | Description | Mode | diff --git a/docs/news.md b/docs/news.md index eb9298a5d3..a132b519f2 100644 --- a/docs/news.md +++ b/docs/news.md @@ -4,6 +4,20 @@ sidebar_position: 2 # 📰 What's new? +## 13.x + +- Big new release with a lot of changes and improvements! + +- The biggest change is the move of a bunch of core features to + [snacks.nvim](https://github.com/folke/snacks.nvim) and fully + integrating it into **LazyVim**. + +- I highly suggest having a look at the **snacks.nvim** documentation + to see all the new features and improvements. Most important changes: + - `Snacks.notifier` for notifications instead of `nvim-notify` + - `Snacks.terminal` is similar to `lazyterm`, but has more features + and creates bottom splits by default (similar to the `edgy` integrating) + ## 12.x - **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index c064d280a7..5719cf8a28 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -476,6 +476,7 @@ opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } }, { path = "LazyVim", words = { "LazyVim" } }, + { path = "snacks.nvim", words = { "Snacks" } }, { path = "lazy.nvim", words = { "LazyVim" } }, }, } @@ -495,6 +496,7 @@ opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } }, { path = "LazyVim", words = { "LazyVim" } }, + { path = "snacks.nvim", words = { "Snacks" } }, { path = "lazy.nvim", words = { "LazyVim" } }, }, }, diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 044ac4b6db..c8a525610c 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -177,7 +177,7 @@ opts = { }, config = function(_, opts) local function on_move(data) - LazyVim.lsp.on_rename(data.source, data.destination) + Snacks.rename.on_rename_file(data.source, data.destination) end local events = require("neo-tree.events") diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 845228fe9f..7d52c57650 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -283,8 +283,6 @@ end LazyVim.lsp.setup() LazyVim.lsp.on_dynamic_capability(require("lazyvim.plugins.lsp.keymaps").on_attach) - LazyVim.lsp.words.setup(opts.document_highlight) - -- diagnostics signs if vim.fn.has("nvim-0.10.0") == 0 then if type(opts.diagnostics.signs) ~= "boolean" then diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 3585104785..26f89605da 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -5,76 +5,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-notify](https://github.com/rcarriga/nvim-notify) - - Better `vim.notify()` - - - - - - -```lua -opts = { - stages = "static", - timeout = 3000, - max_height = function() - return math.floor(vim.o.lines * 0.75) - end, - max_width = function() - return math.floor(vim.o.columns * 0.75) - end, - on_open = function(win) - vim.api.nvim_win_set_config(win, { zindex = 100 }) - end, -} -``` - - - - - - -```lua -{ - "rcarriga/nvim-notify", - keys = { - { - "un", - function() - require("notify").dismiss({ silent = true, pending = true }) - end, - desc = "Dismiss All Notifications", - }, - }, - opts = { - stages = "static", - timeout = 3000, - max_height = function() - return math.floor(vim.o.lines * 0.75) - end, - max_width = function() - return math.floor(vim.o.columns * 0.75) - end, - on_open = function(win) - vim.api.nvim_win_set_config(win, { zindex = 100 }) - end, - }, - init = function() - -- when noice is not enabled, install notify on VeryLazy - if not LazyVim.has("noice.nvim") then - LazyVim.on_very_lazy(function() - vim.notify = require("notify") - end) - end - end, -} -``` - - - - - ## [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) This is what powers LazyVim's fancy-looking @@ -89,9 +19,9 @@ opts = { opts = { options = { -- stylua: ignore - close_command = function(n) LazyVim.ui.bufremove(n) end, + close_command = function(n) Snacks.bufdelete(n) end, -- stylua: ignore - right_mouse_command = function(n) LazyVim.ui.bufremove(n) end, + right_mouse_command = function(n) Snacks.bufdelete(n) end, diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) @@ -141,9 +71,9 @@ opts = { opts = { options = { -- stylua: ignore - close_command = function(n) LazyVim.ui.bufremove(n) end, + close_command = function(n) Snacks.bufdelete(n) end, -- stylua: ignore - right_mouse_command = function(n) LazyVim.ui.bufremove(n) end, + right_mouse_command = function(n) Snacks.bufdelete(n) end, diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) @@ -457,7 +387,7 @@ end ```lua opts = function() - LazyVim.toggle.map("ug", { + Snacks.toggle({ name = "Indention Guides", get = function() return require("ibl.config").get_config(0).enabled @@ -465,7 +395,7 @@ opts = function() set = function(state) require("ibl").setup_buffer(0, { enabled = state }) end, - }) + }):map("ug") return { indent = { @@ -475,17 +405,19 @@ opts = function() scope = { show_start = false, show_end = false }, exclude = { filetypes = { - "help", + "Trouble", "alpha", "dashboard", - "neo-tree", - "Trouble", - "trouble", + "help", "lazy", "mason", + "neo-tree", "notify", + "snacks_notif", + "snacks_terminal", + "snacks_win", "toggleterm", - "lazyterm", + "trouble", }, }, } @@ -502,7 +434,7 @@ end "lukas-reineke/indent-blankline.nvim", event = "LazyFile", opts = function() - LazyVim.toggle.map("ug", { + Snacks.toggle({ name = "Indention Guides", get = function() return require("ibl.config").get_config(0).enabled @@ -510,7 +442,7 @@ end set = function(state) require("ibl").setup_buffer(0, { enabled = state }) end, - }) + }):map("ug") return { indent = { @@ -520,17 +452,19 @@ end scope = { show_start = false, show_end = false }, exclude = { filetypes = { - "help", + "Trouble", "alpha", "dashboard", - "neo-tree", - "Trouble", - "trouble", + "help", "lazy", "mason", + "neo-tree", "notify", + "snacks_notif", + "snacks_terminal", + "snacks_win", "toggleterm", - "lazyterm", + "trouble", }, }, } From 225298df61743c4bfa43a1c448dde2206e751823 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 16:24:07 +0000 Subject: [PATCH 307/553] chore(build): auto-generate docs --- docs/configuration/general.md | 16 ++-- docs/extras/lang/zig.md | 158 ++++++++++++++++++++++++++++++++++ docs/keymaps.md | 7 -- 3 files changed, 167 insertions(+), 14 deletions(-) create mode 100644 docs/extras/lang/zig.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 78950f1891..0eefc5772d 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -316,13 +316,15 @@ if vim.lsp.inlay_hint then end -- lazygit -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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) -map("n", "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) -map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) -map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) -map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) +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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) + map("n", "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) + map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) + map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) + map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) +end -- quit map("n", "qq", "qa", { desc = "Quit All" }) diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md new file mode 100644 index 0000000000..f26af4f33b --- /dev/null +++ b/docs/extras/lang/zig.md @@ -0,0 +1,158 @@ +# `Zig` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.zig" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = { "zig" } } +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "zig" } }, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = { + servers = { + zls = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + zls = {}, + }, + }, +} +``` + + + + + +## [neotest-zig](https://github.com/lawrence-laz/neotest-zig) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "lawrence-laz/neotest-zig", +} +``` + + + + + +## [neotest](https://github.com/nvim-neotest/neotest) _(optional)_ + + + + + +```lua +opts = { + adapters = { + ["neotest-zig"] = {}, + }, +} +``` + + + + + + +```lua +{ + "nvim-neotest/neotest", + optional = true, + dependencies = { + "lawrence-laz/neotest-zig", + }, + opts = { + adapters = { + ["neotest-zig"] = {}, + }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index b142a722a9..53215826de 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -74,13 +74,6 @@ possible keymaps starting with ``. | <leader>uT | Toggle Treesitter Highlight | **n** | | <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | -| <leader>gg | Lazygit (Root Dir) | **n** | -| <leader>gG | Lazygit (cwd) | **n** | -| <leader>gb | Git Blame Line | **n** | -| <leader>gB | Git Browse | **n** | -| <leader>gf | Lazygit Current File History | **n** | -| <leader>gl | Lazygit Log | **n** | -| <leader>gL | Lazygit Log (cwd) | **n** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | From 0eec72834bdcd5ab1aa5006ba48b97610ca8b652 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 7 Nov 2024 22:17:30 +0000 Subject: [PATCH 308/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/extras/coding/blink.md | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 0eefc5772d..caae639d63 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -452,7 +452,6 @@ vim.api.nvim_create_autocmd("FileType", { "notify", "qf", "snacks_win", - "snacks_notif", "spectre_panel", "startuptime", "tsplayground", diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 4dc8ee123f..096b0c3b4c 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -51,7 +51,7 @@ opts = { nerd_font_variant = "mono", windows = { autocomplete = { - draw = "reversed", + -- draw = "reversed", winblend = vim.o.pumblend, }, documentation = { @@ -111,7 +111,7 @@ opts = { nerd_font_variant = "mono", windows = { autocomplete = { - draw = "reversed", + -- draw = "reversed", winblend = vim.o.pumblend, }, documentation = { From cb7553ee8d9288d1ae2d39c0e406ac6cc3f0c0aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 08:23:46 +0000 Subject: [PATCH 309/553] chore(build): auto-generate docs --- docs/extras/editor/illuminate.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md index 19004fe84c..e8d7b96f31 100644 --- a/docs/extras/editor/illuminate.md +++ b/docs/extras/editor/illuminate.md @@ -67,6 +67,21 @@ opts = { config = function(_, opts) require("illuminate").configure(opts) + Snacks.toggle({ + name = "Illuminate", + get = function() + return not require("illuminate.engine").is_paused() + end, + set = function(enabled) + local m = require("illuminate") + if enabled then + m.resume() + else + m.pause() + end + end, + }):map("ux") + local function map(key, dir, buffer) vim.keymap.set("n", key, function() require("illuminate")["goto_" .. dir .. "_reference"](false) From 3022916ed3d0a6f87e44b204a8583fbc9d67e642 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 12:36:45 +0000 Subject: [PATCH 310/553] chore(build): auto-generate docs --- docs/extras/dap/core.md | 2 +- docs/extras/lang/r.md | 2 ++ docs/extras/util/rest.md | 10 +++++----- docs/keymaps.md | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index c29e1603e6..a097e1a5d4 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -67,7 +67,7 @@ opts = {} { "d", "", desc = "+debug", mode = {"n", "v"} }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, - { "dc", function() require("dap").continue() end, desc = "Continue" }, + { "dc", function() require("dap").continue() end, desc = "Run/Continue" }, { "da", function() require("dap").continue({ before = get_args }) end, desc = "Run with Args" }, { "dC", function() require("dap").run_to_cursor() end, desc = "Run to Cursor" }, { "dg", function() require("dap").goto_() end, desc = "Go to Line (No Execute)" }, diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index a00f2e38c1..8e668f38c2 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -53,6 +53,7 @@ opts = { local wk = require("which-key") wk.add({ buffer = true, + mode = { "n", "v" }, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, @@ -96,6 +97,7 @@ opts = { local wk = require("which-key") wk.add({ buffer = true, + mode = { "n", "v" }, { "a", group = "all" }, { "b", group = "between marks" }, { "c", group = "chunks" }, diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md index 670b7867db..16f450f460 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -52,11 +52,11 @@ opts = {} "mistweaverco/kulala.nvim", ft = "http", keys = { - { "R", "", desc = "+Rest" }, - { "Rs", "lua require('kulala').run()", desc = "Send the request" }, - { "Rt", "lua require('kulala').toggle_view()", desc = "Toggle headers/body" }, - { "Rp", "lua require('kulala').jump_prev()", desc = "Jump to previous request" }, - { "Rn", "lua require('kulala').jump_next()", desc = "Jump to next request" }, + { "R", "", desc = "+Rest", ft = "http" }, + { "Rs", "lua require('kulala').run()", desc = "Send the request", ft = "http" }, + { "Rt", "lua require('kulala').toggle_view()", desc = "Toggle headers/body", ft = "http" }, + { "Rp", "lua require('kulala').jump_prev()", desc = "Jump to previous request", ft = "http" }, + { "Rn", "lua require('kulala').jump_next()", desc = "Jump to next request", ft = "http" }, }, opts = {}, } diff --git a/docs/keymaps.md b/docs/keymaps.md index 53215826de..c0581a9128 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -352,7 +352,7 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | <leader>da | Run with Args | **n** | | <leader>db | Toggle Breakpoint | **n** | | <leader>dB | Breakpoint Condition | **n** | -| <leader>dc | Continue | **n** | +| <leader>dc | Run/Continue | **n** | | <leader>dC | Run to Cursor | **n** | | <leader>dg | Go to Line (No Execute) | **n** | | <leader>di | Step Into | **n** | From e6aa6261b7dce6abaf3f3cfdb20cc0e8463e47a3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 13:23:41 +0000 Subject: [PATCH 311/553] chore(build): auto-generate docs --- docs/extras/editor/navic.md | 18 +----- docs/extras/editor/telescope.md | 6 +- docs/extras/lang/angular.md | 39 ++++++++++++ docs/extras/lang/elixir.md | 41 ++++++++++++- docs/extras/lang/rego.md | 101 ++++++++++++++++++++++++++++++++ docs/extras/lang/ruby.md | 14 +++-- docs/extras/lang/scala.md | 14 +++++ docs/extras/linting/eslint.md | 19 ++++++ docs/extras/test/core.md | 18 +++--- docs/extras/util/project.md | 9 +++ docs/keymaps.md | 18 +++--- docs/plugins/coding.md | 27 +++------ 12 files changed, 265 insertions(+), 59 deletions(-) create mode 100644 docs/extras/lang/rego.md diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index 482c542449..0b4bd48c18 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -100,14 +100,7 @@ end ```lua opts = function(_, opts) if not vim.g.trouble_lualine then - table.insert(opts.sections.lualine_c, { - function() - return require("nvim-navic").get_location() - end, - cond = function() - return package.loaded["nvim-navic"] and require("nvim-navic").is_available() - end, - }) + table.insert(opts.sections.lualine_c, { "navic", color_correction = "dynamic" }) end end ``` @@ -123,14 +116,7 @@ end optional = true, opts = function(_, opts) if not vim.g.trouble_lualine then - table.insert(opts.sections.lualine_c, { - function() - return require("nvim-navic").get_location() - end, - cond = function() - return package.loaded["nvim-navic"] and require("nvim-navic").is_available() - end, - }) + table.insert(opts.sections.lualine_c, { "navic", color_correction = "dynamic" }) end end, } diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 20c9b6e7db..521c60cfa4 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -176,7 +176,11 @@ end { ":", "Telescope command_history", desc = "Command History" }, { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find - { "fb", "Telescope buffers sort_mru=true sort_lastused=true", desc = "Buffers" }, + { + "fb", + "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", + desc = "Buffers", + }, { "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)" }, diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index dd8093a64e..4a29b491e4 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -180,4 +180,43 @@ end +## [conform.nvim](https://github.com/stevearc/conform.nvim) + + formatting + + + + + + +```lua +opts = function(_, opts) + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.htmlangular = { "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.htmlangular = { "prettier" } + end + end, +} +``` + + + + + diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index 8d62c9f09b..f60730c841 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -123,7 +123,11 @@ opts = { ```lua -opts = { ensure_installed = { "elixir", "heex", "eex" } } +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "elixir", "heex", "eex" }) + vim.treesitter.language.register("markdown", "livebook") +end ``` @@ -134,7 +138,11 @@ opts = { ensure_installed = { "elixir", "heex", "eex" } } ```lua { "nvim-treesitter/nvim-treesitter", - opts = { ensure_installed = { "elixir", "heex", "eex" } }, + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "elixir", "heex", "eex" }) + vim.treesitter.language.register("markdown", "livebook") + end, } ``` @@ -301,4 +309,33 @@ end +## [render-markdown.nvim](https://github.com/MeanderingProgrammer/render-markdown.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "MeanderingProgrammer/render-markdown.nvim", + optional = true, + ft = function(_, ft) + vim.list_extend(ft, { "livebook" }) + end, +} +``` + + + + + diff --git a/docs/extras/lang/rego.md b/docs/extras/lang/rego.md new file mode 100644 index 0000000000..7461507e6b --- /dev/null +++ b/docs/extras/lang/rego.md @@ -0,0 +1,101 @@ +# `Rego` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.rego" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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 = { + regols = {}, + regal = {}, + }, +} +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = { + servers = { + regols = {}, + regal = {}, + }, + }, +} +``` + + + + + +## [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) + + + + + +```lua +opts = { + ensure_installed = { "rego" }, +} +``` + + + + + + +```lua +{ + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { "rego" }, + }, +} +``` + + + + + + diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index b36438e2e7..918d8ed8a0 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -86,7 +86,10 @@ opts = { enabled = lsp == "solargraph", }, rubocop = { - enabled = formatter == "rubocop", + -- If Solargraph and Rubocop are both enabled as an LSP, + -- diagnostics will be duplicated because Solargraph + -- already calls Rubocop if it is installed + enabled = formatter == "rubocop" and lsp ~= "solargraph", }, standardrb = { enabled = formatter == "standardrb", @@ -114,7 +117,10 @@ opts = { enabled = lsp == "solargraph", }, rubocop = { - enabled = formatter == "rubocop", + -- If Solargraph and Rubocop are both enabled as an LSP, + -- diagnostics will be duplicated because Solargraph + -- already calls Rubocop if it is installed + enabled = formatter == "rubocop" and lsp ~= "solargraph", }, standardrb = { enabled = formatter == "standardrb", @@ -249,7 +255,7 @@ opts = nil opts = { formatters_by_ft = { ruby = { formatter }, - eruby = { "erb-format" }, + eruby = { "erb_format" }, }, } ``` @@ -266,7 +272,7 @@ opts = { opts = { formatters_by_ft = { ruby = { formatter }, - eruby = { "erb-format" }, + eruby = { "erb_format" }, }, }, } diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index dec868c9e9..2ebae5dfc3 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -110,6 +110,13 @@ opts = { end, desc = "Metals compile cascade", }, + { + "mh", + function() + require("metals").hover_worksheet() + end, + desc = "Metals hover worksheet", + }, }, init_options = { statusBarProvider = "off", @@ -166,6 +173,13 @@ opts = { end, desc = "Metals compile cascade", }, + { + "mh", + function() + require("metals").hover_worksheet() + end, + desc = "Metals hover worksheet", + }, }, init_options = { statusBarProvider = "off", diff --git a/docs/extras/linting/eslint.md b/docs/extras/linting/eslint.md index 90930b5e68..ecc7d662e0 100644 --- a/docs/extras/linting/eslint.md +++ b/docs/extras/linting/eslint.md @@ -22,6 +22,15 @@ require("lazy").setup({ +### 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" +-- Set to false to disable auto format +vim.g.lazyvim_eslint_auto_format = true +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -46,11 +55,16 @@ opts = { settings = { -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root workingDirectories = { mode = "auto" }, + format = auto_format, }, }, }, setup = { eslint = function() + if not auto_format then + return + end + local function get_client(buf) return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] end @@ -103,11 +117,16 @@ opts = { settings = { -- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root workingDirectories = { mode = "auto" }, + format = auto_format, }, }, }, setup = { eslint = function() + if not auto_format then + return + end + local function get_client(buf) return LazyVim.lsp.get_clients({ name = "eslint", bufnr = buf })[1] end diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index aeb4e96ce0..8d10937574 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -191,15 +191,15 @@ opts = { -- stylua: ignore keys = { {"t", "", desc = "+test"}, - { "tt", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, - { "tT", function() require("neotest").run.run(vim.uv.cwd()) end, desc = "Run All Test Files" }, - { "tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, - { "tl", function() require("neotest").run.run_last() end, desc = "Run Last" }, - { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, - { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, - { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, - { "tS", function() require("neotest").run.stop() end, desc = "Stop" }, - { "tw", function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch" }, + { "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)" }, + { "tl", function() require("neotest").run.run_last() end, desc = "Run Last (Neotest)" }, + { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary (Neotest)" }, + { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output (Neotest)" }, + { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel (Neotest)" }, + { "tS", function() require("neotest").run.stop() end, desc = "Stop (Neotest)" }, + { "tw", function() require("neotest").watch.toggle(vim.fn.expand("%")) end, desc = "Toggle Watch (Neotest)" }, }, } ``` diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 690beacf49..7a898c2809 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -58,6 +58,15 @@ opts = { event = "VeryLazy", config = function(_, opts) require("project_nvim").setup(opts) + local history = require("project_nvim.utils.history") + history.delete_project = function(project) + for k, v in pairs(history.recent_projects) do + if v == project.value then + history.recent_projects[k] = nil + return + end + end + end LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("projects") end) diff --git a/docs/keymaps.md b/docs/keymaps.md index c0581a9128..7235cbde98 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -634,15 +634,15 @@ Part of [lazyvim.plugins.extras.test.core](/extras/test/core) | Key | Description | Mode | | --- | --- | --- | | <leader>t | +test | **n** | -| <leader>tl | Run Last | **n** | -| <leader>to | Show Output | **n** | -| <leader>tO | Toggle Output Panel | **n** | -| <leader>tr | Run Nearest | **n** | -| <leader>ts | Toggle Summary | **n** | -| <leader>tS | Stop | **n** | -| <leader>tt | Run File | **n** | -| <leader>tT | Run All Test Files | **n** | -| <leader>tw | Toggle Watch | **n** | +| <leader>tl | Run Last (Neotest) | **n** | +| <leader>to | Show Output (Neotest) | **n** | +| <leader>tO | Toggle Output Panel (Neotest) | **n** | +| <leader>tr | Run Nearest (Neotest) | **n** | +| <leader>ts | Toggle Summary (Neotest) | **n** | +| <leader>tS | Stop (Neotest) | **n** | +| <leader>tt | Run File (Neotest) | **n** | +| <leader>tT | Run All Test Files (Neotest) | **n** | +| <leader>tw | Toggle Watch (Neotest) | **n** | ## [nvim-dap](https://github.com/mfussenegger/nvim-dap.git) Part of [lazyvim.plugins.extras.test.core](/extras/test/core) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 5719cf8a28..37b39dd639 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -583,26 +583,17 @@ end table.insert(opts.sources, { name = "snippets" }) end end, - keys = { - { - "", - function() + init = function() + -- Neovim enabled snippet navigation mappings by default in v0.11 + if vim.fn.has("nvim-0.11") == 0 then + vim.keymap.set({ "i", "s" }, "", function() return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - { - "", - function() + end, { expr = true, silent = true }) + vim.keymap.set({ "i", "s" }, "", function() return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, - expr = true, - silent = true, - mode = { "i", "s" }, - }, - }, + end, { expr = true, silent = true }) + end + end, } ``` From 6dff5bc650215ff644ff617e69f5ca699d03d21a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 16:23:24 +0000 Subject: [PATCH 312/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index caae639d63..7288ceb056 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -122,6 +122,7 @@ opt.number = true -- Print line number opt.pumblend = 10 -- Popup blend opt.pumheight = 10 -- Maximum number of entries in a popup opt.relativenumber = true -- Relative line numbers +opt.ruler = false -- Disable the default ruler opt.scrolloff = 4 -- Lines of context opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" } opt.shiftround = true -- Round indent From edf251397c2c7a7354d650b658d35c4d2f1bd2cc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 8 Nov 2024 20:19:50 +0000 Subject: [PATCH 313/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/extras/lang/terraform.md | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 7288ceb056..767567e877 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -134,7 +134,6 @@ opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift t opt.smartcase = true -- Don't ignore case with capitals opt.smartindent = true -- Insert indents automatically opt.spelllang = { "en" } -opt.spelloptions:append("noplainbuffer") opt.splitbelow = true -- Put new windows below current opt.splitkeep = "screen" opt.splitright = true -- Put new windows right of current diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index 6376fabe2a..89050149c9 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -139,6 +139,7 @@ opts = {} ```lua { "ANGkeith/telescope-terraform-doc.nvim", + ft = { "terraform", "hcl" }, config = function() LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("terraform_doc") @@ -169,6 +170,7 @@ opts = {} ```lua { "cappyzawa/telescope-terraform.nvim", + ft = { "terraform", "hcl" }, config = function() LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("terraform") @@ -191,6 +193,7 @@ opts = {} opts = function(_, opts) local null_ls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { + null_ls.builtins.formatting.packer, null_ls.builtins.formatting.terraform_fmt, null_ls.builtins.diagnostics.terraform_validate, }) @@ -209,6 +212,7 @@ end opts = function(_, opts) local null_ls = require("null-ls") opts.sources = vim.list_extend(opts.sources or {}, { + null_ls.builtins.formatting.packer, null_ls.builtins.formatting.terraform_fmt, null_ls.builtins.diagnostics.terraform_validate, }) @@ -266,6 +270,7 @@ opts = { ```lua opts = { formatters_by_ft = { + hcl = { "packer_fmt" }, terraform = { "terraform_fmt" }, tf = { "terraform_fmt" }, ["terraform-vars"] = { "terraform_fmt" }, @@ -284,6 +289,7 @@ opts = { optional = true, opts = { formatters_by_ft = { + hcl = { "packer_fmt" }, terraform = { "terraform_fmt" }, tf = { "terraform_fmt" }, ["terraform-vars"] = { "terraform_fmt" }, @@ -315,9 +321,10 @@ opts = nil { "nvim-telescope/telescope.nvim", optional = true, - dependencies = { + specs = { { "ANGkeith/telescope-terraform-doc.nvim", + ft = { "terraform", "hcl" }, config = function() LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("terraform_doc") @@ -326,6 +333,7 @@ opts = nil }, { "cappyzawa/telescope-terraform.nvim", + ft = { "terraform", "hcl" }, config = function() LazyVim.on_load("telescope.nvim", function() require("telescope").load_extension("terraform") From 572da0c7441e0adf1a4f41fc9637f1bb1adcd8eb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Nov 2024 15:19:41 +0000 Subject: [PATCH 314/553] chore(build): auto-generate docs --- docs/configuration/general.md | 3 +++ docs/extras/ui/alpha.md | 16 ++++++++-------- docs/keymaps.md | 2 +- docs/plugins/ui.md | 1 - 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 767567e877..9d864637e2 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -224,6 +224,9 @@ map("n", "`", "e #", { desc = "Switch to Other Buffer" }) map("n", "bd", function() Snacks.bufdelete() end, { desc = "Delete Buffer" }) +map("n", "bo", function() + Snacks.bufdelete.other() +end, { desc = "Delete Other Buffers" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) -- Clear search with diff --git a/docs/extras/ui/alpha.md b/docs/extras/ui/alpha.md index 73fb44dad1..74c3e800be 100644 --- a/docs/extras/ui/alpha.md +++ b/docs/extras/ui/alpha.md @@ -57,11 +57,11 @@ opts = function() dashboard.section.header.val = vim.split(logo, "\n") -- stylua: ignore dashboard.section.buttons.val = { - dashboard.button("f", " " .. " Find file", LazyVim.pick()), + dashboard.button("f", " " .. " Find file", " lua LazyVim.pick()() "), dashboard.button("n", " " .. " New file", [[ ene startinsert ]]), - dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")), - dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")), - dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()), + dashboard.button("r", " " .. " Recent files", [[ lua LazyVim.pick("oldfiles")() ]]), + dashboard.button("g", " " .. " Find text", [[ lua LazyVim.pick("live_grep")() ]]), + dashboard.button("c", " " .. " Config", " lua LazyVim.pick.config_files()() "), dashboard.button("s", " " .. " Restore Session", [[ lua require("persistence").load() ]]), dashboard.button("x", " " .. " Lazy Extras", " LazyExtras "), dashboard.button("l", "󰒲 " .. " Lazy", " Lazy "), @@ -104,11 +104,11 @@ end dashboard.section.header.val = vim.split(logo, "\n") -- stylua: ignore dashboard.section.buttons.val = { - dashboard.button("f", " " .. " Find file", LazyVim.pick()), + dashboard.button("f", " " .. " Find file", " lua LazyVim.pick()() "), dashboard.button("n", " " .. " New file", [[ ene startinsert ]]), - dashboard.button("r", " " .. " Recent files", LazyVim.pick("oldfiles")), - dashboard.button("g", " " .. " Find text", LazyVim.pick("live_grep")), - dashboard.button("c", " " .. " Config", LazyVim.pick.config_files()), + dashboard.button("r", " " .. " Recent files", [[ lua LazyVim.pick("oldfiles")() ]]), + dashboard.button("g", " " .. " Find text", [[ lua LazyVim.pick("live_grep")() ]]), + dashboard.button("c", " " .. " Config", " lua LazyVim.pick.config_files()() "), dashboard.button("s", " " .. " Restore Session", [[ lua require("persistence").load() ]]), dashboard.button("x", " " .. " Lazy Extras", " LazyExtras "), dashboard.button("l", "󰒲 " .. " Lazy", " Lazy "), diff --git a/docs/keymaps.md b/docs/keymaps.md index 7235cbde98..8a3367ae4f 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -40,6 +40,7 @@ possible keymaps starting with ``. | <leader>bb | Switch to Other Buffer | **n** | | <leader>` | Switch to Other Buffer | **n** | | <leader>bd | Delete Buffer | **n** | +| <leader>bo | Delete Other Buffers | **n** | | <leader>bD | Delete Buffer and Window | **n** | | <esc> | Escape and Clear hlsearch | **i**, **n** | | <leader>ur | Redraw / Clear hlsearch / Diff Update | **n** | @@ -125,7 +126,6 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | | <leader>bl | Delete Buffers to the Left | **n** | -| <leader>bo | Delete Other Buffers | **n** | | <leader>bp | Toggle Pin | **n** | | <leader>bP | Delete Non-Pinned Buffers | **n** | | <leader>br | Delete Buffers to the Right | **n** | diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 26f89605da..e20be97868 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -58,7 +58,6 @@ opts = { keys = { { "bp", "BufferLineTogglePin", desc = "Toggle Pin" }, { "bP", "BufferLineGroupClose ungrouped", desc = "Delete Non-Pinned Buffers" }, - { "bo", "BufferLineCloseOthers", desc = "Delete Other Buffers" }, { "br", "BufferLineCloseRight", desc = "Delete Buffers to the Right" }, { "bl", "BufferLineCloseLeft", desc = "Delete Buffers to the Left" }, { "", "BufferLineCyclePrev", desc = "Prev Buffer" }, From 29b8d69c8c1919f9df5b38ea9a96f68d2482d98c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 10 Nov 2024 11:14:02 +0000 Subject: [PATCH 315/553] chore(build): auto-generate docs --- docs/extras/{coding => ai}/codeium.md | 4 ++-- docs/extras/{coding => ai}/copilot-chat.md | 2 +- docs/extras/{coding => ai}/copilot.md | 4 ++-- docs/extras/{coding => ai}/tabnine.md | 4 ++-- docs/keymaps.md | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) rename docs/extras/{coding => ai}/codeium.md (97%) rename docs/extras/{coding => ai}/copilot-chat.md (98%) rename docs/extras/{coding => ai}/copilot.md (99%) rename docs/extras/{coding => ai}/tabnine.md (98%) diff --git a/docs/extras/coding/codeium.md b/docs/extras/ai/codeium.md similarity index 97% rename from docs/extras/coding/codeium.md rename to docs/extras/ai/codeium.md index 1e891d6f6a..0c8f33a36d 100644 --- a/docs/extras/coding/codeium.md +++ b/docs/extras/ai/codeium.md @@ -1,4 +1,4 @@ -# Codeium +# `Codeium` @@ -14,7 +14,7 @@ Plugins marked as optional will only be configured if they are installed. require("lazy").setup({ spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.codeium" }, + { import = "lazyvim.plugins.extras.ai.codeium" }, { import = "plugins" }, }, }) diff --git a/docs/extras/coding/copilot-chat.md b/docs/extras/ai/copilot-chat.md similarity index 98% rename from docs/extras/coding/copilot-chat.md rename to docs/extras/ai/copilot-chat.md index 324df5103a..dbae1440de 100644 --- a/docs/extras/coding/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -14,7 +14,7 @@ Plugins marked as optional will only be configured if they are installed. require("lazy").setup({ spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot-chat" }, + { import = "lazyvim.plugins.extras.ai.copilot-chat" }, { import = "plugins" }, }, }) diff --git a/docs/extras/coding/copilot.md b/docs/extras/ai/copilot.md similarity index 99% rename from docs/extras/coding/copilot.md rename to docs/extras/ai/copilot.md index ae692a3a7b..694492864d 100644 --- a/docs/extras/coding/copilot.md +++ b/docs/extras/ai/copilot.md @@ -1,4 +1,4 @@ -# Copilot +# `Copilot` @@ -14,7 +14,7 @@ Plugins marked as optional will only be configured if they are installed. require("lazy").setup({ spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.copilot" }, + { import = "lazyvim.plugins.extras.ai.copilot" }, { import = "plugins" }, }, }) diff --git a/docs/extras/coding/tabnine.md b/docs/extras/ai/tabnine.md similarity index 98% rename from docs/extras/coding/tabnine.md rename to docs/extras/ai/tabnine.md index cdba24d111..c7b6bbcf64 100644 --- a/docs/extras/coding/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -1,4 +1,4 @@ -# TabNine +# `Tabnine` @@ -14,7 +14,7 @@ Plugins marked as optional will only be configured if they are installed. require("lazy").setup({ spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.tabnine" }, + { import = "lazyvim.plugins.extras.ai.tabnine" }, { import = "plugins" }, }, }) diff --git a/docs/keymaps.md b/docs/keymaps.md index 8a3367ae4f..b37a2ff3dc 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -287,7 +287,7 @@ possible keymaps starting with ``. | <leader>? | Buffer Keymaps (which-key) | **n** | ## [CopilotChat.nvim](https://github.com/CopilotC-Nvim/CopilotChat.nvim.git) -Part of [lazyvim.plugins.extras.coding.copilot-chat](/extras/coding/copilot-chat) +Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) | Key | Description | Mode | | --- | --- | --- | From 0d2aa3783a82a473d2a38d04caa64821b92410cf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 11 Nov 2024 09:20:56 +0000 Subject: [PATCH 316/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/util/rest.md | 17 +++++++++++++++-- docs/keymaps.md | 8 ++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 9d864637e2..a954e436af 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -137,6 +137,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.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/extras/util/rest.md b/docs/extras/util/rest.md index 16f450f460..97e72d1942 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -53,10 +53,23 @@ opts = {} ft = "http", keys = { { "R", "", desc = "+Rest", ft = "http" }, + { "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" }, + { + "Rg", + "lua require('kulala').download_graphql_schema()", + desc = "Download GraphQL schema", + ft = "http", + }, + { "Ri", "lua require('kulala').inspect()", desc = "Inspect current request", ft = "http" }, + { "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" }, { "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" }, - { "Rp", "lua require('kulala').jump_prev()", desc = "Jump to previous request", ft = "http" }, - { "Rn", "lua require('kulala').jump_next()", desc = "Jump to next request", ft = "http" }, }, opts = {}, } diff --git a/docs/keymaps.md b/docs/keymaps.md index b37a2ff3dc..e7cb193209 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -713,9 +713,17 @@ Part of [lazyvim.plugins.extras.util.rest](/extras/util/rest) | Key | Description | Mode | | --- | --- | --- | | <leader>R | +Rest | **n** | +| <leader>Rb | Open scratchpad | **n** | +| <leader>Rc | Copy as cURL | **n** | +| <leader>RC | Paste from curl | **n** | +| <leader>Rg | Download GraphQL schema | **n** | +| <leader>Ri | Inspect current request | **n** | | <leader>Rn | Jump to next request | **n** | | <leader>Rp | Jump to previous request | **n** | +| <leader>Rq | Close window | **n** | +| <leader>Rr | Replay the last request | **n** | | <leader>Rs | Send the request | **n** | +| <leader>RS | Show stats | **n** | | <leader>Rt | Toggle headers/body | **n** | From 2ea1ad23d00134762d864344ad067a161bdd95ed Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 11 Nov 2024 10:20:40 +0000 Subject: [PATCH 317/553] chore(build): auto-generate docs --- docs/configuration/general.md | 14 ++ docs/extras/ai/codeium.md | 203 +++++++++++++++++++++---- docs/extras/ai/copilot.md | 269 +++++++++++++++++++++------------- docs/extras/coding/blink.md | 53 ++++++- docs/extras/coding/luasnip.md | 132 +++++++++++------ docs/plugins/coding.md | 27 ++-- 6 files changed, 503 insertions(+), 195 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index a954e436af..268b1f7698 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -63,6 +63,10 @@ vim.g.autoformat = true -- enabled with `:LazyExtras` vim.g.lazyvim_picker = "auto" +-- if the completion engine supports the AI source, +-- use that instead of inline suggestions +vim.g.ai_cmp = true + -- LazyVim root dir detection -- Each entry can be: -- * the name of a detector function like `lsp` or `cwd` @@ -366,6 +370,16 @@ 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/ai/codeium.md b/docs/extras/ai/codeium.md index 0c8f33a36d..c0feb8c1b2 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -32,7 +32,152 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [codeium.nvim](https://github.com/Exafunction/codeium.nvim) + + codeium + + + + + + +```lua +opts = { + enable_cmp_source = vim.g.ai_cmp, + virtual_text = { + enabled = not vim.g.ai_cmp, + key_bindings = { + accept = false, -- handled by nvim-cmp / blink.cmp + next = "", + prev = "", + }, + }, +} +``` + + + + + + +```lua +{ + "Exafunction/codeium.nvim", + cmd = "Codeium", + build = ":Codeium Auth", + opts = { + enable_cmp_source = vim.g.ai_cmp, + virtual_text = { + enabled = not vim.g.ai_cmp, + key_bindings = { + accept = false, -- handled by nvim-cmp / blink.cmp + next = "", + prev = "", + }, + }, + }, +} +``` + + + + + +## [codeium.nvim](https://github.com/Exafunction/codeium.nvim) + + add ai_accept action + + + + + + +```lua +opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("codeium.virtual_text").get_current_completion_item() then + LazyVim.create_undo() + vim.api.nvim_input(require("codeium.virtual_text").accept()) + return true + end + end +end +``` + + + + + + +```lua +{ + "Exafunction/codeium.nvim", + opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("codeium.virtual_text").get_current_completion_item() then + LazyVim.create_undo() + vim.api.nvim_input(require("codeium.virtual_text").accept()) + return true + end + end + end, +} +``` + + + + + +## [codeium.nvim](https://github.com/Exafunction/codeium.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "codeium.nvim" } +``` + + + + + +## [codeium.nvim](https://github.com/Exafunction/codeium.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "codeium.nvim", + vim.g.ai_cmp and "saghen/blink.compat" or nil, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ codeium cmp source @@ -59,16 +204,8 @@ end ```lua { "nvim-cmp", - dependencies = { - -- codeium - { - "Exafunction/codeium.nvim", - cmd = "Codeium", - build = ":Codeium Auth", - opts = {}, - }, - }, - ---@param opts cmp.ConfigSchema + optional = true, + dependencies = { "codeium.nvim" }, opts = function(_, opts) table.insert(opts.sources, 1, { name = "codeium", @@ -83,17 +220,16 @@ end -## [codeium.nvim](https://github.com/Exafunction/codeium.nvim) - - codeium - +## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ ```lua -opts = {} +opts = function(_, opts) + table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) +end ``` @@ -103,10 +239,12 @@ opts = {} ```lua { - "Exafunction/codeium.nvim", - cmd = "Codeium", - build = ":Codeium Auth", - opts = {}, + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) + end, } ``` @@ -114,16 +252,18 @@ opts = {} -## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ ```lua -opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) -end +opts = { + sources = { + compat = vim.g.ai_cmp and { "codeium" } or nil, + }, +} ``` @@ -133,12 +273,17 @@ end ```lua { - "nvim-lualine/lualine.nvim", + "saghen/blink.cmp", optional = true, - event = "VeryLazy", - opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) - end, + opts = { + sources = { + compat = vim.g.ai_cmp and { "codeium" } or nil, + }, + }, + dependencies = { + "codeium.nvim", + vim.g.ai_cmp and "saghen/blink.compat" or nil, + }, } ``` diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 694492864d..5aff8cbe6a 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -43,7 +43,15 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - suggestion = { enabled = false }, + suggestion = { + enabled = not vim.g.ai_cmp, + auto_trigger = true, + keymap = { + accept = false, -- handled by nvim-cmp / blink.cmp + next = "", + prev = "", + }, + }, panel = { enabled = false }, filetypes = { markdown = true, @@ -62,8 +70,17 @@ opts = { "zbirenbaum/copilot.lua", cmd = "Copilot", build = ":Copilot auth", + event = "InsertEnter", opts = { - suggestion = { enabled = false }, + suggestion = { + enabled = not vim.g.ai_cmp, + auto_trigger = true, + keymap = { + accept = false, -- handled by nvim-cmp / blink.cmp + next = "", + prev = "", + }, + }, panel = { enabled = false }, filetypes = { markdown = true, @@ -77,6 +94,58 @@ opts = { +## [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) + + this will only be evaluated if nvim-cmp is enabled + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "zbirenbaum/copilot-cmp", + enabled = vim.g.ai_cmp, -- only enable if wanted + 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 = { + { + "nvim-cmp", + ---@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) copilot cmp source @@ -87,13 +156,7 @@ opts = { ```lua -opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) -end +opts = nil ``` @@ -104,30 +167,36 @@ end ```lua { "nvim-cmp", - dependencies = { + optional = true, + dependencies = { -- this will only be evaluated if nvim-cmp is enabled { "zbirenbaum/copilot-cmp", - dependencies = "copilot.lua", + enabled = vim.g.ai_cmp, -- only enable if wanted 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(client) + LazyVim.lsp.on_attach(function() copilot_cmp._on_insert_enter({}) end, "copilot") end, + specs = { + { + "nvim-cmp", + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) + end, + }, + }, }, }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, } ``` @@ -135,14 +204,25 @@ end -## [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) +## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) + + add ai_accept action + ```lua -opts = {} +opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("copilot.suggestion").is_visible() then + LazyVim.create_undo() + require("copilot.suggestion").accept() + return true + end + end +end ``` @@ -152,17 +232,15 @@ opts = {} ```lua { - "zbirenbaum/copilot-cmp", - dependencies = "copilot.lua", - 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(client) - copilot_cmp._on_insert_enter({}) - end, "copilot") + "zbirenbaum/copilot.lua", + opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("copilot.suggestion").is_visible() then + LazyVim.create_undo() + require("copilot.suggestion").accept() + return true + end + end end, } ``` @@ -173,18 +251,15 @@ opts = {} ## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) + blink has no copilot source, so force enable suggestions + + ```lua -opts = { - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { accept = false }, - }, -} +opts = { suggestion = { enabled = true } } ``` @@ -195,14 +270,46 @@ opts = { ```lua { "zbirenbaum/copilot.lua", - event = "InsertEnter", - opts = { - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { accept = false }, - }, - }, + opts = { suggestion = { enabled = true } }, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) +end +``` + + + + + + +```lua +{ + "nvim-cmp", + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) + end, } ``` @@ -212,6 +319,9 @@ opts = { ## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) _(optional)_ + lualine + + @@ -302,34 +412,16 @@ end ## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + blink.cmp + + ```lua opts = { - windows = { - ghost_text = { - enabled = false, - }, - }, - keymap = { - [""] = { - function(cmp) - if cmp.is_in_snippet() then - return cmp.accept() - elseif require("copilot.suggestion").is_visible() then - LazyVim.create_undo() - require("copilot.suggestion").accept() - return true - else - return cmp.select_and_accept() - end - end, - "snippet_forward", - "fallback", - }, - }, + windows = { ghost_text = { enabled = false } }, } ``` @@ -342,41 +434,14 @@ opts = { { "saghen/blink.cmp", optional = true, + opts = { + windows = { ghost_text = { enabled = false } }, + }, specs = { + -- blink has no copilot source, so force enable suggestions { "zbirenbaum/copilot.lua", - event = "InsertEnter", - opts = { - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { accept = false }, - }, - }, - }, - }, - opts = { - windows = { - ghost_text = { - enabled = false, - }, - }, - keymap = { - [""] = { - function(cmp) - if cmp.is_in_snippet() then - return cmp.accept() - elseif require("copilot.suggestion").is_visible() then - LazyVim.create_undo() - require("copilot.suggestion").accept() - return true - else - return cmp.select_and_accept() - end - end, - "snippet_forward", - "fallback", - }, + opts = { suggestion = { enabled = true } }, }, }, } diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 096b0c3b4c..d89718e6b8 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -22,6 +22,17 @@ require("lazy").setup({ +### 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" +-- set to `true` to follow the main branch +-- you need to have a working rust toolchain to build the plugin +-- in this case. +vim.g.lazyvim_blink_main = false +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -58,7 +69,7 @@ opts = { auto_show = true, }, ghost_text = { - enabled = true, + enabled = vim.g.ai_cmp, }, }, @@ -68,6 +79,9 @@ opts = { -- experimental signature help support -- trigger = { signature_help = { enabled = true } } sources = { + -- adding any nvim-cmp sources here will enable them + -- with blink.compat + compat = {}, completion = { -- remember to enable your providers here enabled_providers = { "lsp", "path", "snippets", "buffer" }, @@ -76,6 +90,10 @@ opts = { keymap = { preset = "enter", + [""] = { + LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + "fallback", + }, }, } ``` @@ -88,8 +106,12 @@ opts = { ```lua { "saghen/blink.cmp", - version = "*", - opts_extend = { "sources.completion.enabled_providers" }, + version = not vim.g.lazyvim_blink_main and "*", + build = vim.g.lazyvim_blink_main and "cargo build --release", + opts_extend = { + "sources.completion.enabled_providers", + "sources.compat", + }, dependencies = { "rafamadriz/friendly-snippets", -- add blink.compat to dependencies @@ -118,7 +140,7 @@ opts = { auto_show = true, }, ghost_text = { - enabled = true, + enabled = vim.g.ai_cmp, }, }, @@ -128,6 +150,9 @@ opts = { -- experimental signature help support -- trigger = { signature_help = { enabled = true } } sources = { + -- adding any nvim-cmp sources here will enable them + -- with blink.compat + compat = {}, completion = { -- remember to enable your providers here enabled_providers = { "lsp", "path", "snippets", "buffer" }, @@ -136,8 +161,28 @@ opts = { keymap = { preset = "enter", + [""] = { + LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + "fallback", + }, }, }, + ---@param opts blink.cmp.Config | { sources: { compat: string[] } } + config = function(_, opts) + -- setup compat sources + local enabled = opts.sources.completion.enabled_providers + for _, source in ipairs(opts.sources.compat or {}) do + opts.sources.providers[source] = vim.tbl_deep_extend( + "force", + { name = source, module = "blink.compat.source" }, + opts.sources.providers[source] or {} + ) + if type(enabled) == "table" and not vim.tbl_contains(enabled, source) then + table.insert(enabled, source) + end + end + require("blink.cmp").setup(opts) + end, } ``` diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index c813e56fcd..124a81a1c5 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -34,6 +34,9 @@ import TabItem from '@theme/TabItem'; ## [LuaSnip](https://github.com/L3MON4D3/LuaSnip) + add luasnip + + @@ -64,20 +67,6 @@ opts = { require("luasnip.loaders.from_vscode").lazy_load() end, }, - { - "nvim-cmp", - dependencies = { - "saadparwaiz1/cmp_luasnip", - }, - opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) - end, - }, }, opts = { history = true, @@ -118,20 +107,23 @@ opts = {} -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [LuaSnip](https://github.com/L3MON4D3/LuaSnip) + + add snippet_forward action + ```lua -opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) +opts = function() + LazyVim.cmp.actions.snippet_forward = function() + if require("luasnip").jumpable(1) then + require("luasnip").jump(1) + return true + end + end end ``` @@ -142,17 +134,14 @@ end ```lua { - "nvim-cmp", - dependencies = { - "saadparwaiz1/cmp_luasnip", - }, - opts = function(_, opts) - opts.snippet = { - expand = function(args) - require("luasnip").lsp_expand(args.body) - end, - } - table.insert(opts.sources, { name = "luasnip" }) + "L3MON4D3/LuaSnip", + opts = function() + LazyVim.cmp.actions.snippet_forward = function() + if require("luasnip").jumpable(1) then + require("luasnip").jump(1) + return true + end + end end, } ``` @@ -177,23 +166,31 @@ opts = nil ```lua -{ - "saadparwaiz1/cmp_luasnip", -} +{ "saadparwaiz1/cmp_luasnip" } ``` -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + nvim-cmp integration + ```lua -opts = nil +opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) +end ``` @@ -204,15 +201,18 @@ opts = nil ```lua { "nvim-cmp", + optional = true, + dependencies = { "saadparwaiz1/cmp_luasnip" }, + opts = function(_, opts) + opts.snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + } + table.insert(opts.sources, { name = "luasnip" }) + end, -- stylua: ignore keys = { - { - "", - function() - return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" - end, - expr = true, silent = true, mode = "i", - }, { "", function() require("luasnip").jump(1) end, mode = "s" }, { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, }, @@ -223,4 +223,46 @@ opts = nil +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp integration + + + + + + +```lua +opts = { + accept = { + expand_snippet = function(...) + return require("luasnip").lsp_expand(...) + end, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + opts = { + accept = { + expand_snippet = function(...) + return require("luasnip").lsp_expand(...) + end, + }, + }, +} +``` + + + + + diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index 37b39dd639..fe95bca49c 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -39,6 +39,9 @@ opts = function() cmp.abort() fallback() end, + [""] = function(fallback) + return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + end, }), sources = cmp.config.sources({ { name = "nvim_lsp" }, @@ -68,9 +71,10 @@ opts = function() end, }, experimental = { - ghost_text = { + -- only show ghost text when we show ai completions + ghost_text = vim.g.ai_cmp and { hl_group = "CmpGhostText", - }, + } or false, }, sorting = defaults.sorting, } @@ -125,6 +129,9 @@ end cmp.abort() fallback() end, + [""] = function(fallback) + return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + end, }), sources = cmp.config.sources({ { name = "nvim_lsp" }, @@ -154,9 +161,10 @@ end end, }, experimental = { - ghost_text = { + -- only show ghost text when we show ai completions + ghost_text = vim.g.ai_cmp and { hl_group = "CmpGhostText", - }, + } or false, }, sorting = defaults.sorting, } @@ -583,17 +591,6 @@ end table.insert(opts.sources, { name = "snippets" }) end end, - init = function() - -- Neovim enabled snippet navigation mappings by default in v0.11 - if vim.fn.has("nvim-0.11") == 0 then - vim.keymap.set({ "i", "s" }, "", function() - return vim.snippet.active({ direction = 1 }) and "lua vim.snippet.jump(1)" or "" - end, { expr = true, silent = true }) - vim.keymap.set({ "i", "s" }, "", function() - return vim.snippet.active({ direction = -1 }) and "lua vim.snippet.jump(-1)" or "" - end, { expr = true, silent = true }) - end - end, } ``` From 7c21f2a5179fd058a9ab8888fccf2cd4f1bf0d12 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Nov 2024 16:23:42 +0000 Subject: [PATCH 318/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 78 ++++++++++----------------------------- 1 file changed, 20 insertions(+), 58 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 5aff8cbe6a..c2addb5da3 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -328,36 +328,17 @@ end ```lua opts = function(_, opts) - local colors = { - [""] = LazyVim.ui.fg("Special"), - ["Normal"] = LazyVim.ui.fg("Special"), - ["Warning"] = LazyVim.ui.fg("DiagnosticError"), - ["InProgress"] = LazyVim.ui.fg("DiagnosticWarn"), - } - table.insert(opts.sections.lualine_x, 2, { - function() - local icon = LazyVim.config.icons.kinds.Copilot - local status = require("copilot.api").status.data - return icon .. (status.message or "") - end, - cond = function() - if not package.loaded["copilot"] then - return + table.insert( + 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 {} + if #clients > 0 then + local status = require("copilot.api").status.data.status + return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" end - local ok, clients = pcall(LazyVim.lsp.get_clients, { name = "copilot", bufnr = 0 }) - if not ok then - return false - end - return ok and #clients > 0 - end, - color = function() - if not package.loaded["copilot"] then - return - end - local status = require("copilot.api").status.data - return colors[status.status] or colors[""] - end, - }) + end) + ) end ``` @@ -372,36 +353,17 @@ end optional = true, event = "VeryLazy", opts = function(_, opts) - local colors = { - [""] = LazyVim.ui.fg("Special"), - ["Normal"] = LazyVim.ui.fg("Special"), - ["Warning"] = LazyVim.ui.fg("DiagnosticError"), - ["InProgress"] = LazyVim.ui.fg("DiagnosticWarn"), - } - table.insert(opts.sections.lualine_x, 2, { - function() - local icon = LazyVim.config.icons.kinds.Copilot - local status = require("copilot.api").status.data - return icon .. (status.message or "") - end, - cond = function() - if not package.loaded["copilot"] then - return - end - local ok, clients = pcall(LazyVim.lsp.get_clients, { name = "copilot", bufnr = 0 }) - if not ok then - return false + table.insert( + 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 {} + if #clients > 0 then + local status = require("copilot.api").status.data.status + return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" end - return ok and #clients > 0 - end, - color = function() - if not package.loaded["copilot"] then - return - end - local status = require("copilot.api").status.data - return colors[status.status] or colors[""] - end, - }) + end) + ) end, } ``` From 43a963b3b6045116d76e52499045711c5e863269 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Nov 2024 17:16:35 +0000 Subject: [PATCH 319/553] chore(build): auto-generate docs --- docs/configuration/index.md | 1 + docs/extras/ai/supermaven.md | 368 +++++++++++++++++++++++++++++++++++ 2 files changed, 369 insertions(+) create mode 100644 docs/extras/ai/supermaven.md diff --git a/docs/configuration/index.md b/docs/configuration/index.md index ad75c1364f..e563bdb0af 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -127,6 +127,7 @@ return { Snippet = " ", String = " ", Struct = "󰆼 ", + Supermaven = " ", TabNine = "󰏚 ", Text = " ", TypeParameter = " ", diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md new file mode 100644 index 0000000000..4d57a15513 --- /dev/null +++ b/docs/extras/ai/supermaven.md @@ -0,0 +1,368 @@ +# `Supermaven` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ai.supermaven" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [supermaven-nvim](https://github.com/supermaven-inc/supermaven-nvim) + + + + + +```lua +opts = { + keymaps = { + accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp + }, + disable_inline_completion = vim.g.ai_cmp, +} +``` + + + + + + +```lua +{ + "supermaven-inc/supermaven-nvim", + opts = { + keymaps = { + accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp + }, + disable_inline_completion = vim.g.ai_cmp, + }, +} +``` + + + + + +## [supermaven-nvim](https://github.com/supermaven-inc/supermaven-nvim) + + add ai_accept action + + + + + + +```lua +opts = function() + require("supermaven-nvim.completion_preview").suggestion_group = "SupermavenSuggestion" + LazyVim.cmp.actions.ai_accept = function() + local suggestion = require("supermaven-nvim.completion_preview") + if suggestion.has_suggestion() then + LazyVim.create_undo() + vim.schedule(function() + suggestion.on_accept_suggestion() + end) + return true + end + end +end +``` + + + + + + +```lua +{ + "supermaven-inc/supermaven-nvim", + opts = function() + require("supermaven-nvim.completion_preview").suggestion_group = "SupermavenSuggestion" + LazyVim.cmp.actions.ai_accept = function() + local suggestion = require("supermaven-nvim.completion_preview") + if suggestion.has_suggestion() then + LazyVim.create_undo() + vim.schedule(function() + suggestion.on_accept_suggestion() + end) + return true + end + end + end, +} +``` + + + + + +## [supermaven-nvim](https://github.com/supermaven-inc/supermaven-nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "supermaven-nvim" } +``` + + + + + +## [supermaven-nvim](https://github.com/supermaven-inc/supermaven-nvim) + + + + + +```lua +opts = { + disable_inline_completion = false, +} +``` + + + + + + +```lua +{ + "supermaven-nvim", + opts = { + disable_inline_completion = false, + }, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + cmp integration + + + + + + +```lua +opts = function(_, opts) + if vim.g.ai_cmp then + table.insert(opts.sources, 1, { + name = "supermaven", + group_index = 1, + priority = 100, + }) + end +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { "supermaven-nvim" }, + opts = function(_, opts) + if vim.g.ai_cmp then + table.insert(opts.sources, 1, { + name = "supermaven", + group_index = 1, + priority = 100, + }) + end + end, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp integration + + FIXME: this currently doesn't work properly + { + "saghen/blink.cmp", + optional = true, + opts = { + sources = { + compat = vim.g.ai_cmp and { "supermaven" } or nil, + }, + }, + dependencies = { + "supermaven-nvim", + vim.g.ai_cmp and "saghen/blink.compat" or nil, + }, + }, + + Disabble cmp integration for now + + + + + + +```lua +opts = { + windows = { ghost_text = { enabled = false } }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + opts = { + windows = { ghost_text = { enabled = false } }, + }, + dependencies = { + { + "supermaven-nvim", + opts = { + disable_inline_completion = false, + }, + }, + }, +} +``` + + + + + +## [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 19d7ec8104c7c492065fc3b897b5d67b13dbd722 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 13 Nov 2024 18:26:03 +0000 Subject: [PATCH 320/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 283 +++++++++++++++++++++++-------------- docs/extras/editor/dial.md | 6 + docs/extras/editor/fzf.md | 49 +++---- 3 files changed, 201 insertions(+), 137 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index c2addb5da3..7e61b979ed 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -94,6 +94,140 @@ opts = {
+## [blink.cmp](https://github.com/saghen/blink.cmp) + + blink.cmp + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + dependencies = { + { + "giuxtaposition/blink-cmp-copilot", + enabled = vim.g.ai_cmp, -- only enable if needed + specs = { + { + "blink.cmp", + opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, + }, + }, + }, + }, + }, +} +``` + + + + + +## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) + + add ai_accept action + + + + + + +```lua +opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("copilot.suggestion").is_visible() then + LazyVim.create_undo() + require("copilot.suggestion").accept() + return true + end + end +end +``` + + + + + + +```lua +{ + "zbirenbaum/copilot.lua", + opts = function() + LazyVim.cmp.actions.ai_accept = function() + if require("copilot.suggestion").is_visible() then + LazyVim.create_undo() + require("copilot.suggestion").accept() + return true + end + end + end, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) +end +``` + + + + + + +```lua +{ + "nvim-cmp", + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) + end, +} +``` + + + + + ## [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) this will only be evaluated if nvim-cmp is enabled @@ -204,25 +338,14 @@ opts = nil
-## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) - - add ai_accept action - +## [blink-cmp-copilot](https://github.com/giuxtaposition/blink-cmp-copilot) ```lua -opts = function() - LazyVim.cmp.actions.ai_accept = function() - if require("copilot.suggestion").is_visible() then - LazyVim.create_undo() - require("copilot.suggestion").accept() - return true - end - end -end +opts = nil ``` @@ -232,16 +355,23 @@ end ```lua { - "zbirenbaum/copilot.lua", - opts = function() - LazyVim.cmp.actions.ai_accept = function() - if require("copilot.suggestion").is_visible() then - LazyVim.create_undo() - require("copilot.suggestion").accept() - return true - end - end - end, + "giuxtaposition/blink-cmp-copilot", + enabled = vim.g.ai_cmp, -- only enable if needed + specs = { + { + "blink.cmp", + opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, + }, + }, + }, } ``` @@ -249,67 +379,43 @@ end -## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) - - blink has no copilot source, so force enable suggestions - +## [blink.cmp](https://github.com/saghen/blink.cmp) ```lua -opts = { suggestion = { enabled = true } } -``` - - - - - - -```lua -{ - "zbirenbaum/copilot.lua", - opts = { suggestion = { enabled = true } }, +opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, } ``` - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) -end -``` - - - ```lua { - "nvim-cmp", - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, + "blink.cmp", + opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, + }, } ``` @@ -372,45 +478,4 @@ end -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - blink.cmp - - - - - - -```lua -opts = { - windows = { ghost_text = { enabled = false } }, -} -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - opts = { - windows = { ghost_text = { enabled = false } }, - }, - specs = { - -- blink has no copilot source, so force enable suggestions - { - "zbirenbaum/copilot.lua", - opts = { suggestion = { enabled = true } }, - }, - }, -} -``` - - - - - diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 43abea790b..1ebb9d65a1 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -135,6 +135,9 @@ opts = function() ordinal_numbers, weekdays, months, + capitalized_boolean, + augend.constant.alias.bool, -- boolean value (true <-> false) + logical_alias, }, typescript = { augend.integer.alias.decimal_int, -- nonnegative and negative decimal number @@ -294,6 +297,9 @@ end ordinal_numbers, weekdays, months, + capitalized_boolean, + augend.constant.alias.bool, -- boolean value (true <-> false) + logical_alias, }, typescript = { augend.integer.alias.decimal_int, -- nonnegative and negative decimal number diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 672cc42750..a2d04a60d8 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -79,18 +79,6 @@ opts = function(_, opts) config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") - -- use the same prompt for all - local defaults = require("fzf-lua.profiles.default-title") - local function fix(t) - t.prompt = t.prompt ~= nil and " " or nil - for _, v in pairs(t) do - if type(v) == "table" then - fix(v) - end - end - end - fix(defaults) - local img_previewer ---@type string[]? for _, v in ipairs({ { cmd = "ueberzug", args = {} }, @@ -103,7 +91,8 @@ opts = function(_, opts) end end - return vim.tbl_deep_extend("force", defaults, { + return { + "default-title", fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -191,7 +180,7 @@ opts = function(_, opts) previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, }, }, - }) + } end ``` @@ -234,18 +223,6 @@ end config.defaults.actions.files["alt-c"] = config.defaults.actions.files["ctrl-r"] config.set_action_helpstr(config.defaults.actions.files["ctrl-r"], "toggle-root-dir") - -- use the same prompt for all - local defaults = require("fzf-lua.profiles.default-title") - local function fix(t) - t.prompt = t.prompt ~= nil and " " or nil - for _, v in pairs(t) do - if type(v) == "table" then - fix(v) - end - end - end - fix(defaults) - local img_previewer ---@type string[]? for _, v in ipairs({ { cmd = "ueberzug", args = {} }, @@ -258,7 +235,8 @@ end end end - return vim.tbl_deep_extend("force", defaults, { + return { + "default-title", fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -346,9 +324,24 @@ end previewer = vim.fn.executable("delta") == 1 and "codeaction_native" or nil, }, }, - }) + } end, config = function(_, opts) + if opts[1] == "default-title" then + -- use the same prompt for all pickers for profile `default-title` and + -- profiles that use `default-title` as base profile + local function fix(t) + t.prompt = t.prompt ~= nil and " " or nil + for _, v in pairs(t) do + if type(v) == "table" then + fix(v) + end + end + return t + end + opts = vim.tbl_deep_extend("force", fix(require("fzf-lua.profiles.default-title")), opts) + opts[1] = nil + end require("fzf-lua").setup(opts) end, init = function() From b9e6940c2192ea60f8460d331eb53e28291441a6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 15 Nov 2024 06:31:26 +0000 Subject: [PATCH 321/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 322 +++++++++++++++++++------------------- 1 file changed, 164 insertions(+), 158 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 7e61b979ed..5071988ad9 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -94,56 +94,6 @@ opts = {
-## [blink.cmp](https://github.com/saghen/blink.cmp) - - blink.cmp - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - dependencies = { - { - "giuxtaposition/blink-cmp-copilot", - enabled = vim.g.ai_cmp, -- only enable if needed - specs = { - { - "blink.cmp", - opts = { - sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, - completion = { - enabled_providers = { "copilot" }, - }, - }, - }, - }, - }, - }, - }, -} -``` - - - - - ## [copilot.lua](https://github.com/zbirenbaum/copilot.lua) add ai_accept action @@ -189,45 +139,6 @@ end
-## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) -end -``` - - - - - - -```lua -{ - "nvim-cmp", - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, -} -``` - - - - - ## [copilot-cmp](https://github.com/zbirenbaum/copilot-cmp) this will only be evaluated if nvim-cmp is enabled @@ -263,6 +174,7 @@ opts = {} specs = { { "nvim-cmp", + optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) table.insert(opts.sources, 1, { @@ -280,7 +192,104 @@ opts = {} -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [blink-cmp-copilot](https://github.com/giuxtaposition/blink-cmp-copilot) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "giuxtaposition/blink-cmp-copilot", + enabled = vim.g.ai_cmp, -- only enable if needed + specs = { + { + "blink.cmp", + optional = true, + opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, + }, + }, + }, +} +``` + + + + + +## [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 = 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 + return (status == "InProgress" and "pending") or (status == "Warning" and "error") 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 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 + return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" + end + end) + ) + end, +} +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ copilot cmp source @@ -319,6 +328,7 @@ opts = nil specs = { { "nvim-cmp", + optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) table.insert(opts.sources, 1, { @@ -338,7 +348,50 @@ opts = nil -## [blink-cmp-copilot](https://github.com/giuxtaposition/blink-cmp-copilot) +## [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 +{ + "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)_ + + blink.cmp + @@ -355,18 +408,25 @@ opts = nil ```lua { - "giuxtaposition/blink-cmp-copilot", - enabled = vim.g.ai_cmp, -- only enable if needed - specs = { + "saghen/blink.cmp", + optional = true, + dependencies = { { - "blink.cmp", - opts = { - sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, - completion = { - enabled_providers = { "copilot" }, + "giuxtaposition/blink-cmp-copilot", + enabled = vim.g.ai_cmp, -- only enable if needed + specs = { + { + "blink.cmp", + optional = true, + opts = { + sources = { + providers = { + copilot = { name = "copilot", module = "blink-cmp-copilot" }, + }, + completion = { + enabled_providers = { "copilot" }, + }, + }, }, }, }, @@ -379,7 +439,7 @@ opts = nil -## [blink.cmp](https://github.com/saghen/blink.cmp) +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ @@ -406,6 +466,7 @@ opts = { ```lua { "blink.cmp", + optional = true, opts = { sources = { providers = { @@ -423,59 +484,4 @@ opts = { -## [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 = 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 - return (status == "InProgress" and "pending") or (status == "Warning" and "error") 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 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 - return (status == "InProgress" and "pending") or (status == "Warning" and "error") or "ok" - end - end) - ) - end, -} -``` - - - - - From 72d5ff2afa4671e6ca81fbd0ed305128aae1c18d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 16 Nov 2024 07:17:07 +0000 Subject: [PATCH 322/553] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 12 --- docs/extras/coding/blink.md | 34 +++++++ docs/extras/editor/dial.md | 26 +++++- docs/extras/formatting/biome.md | 158 ++++++++++++++++++++++++++++++++ docs/keymaps.md | 1 - 5 files changed, 214 insertions(+), 17 deletions(-) create mode 100644 docs/extras/formatting/biome.md diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index dbae1440de..10a9f97ac1 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -44,16 +44,11 @@ opts = function() user = user:sub(1, 1):upper() .. user:sub(2) return { auto_insert_mode = true, - show_help = true, question_header = " " .. user .. " ", answer_header = " Copilot ", window = { width = 0.4, }, - selection = function(source) - local select = require("CopilotChat.select") - return select.visual(source) or select.buffer(source) - end, } end ``` @@ -73,16 +68,11 @@ end user = user:sub(1, 1):upper() .. user:sub(2) return { auto_insert_mode = true, - show_help = true, question_header = " " .. user .. " ", answer_header = " Copilot ", window = { width = 0.4, }, - selection = function(source) - local select = require("CopilotChat.select") - return select.visual(source) or select.buffer(source) - end, } end, keys = { @@ -115,8 +105,6 @@ end desc = "Quick Chat (CopilotChat)", mode = { "n", "v" }, }, - -- Show help actions with telescope - { "ad", M.pick("help"), desc = "Diagnostic Help (CopilotChat)", mode = { "n", "v" } }, -- Show prompts actions with telescope { "ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } }, }, diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index d89718e6b8..3d936d5171 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -313,4 +313,38 @@ opts = { +## [catppuccin](https://github.com/catppuccin/nvim) _(optional)_ + + catppuccin support + + + + + + +```lua +opts = { + integrations = { blink_cmp = true }, +} +``` + + + + + + +```lua +{ + "catppuccin", + optional = true, + opts = { + integrations = { blink_cmp = true }, + }, +} +``` + + + + + diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 1ebb9d65a1..37c40f6fc9 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -115,7 +115,10 @@ opts = function() return { dials_by_ft = { css = "css", + vue = "vue", javascript = "typescript", + typescript = "typescript", + typescriptreact = "typescript", javascriptreact = "typescript", json = "json", lua = "lua", @@ -123,8 +126,6 @@ opts = function() python = "python", sass = "css", scss = "css", - typescript = "typescript", - typescriptreact = "typescript", yaml = "yaml", }, groups = { @@ -139,6 +140,14 @@ opts = function() augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, }, + vue = { + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number + augend.constant.alias.bool, -- boolean value (true <-> false) + logical_alias, + augend.constant.new({ elements = { "let", "const" } }), + augend.hexcolor.new({ case = "lower" }), + augend.hexcolor.new({ case = "upper" }), + }, typescript = { augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) @@ -277,7 +286,10 @@ end return { dials_by_ft = { css = "css", + vue = "vue", javascript = "typescript", + typescript = "typescript", + typescriptreact = "typescript", javascriptreact = "typescript", json = "json", lua = "lua", @@ -285,8 +297,6 @@ end python = "python", sass = "css", scss = "css", - typescript = "typescript", - typescriptreact = "typescript", yaml = "yaml", }, groups = { @@ -301,6 +311,14 @@ end augend.constant.alias.bool, -- boolean value (true <-> false) logical_alias, }, + vue = { + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number + augend.constant.alias.bool, -- boolean value (true <-> false) + logical_alias, + augend.constant.new({ elements = { "let", "const" } }), + augend.hexcolor.new({ case = "lower" }), + augend.hexcolor.new({ case = "upper" }), + }, typescript = { augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.constant.alias.bool, -- boolean value (true <-> false) diff --git a/docs/extras/formatting/biome.md b/docs/extras/formatting/biome.md new file mode 100644 index 0000000000..9238c2f995 --- /dev/null +++ b/docs/extras/formatting/biome.md @@ -0,0 +1,158 @@ +# `Biome` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.formatting.biome" }, + { import = "plugins" }, + }, +}) +``` + +
+ +### 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" +-- Enable this option to avoid conflicts with Prettier. +vim.g.lazyvim_prettier_needs_config = true +``` + +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'; + +## [mason.nvim](https://github.com/williamboman/mason.nvim) + + + + + +```lua +opts = { ensure_installed = { "biome" } } +``` + + + + + + +```lua +{ + "williamboman/mason.nvim", + opts = { ensure_installed = { "biome" } }, +} +``` + + + + + +## [conform.nvim](https://github.com/stevearc/conform.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + opts.formatters_by_ft = opts.formatters_by_ft or {} + for _, ft in ipairs(supported) do + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "biome") + end + + opts.formatters = opts.formatters or {} + opts.formatters.biome = { + require_cwd = true, + } +end +``` + + + + + + +```lua +{ + "stevearc/conform.nvim", + optional = true, + ---@param opts ConformOpts + opts = function(_, opts) + opts.formatters_by_ft = opts.formatters_by_ft or {} + for _, ft in ipairs(supported) do + opts.formatters_by_ft[ft] = opts.formatters_by_ft[ft] or {} + table.insert(opts.formatters_by_ft[ft], "biome") + end + + opts.formatters = opts.formatters or {} + opts.formatters.biome = { + require_cwd = true, + } + end, +} +``` + + + + + +## [none-ls.nvim](https://github.com/nvimtools/none-ls.nvim) _(optional)_ + + none-ls support + + + + + + +```lua +opts = function(_, opts) + local nls = require("null-ls") + opts.sources = opts.sources or {} + table.insert(opts.sources, nls.builtins.formatting.biome) +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.formatting.biome) + end, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index e7cb193209..d2fbb2e294 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -294,7 +294,6 @@ Part of [lazyvim.plugins.extras.ai.copilot-chat](/extras/ai/copilot-chat) | <c-s> | Submit Prompt | **n** | | <leader>a | +ai | **n**, **v** | | <leader>aa | Toggle (CopilotChat) | **n**, **v** | -| <leader>ad | Diagnostic Help (CopilotChat) | **n**, **v** | | <leader>ap | Prompt Actions (CopilotChat) | **n**, **v** | | <leader>aq | Quick Chat (CopilotChat) | **n**, **v** | | <leader>ax | Clear (CopilotChat) | **n**, **v** | From cc73ce0cf34ece6480dc77a1acccba956e37143c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 18 Nov 2024 09:23:07 +0000 Subject: [PATCH 323/553] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index 10a9f97ac1..8d5f2d2bec 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -110,9 +110,6 @@ end }, config = function(_, opts) local chat = require("CopilotChat") - if pcall(require, "cmp") then - require("CopilotChat.integrations.cmp").setup() - end vim.api.nvim_create_autocmd("BufEnter", { pattern = "copilot-chat", From e93a4b36749f913fe237b9b034f0880bc8b1374e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 18 Nov 2024 21:16:52 +0000 Subject: [PATCH 324/553] chore(build): auto-generate docs --- docs/extras/ai/tabnine.md | 2 -- docs/plugins/ui.md | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index c7b6bbcf64..6ac42771c6 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -72,7 +72,6 @@ end "tzachar/cmp-tabnine", build = { LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", - ":CmpTabnineHub", }, dependencies = "hrsh7th/nvim-cmp", opts = { @@ -131,7 +130,6 @@ opts = { "tzachar/cmp-tabnine", build = { LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", - ":CmpTabnineHub", }, dependencies = "hrsh7th/nvim-cmp", opts = { diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index e20be97868..15c5bc9d4d 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -136,7 +136,7 @@ opts = function() options = { theme = "auto", globalstatus = vim.o.laststatus == 3, - disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter" } }, + disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter", "snacks_dashboard" } }, }, sections = { lualine_a = { "mode" }, @@ -269,7 +269,7 @@ end options = { theme = "auto", globalstatus = vim.o.laststatus == 3, - disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter" } }, + disabled_filetypes = { statusline = { "dashboard", "alpha", "ministarter", "snacks_dashboard" } }, }, sections = { lualine_a = { "mode" }, From a336a4079a90d703a8e84198e6b1f7ef1a064043 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 18 Nov 2024 23:18:56 +0000 Subject: [PATCH 325/553] chore(build): auto-generate docs --- docs/extras/lang/sql.md | 76 ++++++++++++ docs/extras/ui/alpha.md | 23 ++++ docs/extras/ui/dashboard-nvim.md | 205 +++++++++++++++++++++++++++++++ docs/extras/ui/mini-starter.md | 26 ++++ docs/news.md | 7 ++ docs/plugins/ui.md | 167 +++++++------------------ 6 files changed, 384 insertions(+), 120 deletions(-) create mode 100644 docs/extras/ui/dashboard-nvim.md diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 1915e5a830..dcf8d98c04 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -183,6 +183,31 @@ opts = nil +## [vim-dadbod-completion](https://github.com/kristijanhusak/vim-dadbod-completion) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "kristijanhusak/vim-dadbod-completion", +} +``` + + + + + ## [mason.nvim](https://github.com/williamboman/mason.nvim) Linters & formatters @@ -306,6 +331,57 @@ end +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp integration + + + + + + +```lua +opts = { + sources = { + completion = { + enabled_providers = { "dadbod" }, + }, + providers = { + dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, + }, + }, +} +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + opts = { + sources = { + completion = { + enabled_providers = { "dadbod" }, + }, + providers = { + dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, + }, + }, + }, + dependencies = { + "kristijanhusak/vim-dadbod-completion", + }, +} +``` + + + + + ## [nvim-lint](https://github.com/mfussenegger/nvim-lint) _(optional)_ diff --git a/docs/extras/ui/alpha.md b/docs/extras/ui/alpha.md index 74c3e800be..b311802f35 100644 --- a/docs/extras/ui/alpha.md +++ b/docs/extras/ui/alpha.md @@ -32,6 +32,29 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = { dashboard = { enabled = false } } +``` + + + + + + +```lua +{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } } +``` + + + + + ## [alpha-nvim](https://github.com/goolord/alpha-nvim) Dashboard. This runs when neovim starts, and is what displays diff --git a/docs/extras/ui/dashboard-nvim.md b/docs/extras/ui/dashboard-nvim.md new file mode 100644 index 0000000000..c2e7a8c50c --- /dev/null +++ b/docs/extras/ui/dashboard-nvim.md @@ -0,0 +1,205 @@ +# `Dashboard-nvim` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.dashboard-nvim" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = { dashboard = { enabled = false } } +``` + + + + + + +```lua +{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } } +``` + + + + + +## [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) + + + + + +```lua +opts = function() + local logo = [[ + ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z + ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z + ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ]] + + logo = string.rep("\n", 8) .. logo .. "\n\n" + + local opts = { + theme = "doom", + hide = { + -- this is taken care of by lualine + -- enabling this messes up the actual laststatus setting after loading a file + statusline = false, + }, + config = { + header = vim.split(logo, "\n"), + -- stylua: ignore + center = { + { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, + { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, + { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, + { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, + { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, + { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, + { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, + }, + footer = function() + local stats = require("lazy").stats() + local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) + return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } + end, + }, + } + + for _, button in ipairs(opts.config.center) do + button.desc = button.desc .. string.rep(" ", 43 - #button.desc) + button.key_format = " %s" + end + + -- open dashboard after closing lazy + if vim.o.filetype == "lazy" then + vim.api.nvim_create_autocmd("WinClosed", { + pattern = tostring(vim.api.nvim_get_current_win()), + once = true, + callback = function() + vim.schedule(function() + vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) + end) + end, + }) + end + + return opts +end +``` + + + + + + +```lua +{ + "nvimdev/dashboard-nvim", + lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. + opts = function() + local logo = [[ + ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z + ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z + ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ]] + + logo = string.rep("\n", 8) .. logo .. "\n\n" + + local opts = { + theme = "doom", + hide = { + -- this is taken care of by lualine + -- enabling this messes up the actual laststatus setting after loading a file + statusline = false, + }, + config = { + header = vim.split(logo, "\n"), + -- stylua: ignore + center = { + { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, + { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, + { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, + { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, + { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, + { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, + { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, + { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, + { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, + }, + footer = function() + local stats = require("lazy").stats() + local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) + return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } + end, + }, + } + + for _, button in ipairs(opts.config.center) do + button.desc = button.desc .. string.rep(" ", 43 - #button.desc) + button.key_format = " %s" + end + + -- open dashboard after closing lazy + if vim.o.filetype == "lazy" then + vim.api.nvim_create_autocmd("WinClosed", { + pattern = tostring(vim.api.nvim_get_current_win()), + once = true, + callback = function() + vim.schedule(function() + vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) + end) + end, + }) + end + + return opts + end, +} +``` + + + + + + diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index c7215538ec..b1ed410ae3 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -32,6 +32,32 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + disable alpha + + + + + + +```lua +opts = { dashboard = { enabled = false } } +``` + + + + + + +```lua +{ "folke/snacks.nvim", opts = { dashboard = { enabled = false } } } +``` + + + + + ## [mini.starter](https://github.com/echasnovski/mini.starter) enable mini.starter diff --git a/docs/news.md b/docs/news.md index a132b519f2..57d13e9fd0 100644 --- a/docs/news.md +++ b/docs/news.md @@ -6,6 +6,13 @@ sidebar_position: 2 ## 13.x +- **LazyVim** now uses `Snacks.dashboard` as the default dashboard. + Check the [docs](https://github.com/folke/snacks.nvim/blob/main/docs/dashboard.md), + for more information and examples. + +- A new [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) extra + is available for those who prefer the old dashboard. + - Big new release with a lot of changes and improvements! - The biggest change is the move of a bunch of core features to diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 15c5bc9d4d..b89c3ab97d 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -657,74 +657,38 @@ opts = nil
-## [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) +## [snacks.nvim](https://github.com/folke/snacks.nvim) ```lua -opts = function() - local logo = [[ - ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z - ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z - ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z - ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z - ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ - ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ - ]] - - logo = string.rep("\n", 8) .. logo .. "\n\n" - - local opts = { - theme = "doom", - hide = { - -- this is taken care of by lualine - -- enabling this messes up the actual laststatus setting after loading a file - statusline = false, - }, - config = { - header = vim.split(logo, "\n"), - -- stylua: ignore - center = { - { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, - { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, - { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, - { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, - { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, - { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, - { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, +opts = { + dashboard = { + preset = { + header = [[ +██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z +██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z +██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z +██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z +███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ +╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ]], + ---@param keys snacks.dashboard.Item[] + keys = function(keys) + -- add LazyExtra before Lazy + for k, key in ipairs(keys) do + if key.action == ":Lazy" then + key.key = "l" -- we don't have multiple panes, so `l` is free + table.insert(keys, k, { icon = " ", desc = "Lazy Extras", action = ":LazyExtras", key = "x" }) + break + end + end + end, }, - footer = function() - local stats = require("lazy").stats() - local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) - return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } - end, }, } - - for _, button in ipairs(opts.config.center) do - button.desc = button.desc .. string.rep(" ", 43 - #button.desc) - button.key_format = " %s" - end - - -- open dashboard after closing lazy - if vim.o.filetype == "lazy" then - vim.api.nvim_create_autocmd("WinClosed", { - pattern = tostring(vim.api.nvim_get_current_win()), - once = true, - callback = function() - vim.schedule(function() - vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) - end) - end, - }) - end - - return opts -end ``` @@ -734,69 +698,32 @@ end ```lua { - "nvimdev/dashboard-nvim", - lazy = false, -- As https://github.com/nvimdev/dashboard-nvim/pull/450, dashboard-nvim shouldn't be lazy-loaded to properly handle stdin. - opts = function() - local logo = [[ - ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z - ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z - ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z - ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z - ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ - ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ - ]] - - logo = string.rep("\n", 8) .. logo .. "\n\n" - - local opts = { - theme = "doom", - hide = { - -- this is taken care of by lualine - -- enabling this messes up the actual laststatus setting after loading a file - statusline = false, - }, - config = { - header = vim.split(logo, "\n"), - -- stylua: ignore - center = { - { action = 'lua LazyVim.pick()()', desc = " Find File", icon = " ", key = "f" }, - { action = "ene | startinsert", desc = " New File", icon = " ", key = "n" }, - { action = 'lua LazyVim.pick("oldfiles")()', desc = " Recent Files", icon = " ", key = "r" }, - { action = 'lua LazyVim.pick("live_grep")()', desc = " Find Text", icon = " ", key = "g" }, - { action = 'lua LazyVim.pick.config_files()()', desc = " Config", icon = " ", key = "c" }, - { action = 'lua require("persistence").load()', desc = " Restore Session", icon = " ", key = "s" }, - { action = "LazyExtras", desc = " Lazy Extras", icon = " ", key = "x" }, - { action = "Lazy", desc = " Lazy", icon = "󰒲 ", key = "l" }, - { action = function() vim.api.nvim_input("qa") end, desc = " Quit", icon = " ", key = "q" }, - }, - footer = function() - local stats = require("lazy").stats() - local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100) - return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" } + "folke/snacks.nvim", + opts = { + dashboard = { + preset = { + header = [[ +██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z +██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z +██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z +██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z +███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ +╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ]], + ---@param keys snacks.dashboard.Item[] + keys = function(keys) + -- add LazyExtra before Lazy + for k, key in ipairs(keys) do + if key.action == ":Lazy" then + key.key = "l" -- we don't have multiple panes, so `l` is free + table.insert(keys, k, { icon = " ", desc = "Lazy Extras", action = ":LazyExtras", key = "x" }) + break + end + end end, }, - } - - for _, button in ipairs(opts.config.center) do - button.desc = button.desc .. string.rep(" ", 43 - #button.desc) - button.key_format = " %s" - end - - -- open dashboard after closing lazy - if vim.o.filetype == "lazy" then - vim.api.nvim_create_autocmd("WinClosed", { - pattern = tostring(vim.api.nvim_get_current_win()), - once = true, - callback = function() - vim.schedule(function() - vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" }) - end) - end, - }) - end - - return opts - end, + }, + }, } ``` From 3f78460bce7a924d20ecf03827b8350860a03ff8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 07:19:14 +0000 Subject: [PATCH 326/553] chore(build): auto-generate docs --- docs/extras/util/project.md | 47 ++++++++++++++++++++++++++++++++++++ docs/plugins/ui.md | 48 ++++++++++++++++++++----------------- 2 files changed, 73 insertions(+), 22 deletions(-) diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 7a898c2809..eb70061604 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -226,6 +226,9 @@ end ```lua opts = function(_, opts) + if not vim.tbl_get(opts, "config", "center") then + return + end local projects = { action = pick, desc = " Projects", @@ -250,6 +253,9 @@ end "nvimdev/dashboard-nvim", optional = true, opts = function(_, opts) + if not vim.tbl_get(opts, "config", "center") then + return + end local projects = { action = pick, desc = " Projects", @@ -269,4 +275,45 @@ end +## [snacks.nvim](https://github.com/folke/snacks.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + table.insert(opts.dashboard.preset.keys, 3, { + action = pick, + desc = "Projects", + icon = " ", + key = "p", + }) +end +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + optional = true, + opts = function(_, opts) + table.insert(opts.dashboard.preset.keys, 3, { + action = pick, + desc = "Projects", + icon = " ", + key = "p", + }) + end, +} +``` + + + + + diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index b89c3ab97d..45381b01ac 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -675,17 +675,19 @@ opts = { ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], - ---@param keys snacks.dashboard.Item[] - keys = function(keys) - -- add LazyExtra before Lazy - for k, key in ipairs(keys) do - if key.action == ":Lazy" then - key.key = "l" -- we don't have multiple panes, so `l` is free - table.insert(keys, k, { icon = " ", desc = "Lazy Extras", action = ":LazyExtras", key = "x" }) - break - end - end - end, + -- stylua: ignore + ---@type snacks.dashboard.Item[] + keys = { + { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, + { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, + { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, + { icon = " ", key = "s", desc = "Restore Session", section = "session" }, + { icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" }, + { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, }, }, } @@ -710,17 +712,19 @@ opts = { ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], - ---@param keys snacks.dashboard.Item[] - keys = function(keys) - -- add LazyExtra before Lazy - for k, key in ipairs(keys) do - if key.action == ":Lazy" then - key.key = "l" -- we don't have multiple panes, so `l` is free - table.insert(keys, k, { icon = " ", desc = "Lazy Extras", action = ":LazyExtras", key = "x" }) - break - end - end - end, + -- stylua: ignore + ---@type snacks.dashboard.Item[] + keys = { + { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, + { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, + { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, + { icon = " ", key = "s", desc = "Restore Session", section = "session" }, + { icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" }, + { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, }, }, }, From 8a5b66753bdb15a61a53e9db466b1be105c32dfb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 08:26:21 +0000 Subject: [PATCH 327/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 5071988ad9..f9e9b4b939 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -87,6 +87,15 @@ opts = { help = true, }, }, + config = function(_, opts) + require("copilot").setup(opts) + -- HACK: work-around for https://github.com/neovim/neovim/issues/31262 + local Util = require("copilot.util") + local language_for_file_type = Util.language_for_file_type + Util.language_for_file_type = function(ft) + return language_for_file_type(ft or "") + end + end, } ``` From a7f1a4876562dfe42b512036a858c02f1b13d580 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 09:21:38 +0000 Subject: [PATCH 328/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 64 +++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 45381b01ac..d5ae808aca 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -665,32 +665,32 @@ opts = nil ```lua opts = { - dashboard = { - preset = { - header = [[ -██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z -██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z -██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z -██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z -███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ -╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ - ]], - -- stylua: ignore - ---@type snacks.dashboard.Item[] - keys = { - { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, - { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, - { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, - { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, - { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, - { icon = " ", key = "s", desc = "Restore Session", section = "session" }, - { icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" }, - { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, - { icon = " ", key = "q", desc = "Quit", action = ":qa" }, - }, - }, - }, - } + dashboard = { + preset = { + header = [[ + ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z + ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z + ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ +]], + -- stylua: ignore + ---@type snacks.dashboard.Item[] + keys = { + { icon = " ", key = "f", desc = "Find File", action = ":lua Snacks.dashboard.pick('files')" }, + { icon = " ", key = "n", desc = "New File", action = ":ene | startinsert" }, + { icon = " ", key = "g", desc = "Find Text", action = ":lua Snacks.dashboard.pick('live_grep')" }, + { icon = " ", key = "r", desc = "Recent Files", action = ":lua Snacks.dashboard.pick('oldfiles')" }, + { icon = " ", key = "c", desc = "Config", action = ":lua Snacks.dashboard.pick('files', {cwd = vim.fn.stdpath('config')})" }, + { icon = " ", key = "s", desc = "Restore Session", section = "session" }, + { icon = " ", key = "x", desc = "Lazy Extras", action = ":LazyExtras" }, + { icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" }, + { icon = " ", key = "q", desc = "Quit", action = ":qa" }, + }, + }, + }, + } ``` @@ -705,12 +705,12 @@ opts = { dashboard = { preset = { header = [[ -██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z -██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z -██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z -██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z -███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ -╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z + ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z + ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], -- stylua: ignore ---@type snacks.dashboard.Item[] From f2da878df96a0266bb9c19384c19b642ed6a1b15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 19 Nov 2024 15:21:54 +0000 Subject: [PATCH 329/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 268b1f7698..aa5bf2804a 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -328,7 +328,7 @@ 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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) - map("n", "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) + map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) From c4503b802533bf8253bbff84b6dacc72d983925f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 20 Nov 2024 09:21:14 +0000 Subject: [PATCH 330/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index f9e9b4b939..5071988ad9 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -87,15 +87,6 @@ opts = { help = true, }, }, - config = function(_, opts) - require("copilot").setup(opts) - -- HACK: work-around for https://github.com/neovim/neovim/issues/31262 - local Util = require("copilot.util") - local language_for_file_type = Util.language_for_file_type - Util.language_for_file_type = function(ft) - return language_for_file_type(ft or "") - end - end, } ``` From 6fba35da7376991b7fb0832083369b2151151c50 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Nov 2024 06:28:18 +0000 Subject: [PATCH 331/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 50 ++++++-------------------------------- 1 file changed, 8 insertions(+), 42 deletions(-) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 37c40f6fc9..130eae4c73 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -123,14 +123,13 @@ opts = function() json = "json", lua = "lua", markdown = "markdown", - python = "python", sass = "css", scss = "css", - yaml = "yaml", }, groups = { default = { augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...) + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.) augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.) ordinal_numbers, @@ -141,25 +140,14 @@ opts = function() logical_alias, }, vue = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - logical_alias, augend.constant.new({ elements = { "let", "const" } }), augend.hexcolor.new({ case = "lower" }), augend.hexcolor.new({ case = "upper" }), }, typescript = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - logical_alias, augend.constant.new({ elements = { "let", "const" } }), }, - yaml = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - }, css = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.hexcolor.new({ case = "lower", }), @@ -171,23 +159,15 @@ opts = function() augend.misc.alias.markdown_header, }, json = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.semver.alias.semver, -- versioning (v1.1.2) }, lua = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) augend.constant.new({ elements = { "and", "or" }, word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. cyclic = true, -- "or" is incremented into "and". }), }, - python = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - capitalized_boolean, - logical_alias, - }, }, } end @@ -294,14 +274,13 @@ end json = "json", lua = "lua", markdown = "markdown", - python = "python", sass = "css", scss = "css", - yaml = "yaml", }, groups = { default = { augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...) + augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.) augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.) ordinal_numbers, @@ -312,25 +291,14 @@ end logical_alias, }, vue = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - logical_alias, augend.constant.new({ elements = { "let", "const" } }), augend.hexcolor.new({ case = "lower" }), augend.hexcolor.new({ case = "upper" }), }, typescript = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - logical_alias, augend.constant.new({ elements = { "let", "const" } }), }, - yaml = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) - }, css = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.hexcolor.new({ case = "lower", }), @@ -342,27 +310,25 @@ end augend.misc.alias.markdown_header, }, json = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number augend.semver.alias.semver, -- versioning (v1.1.2) }, lua = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - augend.constant.alias.bool, -- boolean value (true <-> false) augend.constant.new({ elements = { "and", "or" }, word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. cyclic = true, -- "or" is incremented into "and". }), }, - python = { - augend.integer.alias.decimal_int, -- nonnegative and negative decimal number - capitalized_boolean, - logical_alias, - }, }, } end, config = function(_, opts) + -- copy defaults to each group + for name, group in pairs(opts.groups) do + if name ~= "default" then + vim.list_extend(group, opts.groups.default) + end + end require("dial.config").augends:register_group(opts.groups) vim.g.dials_by_ft = opts.dials_by_ft end, From 5997a12221c4dffdef6e1e63a06d82e6b93d1949 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Nov 2024 12:39:02 +0000 Subject: [PATCH 332/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 +++-- docs/keymaps.md | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index aa5bf2804a..a40d504968 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -327,13 +327,14 @@ 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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) - map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) end +map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) + -- quit map("n", "qq", "qa", { desc = "Quit All" }) diff --git a/docs/keymaps.md b/docs/keymaps.md index d2fbb2e294..9987371f0c 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -75,6 +75,8 @@ possible keymaps starting with ``. | <leader>uT | Toggle Treesitter Highlight | **n** | | <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | +| <leader>gb | Git Blame Line | **n** | +| <leader>gB | Git Browse | **n**, **x** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | From 1d76ad5b1c3222faab80bce2c0b6acebf3fd119e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 22 Nov 2024 23:20:25 +0000 Subject: [PATCH 333/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 130eae4c73..a2237c8f5a 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -125,6 +125,7 @@ opts = function() markdown = "markdown", sass = "css", scss = "css", + python = "python", }, groups = { default = { @@ -168,6 +169,11 @@ opts = function() cyclic = true, -- "or" is incremented into "and". }), }, + python = { + augend.constant.new({ + elements = { "and", "or" }, + }), + }, }, } end @@ -276,6 +282,7 @@ end markdown = "markdown", sass = "css", scss = "css", + python = "python", }, groups = { default = { @@ -319,6 +326,11 @@ end cyclic = true, -- "or" is incremented into "and". }), }, + python = { + augend.constant.new({ + elements = { "and", "or" }, + }), + }, }, } end, From 91356167d0275b06d19b35a5ce28d44e140db7e4 Mon Sep 17 00:00:00 2001 From: Rod Elias Date: Sat, 23 Nov 2024 19:50:15 -0300 Subject: [PATCH 334/553] docs: uppercase PHP (#121) --- docs/extras/lang/php.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index a1f2f09997..e1e38a91d9 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -1,4 +1,4 @@ -# `Php` +# `PHP` From 14e509b5440a5e622806c7dfa98d5d11dffc254f Mon Sep 17 00:00:00 2001 From: pynappo Date: Sun, 24 Nov 2024 08:29:06 -0800 Subject: [PATCH 335/553] docs: fix typo (#122) --- docs/configuration/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index e563bdb0af..57db7f7be2 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -21,7 +21,7 @@ For more information, see [configuring plugins](/configuration/plugins). │   ├── spec1.lua │   ├── ** │   └── spec2.lua -└── init.toml +└── init.lua ``` ## Icons & Colorscheme From 1931058eaf89fac3b00b0911b54de818abf4d042 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Nov 2024 16:30:19 +0000 Subject: [PATCH 336/553] chore(build): auto-generate docs --- docs/plugins/colorscheme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index 68f26ef78b..4338a2b27a 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -94,6 +94,7 @@ opts = { noice = true, notify = true, semantic_tokens = true, + snacks = true, telescope = true, treesitter = true, treesitter_context = true, @@ -144,6 +145,7 @@ opts = { noice = true, notify = true, semantic_tokens = true, + snacks = true, telescope = true, treesitter = true, treesitter_context = true, From 8d138e658dcb1b14869f0d4a9d4b631496b8e91e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 24 Nov 2024 22:17:36 +0000 Subject: [PATCH 337/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 47 +++++++++++- docs/plugins/coding.md | 144 +++++++++++++++--------------------- 2 files changed, 102 insertions(+), 89 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 3d936d5171..794dd9d355 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -62,7 +62,6 @@ opts = { nerd_font_variant = "mono", windows = { autocomplete = { - -- draw = "reversed", winblend = vim.o.pumblend, }, documentation = { @@ -115,7 +114,12 @@ opts = { dependencies = { "rafamadriz/friendly-snippets", -- add blink.compat to dependencies - -- { "saghen/blink.compat", opts = {} }, + { + "saghen/blink.compat", + optional = true, -- make optional so it's only enabled if any extras need it + opts = {}, + version = not vim.g.lazyvim_blink_main and "*", + }, }, event = "InsertEnter", @@ -133,7 +137,6 @@ opts = { nerd_font_variant = "mono", windows = { autocomplete = { - -- draw = "reversed", winblend = vim.o.pumblend, }, documentation = { @@ -209,7 +212,12 @@ opts = nil { "rafamadriz/friendly-snippets", -- add blink.compat to dependencies - -- { "saghen/blink.compat", opts = {} }, + { + "saghen/blink.compat", + optional = true, -- make optional so it's only enabled if any extras need it + opts = {}, + version = not vim.g.lazyvim_blink_main and "*", + }, } ``` @@ -313,6 +321,37 @@ opts = { +## [blink.compat](https://github.com/saghen/blink.compat) _(optional)_ + + add blink.compat to dependencies + + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "saghen/blink.compat", + optional = true, -- make optional so it's only enabled if any extras need it + opts = {}, + version = not vim.g.lazyvim_blink_main and "*", +} +``` + + + + + ## [catppuccin](https://github.com/catppuccin/nvim) _(optional)_ catppuccin support diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index fe95bca49c..d324e93d33 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -250,6 +250,63 @@ opts = nil +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + snippets + + + + + + +```lua +opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end +end +``` + + + + + + +```lua +{ + "nvim-cmp", + optional = true, + dependencies = { + { + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + }, + dependencies = { "rafamadriz/friendly-snippets" }, + }, + }, + opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end + end, +} +``` + + + + + ## [nvim-snippets](https://github.com/garymjr/nvim-snippets) @@ -482,7 +539,7 @@ end ```lua opts = { library = { - { path = "luvit-meta/library", words = { "vim%.uv" } }, + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, { path = "LazyVim", words = { "LazyVim" } }, { path = "snacks.nvim", words = { "Snacks" } }, { path = "lazy.nvim", words = { "LazyVim" } }, @@ -502,7 +559,7 @@ opts = { cmd = "LazyDev", opts = { library = { - { path = "luvit-meta/library", words = { "vim%.uv" } }, + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, { path = "LazyVim", words = { "LazyVim" } }, { path = "snacks.nvim", words = { "Snacks" } }, { path = "lazy.nvim", words = { "LazyVim" } }, @@ -515,89 +572,6 @@ opts = { -## [luvit-meta](https://github.com/Bilal2453/luvit-meta) - - Manage libuv types with lazy. Plugin will never be loaded - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "Bilal2453/luvit-meta", lazy = true } -``` - - - - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - snippets - - - - - - -```lua -opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end -end -``` - - - - - - -```lua -{ - "nvim-cmp", - optional = true, - dependencies = { - { - "garymjr/nvim-snippets", - opts = { - friendly_snippets = true, - }, - dependencies = { "rafamadriz/friendly-snippets" }, - }, - }, - opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end - end, -} -``` - - - - - ## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) Add lazydev source to cmp From 220cfc836244735432cf9109f6bf1383b892ec19 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Nov 2024 14:19:17 +0000 Subject: [PATCH 338/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 ++++- docs/extras/lang/java.md | 4 ++-- docs/extras/util/octo.md | 17 ++++++++++------- docs/keymaps.md | 20 ++++++++++++-------- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index a40d504968..d2ef7936a5 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -333,7 +333,10 @@ if vim.fn.executable("lazygit") == 1 then end map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) -map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" }) +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 }) +end, { desc = "Git Browse (copy)" }) -- quit map("n", "qq", "qa", { desc = "Quit All" }) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index a8f9ff2864..cc45f06053 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -344,8 +344,8 @@ end { "cx", group = "extract" }, { "cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" }, { "cxc", require("jdtls").extract_constant, desc = "Extract Constant" }, - { "gs", require("jdtls").super_implementation, desc = "Goto Super" }, - { "gS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" }, + { "cgs", require("jdtls").super_implementation, desc = "Goto Super" }, + { "cgS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" }, { "co", require("jdtls").organize_imports, desc = "Organize Imports" }, }, }) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 662a55fa14..8481e3201a 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -78,13 +78,16 @@ opts = { { "gr", "Octo repo list", desc = "List Repos (Octo)" }, { "gS", "Octo search", desc = "Search (Octo)" }, - { "a", "", desc = "+assignee (Octo)", ft = "octo" }, - { "c", "", desc = "+comment/code (Octo)", ft = "octo" }, - { "l", "", desc = "+label (Octo)", ft = "octo" }, - { "i", "", desc = "+issue (Octo)", ft = "octo" }, - { "r", "", desc = "+react (Octo)", ft = "octo" }, - { "p", "", desc = "+pr (Octo)", ft = "octo" }, - { "v", "", desc = "+review (Octo)", ft = "octo" }, + { "a", "", desc = "+assignee (Octo)", ft = "octo" }, + { "c", "", desc = "+comment/code (Octo)", ft = "octo" }, + { "l", "", desc = "+label (Octo)", ft = "octo" }, + { "i", "", desc = "+issue (Octo)", ft = "octo" }, + { "r", "", desc = "+react (Octo)", ft = "octo" }, + { "p", "", desc = "+pr (Octo)", ft = "octo" }, + { "pr", "", desc = "+rebase (Octo)", ft = "octo" }, + { "ps", "", desc = "+squash (Octo)", ft = "octo" }, + { "v", "", desc = "+review (Octo)", ft = "octo" }, + { "g", "", desc = "+goto_issue (Octo)", ft = "octo" }, { "@", "@", mode = "i", ft = "octo", silent = true }, { "#", "#", mode = "i", ft = "octo", silent = true }, }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 9987371f0c..d001f4f7fb 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -76,7 +76,8 @@ possible keymaps starting with ``. | <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | | <leader>gb | Git Blame Line | **n** | -| <leader>gB | Git Browse | **n**, **x** | +| <leader>gB | Git Browse (open) | **n**, **x** | +| <leader>gY | Git Browse (copy) | **n**, **x** | | <leader>qq | Quit All | **n** | | <leader>ui | Inspect Pos | **n** | | <leader>uI | Inspect Tree | **n** | @@ -680,19 +681,22 @@ Part of [lazyvim.plugins.extras.util.octo](/extras/util/octo) | Key | Description | Mode | | --- | --- | --- | -| <leader>a | +assignee (Octo) | **n** | -| <leader>c | +comment/code (Octo) | **n** | | <leader>gi | List Issues (Octo) | **n** | | <leader>gI | Search Issues (Octo) | **n** | | <leader>gp | List PRs (Octo) | **n** | | <leader>gP | Search PRs (Octo) | **n** | | <leader>gr | List Repos (Octo) | **n** | | <leader>gS | Search (Octo) | **n** | -| <leader>i | +issue (Octo) | **n** | -| <leader>l | +label (Octo) | **n** | -| <leader>p | +pr (Octo) | **n** | -| <leader>r | +react (Octo) | **n** | -| <leader>v | +review (Octo) | **n** | +| <localleader>a | +assignee (Octo) | **n** | +| <localleader>c | +comment/code (Octo) | **n** | +| <localleader>g | +goto_issue (Octo) | **n** | +| <localleader>i | +issue (Octo) | **n** | +| <localleader>l | +label (Octo) | **n** | +| <localleader>p | +pr (Octo) | **n** | +| <localleader>pr | +rebase (Octo) | **n** | +| <localleader>ps | +squash (Octo) | **n** | +| <localleader>r | +react (Octo) | **n** | +| <localleader>v | +review (Octo) | **n** | ## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) Part of [lazyvim.plugins.extras.util.project](/extras/util/project) From a8b369c56dd0c0bc171b0c6f1b41dc83e536f343 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Nov 2024 08:26:44 +0000 Subject: [PATCH 339/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index cc45f06053..4cb7b58dbe 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -460,7 +460,20 @@ opts = nil ```lua -opts = nil +opts = function() + -- Simple configuration to attach to remote java debug process + -- Taken directly from https://github.com/mfussenegger/nvim-dap/wiki/Java + local dap = require("dap") + dap.configurations.java = { + { + type = "java", + request = "attach", + name = "Debug (Attach) - Remote", + hostName = "127.0.0.1", + port = 5005, + }, + } +end ``` @@ -472,6 +485,20 @@ opts = nil { "mfussenegger/nvim-dap", optional = true, + opts = function() + -- Simple configuration to attach to remote java debug process + -- Taken directly from https://github.com/mfussenegger/nvim-dap/wiki/Java + local dap = require("dap") + dap.configurations.java = { + { + type = "java", + request = "attach", + name = "Debug (Attach) - Remote", + hostName = "127.0.0.1", + port = 5005, + }, + } + end, dependencies = { { "williamboman/mason.nvim", From 698d8d868555f27e691bc0f9559f79808ee040a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Nov 2024 15:22:11 +0000 Subject: [PATCH 340/553] chore(build): auto-generate docs --- docs/extras/lang/sql.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index dcf8d98c04..fd774e4d1f 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -114,19 +114,21 @@ opts = nil vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - local cmp = require("cmp") + if LazyVim.has("cmp") then + local cmp = require("cmp") - -- global sources - ---@param source cmp.SourceConfig - local sources = vim.tbl_map(function(source) - return { name = source.name } - end, cmp.get_config().sources) + -- global sources + ---@param source cmp.SourceConfig + local sources = vim.tbl_map(function(source) + return { name = source.name } + end, cmp.get_config().sources) - -- add vim-dadbod-completion source - table.insert(sources, { name = "vim-dadbod-completion" }) + -- add vim-dadbod-completion source + table.insert(sources, { name = "vim-dadbod-completion" }) - -- update sources for the current buffer - cmp.setup.buffer({ sources = sources }) + -- update sources for the current buffer + cmp.setup.buffer({ sources = sources }) + end end, }) end, From 51edf350fc1dc13efc71f61c69f5a2b0392840f9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 26 Nov 2024 22:19:17 +0000 Subject: [PATCH 341/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index d5ae808aca..803787b250 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -412,6 +412,7 @@ opts = function() "mason", "neo-tree", "notify", + "snacks_dashboard", "snacks_notif", "snacks_terminal", "snacks_win", @@ -459,6 +460,7 @@ end "mason", "neo-tree", "notify", + "snacks_dashboard", "snacks_notif", "snacks_terminal", "snacks_win", From ba83049b4949ee3c2a21c202a5b0371c4d4a7703 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 Nov 2024 16:26:22 +0000 Subject: [PATCH 342/553] chore(build): auto-generate docs --- docs/extras/ui/mini-animate.md | 13 ++-- docs/extras/ui/smear-cursor.md | 111 +++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 docs/extras/ui/smear-cursor.md diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 51d82dc615..b7a12a0533 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -39,7 +39,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = function() +opts = function(_, opts) -- don't use animate when scrolling with the mouse local mouse_scrolled = false for _, scroll in ipairs({ "Up", "Down" }) do @@ -68,7 +68,7 @@ opts = function() }):map("ua") local animate = require("mini.animate") - return { + return vim.tbl_deep_extend("force", opts, { resize = { timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), }, @@ -84,7 +84,7 @@ opts = function() end, }), }, - } + }) end ``` @@ -98,7 +98,8 @@ end "echasnovski/mini.animate", recommended = true, event = "VeryLazy", - opts = function() + cond = vim.g.neovide == nil, + opts = function(_, opts) -- don't use animate when scrolling with the mouse local mouse_scrolled = false for _, scroll in ipairs({ "Up", "Down" }) do @@ -127,7 +128,7 @@ end }):map("ua") local animate = require("mini.animate") - return { + return vim.tbl_deep_extend("force", opts, { resize = { timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), }, @@ -143,7 +144,7 @@ end end, }), }, - } + }) end, } ``` diff --git a/docs/extras/ui/smear-cursor.md b/docs/extras/ui/smear-cursor.md new file mode 100644 index 0000000000..0038685583 --- /dev/null +++ b/docs/extras/ui/smear-cursor.md @@ -0,0 +1,111 @@ +# `Smear-cursor` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.smear-cursor" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [smear-cursor.nvim](https://github.com/sphamba/smear-cursor.nvim) + + + + + +```lua +opts = { + hide_target_hack = true, +} +``` + + + + + + +```lua +{ + "sphamba/smear-cursor.nvim", + event = "VeryLazy", + cond = vim.g.neovide == nil, + opts = { + hide_target_hack = true, + }, + specs = { + -- disable mini.animate cursor + { + "echasnovski/mini.animate", + optional = true, + opts = { + cursor = { enable = false }, + }, + }, + }, +} +``` + + + + + +## [mini.animate](https://github.com/echasnovski/mini.animate) _(optional)_ + + disable mini.animate cursor + + + + + + +```lua +opts = { + cursor = { enable = false }, +} +``` + + + + + + +```lua +{ + "echasnovski/mini.animate", + optional = true, + opts = { + cursor = { enable = false }, + }, +} +``` + + + + + + From cb4702cc9f705cbfee8ac0b810592aa0b71511c5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Nov 2024 06:29:25 +0000 Subject: [PATCH 343/553] chore(build): auto-generate docs --- docs/extras/lang/sql.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index fd774e4d1f..87ddc6d983 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -114,7 +114,7 @@ opts = nil vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - if LazyVim.has("cmp") then + if LazyVim.has("nvim-cmp") then local cmp = require("cmp") -- global sources From c014989c8ad41e658e8d75bc697396a69e94f544 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Nov 2024 07:21:44 +0000 Subject: [PATCH 344/553] chore(build): auto-generate docs --- docs/extras/ai/supermaven.md | 6 ++- docs/extras/coding/blink.md | 10 +++-- docs/extras/coding/luasnip.md | 82 ++++++++++++++++++++++++++++++++--- 3 files changed, 86 insertions(+), 12 deletions(-) diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 4d57a15513..61a26cb65f 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -249,7 +249,7 @@ end ```lua opts = { - windows = { ghost_text = { enabled = false } }, + completion = { ghost_text = { enabled = false } }, } ``` @@ -262,8 +262,10 @@ opts = { { "saghen/blink.cmp", optional = true, + ---@module 'blink.cmp' + ---@type blink.cmp.Config opts = { - windows = { ghost_text = { enabled = false } }, + completion = { ghost_text = { enabled = false } }, }, dependencies = { { diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 794dd9d355..21895f1d34 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -60,12 +60,13 @@ opts = { -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", - windows = { - autocomplete = { + completion = { + menu = { winblend = vim.o.pumblend, }, documentation = { auto_show = true, + auto_show_delay_ms = 200, }, ghost_text = { enabled = vim.g.ai_cmp, @@ -135,12 +136,13 @@ opts = { -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", - windows = { - autocomplete = { + completion = { + menu = { winblend = vim.o.pumblend, }, documentation = { auto_show = true, + auto_show_delay_ms = 200, }, ghost_text = { enabled = vim.g.ai_cmp, diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 124a81a1c5..d1cba40817 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -163,6 +163,52 @@ opts = nil
+ + +```lua +{ "saadparwaiz1/cmp_luasnip" } +``` + + + + + +## [blink.compat](https://github.com/saghen/blink.compat) + + + + + +```lua +opts = { impersonate_nvim_cmp = true } +``` + + + + + + +```lua +{ "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } } +``` + + + + + +## [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) + + + + + +```lua +opts = nil +``` + + + + ```lua @@ -234,9 +280,19 @@ end ```lua opts = { - accept = { - expand_snippet = function(...) - return require("luasnip").lsp_expand(...) + sources = { compat = { "luasnip" } }, + snippets = { + expand = function(snippet) + require("luasnip").lsp_expand(snippet) + end, + active = function(filter) + if filter and filter.direction then + return require("luasnip").jumpable(filter.direction) + end + return require("luasnip").in_snippet() + end, + jump = function(direction) + require("luasnip").jump(direction) end, }, } @@ -251,10 +307,24 @@ opts = { { "saghen/blink.cmp", optional = true, + dependencies = { + { "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } }, + { "saadparwaiz1/cmp_luasnip" }, + }, opts = { - accept = { - expand_snippet = function(...) - return require("luasnip").lsp_expand(...) + sources = { compat = { "luasnip" } }, + snippets = { + expand = function(snippet) + require("luasnip").lsp_expand(snippet) + end, + active = function(filter) + if filter and filter.direction then + return require("luasnip").jumpable(filter.direction) + end + return require("luasnip").in_snippet() + end, + jump = function(direction) + require("luasnip").jump(direction) end, }, }, From 9e0e15b7f4cf6f6b9d6d3c3da5101d9a40eee73e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Nov 2024 08:27:22 +0000 Subject: [PATCH 345/553] chore(build): auto-generate docs --- docs/extras/lang/typescript.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 517d0ebc83..62947760af 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -70,6 +70,7 @@ opts = { enableMoveToFileCodeAction = true, autoUseWorkspaceTsdk = true, experimental = { + maxInlayHintLength = 30, completion = { enableServerSideFuzzyMatch = true, }, @@ -250,6 +251,7 @@ opts = { enableMoveToFileCodeAction = true, autoUseWorkspaceTsdk = true, experimental = { + maxInlayHintLength = 30, completion = { enableServerSideFuzzyMatch = true, }, From b64322eb533b55cd004ba79a3bfae8545bd6195c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 28 Nov 2024 21:18:26 +0000 Subject: [PATCH 346/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 21895f1d34..607c92d42d 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -238,7 +238,8 @@ opts = nil ```lua opts = function(_, opts) - opts.kind_icons = LazyVim.config.icons.kinds + opts.appearance = opts.appearance or {} + opts.appearance.kind_icons = LazyVim.config.icons.kinds end ``` @@ -251,7 +252,8 @@ end { "saghen/blink.cmp", opts = function(_, opts) - opts.kind_icons = LazyVim.config.icons.kinds + opts.appearance = opts.appearance or {} + opts.appearance.kind_icons = LazyVim.config.icons.kinds end, } ``` From d93470d372377b987f8510243cdf76a9ab48541c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 29 Nov 2024 14:18:53 +0000 Subject: [PATCH 347/553] chore(build): auto-generate docs --- docs/extras/ui/smear-cursor.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/ui/smear-cursor.md b/docs/extras/ui/smear-cursor.md index 0038685583..a3cf48bf3c 100644 --- a/docs/extras/ui/smear-cursor.md +++ b/docs/extras/ui/smear-cursor.md @@ -41,6 +41,7 @@ import TabItem from '@theme/TabItem'; ```lua opts = { hide_target_hack = true, + cursor_color = "none", } ``` @@ -56,6 +57,7 @@ opts = { cond = vim.g.neovide == nil, opts = { hide_target_hack = true, + cursor_color = "none", }, specs = { -- disable mini.animate cursor From 9be60498644dd69a1bac6723670bb0654ed86f00 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Dec 2024 09:19:18 +0000 Subject: [PATCH 348/553] chore(build): auto-generate docs --- docs/keymaps.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/keymaps.md b/docs/keymaps.md index d001f4f7fb..1d4ff8499a 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -212,6 +212,9 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | +| <leader>. | Toggle Scratch Buffer | **n** | +| <leader>n | Notification History | **n** | +| <leader>S | Select Scratch Buffer | **n** | | <leader>un | Dismiss All Notifications | **n** | ## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) From cea160d6d7dd54a94d4125bb5e512454f300b5fd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 1 Dec 2024 19:14:58 +0000 Subject: [PATCH 349/553] chore(build): auto-generate docs --- docs/extras/ui/mini-indentscope.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index 4ba85547af..bed8f06ee2 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -78,6 +78,7 @@ opts = { "mason", "neo-tree", "notify", + "snacks_dashboard", "snacks_notif", "snacks_terminal", "snacks_win", From 01dc2d6ef43051f4a68b0019d193e43ba0772f2b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 07:22:45 +0000 Subject: [PATCH 350/553] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index 8d5f2d2bec..c61cf19fd6 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -61,7 +61,7 @@ end ```lua { "CopilotC-Nvim/CopilotChat.nvim", - branch = "canary", + branch = "main", cmd = "CopilotChat", opts = function() local user = vim.env.USER or "User" From 3a93bf05ce6b4d7b446f4e18c76b292c2d930b77 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 19:16:30 +0000 Subject: [PATCH 351/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 607c92d42d..e3481fd6db 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -63,6 +63,7 @@ opts = { completion = { menu = { winblend = vim.o.pumblend, + draw = { treesitter = true }, }, documentation = { auto_show = true, @@ -139,6 +140,7 @@ opts = { completion = { menu = { winblend = vim.o.pumblend, + draw = { treesitter = true }, }, documentation = { auto_show = true, From b39f4785e3beee62b37e78066ec5c7d85a26f185 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 20:21:27 +0000 Subject: [PATCH 352/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index d2ef7936a5..ae1cacda89 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -335,7 +335,7 @@ end map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) 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 }) + Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) end, { desc = "Git Browse (copy)" }) -- quit From 4e334dd2c51fff15bfeb1c1e9d3a4461e781073f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 2 Dec 2024 21:18:58 +0000 Subject: [PATCH 353/553] chore(build): auto-generate docs --- docs/extras/ai/supermaven.md | 41 +++++++++--------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 61a26cb65f..4012bd6beb 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -151,9 +151,7 @@ opts = nil ```lua -opts = { - disable_inline_completion = false, -} +opts = nil ``` @@ -164,9 +162,7 @@ opts = { ```lua { "supermaven-nvim", - opts = { - disable_inline_completion = false, - }, + vim.g.ai_cmp and "saghen/blink.compat" or nil, } ``` @@ -225,23 +221,6 @@ end blink.cmp integration - FIXME: this currently doesn't work properly - { - "saghen/blink.cmp", - optional = true, - opts = { - sources = { - compat = vim.g.ai_cmp and { "supermaven" } or nil, - }, - }, - dependencies = { - "supermaven-nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, - }, - }, - - Disabble cmp integration for now - @@ -249,7 +228,9 @@ end ```lua opts = { - completion = { ghost_text = { enabled = false } }, + sources = { + compat = vim.g.ai_cmp and { "supermaven" } or nil, + }, } ``` @@ -265,15 +246,13 @@ opts = { ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { - completion = { ghost_text = { enabled = false } }, + sources = { + compat = vim.g.ai_cmp and { "supermaven" } or nil, + }, }, dependencies = { - { - "supermaven-nvim", - opts = { - disable_inline_completion = false, - }, - }, + "supermaven-nvim", + vim.g.ai_cmp and "saghen/blink.compat" or nil, }, } ``` From 112eee6e9fe7fa01304542541d373553455da128 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Dec 2024 20:22:45 +0000 Subject: [PATCH 354/553] chore(build): auto-generate docs --- docs/extras/ai/codeium.md | 39 ++++++--- docs/extras/ai/copilot.md | 95 ++++----------------- docs/extras/ai/supermaven.md | 44 ++++++---- docs/extras/ai/tabnine.md | 154 +++++++++++++++++++++++++++-------- docs/extras/coding/blink.md | 30 ++++++- 5 files changed, 222 insertions(+), 140 deletions(-) diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index c0feb8c1b2..c62a4700d1 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -167,10 +167,30 @@ opts = nil ```lua -{ - "codeium.nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, -} +{ "codeium.nvim", "saghen/blink.compat" } +``` + + + + + +## [blink.compat](https://github.com/saghen/blink.compat) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"saghen/blink.compat" ``` @@ -261,7 +281,8 @@ end ```lua opts = { sources = { - compat = vim.g.ai_cmp and { "codeium" } or nil, + compat = { "codeium" }, + providers = { codeium = { kind = "Codeium" } }, }, } ``` @@ -275,15 +296,13 @@ opts = { { "saghen/blink.cmp", optional = true, + dependencies = { "codeium.nvim", "saghen/blink.compat" }, opts = { sources = { - compat = vim.g.ai_cmp and { "codeium" } or nil, + compat = { "codeium" }, + providers = { codeium = { kind = "Codeium" } }, }, }, - dependencies = { - "codeium.nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, - }, } ``` diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 5071988ad9..15cfa5169f 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -208,26 +208,7 @@ opts = nil ```lua -{ - "giuxtaposition/blink-cmp-copilot", - enabled = vim.g.ai_cmp, -- only enable if needed - specs = { - { - "blink.cmp", - optional = true, - opts = { - sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, - completion = { - enabled_providers = { "copilot" }, - }, - }, - }, - }, - }, -} +{ "giuxtaposition/blink-cmp-copilot" } ``` @@ -388,57 +369,6 @@ end -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - blink.cmp - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - dependencies = { - { - "giuxtaposition/blink-cmp-copilot", - enabled = vim.g.ai_cmp, -- only enable if needed - specs = { - { - "blink.cmp", - optional = true, - opts = { - sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, - completion = { - enabled_providers = { "copilot" }, - }, - }, - }, - }, - }, - }, - }, -} -``` - - - - - ## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ @@ -448,12 +378,16 @@ opts = nil ```lua opts = { sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, completion = { enabled_providers = { "copilot" }, }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + kind = "Copilot", + }, + }, }, } ``` @@ -465,16 +399,21 @@ opts = { ```lua { - "blink.cmp", + "saghen/blink.cmp", optional = true, + dependencies = { "giuxtaposition/blink-cmp-copilot" }, opts = { sources = { - providers = { - copilot = { name = "copilot", module = "blink-cmp-copilot" }, - }, completion = { enabled_providers = { "copilot" }, }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + kind = "Copilot", + }, + }, }, }, } diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 4012bd6beb..8ae1908487 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -160,10 +160,30 @@ opts = nil ```lua -{ - "supermaven-nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, -} +{ "supermaven-nvim", "saghen/blink.compat" } +``` + + + + + +## [blink.compat](https://github.com/saghen/blink.compat) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"saghen/blink.compat" ``` @@ -219,9 +239,6 @@ end ## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - blink.cmp integration - - @@ -229,7 +246,8 @@ end ```lua opts = { sources = { - compat = vim.g.ai_cmp and { "supermaven" } or nil, + compat = { "supermaven" }, + providers = { supermaven = { kind = "Supermaven" } }, }, } ``` @@ -243,17 +261,13 @@ opts = { { "saghen/blink.cmp", optional = true, - ---@module 'blink.cmp' - ---@type blink.cmp.Config + dependencies = { "supermaven-nvim", "saghen/blink.compat" }, opts = { sources = { - compat = vim.g.ai_cmp and { "supermaven" } or nil, + compat = { "supermaven" }, + providers = { supermaven = { kind = "Supermaven" } }, }, }, - dependencies = { - "supermaven-nvim", - vim.g.ai_cmp and "saghen/blink.compat" or nil, - }, } ``` diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index 6ac42771c6..f2470d060c 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -32,11 +32,118 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [cmp-tabnine](https://github.com/tzachar/cmp-tabnine) Tabnine cmp source + + + + +```lua +opts = { + max_lines = 1000, + max_num_results = 3, + sort = true, +} +``` + + + + + + +```lua +{ + "tzachar/cmp-tabnine", + build = LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", + opts = { + max_lines = 1000, + max_num_results = 3, + sort = true, + }, + config = function(_, opts) + require("cmp_tabnine.config"):setup(opts) + end, +} +``` + + + + + +## [cmp-tabnine](https://github.com/tzachar/cmp-tabnine) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "tzachar/cmp-tabnine" } +``` + + + + + +## [cmp-tabnine](https://github.com/tzachar/cmp-tabnine) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "tzachar/cmp-tabnine", "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)_ + @@ -67,23 +174,7 @@ end { "nvim-cmp", optional = true, - dependencies = { - { - "tzachar/cmp-tabnine", - build = { - LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", - }, - dependencies = "hrsh7th/nvim-cmp", - opts = { - max_lines = 1000, - max_num_results = 3, - sort = true, - }, - config = function(_, opts) - require("cmp_tabnine.config"):setup(opts) - end, - }, - }, + dependencies = { "tzachar/cmp-tabnine" }, ---@param opts cmp.ConfigSchema opts = function(_, opts) table.insert(opts.sources, 1, { @@ -106,7 +197,7 @@ end -## [cmp-tabnine](https://github.com/tzachar/cmp-tabnine) +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ @@ -114,9 +205,10 @@ end ```lua opts = { - max_lines = 1000, - max_num_results = 3, - sort = true, + sources = { + compat = { "cmp_tabnine" }, + providers = { cmp_tabnine = { kind = "TabNine" } }, + }, } ``` @@ -127,19 +219,15 @@ opts = { ```lua { - "tzachar/cmp-tabnine", - build = { - LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", - }, - dependencies = "hrsh7th/nvim-cmp", + "saghen/blink.cmp", + optional = true, + dependencies = { "tzachar/cmp-tabnine", "saghen/blink.compat" }, opts = { - max_lines = 1000, - max_num_results = 3, - sort = true, + sources = { + compat = { "cmp_tabnine" }, + providers = { cmp_tabnine = { kind = "TabNine" } }, + }, }, - config = function(_, opts) - require("cmp_tabnine.config"):setup(opts) - end, } ``` diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index e3481fd6db..c258790eea 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -62,8 +62,9 @@ opts = { nerd_font_variant = "mono", completion = { menu = { - winblend = vim.o.pumblend, - draw = { treesitter = true }, + draw = { + treesitter = true, + }, }, documentation = { auto_show = true, @@ -139,8 +140,9 @@ opts = { nerd_font_variant = "mono", completion = { menu = { - winblend = vim.o.pumblend, - draw = { treesitter = true }, + draw = { + treesitter = true, + }, }, documentation = { auto_show = true, @@ -188,6 +190,26 @@ opts = { table.insert(enabled, source) end end + + -- check if we need to override symbol kinds + for _, provider in pairs(opts.sources.providers or {}) do + ---@cast provider blink.cmp.SourceProviderConfig|{kind?:string} + if provider.kind then + require("blink.cmp.types").CompletionItemKind[provider.kind] = provider.kind + ---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[] + local transform_items = provider.transform_items + ---@param ctx blink.cmp.Context + ---@param items blink.cmp.CompletionItem[] + provider.transform_items = function(ctx, items) + items = transform_items and transform_items(ctx, items) or items + for _, item in ipairs(items) do + item.kind = provider.kind or item.kind + end + return items + end + end + end + require("blink.cmp").setup(opts) end, } From 2c683e24b51cb03c6b3b0057ea05d17534ec1bd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Dec 2024 08:27:11 +0000 Subject: [PATCH 355/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 + docs/extras/coding/blink.md | 40 +++++++++++-------- docs/extras/lang/rust.md | 60 +++++++++++++++++++++++++--- docs/extras/lang/tex.md | 2 +- docs/extras/ui/mini-indentscope.md | 7 ++++ docs/extras/ui/treesitter-context.md | 2 +- docs/keymaps.md | 1 + 7 files changed, 89 insertions(+), 24 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index ae1cacda89..77eebee605 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -317,6 +317,7 @@ Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("ud") Snacks.toggle.line_number():map("ul") Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("uc") +Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, desc = "Tabline"}):map("uA") Snacks.toggle.treesitter():map("uT") Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("ub") if vim.lsp.inlay_hint then diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index c258790eea..eeff7ae384 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -51,16 +51,22 @@ import TabItem from '@theme/TabItem'; ```lua opts = { - highlight = { + appearance = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp -- will be removed in a future release, assuming themes add support use_nvim_cmp_as_default = false, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", }, - -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' - -- adjusts spacing to ensure icons are aligned - nerd_font_variant = "mono", completion = { + accept = { + -- experimental auto-brackets support + auto_brackets = { + enabled = true, + }, + }, menu = { draw = { treesitter = true, @@ -75,11 +81,9 @@ opts = { }, }, - -- experimental auto-brackets support - accept = { auto_brackets = { enabled = true } }, - -- experimental signature help support - -- trigger = { signature_help = { enabled = true } } + -- signature = { enabled = true }, + sources = { -- adding any nvim-cmp sources here will enable them -- with blink.compat @@ -129,16 +133,22 @@ opts = { ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { - highlight = { + appearance = { -- sets the fallback highlight groups to nvim-cmp's highlight groups -- useful for when your theme doesn't support blink.cmp -- will be removed in a future release, assuming themes add support use_nvim_cmp_as_default = false, + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", }, - -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font' - -- adjusts spacing to ensure icons are aligned - nerd_font_variant = "mono", completion = { + accept = { + -- experimental auto-brackets support + auto_brackets = { + enabled = true, + }, + }, menu = { draw = { treesitter = true, @@ -153,11 +163,9 @@ opts = { }, }, - -- experimental auto-brackets support - accept = { auto_brackets = { enabled = true } }, - -- experimental signature help support - -- trigger = { signature_help = { enabled = true } } + -- signature = { enabled = true }, + sources = { -- adding any nvim-cmp sources here will enable them -- with blink.compat diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index f97ab3ea11..1f5e80ac67 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -22,6 +22,18 @@ require("lazy").setup({ +### 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" +-- LSP Server to use for Rust. +-- Set to "bacon-ls" to use bacon-ls instead of rust-analyzer. +-- only for diagnostics. The rest of LSP support will still be +-- provided by rust-analyzer. +vim.g.lazyvim_rust_diagnostics = "rust-analyzer" +``` + Below you can find a list of included plugins and their default settings. :::caution @@ -142,8 +154,12 @@ opts = { enable = true, }, }, - -- Add clippy lints for Rust. - checkOnSave = true, + -- Add clippy lints for Rust if using rust-analyzer + checkOnSave = diagnostics == "rust-analyzer", + -- Enable diagnostics if using rust-analyzer + diagnostics = { + enable = diagnostics == "rust-analyzer", + }, procMacro = { enable = true, ignored = { @@ -188,8 +204,12 @@ opts = { enable = true, }, }, - -- Add clippy lints for Rust. - checkOnSave = true, + -- Add clippy lints for Rust if using rust-analyzer + checkOnSave = diagnostics == "rust-analyzer", + -- Enable diagnostics if using rust-analyzer + diagnostics = { + enable = diagnostics == "rust-analyzer", + }, procMacro = { enable = true, ignored = { @@ -203,6 +223,16 @@ opts = { }, }, config = function(_, opts) + 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 + opts.dap = { + adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), + } vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) if vim.fn.executable("rust-analyzer") == 0 then LazyVim.error( @@ -230,6 +260,9 @@ opts = { ```lua opts = { servers = { + bacon_ls = { + enabled = diagnostics == "bacon-ls", + }, rust_analyzer = { enabled = false }, }, } @@ -245,6 +278,9 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { + bacon_ls = { + enabled = diagnostics == "bacon-ls", + }, rust_analyzer = { enabled = false }, }, }, @@ -265,7 +301,13 @@ opts = { ```lua -opts = { ensure_installed = { "codelldb" } } +opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "codelldb" }) + if diagnostics == "bacon-ls" then + vim.list_extend(opts.ensure_installed, { "bacon" }) + end +end ``` @@ -277,7 +319,13 @@ opts = { ensure_installed = { "codelldb" } } { "williamboman/mason.nvim", optional = true, - opts = { ensure_installed = { "codelldb" } }, + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "codelldb" }) + if diagnostics == "bacon-ls" then + vim.list_extend(opts.ensure_installed, { "bacon" }) + end + end, } ``` diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index 03a76a6d1b..93fc6f2917 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -105,7 +105,7 @@ opts = {} vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" end, keys = { - { "l", "", desc = "+vimtex" }, + { "l", "", desc = "+vimtex", ft = "tex" }, }, } ``` diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index bed8f06ee2..982a0a20ab 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -89,6 +89,13 @@ opts = { vim.b.miniindentscope_disable = true end, }) + + vim.api.nvim_create_autocmd("User", { + pattern = "SnacksDashboardOpened", + callback = function(data) + vim.b[data.buf].miniindentscope_disable = true + end, + }) end, } ``` diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md index ad54af8263..edcd4c5558 100644 --- a/docs/extras/ui/treesitter-context.md +++ b/docs/extras/ui/treesitter-context.md @@ -64,7 +64,7 @@ end ```lua { "nvim-treesitter/nvim-treesitter-context", - event = "VeryLazy", + event = "LazyFile", opts = function() local tsc = require("treesitter-context") Snacks.toggle({ diff --git a/docs/keymaps.md b/docs/keymaps.md index 1d4ff8499a..52d0f4d1de 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -72,6 +72,7 @@ possible keymaps starting with ``. | <leader>ud | Toggle Diagnostics | **n** | | <leader>ul | Toggle Line Numbers | **n** | | <leader>uc | Toggle conceallevel | **n** | +| <leader>uA | Toggle showtabline | **n** | | <leader>uT | Toggle Treesitter Highlight | **n** | | <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | From 26ad4eb3bede01f4d9140911c73f6366359799e3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 5 Dec 2024 09:22:26 +0000 Subject: [PATCH 356/553] chore(build): auto-generate docs --- docs/configuration/general.md | 4 ++-- docs/keymaps.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 77eebee605..ca2c8bf0ab 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -316,8 +316,8 @@ Snacks.toggle.option("wrap", {name = "Wrap"}):map("uw") Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("uL") Snacks.toggle.diagnostics():map("ud") Snacks.toggle.line_number():map("ul") -Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2}):map("uc") -Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, desc = "Tabline"}):map("uA") +Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level"}):map("uc") +Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("uA") Snacks.toggle.treesitter():map("uT") Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("ub") if vim.lsp.inlay_hint then diff --git a/docs/keymaps.md b/docs/keymaps.md index 52d0f4d1de..a9f0304a9b 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -71,8 +71,8 @@ possible keymaps starting with ``. | <leader>uL | Toggle Relative Number | **n** | | <leader>ud | Toggle Diagnostics | **n** | | <leader>ul | Toggle Line Numbers | **n** | -| <leader>uc | Toggle conceallevel | **n** | -| <leader>uA | Toggle showtabline | **n** | +| <leader>uc | Toggle Conceal Level | **n** | +| <leader>uA | Toggle Tabline | **n** | | <leader>uT | Toggle Treesitter Highlight | **n** | | <leader>ub | Toggle Dark Background | **n** | | <leader>uh | Toggle Inlay Hints | **n** | From 691673f2c471e75bba9f892b96241fe52abf909f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Dec 2024 16:25:14 +0000 Subject: [PATCH 357/553] chore(build): auto-generate docs --- docs/extras/lang/rust.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 1f5e80ac67..28edcf4965 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -223,16 +223,18 @@ opts = { }, }, config = function(_, opts) - 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" + 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 + opts.dap = { + adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), + } end - opts.dap = { - adapter = require("rustaceanvim.config").get_codelldb_adapter(codelldb, library_path), - } vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) if vim.fn.executable("rust-analyzer") == 0 then LazyVim.error( From a355a16dd858fb8021fb64082d807c9ba11a8b8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Dec 2024 11:15:32 +0000 Subject: [PATCH 358/553] chore(build): auto-generate docs --- docs/extras/editor/mini-diff.md | 64 +++++++++++++++++++++++++++++++++ docs/plugins/editor.md | 46 ++++++++++++++++++++++++ 2 files changed, 110 insertions(+) diff --git a/docs/extras/editor/mini-diff.md b/docs/extras/editor/mini-diff.md index 169a64fe01..18069a4b05 100644 --- a/docs/extras/editor/mini-diff.md +++ b/docs/extras/editor/mini-diff.md @@ -89,6 +89,70 @@ opts = { +## [mini.diff](https://github.com/echasnovski/mini.diff) + + + + + +```lua +opts = function() + Snacks.toggle({ + name = "Mini Diff Signs", + get = function() + return vim.b.minidiff_disable ~= true + end, + set = function(state) + vim.b.minidiff_disable = not state + if state then + require("mini.diff").enable(0) + else + require("mini.diff").disable(0) + end + -- HACK: redraw to update the signs + vim.defer_fn(function() + vim.cmd([[redraw!]]) + end, 200) + end, + }):map("uG") +end +``` + + + + + + +```lua +{ + "mini.diff", + opts = function() + Snacks.toggle({ + name = "Mini Diff Signs", + get = function() + return vim.b.minidiff_disable ~= true + end, + set = function(state) + vim.b.minidiff_disable = not state + if state then + require("mini.diff").enable(0) + else + require("mini.diff").disable(0) + end + -- HACK: redraw to update the signs + vim.defer_fn(function() + vim.cmd([[redraw!]]) + end, 200) + end, + }):map("uG") + end, +} +``` + + + + + ## [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) lualine integration diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index c8a525610c..7048292874 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -560,6 +560,52 @@ opts = { +## [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) + + + + + +```lua +opts = function() + Snacks.toggle({ + name = "Git Signs", + get = function() + return require("gitsigns.config").config.signcolumn + end, + set = function(state) + require("gitsigns").toggle_signs(state) + end, + }):map("uG") +end +``` + + + + + + +```lua +{ + "gitsigns.nvim", + opts = function() + Snacks.toggle({ + name = "Git Signs", + get = function() + return require("gitsigns.config").config.signcolumn + end, + set = function(state) + require("gitsigns").toggle_signs(state) + end, + }):map("uG") + end, +} +``` + + + + + ## [trouble.nvim](https://github.com/folke/trouble.nvim) better diagnostics list and others From a745d0ce22df7201ad8d6eb7735a1bfb5e5d6fad Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 7 Dec 2024 20:20:31 +0000 Subject: [PATCH 359/553] chore(build): auto-generate docs --- docs/extras/editor/mini-diff.md | 8 ++++---- docs/extras/util/dot.md | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/mini-diff.md b/docs/extras/editor/mini-diff.md index 18069a4b05..ff33921305 100644 --- a/docs/extras/editor/mini-diff.md +++ b/docs/extras/editor/mini-diff.md @@ -100,10 +100,10 @@ opts = function() Snacks.toggle({ name = "Mini Diff Signs", get = function() - return vim.b.minidiff_disable ~= true + return vim.g.minidiff_disable ~= true end, set = function(state) - vim.b.minidiff_disable = not state + vim.g.minidiff_disable = not state if state then require("mini.diff").enable(0) else @@ -130,10 +130,10 @@ end Snacks.toggle({ name = "Mini Diff Signs", get = function() - return vim.b.minidiff_disable ~= true + return vim.g.minidiff_disable ~= true end, set = function(state) - vim.b.minidiff_disable = not state + vim.g.minidiff_disable = not state if state then require("mini.diff").enable(0) else diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index 1f09c4d3bd..e059503d09 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -117,11 +117,12 @@ opts = function(_, opts) pattern = { [".*/waybar/config"] = "jsonc", [".*/mako/config"] = "dosini", - [".*/kitty/.+%.conf"] = "bash", + [".*/kitty/.+%.conf"] = "kitty", [".*/hypr/.+%.conf"] = "hyprlang", ["%.env%.[%w_.-]+"] = "sh", }, }) + vim.treesitter.language.register("bash", "kitty") add("git_config") @@ -162,11 +163,12 @@ end pattern = { [".*/waybar/config"] = "jsonc", [".*/mako/config"] = "dosini", - [".*/kitty/.+%.conf"] = "bash", + [".*/kitty/.+%.conf"] = "kitty", [".*/hypr/.+%.conf"] = "hyprlang", ["%.env%.[%w_.-]+"] = "sh", }, }) + vim.treesitter.language.register("bash", "kitty") add("git_config") From dbafd6aa5e15609e2b719a3bdac0c4968fb9eb2c Mon Sep 17 00:00:00 2001 From: YuKun Liu Date: Mon, 9 Dec 2024 00:50:13 -0800 Subject: [PATCH 360/553] Fix: Harpoon 2 Link (#124) --- docs/extras/editor/harpoon2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/harpoon2.md b/docs/extras/editor/harpoon2.md index 69e65c1c75..76e2d06da0 100644 --- a/docs/extras/editor/harpoon2.md +++ b/docs/extras/editor/harpoon2.md @@ -32,7 +32,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [harpoon](https://github.com/ThePrimeagen/harpoon) +## [harpoon](https://github.com/ThePrimeagen/harpoon/tree/harpoon2) From 90aa2071bb78f432f6082751974c0de251a41524 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Dec 2024 08:50:38 +0000 Subject: [PATCH 361/553] chore(build): auto-generate docs --- docs/extras/editor/harpoon2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/harpoon2.md b/docs/extras/editor/harpoon2.md index 76e2d06da0..69e65c1c75 100644 --- a/docs/extras/editor/harpoon2.md +++ b/docs/extras/editor/harpoon2.md @@ -32,7 +32,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [harpoon](https://github.com/ThePrimeagen/harpoon/tree/harpoon2) +## [harpoon](https://github.com/ThePrimeagen/harpoon) From 9d9403ba37e0eaa7d906aebbebd515390a90576f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 10 Dec 2024 01:43:40 +0000 Subject: [PATCH 362/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index ca2c8bf0ab..fd490370e0 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -474,7 +474,6 @@ vim.api.nvim_create_autocmd("FileType", { "neotest-summary", "notify", "qf", - "snacks_win", "spectre_panel", "startuptime", "tsplayground", From 1d84dc06b7e4dc61a9125feedfa8bf1cf64baf4c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Dec 2024 10:22:39 +0000 Subject: [PATCH 363/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 8 ++----- docs/extras/coding/blink.md | 39 +++++++++++++---------------------- docs/extras/coding/luasnip.md | 2 ++ docs/extras/lang/sql.md | 8 ++----- 4 files changed, 20 insertions(+), 37 deletions(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 15cfa5169f..e5c7954605 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -378,9 +378,7 @@ end ```lua opts = { sources = { - completion = { - enabled_providers = { "copilot" }, - }, + default = { "copilot" }, providers = { copilot = { name = "copilot", @@ -404,9 +402,7 @@ opts = { dependencies = { "giuxtaposition/blink-cmp-copilot" }, opts = { sources = { - completion = { - enabled_providers = { "copilot" }, - }, + default = { "copilot" }, providers = { copilot = { name = "copilot", diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index eeff7ae384..90eed281be 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -88,10 +88,7 @@ opts = { -- adding any nvim-cmp sources here will enable them -- with blink.compat compat = {}, - completion = { - -- remember to enable your providers here - enabled_providers = { "lsp", "path", "snippets", "buffer" }, - }, + default = { "lsp", "path", "snippets", "buffer" }, }, keymap = { @@ -117,6 +114,7 @@ opts = { opts_extend = { "sources.completion.enabled_providers", "sources.compat", + "sources.default", }, dependencies = { "rafamadriz/friendly-snippets", @@ -170,10 +168,7 @@ opts = { -- adding any nvim-cmp sources here will enable them -- with blink.compat compat = {}, - completion = { - -- remember to enable your providers here - enabled_providers = { "lsp", "path", "snippets", "buffer" }, - }, + default = { "lsp", "path", "snippets", "buffer" }, }, keymap = { @@ -187,7 +182,7 @@ opts = { ---@param opts blink.cmp.Config | { sources: { compat: string[] } } config = function(_, opts) -- setup compat sources - local enabled = opts.sources.completion.enabled_providers + local enabled = opts.sources.default for _, source in ipairs(opts.sources.compat or {}) do opts.sources.providers[source] = vim.tbl_deep_extend( "force", @@ -199,6 +194,12 @@ opts = { end end + -- TODO: remove when blink made a new release > 0.7.6 + if not vim.g.lazyvim_blink_main then + opts.sources.completion = opts.sources.completion or {} + opts.sources.completion.enabled_providers = enabled + end + -- check if we need to override symbol kinds for _, provider in pairs(opts.sources.providers or {}) do ---@cast provider blink.cmp.SourceProviderConfig|{kind?:string} @@ -306,15 +307,9 @@ end ```lua opts = { sources = { - completion = { - -- add lazydev to your completion providers - enabled_providers = { "lazydev" }, - }, + -- add lazydev to your completion providers + default = { "lazydev" }, providers = { - lsp = { - -- dont show LuaLS require statements when lazydev has items - fallback_for = { "lazydev" }, - }, lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", @@ -334,15 +329,9 @@ opts = { "saghen/blink.cmp", opts = { sources = { - completion = { - -- add lazydev to your completion providers - enabled_providers = { "lazydev" }, - }, + -- add lazydev to your completion providers + default = { "lazydev" }, providers = { - lsp = { - -- dont show LuaLS require statements when lazydev has items - fallback_for = { "lazydev" }, - }, lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index d1cba40817..bdf463afb2 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -65,6 +65,7 @@ opts = { "rafamadriz/friendly-snippets", config = function() require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } }) end, }, }, @@ -99,6 +100,7 @@ opts = {} "rafamadriz/friendly-snippets", config = function() require("luasnip.loaders.from_vscode").lazy_load() + require("luasnip.loaders.from_vscode").lazy_load({ paths = { vim.fn.stdpath("config") .. "/snippets" } }) end, } ``` diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 87ddc6d983..889774c916 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -345,9 +345,7 @@ end ```lua opts = { sources = { - completion = { - enabled_providers = { "dadbod" }, - }, + default = { "dadbod" }, providers = { dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, }, @@ -366,9 +364,7 @@ opts = { optional = true, opts = { sources = { - completion = { - enabled_providers = { "dadbod" }, - }, + default = { "dadbod" }, providers = { dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, }, From 457d4e4d97e67061d14f32e82e34071c0458108e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Dec 2024 17:18:07 +0000 Subject: [PATCH 364/553] chore(build): auto-generate docs --- docs/configuration/general.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index fd490370e0..fbf89feac2 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -398,7 +398,12 @@ end ```lua title="lua/config/autocmds.lua" -- Autocmds are automatically loaded on the VeryLazy event -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- -- Add any additional autocmds here +-- with `vim.api.nvim_create_autocmd` +-- +-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults) +-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell") ``` From 5aa8acecaac45817ac25bbcd49e13a5eba720a87 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 06:29:55 +0000 Subject: [PATCH 365/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 90eed281be..3192d3cf48 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -204,7 +204,12 @@ opts = { for _, provider in pairs(opts.sources.providers or {}) do ---@cast provider blink.cmp.SourceProviderConfig|{kind?:string} if provider.kind then - require("blink.cmp.types").CompletionItemKind[provider.kind] = provider.kind + local CompletionItemKind = require("blink.cmp.types").CompletionItemKind + local kind_idx = #CompletionItemKind + 1 + + CompletionItemKind[kind_idx] = provider.kind + CompletionItemKind[provider.kind] = kind_idx + ---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[] local transform_items = provider.transform_items ---@param ctx blink.cmp.Context @@ -212,7 +217,7 @@ opts = { provider.transform_items = function(ctx, items) items = transform_items and transform_items(ctx, items) or items for _, item in ipairs(items) do - item.kind = provider.kind or item.kind + item.kind = kind_idx or item.kind end return items end From 13ca73a57951ee12dc24bb319ffc4594130f7f86 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 13:47:58 +0000 Subject: [PATCH 366/553] chore(build): auto-generate docs --- docs/configuration/general.md | 19 +- docs/extras/ai/codeium.md | 2 +- docs/extras/ai/copilot.md | 10 +- docs/extras/ai/tabnine.md | 2 +- docs/extras/coding/luasnip.md | 2 +- docs/extras/coding/nvim-cmp.md | 392 ++++++++++++++++++++++++++ docs/extras/dap/core.md | 3 +- docs/extras/editor/telescope.md | 439 ----------------------------- docs/extras/lang/clangd.md | 2 +- docs/extras/lang/git.md | 37 +-- docs/extras/lang/python.md | 46 --- docs/extras/ui/indent-blankline.md | 168 +++++++++++ docs/extras/ui/mini-animate.md | 37 ++- docs/keymaps.md | 153 ++++------ docs/news.md | 61 ++++ docs/plugins/coding.md | 393 +------------------------- docs/plugins/editor.md | 6 + docs/plugins/ui.md | 172 ++++------- docs/plugins/util.md | 61 ++++ 19 files changed, 887 insertions(+), 1118 deletions(-) create mode 100644 docs/extras/coding/nvim-cmp.md create mode 100644 docs/extras/ui/indent-blankline.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index fbf89feac2..03ae3ebf6a 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -57,12 +57,22 @@ vim.g.maplocalleader = "\\" -- LazyVim auto format vim.g.autoformat = true +-- Snacks animations +-- Set to `false` to globally disable all snacks animations +vim.g.snacks_animate = true + -- LazyVim picker to use. -- Can be one of: telescope, fzf -- Leave it to "auto" to automatically use the picker -- enabled with `:LazyExtras` vim.g.lazyvim_picker = "auto" +-- LazyVim completion engine to use. +-- Can be one of: nvim-cmp, blink.cmp +-- Leave it to "auto" to automatically use the completion engine +-- enabled with `:LazyExtras` +vim.g.lazyvim_cmp = "auto" + -- if the completion engine supports the AI source, -- use that instead of inline suggestions vim.g.ai_cmp = true @@ -320,6 +330,12 @@ Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and v Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("uA") Snacks.toggle.treesitter():map("uT") Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("ub") +Snacks.toggle.dim():map("uD") +Snacks.toggle.animate():map("ua") +Snacks.toggle.indent():map("ug") +Snacks.toggle.scroll():map("uS") +Snacks.toggle.profiler():map("dpp") +Snacks.toggle.profiler_highlights():map("dph") if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end @@ -364,7 +380,8 @@ map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wd", "c", { desc = "Delete Window", remap = true }) -LazyVim.ui.maximize():map("wm") +Snacks.toggle.zoom():map("wm"):map("uZ") +Snacks.toggle.zen():map("uz") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index c62a4700d1..aa72782768 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -223,7 +223,7 @@ end ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "codeium.nvim" }, opts = function(_, opts) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index e5c7954605..59878b21db 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -160,7 +160,6 @@ opts = {} ```lua { "zbirenbaum/copilot-cmp", - enabled = vim.g.ai_cmp, -- only enable if wanted opts = {}, config = function(_, opts) local copilot_cmp = require("copilot_cmp") @@ -173,7 +172,7 @@ opts = {} end, specs = { { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) @@ -290,12 +289,11 @@ opts = nil ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { -- this will only be evaluated if nvim-cmp is enabled { "zbirenbaum/copilot-cmp", - enabled = vim.g.ai_cmp, -- only enable if wanted opts = {}, config = function(_, opts) local copilot_cmp = require("copilot_cmp") @@ -308,7 +306,7 @@ opts = nil end, specs = { { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) @@ -352,7 +350,7 @@ end ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index f2470d060c..36fb136fbc 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -172,7 +172,7 @@ end ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "tzachar/cmp-tabnine" }, ---@param opts cmp.ConfigSchema diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index bdf463afb2..b58ae9f035 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -248,7 +248,7 @@ end ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "saadparwaiz1/cmp_luasnip" }, opts = function(_, opts) diff --git a/docs/extras/coding/nvim-cmp.md b/docs/extras/coding/nvim-cmp.md new file mode 100644 index 0000000000..95b2611338 --- /dev/null +++ b/docs/extras/coding/nvim-cmp.md @@ -0,0 +1,392 @@ +# `Nvim-cmp` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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-cmp](https://github.com/hrsh7th/nvim-cmp) + + Setup nvim-cmp + + + + + + +```lua +opts = function() + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) + local cmp = require("cmp") + local defaults = require("cmp.config.default")() + local auto_select = true + return { + auto_brackets = {}, -- configure any filetype to auto add brackets + completion = { + completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), + }, + preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.complete(), + [""] = LazyVim.cmp.confirm({ select = auto_select }), + [""] = LazyVim.cmp.confirm({ select = true }), + [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + cmp.abort() + fallback() + end, + [""] = function(fallback) + return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + end, + }), + sources = cmp.config.sources({ + { name = "lazydev" }, + { name = "nvim_lsp" }, + { name = "path" }, + }, { + { name = "buffer" }, + }), + formatting = { + format = function(entry, item) + local icons = LazyVim.config.icons.kinds + if icons[item.kind] then + item.kind = icons[item.kind] .. item.kind + end + + local widths = { + abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, + menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, + } + + for key, width in pairs(widths) do + if item[key] and vim.fn.strdisplaywidth(item[key]) > width then + item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" + end + end + + return item + end, + }, + experimental = { + -- only show ghost text when we show ai completions + ghost_text = vim.g.ai_cmp and { + hl_group = "CmpGhostText", + } or false, + }, + sorting = defaults.sorting, + } +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + version = false, -- last release is way too old + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + }, + -- Not all LSP servers add brackets when completing a function. + -- To better deal with this, LazyVim adds a custom option to cmp, + -- that you can configure. For example: + -- + -- ```lua + -- opts = { + -- auto_brackets = { "python" } + -- } + -- ``` + opts = function() + vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) + local cmp = require("cmp") + local defaults = require("cmp.config.default")() + local auto_select = true + return { + auto_brackets = {}, -- configure any filetype to auto add brackets + completion = { + completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), + }, + preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.complete(), + [""] = LazyVim.cmp.confirm({ select = auto_select }), + [""] = LazyVim.cmp.confirm({ select = true }), + [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [""] = function(fallback) + cmp.abort() + fallback() + end, + [""] = function(fallback) + return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + end, + }), + sources = cmp.config.sources({ + { name = "lazydev" }, + { name = "nvim_lsp" }, + { name = "path" }, + }, { + { name = "buffer" }, + }), + formatting = { + format = function(entry, item) + local icons = LazyVim.config.icons.kinds + if icons[item.kind] then + item.kind = icons[item.kind] .. item.kind + end + + local widths = { + abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, + menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, + } + + for key, width in pairs(widths) do + if item[key] and vim.fn.strdisplaywidth(item[key]) > width then + item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" + end + end + + return item + end, + }, + experimental = { + -- only show ghost text when we show ai completions + ghost_text = vim.g.ai_cmp and { + hl_group = "CmpGhostText", + } or false, + }, + sorting = defaults.sorting, + } + end, + main = "lazyvim.util.cmp", +} +``` + + + + + +## [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", +} +``` + + + + + +## [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"hrsh7th/cmp-buffer" +``` + + + + + +## [cmp-path](https://github.com/hrsh7th/cmp-path) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +"hrsh7th/cmp-path" +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + + snippets + + + + + + +```lua +opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + dependencies = { + { + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + }, + dependencies = { "rafamadriz/friendly-snippets" }, + }, + }, + opts = function(_, opts) + opts.snippet = { + expand = function(item) + return LazyVim.cmp.expand(item.body) + end, + } + if LazyVim.has("nvim-snippets") then + table.insert(opts.sources, { name = "snippets" }) + end + end, +} +``` + + + + + +## [nvim-snippets](https://github.com/garymjr/nvim-snippets) + + + + + +```lua +opts = { + friendly_snippets = true, +} +``` + + + + + + +```lua +{ + "garymjr/nvim-snippets", + opts = { + friendly_snippets = true, + }, + dependencies = { "rafamadriz/friendly-snippets" }, +} +``` + + + + + +## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "rafamadriz/friendly-snippets" } +``` + + + + + + diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index a097e1a5d4..eedc4473c0 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -64,7 +64,6 @@ opts = {} -- stylua: ignore keys = { - { "d", "", desc = "+debug", mode = {"n", "v"} }, { "dB", function() require("dap").set_breakpoint(vim.fn.input('Breakpoint condition: ')) end, desc = "Breakpoint Condition" }, { "db", function() require("dap").toggle_breakpoint() end, desc = "Toggle Breakpoint" }, { "dc", function() require("dap").continue() end, desc = "Run/Continue" }, @@ -77,7 +76,7 @@ opts = {} { "dl", function() require("dap").run_last() end, desc = "Run Last" }, { "do", function() require("dap").step_out() end, desc = "Step Out" }, { "dO", function() require("dap").step_over() end, desc = "Step Over" }, - { "dp", function() require("dap").pause() end, desc = "Pause" }, + { "dP", function() require("dap").pause() end, desc = "Pause" }, { "dr", function() require("dap").repl.toggle() end, desc = "Toggle REPL" }, { "ds", function() require("dap").session() end, desc = "Session" }, { "dt", function() require("dap").terminate() end, desc = "Terminate" }, diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 521c60cfa4..4f3577d52b 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -42,445 +42,6 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - - Fuzzy finder. - The default key bindings to find files will use Telescope's - `find_files` or `git_files` depending on whether the - directory is a git repo. - - - - - - -```lua -opts = function() - local actions = require("telescope.actions") - - local open_with_trouble = function(...) - return require("trouble.sources.telescope").open(...) - end - local find_files_no_ignore = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { no_ignore = true, default_text = line })() - end - local find_files_with_hidden = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { hidden = true, default_text = line })() - end - - local function find_command() - if 1 == vim.fn.executable("rg") then - return { "rg", "--files", "--color", "never", "-g", "!.git" } - elseif 1 == vim.fn.executable("fd") then - return { "fd", "--type", "f", "--color", "never", "-E", ".git" } - elseif 1 == vim.fn.executable("fdfind") then - return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } - elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then - return { "find", ".", "-type", "f" } - elseif 1 == vim.fn.executable("where") then - return { "where", "/r", ".", "*" } - end - end - - return { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - -- open files in the first window that is an actual file. - -- use the current window if no other window is available. - get_selection_window = function() - local wins = vim.api.nvim_list_wins() - table.insert(wins, 1, vim.api.nvim_get_current_win()) - for _, win in ipairs(wins) do - local buf = vim.api.nvim_win_get_buf(win) - if vim.bo[buf].buftype == "" then - return win - end - end - return 0 - end, - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - [""] = find_files_no_ignore, - [""] = find_files_with_hidden, - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - [""] = actions.preview_scrolling_down, - [""] = actions.preview_scrolling_up, - }, - n = { - ["q"] = actions.close, - }, - }, - }, - pickers = { - find_files = { - find_command = find_command, - hidden = true, - }, - }, - } -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - enabled = function() - return LazyVim.pick.want() == "telescope" - end, - version = false, -- telescope did only one release, so use HEAD for now - dependencies = { - { - "nvim-telescope/telescope-fzf-native.nvim", - build = (build_cmd ~= "cmake") and "make" - or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = build_cmd ~= nil, - config = function(plugin) - LazyVim.on_load("telescope.nvim", function() - local ok, err = pcall(require("telescope").load_extension, "fzf") - if not ok then - local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") - if not vim.uv.fs_stat(lib) then - LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") - require("lazy").build({ plugins = { plugin }, show = false }):wait(function() - LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") - end) - else - LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) - end - end - end) - end, - }, - }, - keys = { - { - ",", - "Telescope buffers sort_mru=true sort_lastused=true", - desc = "Switch Buffer", - }, - { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, - { ":", "Telescope command_history", desc = "Command History" }, - { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, - -- find - { - "fb", - "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", - desc = "Buffers", - }, - { "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)" }, - { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, - { "fr", "Telescope oldfiles", desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, - -- git - { "gc", "Telescope git_commits", desc = "Commits" }, - { "gs", "Telescope git_status", desc = "Status" }, - -- search - { 's"', "Telescope registers", desc = "Registers" }, - { "sa", "Telescope autocommands", desc = "Auto Commands" }, - { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, - { "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" }, - { "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" }, - { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, - { "sj", "Telescope jumplist", desc = "Jumplist" }, - { "sk", "Telescope keymaps", desc = "Key Maps" }, - { "sl", "Telescope loclist", desc = "Location List" }, - { "sM", "Telescope man_pages", desc = "Man Pages" }, - { "sm", "Telescope marks", desc = "Jump to Mark" }, - { "so", "Telescope vim_options", desc = "Options" }, - { "sR", "Telescope resume", desc = "Resume" }, - { "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)" }, - { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, - { - "ss", - function() - require("telescope.builtin").lsp_document_symbols({ - symbols = LazyVim.config.get_kind_filter(), - }) - end, - desc = "Goto Symbol", - }, - { - "sS", - function() - require("telescope.builtin").lsp_dynamic_workspace_symbols({ - symbols = LazyVim.config.get_kind_filter(), - }) - end, - desc = "Goto Symbol (Workspace)", - }, - }, - opts = function() - local actions = require("telescope.actions") - - local open_with_trouble = function(...) - return require("trouble.sources.telescope").open(...) - end - local find_files_no_ignore = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { no_ignore = true, default_text = line })() - end - local find_files_with_hidden = function() - local action_state = require("telescope.actions.state") - local line = action_state.get_current_line() - LazyVim.pick("find_files", { hidden = true, default_text = line })() - end - - local function find_command() - if 1 == vim.fn.executable("rg") then - return { "rg", "--files", "--color", "never", "-g", "!.git" } - elseif 1 == vim.fn.executable("fd") then - return { "fd", "--type", "f", "--color", "never", "-E", ".git" } - elseif 1 == vim.fn.executable("fdfind") then - return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } - elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then - return { "find", ".", "-type", "f" } - elseif 1 == vim.fn.executable("where") then - return { "where", "/r", ".", "*" } - end - end - - return { - defaults = { - prompt_prefix = " ", - selection_caret = " ", - -- open files in the first window that is an actual file. - -- use the current window if no other window is available. - get_selection_window = function() - local wins = vim.api.nvim_list_wins() - table.insert(wins, 1, vim.api.nvim_get_current_win()) - for _, win in ipairs(wins) do - local buf = vim.api.nvim_win_get_buf(win) - if vim.bo[buf].buftype == "" then - return win - end - end - return 0 - end, - mappings = { - i = { - [""] = open_with_trouble, - [""] = open_with_trouble, - [""] = find_files_no_ignore, - [""] = find_files_with_hidden, - [""] = actions.cycle_history_next, - [""] = actions.cycle_history_prev, - [""] = actions.preview_scrolling_down, - [""] = actions.preview_scrolling_up, - }, - n = { - ["q"] = actions.close, - }, - }, - }, - pickers = { - find_files = { - find_command = find_command, - hidden = true, - }, - }, - } - end, -} -``` - - - - - -## [dressing.nvim](https://github.com/stevearc/dressing.nvim) - - better vim.ui with telescope - - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "stevearc/dressing.nvim", - lazy = true, - enabled = function() - return LazyVim.pick.want() == "telescope" - end, - init = function() - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.select = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.select(...) - end - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.input = function(...) - require("lazy").load({ plugins = { "dressing.nvim" } }) - return vim.ui.input(...) - end - end, -} -``` - - - - - -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - - Flash Telescope config - - - - - - -```lua -opts = function(_, opts) - if not LazyVim.has("flash.nvim") then - return - end - local function flash(prompt_bufnr) - require("flash").jump({ - pattern = "^", - label = { after = { 0, 0 } }, - search = { - mode = "search", - exclude = { - function(win) - return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" - end, - }, - }, - action = function(match) - local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) - picker:set_selection(match.pos[1] - 1) - end, - }) - end - opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { - mappings = { n = { s = flash }, i = { [""] = flash } }, - }) -end -``` - - - - - - -```lua -{ - "nvim-telescope/telescope.nvim", - optional = true, - opts = function(_, opts) - if not LazyVim.has("flash.nvim") then - return - end - local function flash(prompt_bufnr) - require("flash").jump({ - pattern = "^", - label = { after = { 0, 0 } }, - search = { - mode = "search", - exclude = { - function(win) - return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" - end, - }, - }, - action = function(match) - local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) - picker:set_selection(match.pos[1] - 1) - end, - }) - end - opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { - mappings = { n = { s = flash }, i = { [""] = flash } }, - }) - end, -} -``` - - - - - -## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) - - - - - -```lua -opts = {} -``` - - - - - - -```lua -{ - "nvim-telescope/telescope-fzf-native.nvim", - build = (build_cmd ~= "cmake") and "make" - or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - enabled = build_cmd ~= nil, - config = function(plugin) - LazyVim.on_load("telescope.nvim", function() - local ok, err = pcall(require("telescope").load_extension, "fzf") - if not ok then - local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") - if not vim.uv.fs_stat(lib) then - LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") - require("lazy").build({ plugins = { plugin }, show = false }):wait(function() - LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") - end) - else - LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) - end - end - end) - end, -} -``` - - - - - ## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 924cf599f5..5da8a0a95e 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -277,7 +277,7 @@ end ```lua { - "nvim-cmp", + "hrsh7th/nvim-cmp", opts = function(_, opts) table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores")) end, diff --git a/docs/extras/lang/git.md b/docs/extras/lang/git.md index f7b97b718a..3c93c3a83b 100644 --- a/docs/extras/lang/git.md +++ b/docs/extras/lang/git.md @@ -61,16 +61,14 @@ opts = { ensure_installed = { "git_config", "gitcommit", "git_rebase", "gitignor -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [cmp-git](https://github.com/petertriho/cmp-git) ```lua -opts = function(_, opts) - table.insert(opts.sources, { name = "git" }) -end +opts = {} ``` @@ -79,31 +77,23 @@ end ```lua -{ - "nvim-cmp", - dependencies = { - { "petertriho/cmp-git", opts = {} }, - }, - ---@module 'cmp' - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, { name = "git" }) - end, -} +{ "petertriho/cmp-git", opts = {} } ``` -## [cmp-git](https://github.com/petertriho/cmp-git) +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ ```lua -opts = {} +opts = function(_, opts) + table.insert(opts.sources, { name = "git" }) +end ``` @@ -112,7 +102,18 @@ opts = {} ```lua -{ "petertriho/cmp-git", opts = {} } +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = { + { "petertriho/cmp-git", opts = {} }, + }, + ---@module 'cmp' + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "git" }) + end, +} ``` diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 7f611d75ba..f4788f00de 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -266,52 +266,6 @@ 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", - branch = "regexp", -- Use this branch for the new version - cmd = "VenvSelect", - enabled = function() - return LazyVim.has("telescope.nvim") - end, - 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/extras/ui/indent-blankline.md b/docs/extras/ui/indent-blankline.md new file mode 100644 index 0000000000..1e52d277d1 --- /dev/null +++ b/docs/extras/ui/indent-blankline.md @@ -0,0 +1,168 @@ +# `Indent-blankline` + + + +:::info +You can enable the extra with the `:LazyExtras` command. +Plugins marked as optional will only be configured if they are installed. +::: + +
+Alternatively, you can add it to your lazy.nvim imports + +```lua title="lua/config/lazy.lua" {4} +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.indent-blankline" }, + { import = "plugins" }, + }, +}) +``` + +
+ +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'; + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + disable snacks indent when indent-blankline is enabled + + + + + + +```lua +opts = { + indent = { enabled = false }, +} +``` + + + + + + +```lua +{ + "snacks.nvim", + opts = { + indent = { enabled = false }, + }, +} +``` + + + + + +## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) + + + + + +```lua +opts = function() + Snacks.toggle({ + name = "Indention Guides", + get = function() + return require("ibl.config").get_config(0).enabled + end, + set = function(state) + require("ibl").setup_buffer(0, { enabled = state }) + end, + }):map("ug") + + return { + indent = { + char = "│", + tab_char = "│", + }, + scope = { show_start = false, show_end = false }, + exclude = { + filetypes = { + "Trouble", + "alpha", + "dashboard", + "help", + "lazy", + "mason", + "neo-tree", + "notify", + "snacks_dashboard", + "snacks_notif", + "snacks_terminal", + "snacks_win", + "toggleterm", + "trouble", + }, + }, + } +end +``` + + + + + + +```lua +{ + "lukas-reineke/indent-blankline.nvim", + event = "LazyFile", + opts = function() + Snacks.toggle({ + name = "Indention Guides", + get = function() + return require("ibl.config").get_config(0).enabled + end, + set = function(state) + require("ibl").setup_buffer(0, { enabled = state }) + end, + }):map("ug") + + return { + indent = { + char = "│", + tab_char = "│", + }, + scope = { show_start = false, show_end = false }, + exclude = { + filetypes = { + "Trouble", + "alpha", + "dashboard", + "help", + "lazy", + "mason", + "neo-tree", + "notify", + "snacks_dashboard", + "snacks_notif", + "snacks_terminal", + "snacks_win", + "toggleterm", + "trouble", + }, + }, + } + end, + main = "ibl", +} +``` + + + + + + diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index b7a12a0533..c48a7508c8 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -32,8 +32,44 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + disable snacks scroll when animate is enabled + + + + + + +```lua +opts = { + scroll = { enabled = false }, +} +``` + + + + + + +```lua +{ + "snacks.nvim", + opts = { + scroll = { enabled = false }, + }, +} +``` + + + + + ## [mini.animate](https://github.com/echasnovski/mini.animate) + setup animate + + @@ -96,7 +132,6 @@ end ```lua { "echasnovski/mini.animate", - recommended = true, event = "VeryLazy", cond = vim.g.neovide == nil, opts = function(_, opts) diff --git a/docs/keymaps.md b/docs/keymaps.md index a9f0304a9b..2583f3b8e6 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -75,6 +75,12 @@ possible keymaps starting with ``. | <leader>uA | Toggle Tabline | **n** | | <leader>uT | Toggle Treesitter Highlight | **n** | | <leader>ub | Toggle Dark Background | **n** | +| <leader>uD | Toggle Dimming | **n** | +| <leader>ua | Toggle Animations | **n** | +| <leader>ug | Toggle Indent Guides | **n** | +| <leader>uS | Toggle Smooth Scroll | **n** | +| <leader>dpp | Toggle Profiler | **n** | +| <leader>dph | Toggle Profiler Highlights | **n** | | <leader>uh | Toggle Inlay Hints | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | @@ -92,7 +98,9 @@ possible keymaps starting with ``. | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | | <leader>wd | Delete Window | **n** | -| <leader>wm | Toggle Maximize | **n** | +| <leader>wm | Toggle Zoom Mode | **n** | +| <leader>uZ | Toggle Zoom Mode | **n** | +| <leader>uz | Toggle Zen Mode | **n** | | <leader><tab>l | Last Tab | **n** | | <leader><tab>o | Close Other Tabs | **n** | | <leader><tab>f | First Tab | **n** | @@ -156,6 +164,49 @@ possible keymaps starting with ``. | s | Flash | **n**, **o**, **x** | | S | Flash Treesitter | **n**, **o**, **x** | +## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Switch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Commits | **n** | +| <leader>gs | Status | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Auto Commands | **n** | +| <leader>sb | Buffer | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Document Diagnostics | **n** | +| <leader>sD | Workspace Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Search Highlight Groups | **n** | +| <leader>sj | Jumplist | **n** | +| <leader>sk | Key Maps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Jump to Mark | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>ss | Goto Symbol | **n** | +| <leader>sS | Goto Symbol (Workspace) | **n** | +| <leader>sw | Word (Root Dir) | **n** | +| <leader>sW | Word (cwd) | **n** | +| <leader>sw | Selection (Root Dir) | **v** | +| <leader>sW | Selection (cwd) | **v** | +| <leader>uC | Colorscheme with Preview | **n** | + ## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim.git) | Key | Description | Mode | @@ -214,54 +265,11 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | | <leader>. | Toggle Scratch Buffer | **n** | +| <leader>dps | Profiler Scratch Buffer | **n** | | <leader>n | Notification History | **n** | | <leader>S | Select Scratch Buffer | **n** | | <leader>un | Dismiss All Notifications | **n** | -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>so | Options | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - ## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) | Key | Description | Mode | @@ -354,7 +362,6 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | Key | Description | Mode | | --- | --- | --- | -| <leader>d | +debug | **n**, **v** | | <leader>da | Run with Args | **n** | | <leader>db | Toggle Breakpoint | **n** | | <leader>dB | Breakpoint Condition | **n** | @@ -367,7 +374,7 @@ Part of [lazyvim.plugins.extras.dap.core](/extras/dap/core) | <leader>dl | Run Last | **n** | | <leader>do | Step Out | **n** | | <leader>dO | Step Over | **n** | -| <leader>dp | Pause | **n** | +| <leader>dP | Pause | **n** | | <leader>dr | Toggle REPL | **n** | | <leader>ds | Session | **n** | | <leader>dt | Terminate | **n** | @@ -546,51 +553,6 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | -## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git) -Part of [lazyvim.plugins.extras.editor.telescope](/extras/editor/telescope) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>so | Options | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) @@ -613,13 +575,6 @@ 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) diff --git a/docs/news.md b/docs/news.md index 57d13e9fd0..c88780c506 100644 --- a/docs/news.md +++ b/docs/news.md @@ -4,6 +4,61 @@ sidebar_position: 2 # 📰 What's new? +## 14.x + +Big new release with a lot of changes and improvements! +Two new plugins have been added, and a lot of plugins have been replaced. +With these changes, default **LazyVim** is now just `34` plugins. + +### Added Plugins + +- [fzf-lua](https://github.com/ibhagwan/fzf-lua) as a replacement for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) + - to use **telescope.nvim** instead, enable the `ui.telescope` extra +- [blink.cmp](https://github.com/saghm/blink.cmp) as a replacement for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + - to use **nvim-cmp** instead, enable the `nvim-cmp` extra + +### Removed Plugins + +- [dressing.nvim](https://github.com/stevearc/dressing.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua) and [snacks.input](https://github.com/folke/snacks.nvim)) +- [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua)) +- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) (replaced with [fzf-lua](https://github.com/ibhagwan/fzf-lua)) +- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) (replaced with [snacks.indent](https://github.com/Folke/snacks.nvim)) + - to use **indent-blankline.nvim** instead, enable the `indent-blankline` extra +- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) (replaced with [blink](https://github.com/Saghen/blink.cmp)) +- [nvim-snippets](https://github.com/hrsh7th/vim-vsnip) (replaced with [blink](https://github.com/Saghen/blink.cmp)) +- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) (replaced with [blink](https://github.com/Saghen/blink.cmp)) +- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) (replaced with [blink](https://github.com/Saghen/blink.cmp)) +- [cmp-path](https://github.com/hrsh7th/cmp-path) (replaced with [blink](https://github.com/Saghen/blink.cmp)) + +### Changes + +- added [`snacks.input`](https://github.com/folke/snacks.nvim/blob/main/docs/input.md) +- added [`snacks.scroll`](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md) +- added [`snacks.indent`](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md) +- added [`snacks.scope`](https://github.com/folke/snacks.nvim/blob/main/docs/scope.md) +- added [`snacks.dim`](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md) +- added [`snacks.zen`](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) +- changed default [`which-key`](https://github.com/folke/which-key.nvim) preset to `helix` +- drop `LazyVim.ui.fg` in favor of [`Snacks.util.color`](https://github.com/folke/snacks.nvim/blob/main/docs/util.md) + +To disable **all animations**, add the following to your `options.lua`: + +```lua +vim.g.snacks_animate = false +``` + +### Keymaps + +- `z` to toggle [zen mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) +- `Z` to toggle [zoom mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) +- `uD` to toggle [dimming](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md) +- `ua` to toggle [animations](https://github.com/folke/snacks.nvim/blob/main/docs/animate.md) +- `uS` to toggle [scroll](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md) +- `ug` to toggle [indent guides](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md) +- [`snacks.profiler`](https://github.com/folke/snacks.nvim/blob/main/docs/profiler.md) keymaps under `dp` + +--- + ## 13.x - **LazyVim** now uses `Snacks.dashboard` as the default dashboard. @@ -25,6 +80,8 @@ sidebar_position: 2 - `Snacks.terminal` is similar to `lazyterm`, but has more features and creates bottom splits by default (similar to the `edgy` integrating) +--- + ## 12.x - **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim) @@ -52,6 +109,8 @@ sidebar_position: 2 - moved `neoconf.nvim` to extras. Project specific LSP settings can be done with a `.lazy.lua` file instead. +--- + ## 11.x - **Keymaps:** @@ -111,6 +170,8 @@ Additionally, some core plugins have been moved to extras. - `mini.indentscope` scopes are now also highlighted with `indent-blankline` - `nvim-treesitter-context` +--- + ## 10.x - added new extra for [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index d324e93d33..a1c5ab9d61 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -5,361 +5,10 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +### Includes the following extras - auto completion - - - - - - -```lua -opts = function() - vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) - local cmp = require("cmp") - local defaults = require("cmp.config.default")() - local auto_select = true - return { - auto_brackets = {}, -- configure any filetype to auto add brackets - completion = { - completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), - }, - preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.complete(), - [""] = LazyVim.cmp.confirm({ select = auto_select }), - [""] = LazyVim.cmp.confirm({ select = true }), - [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = function(fallback) - cmp.abort() - fallback() - end, - [""] = function(fallback) - return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() - end, - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "path" }, - }, { - { name = "buffer" }, - }), - formatting = { - format = function(entry, item) - local icons = LazyVim.config.icons.kinds - if icons[item.kind] then - item.kind = icons[item.kind] .. item.kind - end - - local widths = { - abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, - menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, - } - - for key, width in pairs(widths) do - if item[key] and vim.fn.strdisplaywidth(item[key]) > width then - item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" - end - end - - return item - end, - }, - experimental = { - -- only show ghost text when we show ai completions - ghost_text = vim.g.ai_cmp and { - hl_group = "CmpGhostText", - } or false, - }, - sorting = defaults.sorting, - } -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - version = false, -- last release is way too old - event = "InsertEnter", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - }, - -- Not all LSP servers add brackets when completing a function. - -- To better deal with this, LazyVim adds a custom option to cmp, - -- that you can configure. For example: - -- - -- ```lua - -- opts = { - -- auto_brackets = { "python" } - -- } - -- ``` - opts = function() - vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true }) - local cmp = require("cmp") - local defaults = require("cmp.config.default")() - local auto_select = true - return { - auto_brackets = {}, -- configure any filetype to auto add brackets - completion = { - completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"), - }, - preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None, - mapping = cmp.mapping.preset.insert({ - [""] = cmp.mapping.scroll_docs(-4), - [""] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.complete(), - [""] = LazyVim.cmp.confirm({ select = auto_select }), - [""] = LazyVim.cmp.confirm({ select = true }), - [""] = LazyVim.cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - [""] = function(fallback) - cmp.abort() - fallback() - end, - [""] = function(fallback) - return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() - end, - }), - sources = cmp.config.sources({ - { name = "nvim_lsp" }, - { name = "path" }, - }, { - { name = "buffer" }, - }), - formatting = { - format = function(entry, item) - local icons = LazyVim.config.icons.kinds - if icons[item.kind] then - item.kind = icons[item.kind] .. item.kind - end - - local widths = { - abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40, - menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30, - } - - for key, width in pairs(widths) do - if item[key] and vim.fn.strdisplaywidth(item[key]) > width then - item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…" - end - end - - return item - end, - }, - experimental = { - -- only show ghost text when we show ai completions - ghost_text = vim.g.ai_cmp and { - hl_group = "CmpGhostText", - } or false, - }, - sorting = defaults.sorting, - } - end, - main = "lazyvim.util.cmp", -} -``` - - - - - -## [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", -} -``` - - - - - -## [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -"hrsh7th/cmp-buffer" -``` - - - - - -## [cmp-path](https://github.com/hrsh7th/cmp-path) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -"hrsh7th/cmp-path" -``` - - - - - -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - snippets - - - - - - -```lua -opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end -end -``` - - - - - - -```lua -{ - "nvim-cmp", - optional = true, - dependencies = { - { - "garymjr/nvim-snippets", - opts = { - friendly_snippets = true, - }, - dependencies = { "rafamadriz/friendly-snippets" }, - }, - }, - opts = function(_, opts) - opts.snippet = { - expand = function(item) - return LazyVim.cmp.expand(item.body) - end, - } - if LazyVim.has("nvim-snippets") then - table.insert(opts.sources, { name = "snippets" }) - end - end, -} -``` - - - - - -## [nvim-snippets](https://github.com/garymjr/nvim-snippets) - - - - - -```lua -opts = { - friendly_snippets = true, -} -``` - - - - - - -```lua -{ - "garymjr/nvim-snippets", - opts = { - friendly_snippets = true, - }, - dependencies = { "rafamadriz/friendly-snippets" }, -} -``` - - - - - -## [friendly-snippets](https://github.com/rafamadriz/friendly-snippets) - - - - - -```lua -opts = nil -``` - - - - - - -```lua -{ "rafamadriz/friendly-snippets" } -``` - - - - +- [coding.blink](/extras/coding/blink) +- [coding.nvim-cmp](/extras/coding/nvim-cmp) ## [mini.pairs](https://github.com/echasnovski/mini.pairs) @@ -473,7 +122,6 @@ opts = function() { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" }, "^().*()$", }, - i = LazyVim.mini.ai_indent, -- indent g = LazyVim.mini.ai_buffer, -- buffer u = ai.gen_spec.function_call(), -- u for "Usage" U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name @@ -508,7 +156,6 @@ end { "%u[%l%d]+%f[^%l%d]", "%f[%S][%l%d]+%f[^%l%d]", "%f[%P][%l%d]+%f[^%l%d]", "^[%l%d]+%f[^%l%d]" }, "^().*()$", }, - i = LazyVim.mini.ai_indent, -- indent g = LazyVim.mini.ai_buffer, -- buffer u = ai.gen_spec.function_call(), -- u for "Usage" U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- without dot in function name @@ -572,38 +219,4 @@ opts = { -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - Add lazydev source to cmp - - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sources, { name = "lazydev", group_index = 0 }) -end -``` - - - - - - -```lua -{ - "hrsh7th/nvim-cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources, { name = "lazydev", group_index = 0 }) - end, -} -``` - - - - - diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 7048292874..f8cdc4493f 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -304,12 +304,15 @@ opts = {} ```lua opts = { + preset = "helix", defaults = {}, spec = { { mode = { "n", "v" }, { "", group = "tabs" }, { "c", group = "code" }, + { "d", group = "debug" }, + { "dp", group = "profiler" }, { "f", group = "file/find" }, { "g", group = "git" }, { "gh", group = "hunks" }, @@ -355,12 +358,15 @@ opts = { event = "VeryLazy", opts_extend = { "spec" }, opts = { + preset = "helix", defaults = {}, spec = { { mode = { "n", "v" }, { "", group = "tabs" }, { "c", group = "code" }, + { "d", group = "debug" }, + { "dp", group = "profiler" }, { "f", group = "file/find" }, { "g", group = "git" }, { "gh", group = "hunks" }, diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 803787b250..1cde3bfd0b 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -157,29 +157,30 @@ opts = function() { LazyVim.lualine.pretty_path() }, }, lualine_x = { + Snacks.profiler.status(), -- stylua: ignore { function() return require("noice").api.status.command.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = function() return LazyVim.ui.fg("Statement") end, + color = function() return { fg = Snacks.util.color("Statement") } end, }, -- stylua: ignore { function() return require("noice").api.status.mode.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = function() return LazyVim.ui.fg("Constant") end, + color = function() return { fg = Snacks.util.color("Constant") } end, }, -- stylua: ignore { function() return " " .. require("dap").status() end, cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, - color = function() return LazyVim.ui.fg("Debug") end, + color = function() return { fg = Snacks.util.color("Debug") } end, }, -- stylua: ignore { require("lazy.status").updates, cond = require("lazy.status").has_updates, - color = function() return LazyVim.ui.fg("Special") end, + color = function() return { fg = Snacks.util.color("Special") } end, }, { "diff", @@ -290,29 +291,30 @@ end { LazyVim.lualine.pretty_path() }, }, lualine_x = { + Snacks.profiler.status(), -- stylua: ignore { function() return require("noice").api.status.command.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.command.has() end, - color = function() return LazyVim.ui.fg("Statement") end, + color = function() return { fg = Snacks.util.color("Statement") } end, }, -- stylua: ignore { function() return require("noice").api.status.mode.get() end, cond = function() return package.loaded["noice"] and require("noice").api.status.mode.has() end, - color = function() return LazyVim.ui.fg("Constant") end, + color = function() return { fg = Snacks.util.color("Constant") } end, }, -- stylua: ignore { function() return " " .. require("dap").status() end, cond = function() return package.loaded["dap"] and require("dap").status() ~= "" end, - color = function() return LazyVim.ui.fg("Debug") end, + color = function() return { fg = Snacks.util.color("Debug") } end, }, -- stylua: ignore { require("lazy.status").updates, cond = require("lazy.status").has_updates, - color = function() return LazyVim.ui.fg("Special") end, + color = function() return { fg = Snacks.util.color("Special") } end, }, { "diff", @@ -375,109 +377,6 @@ end
-## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) - - indent guides for Neovim - - - - - - -```lua -opts = function() - Snacks.toggle({ - name = "Indention Guides", - get = function() - return require("ibl.config").get_config(0).enabled - end, - set = function(state) - require("ibl").setup_buffer(0, { enabled = state }) - end, - }):map("ug") - - return { - indent = { - char = "│", - tab_char = "│", - }, - scope = { show_start = false, show_end = false }, - exclude = { - filetypes = { - "Trouble", - "alpha", - "dashboard", - "help", - "lazy", - "mason", - "neo-tree", - "notify", - "snacks_dashboard", - "snacks_notif", - "snacks_terminal", - "snacks_win", - "toggleterm", - "trouble", - }, - }, - } -end -``` - - - - - - -```lua -{ - "lukas-reineke/indent-blankline.nvim", - event = "LazyFile", - opts = function() - Snacks.toggle({ - name = "Indention Guides", - get = function() - return require("ibl.config").get_config(0).enabled - end, - set = function(state) - require("ibl").setup_buffer(0, { enabled = state }) - end, - }):map("ug") - - return { - indent = { - char = "│", - tab_char = "│", - }, - scope = { show_start = false, show_end = false }, - exclude = { - filetypes = { - "Trouble", - "alpha", - "dashboard", - "help", - "lazy", - "mason", - "neo-tree", - "notify", - "snacks_dashboard", - "snacks_notif", - "snacks_terminal", - "snacks_win", - "toggleterm", - "trouble", - }, - }, - } - end, - main = "ibl", -} -``` - - - - - ## [noice.nvim](https://github.com/folke/noice.nvim) Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu. @@ -665,6 +564,55 @@ opts = nil +```lua +opts = { + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + scope = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = false }, -- we set this in options.lua + toggle = { map = LazyVim.safe_keymap_set }, + words = { enabled = true }, +} +``` + + + + + + +```lua +{ + "snacks.nvim", + opts = { + indent = { enabled = true }, + input = { enabled = true }, + notifier = { enabled = true }, + scope = { enabled = true }, + scroll = { enabled = true }, + statuscolumn = { enabled = false }, -- we set this in options.lua + toggle = { map = LazyVim.safe_keymap_set }, + words = { enabled = true }, + }, + -- stylua: ignore + keys = { + { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, + { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, + }, +} +``` + + + +
+ +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + ```lua opts = { dashboard = { @@ -702,7 +650,7 @@ opts = { ```lua { - "folke/snacks.nvim", + "snacks.nvim", opts = { dashboard = { preset = { diff --git a/docs/plugins/util.md b/docs/plugins/util.md index 74dff515d4..bf1079c175 100644 --- a/docs/plugins/util.md +++ b/docs/plugins/util.md @@ -5,6 +5,67 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + Snacks utils + + + + + + +```lua +opts = { + bigfile = { enabled = true }, + quickfile = { enabled = true }, + terminal = { + win = { + keys = { + nav_h = { "", term_nav("h"), desc = "Go to Left Window", expr = true, mode = "t" }, + 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" }, + }, + }, + }, +} +``` + + + + + + +```lua +{ + "snacks.nvim", + opts = { + bigfile = { enabled = true }, + quickfile = { enabled = true }, + terminal = { + win = { + keys = { + nav_h = { "", term_nav("h"), desc = "Go to Left Window", expr = true, mode = "t" }, + 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" }, + }, + }, + }, + }, + -- stylua: ignore + keys = { + { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, + { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, + { "dps", function() Snacks.profiler.scratch() end, desc = "Profiler Scratch Buffer" }, + }, +} +``` + + + + + ## [persistence.nvim](https://github.com/folke/persistence.nvim) Session management. This saves your session in the background, From ccbbbc24bd56328f38ea37a99839f7ec3bb8334d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 16:26:35 +0000 Subject: [PATCH 367/553] chore(build): auto-generate docs --- docs/extras/lang/clangd.md | 7 ++++- docs/extras/ui/mini-indentscope.md | 43 +++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 5da8a0a95e..fb5ab8c2e9 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -258,7 +258,7 @@ opts = { -## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ @@ -266,6 +266,8 @@ opts = { ```lua opts = function(_, opts) + opts.sorting = opts.sorting or {} + opts.sorting.comparators = opts.sorting.comparators or {} table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores")) end ``` @@ -278,7 +280,10 @@ end ```lua { "hrsh7th/nvim-cmp", + optional = true, opts = function(_, opts) + opts.sorting = opts.sorting or {} + opts.sorting.comparators = opts.sorting.comparators or {} table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores")) end, } diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index 982a0a20ab..d3593808e8 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -104,7 +104,47 @@ opts = { -## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + disable snacks scroll when mini-indentscope is enabled + + + + + + +```lua +opts = { + indent = { + scope = { enabled = false }, + }, +} +``` + + + + + + +```lua +{ + "snacks.nvim", + opts = { + indent = { + scope = { enabled = false }, + }, + }, +} +``` + + + + + +## [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) _(optional)_ + + disable inent-blankline scope when mini-indentscope is enabled + @@ -124,6 +164,7 @@ opts = { ```lua { "lukas-reineke/indent-blankline.nvim", + optional = true, event = "LazyFile", opts = { scope = { enabled = false }, From a53831ab0c131d0826874353dc012f7ef15883ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 17:17:57 +0000 Subject: [PATCH 368/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 26 ++++++++++++++------------ docs/news.md | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 4cb7b58dbe..375a4222ee 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -148,8 +148,12 @@ opts = { ```lua opts = function() - local mason_registry = require("mason-registry") - local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" + 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" + 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. @@ -170,10 +174,7 @@ opts = function() -- How to run jdtls. This can be overridden to a full java command-line -- if the Python wrapper script doesn't suffice. - cmd = { - vim.fn.exepath("jdtls"), - string.format("--jvm-arg=-javaagent:%s", lombok_jar), - }, + cmd = cmd, full_cmd = function(opts) local fname = vim.api.nvim_buf_get_name(0) local root_dir = opts.root_dir(fname) @@ -218,8 +219,12 @@ end dependencies = { "folke/which-key.nvim" }, ft = java_filetypes, opts = function() - local mason_registry = require("mason-registry") - local lombok_jar = mason_registry.get_package("jdtls"):get_install_path() .. "/lombok.jar" + 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" + 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. @@ -240,10 +245,7 @@ end -- How to run jdtls. This can be overridden to a full java command-line -- if the Python wrapper script doesn't suffice. - cmd = { - vim.fn.exepath("jdtls"), - string.format("--jvm-arg=-javaagent:%s", lombok_jar), - }, + cmd = cmd, full_cmd = function(opts) local fname = vim.api.nvim_buf_get_name(0) local root_dir = opts.root_dir(fname) diff --git a/docs/news.md b/docs/news.md index c88780c506..042eefd91e 100644 --- a/docs/news.md +++ b/docs/news.md @@ -49,8 +49,8 @@ vim.g.snacks_animate = false ### Keymaps -- `z` to toggle [zen mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) -- `Z` to toggle [zoom mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) +- `uz` to toggle [zen mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) +- `uZ` & `wm` to toggle [zoom mode](https://github.com/folke/snacks.nvim/blob/main/docs/zen.md) - `uD` to toggle [dimming](https://github.com/folke/snacks.nvim/blob/main/docs/dim.md) - `ua` to toggle [animations](https://github.com/folke/snacks.nvim/blob/main/docs/animate.md) - `uS` to toggle [scroll](https://github.com/folke/snacks.nvim/blob/main/docs/scroll.md) From d88de6d1b8484420fd211afef1219bd3cd9e1044 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 18:29:12 +0000 Subject: [PATCH 369/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 375a4222ee..3afe8198f9 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -282,7 +282,12 @@ end -- if nvim-dap is enabled with java debug/test. local mason_registry = require("mason-registry") local bundles = {} ---@type string[] - if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then + if + LazyVim.has("mason.nvim") + and 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 = { @@ -374,7 +379,12 @@ end }, }) - if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then + if + LazyVim.has("mason.nvim") + and opts.dap + and LazyVim.has("nvim-dap") + and mason_registry.is_installed("java-debug-adapter") + then -- custom init for Java debugger require("jdtls").setup_dap(opts.dap) require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) From 7a1f585ddeccf7e2daebbbef286b3edef8dce448 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 12 Dec 2024 19:16:41 +0000 Subject: [PATCH 370/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 116 +++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 61 deletions(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 3afe8198f9..3e09625a59 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -280,34 +280,30 @@ end config = function(_, opts) -- Find the extra bundles that should be passed on the jdtls command-line -- if nvim-dap is enabled with java debug/test. - local mason_registry = require("mason-registry") local bundles = {} ---@type string[] - if - LazyVim.has("mason.nvim") - and 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", - } - -- 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", - }) - 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) + 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", + } + -- 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", + }) + 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 end end end - local function attach_jdtls() local fname = vim.api.nvim_buf_get_name(0) @@ -379,45 +375,43 @@ end }, }) - if - LazyVim.has("mason.nvim") - and opts.dap - and LazyVim.has("nvim-dap") - and mason_registry.is_installed("java-debug-adapter") - then - -- custom init for Java debugger - require("jdtls").setup_dap(opts.dap) - require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) - - -- Java Test require Java debugger to work - if opts.test and mason_registry.is_installed("java-test") then - -- custom keymaps for Java test runner (not yet compatible with neotest) - wk.add({ - { - mode = "n", - buffer = args.buf, - { "t", group = "test" }, - { - "tt", - function() - require("jdtls.dap").test_class({ - config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, - }) - end, - desc = "Run All Test", - }, + 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 + -- custom init for Java debugger + require("jdtls").setup_dap(opts.dap) + require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + + -- Java Test require Java debugger to work + if opts.test and mason_registry.is_installed("java-test") then + -- custom keymaps for Java test runner (not yet compatible with neotest) + wk.add({ { - "tr", - function() - require("jdtls.dap").test_nearest_method({ - config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, - }) - end, - desc = "Run Nearest Test", + mode = "n", + buffer = args.buf, + { "t", group = "test" }, + { + "tt", + function() + require("jdtls.dap").test_class({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) + end, + desc = "Run All Test", + }, + { + "tr", + function() + require("jdtls.dap").test_nearest_method({ + config_overrides = type(opts.test) ~= "boolean" and opts.test.config_overrides or nil, + }) + end, + desc = "Run Nearest Test", + }, + { "tT", require("jdtls.dap").pick_test, desc = "Run Test" }, }, - { "tT", require("jdtls.dap").pick_test, desc = "Run Test" }, - }, - }) + }) + end end end From aefa536efa62c6242e8584e72f390e2311db6014 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 01:43:16 +0000 Subject: [PATCH 371/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 3192d3cf48..59695129be 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -193,12 +193,7 @@ opts = { table.insert(enabled, source) end end - - -- TODO: remove when blink made a new release > 0.7.6 - if not vim.g.lazyvim_blink_main then - opts.sources.completion = opts.sources.completion or {} - opts.sources.completion.enabled_providers = enabled - end + opts.sources.compat = nil -- check if we need to override symbol kinds for _, provider in pairs(opts.sources.providers or {}) do From 17ea146bf51b11aadeef5e87d911fc85bae906d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 06:29:27 +0000 Subject: [PATCH 372/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 5 +++++ docs/extras/lang/rust.md | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 59695129be..524b6f2f5b 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -193,6 +193,8 @@ opts = { table.insert(enabled, source) end end + + -- Unset custom prop to pass blink.cmp validation opts.sources.compat = nil -- check if we need to override symbol kinds @@ -216,6 +218,9 @@ opts = { end return items end + + -- Unset custom prop to pass blink.cmp validation + provider.kind = nil end end diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 28edcf4965..0b35a433f7 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -168,6 +168,19 @@ opts = { ["async-recursion"] = { "async_recursion" }, }, }, + files = { + excludeDirs = { + ".direnv", + ".git", + ".github", + ".gitlab", + "bin", + "node_modules", + "target", + "venv", + ".venv", + }, + }, }, }, }, @@ -218,6 +231,19 @@ opts = { ["async-recursion"] = { "async_recursion" }, }, }, + files = { + excludeDirs = { + ".direnv", + ".git", + ".github", + ".gitlab", + "bin", + "node_modules", + "target", + "venv", + ".venv", + }, + }, }, }, }, From c1708e0bec574b50482fe221389c45b9df6b4aea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 09:21:54 +0000 Subject: [PATCH 373/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 524b6f2f5b..a6454951b3 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -89,6 +89,7 @@ opts = { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, + cmdline = {}, }, keymap = { @@ -169,6 +170,7 @@ opts = { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, + cmdline = {}, }, keymap = { From 265321989276e6c3516a9df880c0565933e1561c Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 13 Dec 2024 09:03:52 -0600 Subject: [PATCH 374/553] docs(installation): update docker instructions (#125) fzf and curl are new dependencies with LazyVim 14.0. --- docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index c63115a9a5..466c2b7991 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -89,7 +89,7 @@ with [PowerShell](https://github.com/PowerShell/PowerShell) ```sh docker run -w /root -it --rm alpine:edge sh -uelic ' - apk add git lazygit neovim ripgrep alpine-sdk --update + apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update git clone https://github.com/LazyVim/starter ~/.config/nvim cd ~/.config/nvim nvim From 8ff037ea367832f812af33c745979f70ba51c232 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 16:26:00 +0000 Subject: [PATCH 375/553] chore(build): auto-generate docs --- docs/news.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/news.md b/docs/news.md index 042eefd91e..67c8a75205 100644 --- a/docs/news.md +++ b/docs/news.md @@ -13,9 +13,9 @@ With these changes, default **LazyVim** is now just `34` plugins. ### Added Plugins - [fzf-lua](https://github.com/ibhagwan/fzf-lua) as a replacement for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - - to use **telescope.nvim** instead, enable the `ui.telescope` extra -- [blink.cmp](https://github.com/saghm/blink.cmp) as a replacement for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - - to use **nvim-cmp** instead, enable the `nvim-cmp` extra + - to use **telescope.nvim** instead, enable the `editor.telescope` extra +- [blink.cmp](https://github.com/saghen/blink.cmp) as a replacement for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) + - to use **nvim-cmp** instead, enable the `coding.nvim-cmp` extra ### Removed Plugins From ab5795200a0018b510a64a121947a5180e38cbff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 20:22:45 +0000 Subject: [PATCH 376/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index a6454951b3..acf4737187 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -196,6 +196,12 @@ opts = { end end + -- TODO: remove when blink made a new release > 0.7.6 + if not vim.g.lazyvim_blink_main then + opts.sources.completion = opts.sources.completion or {} + opts.sources.completion.enabled_providers = enabled + end + -- Unset custom prop to pass blink.cmp validation opts.sources.compat = nil @@ -280,6 +286,9 @@ opts = nil opts = function(_, opts) opts.appearance = opts.appearance or {} opts.appearance.kind_icons = LazyVim.config.icons.kinds + + -- Use block instead of icon for color items to make swatches more usable + opts.appearance.kind_icons.Color = "██" end ``` @@ -294,6 +303,9 @@ end opts = function(_, opts) opts.appearance = opts.appearance or {} opts.appearance.kind_icons = LazyVim.config.icons.kinds + + -- Use block instead of icon for color items to make swatches more usable + opts.appearance.kind_icons.Color = "██" end, } ``` From 5f3da463e19e2d51313d0ed4819729625eb3a320 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 22:19:16 +0000 Subject: [PATCH 377/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index acf4737187..fe2b84bfe7 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -69,7 +69,7 @@ opts = { }, menu = { draw = { - treesitter = true, + treesitter = { "lsp" }, }, }, documentation = { @@ -150,7 +150,7 @@ opts = { }, menu = { draw = { - treesitter = true, + treesitter = { "lsp" }, }, }, documentation = { @@ -196,10 +196,15 @@ opts = { end end - -- TODO: remove when blink made a new release > 0.7.6 + --- NOTE: compat with latest version. Currenlty 0.7.6 if not vim.g.lazyvim_blink_main then + ---@diagnostic disable-next-line: inject-field opts.sources.completion = opts.sources.completion or {} opts.sources.completion.enabled_providers = enabled + if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then + ---@diagnostic disable-next-line: assign-type-mismatch + opts.completion.menu.draw.treesitter = true + end end -- Unset custom prop to pass blink.cmp validation @@ -213,6 +218,7 @@ opts = { local kind_idx = #CompletionItemKind + 1 CompletionItemKind[kind_idx] = provider.kind + ---@diagnostic disable-next-line: no-unknown CompletionItemKind[provider.kind] = kind_idx ---@type fun(ctx: blink.cmp.Context, items: blink.cmp.CompletionItem[]): blink.cmp.CompletionItem[] @@ -285,10 +291,9 @@ opts = nil ```lua opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = LazyVim.config.icons.kinds - - -- Use block instead of icon for color items to make swatches more usable - opts.appearance.kind_icons.Color = "██" + opts.appearance.kind_icons = vim.tbl_extend("keep", { + Color = "██", -- Use block instead of icon for color items to make swatches more usable + }, LazyVim.config.icons.kinds) end ``` @@ -302,10 +307,9 @@ end "saghen/blink.cmp", opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = LazyVim.config.icons.kinds - - -- Use block instead of icon for color items to make swatches more usable - opts.appearance.kind_icons.Color = "██" + opts.appearance.kind_icons = vim.tbl_extend("keep", { + Color = "██", -- Use block instead of icon for color items to make swatches more usable + }, LazyVim.config.icons.kinds) end, } ``` From 4b7b8820acb20a1b5d57ae2a13b1e41bc5e8f01b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 13 Dec 2024 23:19:17 +0000 Subject: [PATCH 378/553] chore(build): auto-generate docs --- docs/configuration/general.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 03ae3ebf6a..533a80d175 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -321,21 +321,22 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" }) -- toggle options LazyVim.format.snacks_toggle():map("uf") LazyVim.format.snacks_toggle(true):map("uF") -Snacks.toggle.option("spell", { name = "Spelling"}):map("us") -Snacks.toggle.option("wrap", {name = "Wrap"}):map("uw") -Snacks.toggle.option("relativenumber", { name = "Relative Number"}):map("uL") +Snacks.toggle.option("spell", { name = "Spelling" }):map("us") +Snacks.toggle.option("wrap", { name = "Wrap" }):map("uw") +Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("uL") Snacks.toggle.diagnostics():map("ud") Snacks.toggle.line_number():map("ul") -Snacks.toggle.option("conceallevel", {off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level"}):map("uc") -Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline"}):map("uA") +Snacks.toggle.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2, name = "Conceal Level" }):map("uc") +Snacks.toggle.option("showtabline", { off = 0, on = vim.o.showtabline > 0 and vim.o.showtabline or 2, name = "Tabline" }):map("uA") Snacks.toggle.treesitter():map("uT") -Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background"}):map("ub") +Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark Background" }):map("ub") Snacks.toggle.dim():map("uD") Snacks.toggle.animate():map("ua") Snacks.toggle.indent():map("ug") Snacks.toggle.scroll():map("uS") Snacks.toggle.profiler():map("dpp") Snacks.toggle.profiler_highlights():map("dph") + if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end From df5d5afaf0b8900251a0ded814ab4113d0cee94b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 14 Dec 2024 07:18:00 +0000 Subject: [PATCH 379/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index fe2b84bfe7..c0c3e5c090 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -94,6 +94,7 @@ opts = { keymap = { preset = "enter", + [""] = { "select_and_accept" }, [""] = { LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", @@ -175,6 +176,7 @@ opts = { keymap = { preset = "enter", + [""] = { "select_and_accept" }, [""] = { LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", From c0d59096e1bd0a8bb5ba2db638cd4efaf2c91be8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 14 Dec 2024 22:52:42 +0100 Subject: [PATCH 380/553] docs: added fzf and curl to requirements --- docs/intro.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/intro.md b/docs/intro.md index 780ea89c60..635138e8bd 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -29,7 +29,9 @@ to make it easy to customize and extend your config. - 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) -- for [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) **_(optional)_** +- **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)** - **live grep**: [ripgrep](https://github.com/BurntSushi/ripgrep) - **find files**: [fd](https://github.com/sharkdp/fd) - a terminal that support true color and _undercurl_: From c6629e19836bbc3bafaa0b622933f4904ca3ecd6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Dec 2024 08:24:29 +0000 Subject: [PATCH 381/553] chore(build): auto-generate docs --- docs/configuration/general.md | 11 ++++++++--- docs/configuration/index.md | 2 +- docs/extras/coding/blink.md | 15 +++++++++++++++ docs/keymaps.md | 1 - 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 533a80d175..9e04693552 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -203,6 +203,14 @@ vim.g.markdown_recommended_style = 0 -- use `vim.keymap.set` instead local map = LazyVim.safe_keymap_set +-- Clear search and stop snippet on escape +Snacks.util.on_key("", function() + vim.cmd("noh") + if vim.snippet then + vim.snippet.stop() + end +end) + -- better up/down map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) @@ -244,9 +252,6 @@ map("n", "bo", function() end, { desc = "Delete Other Buffers" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) --- Clear search with -map({ "i", "n" }, "", "noh", { desc = "Escape and Clear hlsearch" }) - -- Clear search, diff update and redraw -- taken from runtime/lua/_editor.lua map( diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 57db7f7be2..45e8d55d8e 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -124,7 +124,7 @@ return { Package = " ", Property = " ", Reference = " ", - Snippet = " ", + Snippet = "󱄽 ", String = " ", Struct = "󰆼 ", Supermaven = " ", diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index c0c3e5c090..9f0fede08b 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -198,6 +198,21 @@ opts = { end end + -- fix super-tab completion + if opts.keymap.preset == "super-tab" then + opts.keymap[""] = { + function(cmp) + if cmp.snippet_active() then + return cmp.accept() + else + return cmp.select_and_accept() + end + end, + LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + "fallback", + } + end + --- NOTE: compat with latest version. Currenlty 0.7.6 if not vim.g.lazyvim_blink_main then ---@diagnostic disable-next-line: inject-field diff --git a/docs/keymaps.md b/docs/keymaps.md index 2583f3b8e6..9197b30dfe 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -42,7 +42,6 @@ possible keymaps starting with ``. | <leader>bd | Delete Buffer | **n** | | <leader>bo | Delete Other Buffers | **n** | | <leader>bD | Delete Buffer and Window | **n** | -| <esc> | Escape and Clear hlsearch | **i**, **n** | | <leader>ur | Redraw / Clear hlsearch / Diff Update | **n** | | n | Next Search Result | **n**, **x**, **o** | | N | Prev Search Result | **n**, **x**, **o** | From 4243eacbd11c728d409e8d9a85d52f56b1766b29 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Dec 2024 11:15:30 +0000 Subject: [PATCH 382/553] chore(build): auto-generate docs --- docs/configuration/general.md | 4 +--- docs/extras/coding/luasnip.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 9e04693552..79aff7b699 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -206,9 +206,7 @@ local map = LazyVim.safe_keymap_set -- Clear search and stop snippet on escape Snacks.util.on_key("", function() vim.cmd("noh") - if vim.snippet then - vim.snippet.stop() - end + LazyVim.cmp.actions.snippet_stop() end) -- better up/down diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index b58ae9f035..087aab25f8 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -126,6 +126,12 @@ opts = function() return true end end + LazyVim.cmp.actions.snippet_stop = function() + if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine? + require("luasnip").unlink_current() + return true + end + end end ``` @@ -144,6 +150,12 @@ end return true end end + LazyVim.cmp.actions.snippet_stop = function() + if require("luasnip").expand_or_jumpable() then -- or just jumpable(1) is fine? + require("luasnip").unlink_current() + return true + end + end end, } ``` From b3dff91bc3c11712a2da4cc2127ae90ad61f810f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Dec 2024 18:26:20 +0000 Subject: [PATCH 383/553] chore(build): auto-generate docs --- docs/configuration/general.md | 13 ++++++----- docs/extras/ai/codeium.md | 16 ++++++++++++-- docs/extras/ai/copilot.md | 4 ++++ docs/extras/ai/supermaven.md | 16 ++++++++++++-- docs/extras/ai/tabnine.md | 16 ++++++++++++-- docs/extras/coding/blink.md | 41 +++++++++++++++++------------------ docs/keymaps.md | 1 + 7 files changed, 74 insertions(+), 33 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 79aff7b699..6baf0ef9cb 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -203,12 +203,6 @@ vim.g.markdown_recommended_style = 0 -- use `vim.keymap.set` instead local map = LazyVim.safe_keymap_set --- Clear search and stop snippet on escape -Snacks.util.on_key("", function() - vim.cmd("noh") - LazyVim.cmp.actions.snippet_stop() -end) - -- better up/down map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) map({ "n", "x" }, "", "v:count == 0 ? 'gj' : 'j'", { desc = "Down", expr = true, silent = true }) @@ -250,6 +244,13 @@ map("n", "bo", function() end, { desc = "Delete Other Buffers" }) map("n", "bD", ":bd", { desc = "Delete Buffer and Window" }) +-- Clear search and stop snippet on escape +map({ "i", "n", "s" }, "", function() + vim.cmd("noh") + LazyVim.cmp.actions.snippet_stop() + return "" +end, { expr = true, desc = "Escape and Clear hlsearch" }) + -- Clear search, diff update and redraw -- taken from runtime/lua/_editor.lua map( diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index aa72782768..499cdf9d53 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -282,7 +282,13 @@ end opts = { sources = { compat = { "codeium" }, - providers = { codeium = { kind = "Codeium" } }, + providers = { + codeium = { + kind = "Codeium", + score_offset = 100, + async = true, + }, + }, }, } ``` @@ -300,7 +306,13 @@ opts = { opts = { sources = { compat = { "codeium" }, - providers = { codeium = { kind = "Codeium" } }, + providers = { + codeium = { + kind = "Codeium", + score_offset = 100, + async = true, + }, + }, }, }, } diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 59878b21db..14d9a4f87b 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -382,6 +382,8 @@ opts = { name = "copilot", module = "blink-cmp-copilot", kind = "Copilot", + score_offset = 100, + async = true, }, }, }, @@ -406,6 +408,8 @@ opts = { name = "copilot", module = "blink-cmp-copilot", kind = "Copilot", + score_offset = 100, + async = true, }, }, }, diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 8ae1908487..a0e3f14fb3 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -247,7 +247,13 @@ end opts = { sources = { compat = { "supermaven" }, - providers = { supermaven = { kind = "Supermaven" } }, + providers = { + supermaven = { + kind = "Supermaven", + score_offset = 100, + async = true, + }, + }, }, } ``` @@ -265,7 +271,13 @@ opts = { opts = { sources = { compat = { "supermaven" }, - providers = { supermaven = { kind = "Supermaven" } }, + providers = { + supermaven = { + kind = "Supermaven", + score_offset = 100, + async = true, + }, + }, }, }, } diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index 36fb136fbc..62787f984b 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -207,7 +207,13 @@ end opts = { sources = { compat = { "cmp_tabnine" }, - providers = { cmp_tabnine = { kind = "TabNine" } }, + providers = { + cmp_tabnine = { + kind = "TabNine", + score_offset = 100, + async = true, + }, + }, }, } ``` @@ -225,7 +231,13 @@ opts = { opts = { sources = { compat = { "cmp_tabnine" }, - providers = { cmp_tabnine = { kind = "TabNine" } }, + providers = { + cmp_tabnine = { + kind = "TabNine", + score_offset = 100, + async = true, + }, + }, }, }, } diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 9f0fede08b..5e0572dce4 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -95,10 +95,6 @@ opts = { keymap = { preset = "enter", [""] = { "select_and_accept" }, - [""] = { - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), - "fallback", - }, }, } ``` @@ -177,10 +173,6 @@ opts = { keymap = { preset = "enter", [""] = { "select_and_accept" }, - [""] = { - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), - "fallback", - }, }, }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } } @@ -198,19 +190,26 @@ opts = { end end - -- fix super-tab completion - if opts.keymap.preset == "super-tab" then - opts.keymap[""] = { - function(cmp) - if cmp.snippet_active() then - return cmp.accept() - else - return cmp.select_and_accept() - end - end, - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), - "fallback", - } + -- add ai_accept to key + if not opts.keymap[""] then + if opts.keymap.preset == "super-tab" then -- super-tab + opts.keymap[""] = { + function(cmp) + if cmp.snippet_active() then + return cmp.accept() + else + return cmp.select_and_accept() + end + end, + LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + "fallback", + } + else -- other presets + opts.keymap[""] = { + LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), + "fallback", + } + end end --- NOTE: compat with latest version. Currenlty 0.7.6 diff --git a/docs/keymaps.md b/docs/keymaps.md index 9197b30dfe..39ba2d3bcf 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -42,6 +42,7 @@ possible keymaps starting with ``. | <leader>bd | Delete Buffer | **n** | | <leader>bo | Delete Other Buffers | **n** | | <leader>bD | Delete Buffer and Window | **n** | +| <esc> | Escape and Clear hlsearch | **i**, **n**, **s** | | <leader>ur | Redraw / Clear hlsearch / Diff Update | **n** | | n | Next Search Result | **n**, **x**, **o** | | N | Prev Search Result | **n**, **x**, **o** | From f0e6cf89ecfeaf2316e18eb82714596956499944 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 07:21:15 +0000 Subject: [PATCH 384/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 5e0572dce4..8dba0164b4 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -352,6 +352,7 @@ opts = { lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", + score_offset = 100, -- show at a higher priority than lsp }, }, }, @@ -374,6 +375,7 @@ opts = { lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", + score_offset = 100, -- show at a higher priority than lsp }, }, }, From 7c5dc5f7527aba67716ea13e155d162869578cb0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 15:22:12 +0000 Subject: [PATCH 385/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 8dba0164b4..217b8b5cad 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -51,6 +51,11 @@ import TabItem from '@theme/TabItem'; ```lua opts = { + snippets = { + expand = function(snippet, _) + 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 @@ -129,6 +134,11 @@ opts = { ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { + snippets = { + expand = function(snippet, _) + 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 From 5863f56cae82349f6d723692d17800b022a69eb1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 17:17:03 +0000 Subject: [PATCH 386/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 6 ++++ docs/extras/editor/illuminate.md | 52 ++++++++++++++++---------------- docs/plugins/lsp.md | 8 ----- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 217b8b5cad..b45de18b05 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -72,6 +72,9 @@ opts = { enabled = true, }, }, + trigger = { + show_on_insert_on_trigger_character = false, + }, menu = { draw = { treesitter = { "lsp" }, @@ -155,6 +158,9 @@ opts = { enabled = true, }, }, + trigger = { + show_on_insert_on_trigger_character = false, + }, menu = { draw = { treesitter = { "lsp" }, diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md index e8d7b96f31..fc4e9f5ad4 100644 --- a/docs/extras/editor/illuminate.md +++ b/docs/extras/editor/illuminate.md @@ -32,6 +32,32 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + disable snacks words + + + + + + +```lua +opts = { words = { enabled = false } } +``` + + + + + + +```lua +{ "snacks.nvim", opts = { words = { enabled = false } } } +``` + + + + + ## [vim-illuminate](https://github.com/RRethy/vim-illuminate) @@ -111,30 +137,4 @@ opts = { -## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - - - - - -```lua -opts = { document_highlight = { enabled = false } } -``` - - - - - - -```lua -{ - "neovim/nvim-lspconfig", - opts = { document_highlight = { enabled = false } }, -} -``` - - - - - diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 7d52c57650..8bf86454e2 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -76,10 +76,6 @@ opts = function() codelens = { enabled = false, }, - -- Enable lsp cursor word highlighting - document_highlight = { - enabled = true, - }, -- add any global capabilities here capabilities = { workspace = { @@ -200,10 +196,6 @@ end codelens = { enabled = false, }, - -- Enable lsp cursor word highlighting - document_highlight = { - enabled = true, - }, -- add any global capabilities here capabilities = { workspace = { From 5767bfa90b01c535e8e2db128f81fc81d360c683 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 16 Dec 2024 20:22:49 +0000 Subject: [PATCH 387/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index b45de18b05..22263a8540 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -72,9 +72,6 @@ opts = { enabled = true, }, }, - trigger = { - show_on_insert_on_trigger_character = false, - }, menu = { draw = { treesitter = { "lsp" }, @@ -158,9 +155,6 @@ opts = { enabled = true, }, }, - trigger = { - show_on_insert_on_trigger_character = false, - }, menu = { draw = { treesitter = { "lsp" }, @@ -210,13 +204,7 @@ opts = { if not opts.keymap[""] then if opts.keymap.preset == "super-tab" then -- super-tab opts.keymap[""] = { - function(cmp) - if cmp.snippet_active() then - return cmp.accept() - else - return cmp.select_and_accept() - end - end, + require("blink.cmp.keymap.presets")["super-tab"][""][1], LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", } From e6a987f16e5a4f99ce2e896d0948254a5850effa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 17 Dec 2024 06:29:15 +0000 Subject: [PATCH 388/553] chore(build): auto-generate docs --- docs/extras/ai/supermaven.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index a0e3f14fb3..9252024817 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -44,6 +44,7 @@ opts = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp }, disable_inline_completion = vim.g.ai_cmp, + ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" }, } ``` @@ -60,6 +61,7 @@ opts = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp }, disable_inline_completion = vim.g.ai_cmp, + ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" }, }, } ``` From dd9f2842a1aad0802c087e8863297882af3a1d3f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 18 Dec 2024 10:24:59 +0100 Subject: [PATCH 389/553] docs: remove manual extras imports --- lua/build.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lua/build.lua b/lua/build.lua index 4add8b4234..70fd9a27fe 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -308,21 +308,6 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "%s" }, - { import = "plugins" }, - }, -}) -``` - -
- %sBelow you can find a list of included plugins and their default settings. :::caution From 6d9943de897447c4cd9c919098e2c3d904d670e5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 18 Dec 2024 10:25:28 +0100 Subject: [PATCH 390/553] docs: docgen --- docs/extras/ai/codeium.md | 17 +--------- docs/extras/ai/copilot-chat.md | 17 +--------- docs/extras/ai/copilot.md | 17 +--------- docs/extras/ai/supermaven.md | 17 +--------- docs/extras/ai/tabnine.md | 17 +--------- docs/extras/coding/blink.md | 28 +--------------- docs/extras/coding/luasnip.md | 17 +--------- docs/extras/coding/mini-comment.md | 17 +--------- docs/extras/coding/mini-surround.md | 17 +--------- docs/extras/coding/neogen.md | 17 +--------- docs/extras/coding/nvim-cmp.md | 17 +--------- docs/extras/coding/yanky.md | 17 +--------- docs/extras/dap/core.md | 17 +--------- docs/extras/dap/nlua.md | 17 +--------- docs/extras/editor/aerial.md | 17 +--------- docs/extras/editor/dial.md | 17 +--------- docs/extras/editor/fzf.md | 27 +-------------- docs/extras/editor/harpoon2.md | 17 +--------- docs/extras/editor/illuminate.md | 17 +--------- docs/extras/editor/inc-rename.md | 17 +--------- docs/extras/editor/leap.md | 17 +--------- docs/extras/editor/mini-diff.md | 17 +--------- docs/extras/editor/mini-files.md | 17 +--------- docs/extras/editor/mini-move.md | 17 +--------- docs/extras/editor/navic.md | 17 +--------- docs/extras/editor/outline.md | 17 +--------- docs/extras/editor/overseer.md | 17 +--------- docs/extras/editor/refactoring.md | 17 +--------- docs/extras/editor/telescope.md | 27 +-------------- docs/extras/formatting/biome.md | 26 +-------------- docs/extras/formatting/black.md | 17 +--------- docs/extras/formatting/prettier.md | 27 +-------------- docs/extras/lang/angular.md | 17 +--------- docs/extras/lang/ansible.md | 17 +--------- docs/extras/lang/astro.md | 17 +--------- docs/extras/lang/clangd.md | 17 +--------- docs/extras/lang/clojure.md | 17 +--------- docs/extras/lang/cmake.md | 17 +--------- docs/extras/lang/docker.md | 17 +--------- docs/extras/lang/elixir.md | 17 +--------- docs/extras/lang/elm.md | 17 +--------- docs/extras/lang/erlang.md | 17 +--------- docs/extras/lang/git.md | 17 +--------- docs/extras/lang/gleam.md | 17 +--------- docs/extras/lang/go.md | 17 +--------- docs/extras/lang/haskell.md | 17 +--------- docs/extras/lang/helm.md | 17 +--------- docs/extras/lang/java.md | 17 +--------- docs/extras/lang/json.md | 17 +--------- docs/extras/lang/kotlin.md | 17 +--------- docs/extras/lang/lean.md | 17 +--------- docs/extras/lang/markdown.md | 17 +--------- docs/extras/lang/nix.md | 17 +--------- docs/extras/lang/nushell.md | 17 +--------- docs/extras/lang/ocaml.md | 17 +--------- docs/extras/lang/omnisharp.md | 17 +--------- docs/extras/lang/php.md | 27 +-------------- docs/extras/lang/prisma.md | 17 +--------- docs/extras/lang/python.md | 29 +--------------- docs/extras/lang/r.md | 17 +--------- docs/extras/lang/rego.md | 17 +--------- docs/extras/lang/ruby.md | 28 +--------------- docs/extras/lang/rust.md | 29 +--------------- docs/extras/lang/scala.md | 17 +--------- docs/extras/lang/sql.md | 49 +--------------------------- docs/extras/lang/svelte.md | 17 +--------- docs/extras/lang/tailwind.md | 17 +--------- docs/extras/lang/terraform.md | 17 +--------- docs/extras/lang/tex.md | 17 +--------- docs/extras/lang/thrift.md | 17 +--------- docs/extras/lang/toml.md | 17 +--------- docs/extras/lang/typescript.md | 17 +--------- docs/extras/lang/vue.md | 17 +--------- docs/extras/lang/yaml.md | 17 +--------- docs/extras/lang/zig.md | 17 +--------- docs/extras/linting/eslint.md | 26 +-------------- docs/extras/lsp/neoconf.md | 17 +--------- docs/extras/lsp/none-ls.md | 17 +--------- docs/extras/test/core.md | 17 +--------- docs/extras/ui/alpha.md | 17 +--------- docs/extras/ui/dashboard-nvim.md | 17 +--------- docs/extras/ui/edgy.md | 17 +--------- docs/extras/ui/indent-blankline.md | 17 +--------- docs/extras/ui/mini-animate.md | 17 +--------- docs/extras/ui/mini-indentscope.md | 17 +--------- docs/extras/ui/mini-starter.md | 17 +--------- docs/extras/ui/smear-cursor.md | 17 +--------- docs/extras/ui/treesitter-context.md | 17 +--------- docs/extras/util/chezmoi.md | 17 +--------- docs/extras/util/dot.md | 17 +--------- docs/extras/util/gitui.md | 17 +--------- docs/extras/util/mini-hipatterns.md | 17 +--------- docs/extras/util/octo.md | 17 +--------- docs/extras/util/project.md | 17 +--------- docs/extras/util/rest.md | 17 +--------- docs/extras/util/startuptime.md | 17 +--------- docs/extras/vscode.md | 17 +--------- docs/keymaps.md | 5 +++ 98 files changed, 102 insertions(+), 1688 deletions(-) diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index 499cdf9d53..26e5387dda 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ai.codeium" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ai.codeiumBelow 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. diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index c61cf19fd6..0460c6e270 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ai.copilot-chat" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ai.copilot-chatBelow 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. diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 14d9a4f87b..9623ead647 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ai.copilot" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ai.copilotBelow 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. diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index 9252024817..d8169fc05a 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ai.supermaven" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ai.supermavenBelow 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. diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index 62787f984b..49bd1ab42a 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ai.tabnine" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ai.tabnineBelow 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. diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 22263a8540..a4e62ddee2 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -7,33 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.blink" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- set to `true` to follow the main branch --- you need to have a working rust toolchain to build the plugin --- in this case. -vim.g.lazyvim_blink_main = false -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.blinkBelow 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. diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 087aab25f8..ea4dea5cab 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.luasnip" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.luasnipBelow 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. diff --git a/docs/extras/coding/mini-comment.md b/docs/extras/coding/mini-comment.md index 3fb490b80d..44203cb2e0 100644 --- a/docs/extras/coding/mini-comment.md +++ b/docs/extras/coding/mini-comment.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.mini-comment" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.mini-commentBelow 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. diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index 46b8803cda..3a47896e4f 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.mini-surround" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.mini-surroundBelow 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. diff --git a/docs/extras/coding/neogen.md b/docs/extras/coding/neogen.md index f7c9e860f6..c2636fbaee 100644 --- a/docs/extras/coding/neogen.md +++ b/docs/extras/coding/neogen.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.neogen" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.neogenBelow 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. diff --git a/docs/extras/coding/nvim-cmp.md b/docs/extras/coding/nvim-cmp.md index 95b2611338..e100d5e1db 100644 --- a/docs/extras/coding/nvim-cmp.md +++ b/docs/extras/coding/nvim-cmp.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.nvim-cmpBelow 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. diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index d59d2ac426..d6ecddbc84 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -9,22 +9,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.coding.yanky" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.coding.yankyBelow 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. diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index eedc4473c0..7ce358663d 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.dap.core" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.dap.coreBelow 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. diff --git a/docs/extras/dap/nlua.md b/docs/extras/dap/nlua.md index 2ac503de08..608fb52781 100644 --- a/docs/extras/dap/nlua.md +++ b/docs/extras/dap/nlua.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.dap.nlua" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.dap.nluaBelow 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. diff --git a/docs/extras/editor/aerial.md b/docs/extras/editor/aerial.md index c992153478..143d0d173f 100644 --- a/docs/extras/editor/aerial.md +++ b/docs/extras/editor/aerial.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.aerial" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.aerialBelow 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. diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index a2237c8f5a..a1d58747a1 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.dial" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.dialBelow 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. diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index a2d04a60d8..4c3e8185a7 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -7,32 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.fzf" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "fzf" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.fzfBelow 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. diff --git a/docs/extras/editor/harpoon2.md b/docs/extras/editor/harpoon2.md index 69e65c1c75..387304f31c 100644 --- a/docs/extras/editor/harpoon2.md +++ b/docs/extras/editor/harpoon2.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.harpoon2" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.harpoon2Below 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. diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md index fc4e9f5ad4..7bc07691e8 100644 --- a/docs/extras/editor/illuminate.md +++ b/docs/extras/editor/illuminate.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.illuminate" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.illuminateBelow 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. diff --git a/docs/extras/editor/inc-rename.md b/docs/extras/editor/inc-rename.md index 1d3d268c36..fd9e7b51bf 100644 --- a/docs/extras/editor/inc-rename.md +++ b/docs/extras/editor/inc-rename.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.inc-rename" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.inc-renameBelow 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. diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index e6e6b8fa7a..bf6a45357e 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.leap" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.leapBelow 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. diff --git a/docs/extras/editor/mini-diff.md b/docs/extras/editor/mini-diff.md index ff33921305..8b1e80cfb1 100644 --- a/docs/extras/editor/mini-diff.md +++ b/docs/extras/editor/mini-diff.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.mini-diff" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.mini-diffBelow 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. diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 0c5a95b0dd..489c1bf347 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.mini-files" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.mini-filesBelow 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. diff --git a/docs/extras/editor/mini-move.md b/docs/extras/editor/mini-move.md index 12c03e75f2..4929b3574d 100644 --- a/docs/extras/editor/mini-move.md +++ b/docs/extras/editor/mini-move.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.mini-move" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.mini-moveBelow 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. diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index 0b4bd48c18..7330836462 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.navic" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.navicBelow 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. diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index 65a4d82435..2f79834d57 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.outline" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.outlineBelow 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. diff --git a/docs/extras/editor/overseer.md b/docs/extras/editor/overseer.md index 0228fbaa7b..9d74d1c370 100644 --- a/docs/extras/editor/overseer.md +++ b/docs/extras/editor/overseer.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.overseer" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.overseerBelow 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. diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index 785d90ca7f..663119bd5b 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.refactoring" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.refactoringBelow 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. diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index 4f3577d52b..f94114b9c0 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -7,32 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.editor.telescope" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- In case you don't want to use `:LazyExtras`, --- then you need to set the option below. -vim.g.lazyvim_picker = "telescope" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.editor.telescopeBelow 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. diff --git a/docs/extras/formatting/biome.md b/docs/extras/formatting/biome.md index 9238c2f995..58a5aef681 100644 --- a/docs/extras/formatting/biome.md +++ b/docs/extras/formatting/biome.md @@ -7,31 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.formatting.biome" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- Enable this option to avoid conflicts with Prettier. -vim.g.lazyvim_prettier_needs_config = true -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.formatting.biomeBelow 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. diff --git a/docs/extras/formatting/black.md b/docs/extras/formatting/black.md index 59adc170c2..18b8909a82 100644 --- a/docs/extras/formatting/black.md +++ b/docs/extras/formatting/black.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.formatting.black" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.formatting.blackBelow 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. diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index 7a24a9ab17..f9d9265ad9 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -7,32 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.formatting.prettier" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- Enable the option to require a Prettier config file --- If no prettier config file is found, the formatter will not be used -vim.g.lazyvim_prettier_needs_config = false -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.formatting.prettierBelow 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. diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index 4a29b491e4..f69b5aee2a 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.angular" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.angularBelow 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. diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index 798f7765a0..63e80b2cc2 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.ansible" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.ansibleBelow 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. diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index 83e938ca21..8a55c10ad1 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.astro" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.astroBelow 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. diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index fb5ab8c2e9..692e92f6ca 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.clangd" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.clangdBelow 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. diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index d7401d7e6a..c0398133e9 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.clojure" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.clojureBelow 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. diff --git a/docs/extras/lang/cmake.md b/docs/extras/lang/cmake.md index d1ad6e2f71..60a1376c90 100644 --- a/docs/extras/lang/cmake.md +++ b/docs/extras/lang/cmake.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.cmake" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.cmakeBelow 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. diff --git a/docs/extras/lang/docker.md b/docs/extras/lang/docker.md index bb2f7d0b61..fed28a62cf 100644 --- a/docs/extras/lang/docker.md +++ b/docs/extras/lang/docker.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.docker" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.dockerBelow 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. diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index f60730c841..4ab27eb16e 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.elixir" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.elixirBelow 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. diff --git a/docs/extras/lang/elm.md b/docs/extras/lang/elm.md index 9d37ebea3b..391d20434d 100644 --- a/docs/extras/lang/elm.md +++ b/docs/extras/lang/elm.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.elm" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.elmBelow 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. diff --git a/docs/extras/lang/erlang.md b/docs/extras/lang/erlang.md index 464cc9a018..7142af088c 100644 --- a/docs/extras/lang/erlang.md +++ b/docs/extras/lang/erlang.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.erlang" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.erlangBelow 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. diff --git a/docs/extras/lang/git.md b/docs/extras/lang/git.md index 3c93c3a83b..038153d91f 100644 --- a/docs/extras/lang/git.md +++ b/docs/extras/lang/git.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.git" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.gitBelow 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. diff --git a/docs/extras/lang/gleam.md b/docs/extras/lang/gleam.md index 705f768afd..187f49f9ca 100644 --- a/docs/extras/lang/gleam.md +++ b/docs/extras/lang/gleam.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.gleam" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.gleamBelow 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. diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 8c06a72708..a9ce953a86 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.go" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.goBelow 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. diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 0c38698abb..8370356875 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.haskell" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.haskellBelow 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. diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index 878afb8af6..de54eb6833 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.helm" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.helmBelow 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. diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 3e09625a59..c0165e9da4 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.java" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.javaBelow 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. diff --git a/docs/extras/lang/json.md b/docs/extras/lang/json.md index a1112aa6f1..4af860e7a9 100644 --- a/docs/extras/lang/json.md +++ b/docs/extras/lang/json.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.json" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.jsonBelow 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. diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index 98dff3611c..f8b565022c 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.kotlin" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.kotlinBelow 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. diff --git a/docs/extras/lang/lean.md b/docs/extras/lang/lean.md index 1475e1400c..0bfc8db539 100644 --- a/docs/extras/lang/lean.md +++ b/docs/extras/lang/lean.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.lean" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.leanBelow 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. diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 3106ee4578..4c6af96899 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.markdown" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.markdownBelow 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. diff --git a/docs/extras/lang/nix.md b/docs/extras/lang/nix.md index 85b1ec4260..ea3829c3bd 100644 --- a/docs/extras/lang/nix.md +++ b/docs/extras/lang/nix.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.nix" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.nixBelow 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. diff --git a/docs/extras/lang/nushell.md b/docs/extras/lang/nushell.md index 5e42108889..66fe96f892 100644 --- a/docs/extras/lang/nushell.md +++ b/docs/extras/lang/nushell.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.nushell" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.nushellBelow 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. diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index 04ccaf4348..62357b0de9 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.ocaml" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.ocamlBelow 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. diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index 795bbd1464..56fd6eae48 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.omnisharp" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.omnisharpBelow 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. diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index e1e38a91d9..bb196d191c 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -7,32 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.php" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- LSP Server to use for PHP. --- Set to "intelephense" to use intelephense instead of phpactor. -vim.g.lazyvim_php_lsp = "intelephense" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.phpBelow 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. diff --git a/docs/extras/lang/prisma.md b/docs/extras/lang/prisma.md index eead6c0eaf..109ca29deb 100644 --- a/docs/extras/lang/prisma.md +++ b/docs/extras/lang/prisma.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.prisma" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.prismaBelow 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. diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index f4788f00de..21a0f80d70 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -7,34 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.python" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- LSP Server to use for Python. --- Set to "basedpyright" to use basedpyright instead of pyright. -vim.g.lazyvim_python_lsp = "pyright" --- Set to "ruff_lsp" to use the old LSP implementation version. -vim.g.lazyvim_python_ruff = "ruff" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.pythonBelow 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. diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index 8e668f38c2..e47a2eae46 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.r" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.rBelow 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. diff --git a/docs/extras/lang/rego.md b/docs/extras/lang/rego.md index 7461507e6b..5aa589b2af 100644 --- a/docs/extras/lang/rego.md +++ b/docs/extras/lang/rego.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.rego" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.regoBelow 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. diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index 918d8ed8a0..c02e9c3e31 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -7,33 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.ruby" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- LSP Server to use for Ruby. --- Set to "solargraph" to use solargraph instead of ruby_lsp. -vim.g.lazyvim_ruby_lsp = "ruby_lsp" -vim.g.lazyvim_ruby_formatter = "rubocop" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.rubyBelow 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. diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 0b35a433f7..eab685e99e 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -7,34 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.rust" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- LSP Server to use for Rust. --- Set to "bacon-ls" to use bacon-ls instead of rust-analyzer. --- only for diagnostics. The rest of LSP support will still be --- provided by rust-analyzer. -vim.g.lazyvim_rust_diagnostics = "rust-analyzer" -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.rustBelow 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. diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index 2ebae5dfc3..65d6187809 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.scala" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.scalaBelow 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. diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 889774c916..99e8cbfd9d 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -7,54 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.sql" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- The setup below will automatically configure connections without the need for manual input each time. - --- Example configuration using dictionary with keys: --- vim.g.dbs = { --- dev = "Replace with your database connection URL.", --- staging = "Replace with your database connection URL.", --- } --- or --- Example configuration using a list of dictionaries: --- vim.g.dbs = { --- { name = "dev", url = "Replace with your database connection URL." }, --- { name = "staging", url = "Replace with your database connection URL." }, --- } - --- or --- Create a `.lazy.lua` file in your project and set your connections like this: --- ```lua --- vim.g.dbs = {...} --- --- return {} --- ``` - --- Alternatively, you can also use other methods to inject your environment variables. - --- Finally, please make sure to add `.lazy.lua` to your `.gitignore` file to protect your secrets. -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.sqlBelow 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. diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index e36da298c7..fcad284408 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.svelte" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.svelteBelow 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. diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index 9eeb232328..d933380bca 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.tailwind" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.tailwindBelow 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. diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index 89050149c9..8b67a568fd 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.terraform" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.terraformBelow 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. diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index 93fc6f2917..7be392ce41 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.tex" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.texBelow 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. diff --git a/docs/extras/lang/thrift.md b/docs/extras/lang/thrift.md index 8bba7bacbb..4ca7278cea 100644 --- a/docs/extras/lang/thrift.md +++ b/docs/extras/lang/thrift.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.thrift" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.thriftBelow 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. diff --git a/docs/extras/lang/toml.md b/docs/extras/lang/toml.md index 48ab00c404..86c1108cac 100644 --- a/docs/extras/lang/toml.md +++ b/docs/extras/lang/toml.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.toml" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.tomlBelow 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. diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 62947760af..3deb2b86c8 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.typescript" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.typescriptBelow 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. diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 109ec0d107..9db0d33dcd 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.vue" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.vueBelow 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. diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 0349298a18..68a2313f3c 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.yaml" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.yamlBelow 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. diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md index f26af4f33b..43897a9c73 100644 --- a/docs/extras/lang/zig.md +++ b/docs/extras/lang/zig.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lang.zig" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lang.zigBelow 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. diff --git a/docs/extras/linting/eslint.md b/docs/extras/linting/eslint.md index ecc7d662e0..06f5664ae3 100644 --- a/docs/extras/linting/eslint.md +++ b/docs/extras/linting/eslint.md @@ -7,31 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.linting.eslint" }, - { import = "plugins" }, - }, -}) -``` - -
- -### 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" --- Set to false to disable auto format -vim.g.lazyvim_eslint_auto_format = true -``` - -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.linting.eslintBelow 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. diff --git a/docs/extras/lsp/neoconf.md b/docs/extras/lsp/neoconf.md index 53f21bc640..f24aefa073 100644 --- a/docs/extras/lsp/neoconf.md +++ b/docs/extras/lsp/neoconf.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lsp.neoconf" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lsp.neoconfBelow 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. diff --git a/docs/extras/lsp/none-ls.md b/docs/extras/lsp/none-ls.md index 63f324dd58..41617960c3 100644 --- a/docs/extras/lsp/none-ls.md +++ b/docs/extras/lsp/none-ls.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.lsp.none-ls" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.lsp.none-lsBelow 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. diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 8d10937574..1bb243223c 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -21,22 +21,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.test.core" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.test.coreBelow 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. diff --git a/docs/extras/ui/alpha.md b/docs/extras/ui/alpha.md index b311802f35..fea5b52e60 100644 --- a/docs/extras/ui/alpha.md +++ b/docs/extras/ui/alpha.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.alpha" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.alphaBelow 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. diff --git a/docs/extras/ui/dashboard-nvim.md b/docs/extras/ui/dashboard-nvim.md index c2e7a8c50c..537c340eaf 100644 --- a/docs/extras/ui/dashboard-nvim.md +++ b/docs/extras/ui/dashboard-nvim.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.dashboard-nvim" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.dashboard-nvimBelow 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. diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 42c3e4a04d..9bfe013091 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.edgy" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.edgyBelow 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. diff --git a/docs/extras/ui/indent-blankline.md b/docs/extras/ui/indent-blankline.md index 1e52d277d1..89711b3166 100644 --- a/docs/extras/ui/indent-blankline.md +++ b/docs/extras/ui/indent-blankline.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.indent-blankline" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.indent-blanklineBelow 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. diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index c48a7508c8..0a64c3da07 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.mini-animate" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.mini-animateBelow 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. diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index d3593808e8..a910bc10d2 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.mini-indentscope" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.mini-indentscopeBelow 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. diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index b1ed410ae3..f123c64e06 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.mini-starter" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.mini-starterBelow 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. diff --git a/docs/extras/ui/smear-cursor.md b/docs/extras/ui/smear-cursor.md index a3cf48bf3c..cea2b95533 100644 --- a/docs/extras/ui/smear-cursor.md +++ b/docs/extras/ui/smear-cursor.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.smear-cursor" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.smear-cursorBelow 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. diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md index edcd4c5558..6702fc5a02 100644 --- a/docs/extras/ui/treesitter-context.md +++ b/docs/extras/ui/treesitter-context.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.ui.treesitter-context" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.ui.treesitter-contextBelow 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. diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index ddad046f1b..415733cd0a 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.chezmoi" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.chezmoiBelow 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. diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index e059503d09..1c82710810 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.dot" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.dotBelow 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. diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index 424daffa82..ba9662fc30 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.gitui" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.gituiBelow 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. diff --git a/docs/extras/util/mini-hipatterns.md b/docs/extras/util/mini-hipatterns.md index c713e17af9..0fe4834e55 100644 --- a/docs/extras/util/mini-hipatterns.md +++ b/docs/extras/util/mini-hipatterns.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.mini-hipatterns" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.mini-hipatternsBelow 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. diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 8481e3201a..5b7c001951 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.octo" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.octoBelow 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. diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index eb70061604..762ffb4597 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.project" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.projectBelow 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. diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md index 97e72d1942..ad0f927456 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.rest" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.restBelow 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. diff --git a/docs/extras/util/startuptime.md b/docs/extras/util/startuptime.md index df7ecb53e0..3927b5a2dd 100644 --- a/docs/extras/util/startuptime.md +++ b/docs/extras/util/startuptime.md @@ -7,22 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.util.startuptime" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.util.startuptimeBelow 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. diff --git a/docs/extras/vscode.md b/docs/extras/vscode.md index b5a7be886a..9bd0650a07 100644 --- a/docs/extras/vscode.md +++ b/docs/extras/vscode.md @@ -35,22 +35,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -
-Alternatively, you can add it to your lazy.nvim imports - -```lua title="lua/config/lazy.lua" {4} -require("lazy").setup({ - spec = { - { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - { import = "lazyvim.plugins.extras.vscode" }, - { import = "plugins" }, - }, -}) -``` - -
- -Below you can find a list of included plugins and their default settings. +lazyvim.plugins.extras.vscodeBelow 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. diff --git a/docs/keymaps.md b/docs/keymaps.md index 39ba2d3bcf..c19e8a9d59 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 | Lazygit Current File History | **n** | +| <leader>gl | Lazygit Log | **n** | +| <leader>gL | Lazygit Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | | <leader>gY | Git Browse (copy) | **n**, **x** | From b5bef6bc85777a8901d02d65dca45ef6b6450d0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Dec 2024 09:25:53 +0000 Subject: [PATCH 391/553] 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 c19e8a9d59..39ba2d3bcf 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 | Lazygit Current File History | **n** | -| <leader>gl | Lazygit Log | **n** | -| <leader>gL | Lazygit Log (cwd) | **n** | | <leader>gb | Git Blame Line | **n** | | <leader>gB | Git Browse (open) | **n**, **x** | | <leader>gY | Git Browse (copy) | **n**, **x** | From b2ee7090180a0bb5c6105e16aa29ec0f1b5406ae Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Dec 2024 13:27:36 +0000 Subject: [PATCH 392/553] chore(build): auto-generate docs --- docs/plugins/colorscheme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/colorscheme.md b/docs/plugins/colorscheme.md index 4338a2b27a..52f5b30b8a 100644 --- a/docs/plugins/colorscheme.md +++ b/docs/plugins/colorscheme.md @@ -69,6 +69,7 @@ opts = { cmp = true, dashboard = true, flash = true, + fzf = true, grug_far = true, gitsigns = true, headlines = true, @@ -120,6 +121,7 @@ opts = { cmp = true, dashboard = true, flash = true, + fzf = true, grug_far = true, gitsigns = true, headlines = true, From a074ec535befe29dcb643681fbf082ab108a1292 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 18 Dec 2024 15:58:54 +0100 Subject: [PATCH 393/553] ci: fix docgen. Fixes #128 --- docs/extras/ai/codeium.md | 2 +- docs/extras/ai/copilot-chat.md | 2 +- docs/extras/ai/copilot.md | 2 +- docs/extras/ai/supermaven.md | 2 +- docs/extras/ai/tabnine.md | 2 +- docs/extras/coding/blink.md | 13 ++++++++++- docs/extras/coding/luasnip.md | 2 +- docs/extras/coding/mini-comment.md | 2 +- docs/extras/coding/mini-surround.md | 2 +- docs/extras/coding/neogen.md | 2 +- docs/extras/coding/nvim-cmp.md | 2 +- docs/extras/coding/yanky.md | 2 +- docs/extras/dap/core.md | 2 +- docs/extras/dap/nlua.md | 2 +- docs/extras/editor/aerial.md | 2 +- docs/extras/editor/dial.md | 2 +- docs/extras/editor/fzf.md | 12 +++++++++- docs/extras/editor/harpoon2.md | 2 +- docs/extras/editor/illuminate.md | 2 +- docs/extras/editor/inc-rename.md | 2 +- docs/extras/editor/leap.md | 2 +- docs/extras/editor/mini-diff.md | 2 +- docs/extras/editor/mini-files.md | 2 +- docs/extras/editor/mini-move.md | 2 +- docs/extras/editor/navic.md | 2 +- docs/extras/editor/outline.md | 2 +- docs/extras/editor/overseer.md | 2 +- docs/extras/editor/refactoring.md | 2 +- docs/extras/editor/telescope.md | 12 +++++++++- docs/extras/formatting/biome.md | 11 ++++++++- docs/extras/formatting/black.md | 2 +- docs/extras/formatting/prettier.md | 12 +++++++++- docs/extras/lang/angular.md | 2 +- docs/extras/lang/ansible.md | 2 +- docs/extras/lang/astro.md | 2 +- docs/extras/lang/clangd.md | 2 +- docs/extras/lang/clojure.md | 2 +- docs/extras/lang/cmake.md | 2 +- docs/extras/lang/docker.md | 2 +- docs/extras/lang/elixir.md | 2 +- docs/extras/lang/elm.md | 2 +- docs/extras/lang/erlang.md | 2 +- docs/extras/lang/git.md | 2 +- docs/extras/lang/gleam.md | 2 +- docs/extras/lang/go.md | 2 +- docs/extras/lang/haskell.md | 2 +- docs/extras/lang/helm.md | 2 +- docs/extras/lang/java.md | 2 +- docs/extras/lang/json.md | 2 +- docs/extras/lang/kotlin.md | 2 +- docs/extras/lang/lean.md | 2 +- docs/extras/lang/markdown.md | 2 +- docs/extras/lang/nix.md | 2 +- docs/extras/lang/nushell.md | 2 +- docs/extras/lang/ocaml.md | 2 +- docs/extras/lang/omnisharp.md | 2 +- docs/extras/lang/php.md | 12 +++++++++- docs/extras/lang/prisma.md | 2 +- docs/extras/lang/python.md | 14 +++++++++++- docs/extras/lang/r.md | 2 +- docs/extras/lang/rego.md | 2 +- docs/extras/lang/ruby.md | 13 ++++++++++- docs/extras/lang/rust.md | 14 +++++++++++- docs/extras/lang/scala.md | 2 +- docs/extras/lang/sql.md | 34 +++++++++++++++++++++++++++- docs/extras/lang/svelte.md | 2 +- docs/extras/lang/tailwind.md | 2 +- docs/extras/lang/terraform.md | 2 +- docs/extras/lang/tex.md | 2 +- docs/extras/lang/thrift.md | 2 +- docs/extras/lang/toml.md | 2 +- docs/extras/lang/typescript.md | 2 +- docs/extras/lang/vue.md | 2 +- docs/extras/lang/yaml.md | 2 +- docs/extras/lang/zig.md | 2 +- docs/extras/linting/eslint.md | 11 ++++++++- docs/extras/lsp/neoconf.md | 2 +- docs/extras/lsp/none-ls.md | 2 +- docs/extras/test/core.md | 2 +- docs/extras/ui/alpha.md | 2 +- docs/extras/ui/dashboard-nvim.md | 2 +- docs/extras/ui/edgy.md | 2 +- docs/extras/ui/indent-blankline.md | 2 +- docs/extras/ui/mini-animate.md | 2 +- docs/extras/ui/mini-indentscope.md | 2 +- docs/extras/ui/mini-starter.md | 2 +- docs/extras/ui/smear-cursor.md | 2 +- docs/extras/ui/treesitter-context.md | 2 +- docs/extras/util/chezmoi.md | 2 +- docs/extras/util/dot.md | 2 +- docs/extras/util/gitui.md | 2 +- docs/extras/util/mini-hipatterns.md | 2 +- docs/extras/util/octo.md | 2 +- docs/extras/util/project.md | 2 +- docs/extras/util/rest.md | 2 +- docs/extras/util/startuptime.md | 2 +- docs/extras/vscode.md | 2 +- lua/build.lua | 2 +- 98 files changed, 234 insertions(+), 98 deletions(-) diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index 26e5387dda..584ca9ad40 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ai.codeiumBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index 0460c6e270..aaab9fb7b8 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ai.copilot-chatBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 9623ead647..1c883aa935 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ai.copilotBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index d8169fc05a..f03b184960 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ai.supermavenBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ai/tabnine.md b/docs/extras/ai/tabnine.md index 49bd1ab42a..871fe61db5 100644 --- a/docs/extras/ai/tabnine.md +++ b/docs/extras/ai/tabnine.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ai.tabnineBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index a4e62ddee2..a2771f7407 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -7,7 +7,18 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.blinkBelow you can find a list of included plugins and their default settings. +### 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" +-- set to `true` to follow the main branch +-- you need to have a working rust toolchain to build the plugin +-- in this case. +vim.g.lazyvim_blink_main = 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. diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index ea4dea5cab..73dd7b355a 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.luasnipBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/mini-comment.md b/docs/extras/coding/mini-comment.md index 44203cb2e0..5cba4fd597 100644 --- a/docs/extras/coding/mini-comment.md +++ b/docs/extras/coding/mini-comment.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.mini-commentBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index 3a47896e4f..c03691a35e 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.mini-surroundBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/neogen.md b/docs/extras/coding/neogen.md index c2636fbaee..9b06050614 100644 --- a/docs/extras/coding/neogen.md +++ b/docs/extras/coding/neogen.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.neogenBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/nvim-cmp.md b/docs/extras/coding/nvim-cmp.md index e100d5e1db..0a335e9fa4 100644 --- a/docs/extras/coding/nvim-cmp.md +++ b/docs/extras/coding/nvim-cmp.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.nvim-cmpBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/coding/yanky.md b/docs/extras/coding/yanky.md index d6ecddbc84..246b6db7c3 100644 --- a/docs/extras/coding/yanky.md +++ b/docs/extras/coding/yanky.md @@ -9,7 +9,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.coding.yankyBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/dap/core.md b/docs/extras/dap/core.md index 7ce358663d..edb040628e 100644 --- a/docs/extras/dap/core.md +++ b/docs/extras/dap/core.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.dap.coreBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/dap/nlua.md b/docs/extras/dap/nlua.md index 608fb52781..297966cc8b 100644 --- a/docs/extras/dap/nlua.md +++ b/docs/extras/dap/nlua.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.dap.nluaBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/aerial.md b/docs/extras/editor/aerial.md index 143d0d173f..59d0f6e840 100644 --- a/docs/extras/editor/aerial.md +++ b/docs/extras/editor/aerial.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.aerialBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index a1d58747a1..4a5b14090c 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.dialBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 4c3e8185a7..70f01ff269 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -7,7 +7,17 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.fzfBelow you can find a list of included plugins and their default settings. +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "fzf" +``` + +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. diff --git a/docs/extras/editor/harpoon2.md b/docs/extras/editor/harpoon2.md index 387304f31c..b31891b85a 100644 --- a/docs/extras/editor/harpoon2.md +++ b/docs/extras/editor/harpoon2.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.harpoon2Below you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/illuminate.md b/docs/extras/editor/illuminate.md index 7bc07691e8..af10eba063 100644 --- a/docs/extras/editor/illuminate.md +++ b/docs/extras/editor/illuminate.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.illuminateBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/inc-rename.md b/docs/extras/editor/inc-rename.md index fd9e7b51bf..02e9c33bae 100644 --- a/docs/extras/editor/inc-rename.md +++ b/docs/extras/editor/inc-rename.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.inc-renameBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/leap.md b/docs/extras/editor/leap.md index bf6a45357e..ef2b4f0bd4 100644 --- a/docs/extras/editor/leap.md +++ b/docs/extras/editor/leap.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.leapBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/mini-diff.md b/docs/extras/editor/mini-diff.md index 8b1e80cfb1..2234cf2370 100644 --- a/docs/extras/editor/mini-diff.md +++ b/docs/extras/editor/mini-diff.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.mini-diffBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/mini-files.md b/docs/extras/editor/mini-files.md index 489c1bf347..6cb36a3217 100644 --- a/docs/extras/editor/mini-files.md +++ b/docs/extras/editor/mini-files.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.mini-filesBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/mini-move.md b/docs/extras/editor/mini-move.md index 4929b3574d..83736f80db 100644 --- a/docs/extras/editor/mini-move.md +++ b/docs/extras/editor/mini-move.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.mini-moveBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/navic.md b/docs/extras/editor/navic.md index 7330836462..dbaa5c90aa 100644 --- a/docs/extras/editor/navic.md +++ b/docs/extras/editor/navic.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.navicBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/outline.md b/docs/extras/editor/outline.md index 2f79834d57..0c81a00348 100644 --- a/docs/extras/editor/outline.md +++ b/docs/extras/editor/outline.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.outlineBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/overseer.md b/docs/extras/editor/overseer.md index 9d74d1c370..bb6560bc60 100644 --- a/docs/extras/editor/overseer.md +++ b/docs/extras/editor/overseer.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.overseerBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/refactoring.md b/docs/extras/editor/refactoring.md index 663119bd5b..04454a21d4 100644 --- a/docs/extras/editor/refactoring.md +++ b/docs/extras/editor/refactoring.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.refactoringBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index f94114b9c0..b64ccb6732 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -7,7 +7,17 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.editor.telescopeBelow you can find a list of included plugins and their default settings. +### 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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "telescope" +``` + +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. diff --git a/docs/extras/formatting/biome.md b/docs/extras/formatting/biome.md index 58a5aef681..4cafb2b34a 100644 --- a/docs/extras/formatting/biome.md +++ b/docs/extras/formatting/biome.md @@ -7,7 +7,16 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.formatting.biomeBelow you can find a list of included plugins and their default settings. +### 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" +-- Enable this option to avoid conflicts with Prettier. +vim.g.lazyvim_prettier_needs_config = true +``` + +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. diff --git a/docs/extras/formatting/black.md b/docs/extras/formatting/black.md index 18b8909a82..fcdb98bdd9 100644 --- a/docs/extras/formatting/black.md +++ b/docs/extras/formatting/black.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.formatting.blackBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index f9d9265ad9..cc5d67f52b 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -7,7 +7,17 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.formatting.prettierBelow you can find a list of included plugins and their default settings. +### 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" +-- Enable the option to require a Prettier config file +-- If no prettier config file is found, the formatter will not be used +vim.g.lazyvim_prettier_needs_config = 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. diff --git a/docs/extras/lang/angular.md b/docs/extras/lang/angular.md index f69b5aee2a..a0c9b387a3 100644 --- a/docs/extras/lang/angular.md +++ b/docs/extras/lang/angular.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.angularBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index 63e80b2cc2..945ee62eb1 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.ansibleBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/astro.md b/docs/extras/lang/astro.md index 8a55c10ad1..43f20394df 100644 --- a/docs/extras/lang/astro.md +++ b/docs/extras/lang/astro.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.astroBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 692e92f6ca..2080b76d57 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.clangdBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/clojure.md b/docs/extras/lang/clojure.md index c0398133e9..f70bbc9fb6 100644 --- a/docs/extras/lang/clojure.md +++ b/docs/extras/lang/clojure.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.clojureBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/cmake.md b/docs/extras/lang/cmake.md index 60a1376c90..a89528270b 100644 --- a/docs/extras/lang/cmake.md +++ b/docs/extras/lang/cmake.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.cmakeBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/docker.md b/docs/extras/lang/docker.md index fed28a62cf..bf90b23b18 100644 --- a/docs/extras/lang/docker.md +++ b/docs/extras/lang/docker.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.dockerBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/elixir.md b/docs/extras/lang/elixir.md index 4ab27eb16e..8e5d395fbe 100644 --- a/docs/extras/lang/elixir.md +++ b/docs/extras/lang/elixir.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.elixirBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/elm.md b/docs/extras/lang/elm.md index 391d20434d..10982c7dc4 100644 --- a/docs/extras/lang/elm.md +++ b/docs/extras/lang/elm.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.elmBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/erlang.md b/docs/extras/lang/erlang.md index 7142af088c..846b48d0ab 100644 --- a/docs/extras/lang/erlang.md +++ b/docs/extras/lang/erlang.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.erlangBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/git.md b/docs/extras/lang/git.md index 038153d91f..a347610219 100644 --- a/docs/extras/lang/git.md +++ b/docs/extras/lang/git.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.gitBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/gleam.md b/docs/extras/lang/gleam.md index 187f49f9ca..284f93f68b 100644 --- a/docs/extras/lang/gleam.md +++ b/docs/extras/lang/gleam.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.gleamBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index a9ce953a86..64cefa3b37 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.goBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 8370356875..189ef749ac 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.haskellBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/helm.md b/docs/extras/lang/helm.md index de54eb6833..507ebfe7eb 100644 --- a/docs/extras/lang/helm.md +++ b/docs/extras/lang/helm.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.helmBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index c0165e9da4..b19ad168cf 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.javaBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/json.md b/docs/extras/lang/json.md index 4af860e7a9..d8b5647780 100644 --- a/docs/extras/lang/json.md +++ b/docs/extras/lang/json.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.jsonBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index f8b565022c..a82eeb8321 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.kotlinBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/lean.md b/docs/extras/lang/lean.md index 0bfc8db539..e26f513b5f 100644 --- a/docs/extras/lang/lean.md +++ b/docs/extras/lang/lean.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.leanBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 4c6af96899..35c29547cb 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.markdownBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/nix.md b/docs/extras/lang/nix.md index ea3829c3bd..a4087d1307 100644 --- a/docs/extras/lang/nix.md +++ b/docs/extras/lang/nix.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.nixBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/nushell.md b/docs/extras/lang/nushell.md index 66fe96f892..38ef76d96d 100644 --- a/docs/extras/lang/nushell.md +++ b/docs/extras/lang/nushell.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.nushellBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/ocaml.md b/docs/extras/lang/ocaml.md index 62357b0de9..bb410d4219 100644 --- a/docs/extras/lang/ocaml.md +++ b/docs/extras/lang/ocaml.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.ocamlBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index 56fd6eae48..879d96f473 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.omnisharpBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index bb196d191c..08c0650c1b 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -7,7 +7,17 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.phpBelow you can find a list of included plugins and their default settings. +### 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" +-- LSP Server to use for PHP. +-- Set to "intelephense" to use intelephense instead of phpactor. +vim.g.lazyvim_php_lsp = "intelephense" +``` + +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. diff --git a/docs/extras/lang/prisma.md b/docs/extras/lang/prisma.md index 109ca29deb..3c222765a8 100644 --- a/docs/extras/lang/prisma.md +++ b/docs/extras/lang/prisma.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.prismaBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/python.md b/docs/extras/lang/python.md index 21a0f80d70..987e02032a 100644 --- a/docs/extras/lang/python.md +++ b/docs/extras/lang/python.md @@ -7,7 +7,19 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.pythonBelow you can find a list of included plugins and their default settings. +### 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" +-- LSP Server to use for Python. +-- Set to "basedpyright" to use basedpyright instead of pyright. +vim.g.lazyvim_python_lsp = "pyright" +-- Set to "ruff_lsp" to use the old LSP implementation version. +vim.g.lazyvim_python_ruff = "ruff" +``` + +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. diff --git a/docs/extras/lang/r.md b/docs/extras/lang/r.md index e47a2eae46..c2b15db096 100644 --- a/docs/extras/lang/r.md +++ b/docs/extras/lang/r.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.rBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/rego.md b/docs/extras/lang/rego.md index 5aa589b2af..f6e26aa071 100644 --- a/docs/extras/lang/rego.md +++ b/docs/extras/lang/rego.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.regoBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index c02e9c3e31..f67b981de2 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -7,7 +7,18 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.rubyBelow you can find a list of included plugins and their default settings. +### 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" +-- LSP Server to use for Ruby. +-- Set to "solargraph" to use solargraph instead of ruby_lsp. +vim.g.lazyvim_ruby_lsp = "ruby_lsp" +vim.g.lazyvim_ruby_formatter = "rubocop" +``` + +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. diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index eab685e99e..7c76ca494b 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -7,7 +7,19 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.rustBelow you can find a list of included plugins and their default settings. +### 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" +-- LSP Server to use for Rust. +-- Set to "bacon-ls" to use bacon-ls instead of rust-analyzer. +-- only for diagnostics. The rest of LSP support will still be +-- provided by rust-analyzer. +vim.g.lazyvim_rust_diagnostics = "rust-analyzer" +``` + +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. diff --git a/docs/extras/lang/scala.md b/docs/extras/lang/scala.md index 65d6187809..31e2d77085 100644 --- a/docs/extras/lang/scala.md +++ b/docs/extras/lang/scala.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.scalaBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 99e8cbfd9d..5c0e9dd455 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -7,7 +7,39 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.sqlBelow you can find a list of included plugins and their default settings. +### 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" +-- The setup below will automatically configure connections without the need for manual input each time. + +-- Example configuration using dictionary with keys: +-- vim.g.dbs = { +-- dev = "Replace with your database connection URL.", +-- staging = "Replace with your database connection URL.", +-- } +-- or +-- Example configuration using a list of dictionaries: +-- vim.g.dbs = { +-- { name = "dev", url = "Replace with your database connection URL." }, +-- { name = "staging", url = "Replace with your database connection URL." }, +-- } + +-- or +-- Create a `.lazy.lua` file in your project and set your connections like this: +-- ```lua +-- vim.g.dbs = {...} +-- +-- return {} +-- ``` + +-- Alternatively, you can also use other methods to inject your environment variables. + +-- Finally, please make sure to add `.lazy.lua` to your `.gitignore` file to protect your secrets. +``` + +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. diff --git a/docs/extras/lang/svelte.md b/docs/extras/lang/svelte.md index fcad284408..6fa6e4333d 100644 --- a/docs/extras/lang/svelte.md +++ b/docs/extras/lang/svelte.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.svelteBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/tailwind.md b/docs/extras/lang/tailwind.md index d933380bca..5868f4b0f0 100644 --- a/docs/extras/lang/tailwind.md +++ b/docs/extras/lang/tailwind.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.tailwindBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index 8b67a568fd..3a605b5a43 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.terraformBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/tex.md b/docs/extras/lang/tex.md index 7be392ce41..cdf44203aa 100644 --- a/docs/extras/lang/tex.md +++ b/docs/extras/lang/tex.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.texBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/thrift.md b/docs/extras/lang/thrift.md index 4ca7278cea..c1a0b28fd0 100644 --- a/docs/extras/lang/thrift.md +++ b/docs/extras/lang/thrift.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.thriftBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/toml.md b/docs/extras/lang/toml.md index 86c1108cac..0d091c8d2a 100644 --- a/docs/extras/lang/toml.md +++ b/docs/extras/lang/toml.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.tomlBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index 3deb2b86c8..bff51eefdf 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.typescriptBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/vue.md b/docs/extras/lang/vue.md index 9db0d33dcd..f6c04d50c9 100644 --- a/docs/extras/lang/vue.md +++ b/docs/extras/lang/vue.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.vueBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/yaml.md b/docs/extras/lang/yaml.md index 68a2313f3c..4187fe9b2b 100644 --- a/docs/extras/lang/yaml.md +++ b/docs/extras/lang/yaml.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.yamlBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md index 43897a9c73..ce82de8539 100644 --- a/docs/extras/lang/zig.md +++ b/docs/extras/lang/zig.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lang.zigBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/linting/eslint.md b/docs/extras/linting/eslint.md index 06f5664ae3..8b8b636a79 100644 --- a/docs/extras/linting/eslint.md +++ b/docs/extras/linting/eslint.md @@ -7,7 +7,16 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.linting.eslintBelow you can find a list of included plugins and their default settings. +### 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" +-- Set to false to disable auto format +vim.g.lazyvim_eslint_auto_format = true +``` + +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. diff --git a/docs/extras/lsp/neoconf.md b/docs/extras/lsp/neoconf.md index f24aefa073..a560647b37 100644 --- a/docs/extras/lsp/neoconf.md +++ b/docs/extras/lsp/neoconf.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lsp.neoconfBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/lsp/none-ls.md b/docs/extras/lsp/none-ls.md index 41617960c3..d5a87ae9d6 100644 --- a/docs/extras/lsp/none-ls.md +++ b/docs/extras/lsp/none-ls.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.lsp.none-lsBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/test/core.md b/docs/extras/test/core.md index 1bb243223c..7c3f060cbb 100644 --- a/docs/extras/test/core.md +++ b/docs/extras/test/core.md @@ -21,7 +21,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.test.coreBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/alpha.md b/docs/extras/ui/alpha.md index fea5b52e60..83fe60843f 100644 --- a/docs/extras/ui/alpha.md +++ b/docs/extras/ui/alpha.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.alphaBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/dashboard-nvim.md b/docs/extras/ui/dashboard-nvim.md index 537c340eaf..8d31c7aa6a 100644 --- a/docs/extras/ui/dashboard-nvim.md +++ b/docs/extras/ui/dashboard-nvim.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.dashboard-nvimBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/edgy.md b/docs/extras/ui/edgy.md index 9bfe013091..17414e16c2 100644 --- a/docs/extras/ui/edgy.md +++ b/docs/extras/ui/edgy.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.edgyBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/indent-blankline.md b/docs/extras/ui/indent-blankline.md index 89711b3166..c626c06ac5 100644 --- a/docs/extras/ui/indent-blankline.md +++ b/docs/extras/ui/indent-blankline.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.indent-blanklineBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/mini-animate.md b/docs/extras/ui/mini-animate.md index 0a64c3da07..a000366efe 100644 --- a/docs/extras/ui/mini-animate.md +++ b/docs/extras/ui/mini-animate.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.mini-animateBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/mini-indentscope.md b/docs/extras/ui/mini-indentscope.md index a910bc10d2..c4ba22b34a 100644 --- a/docs/extras/ui/mini-indentscope.md +++ b/docs/extras/ui/mini-indentscope.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.mini-indentscopeBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/mini-starter.md b/docs/extras/ui/mini-starter.md index f123c64e06..f0a6937964 100644 --- a/docs/extras/ui/mini-starter.md +++ b/docs/extras/ui/mini-starter.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.mini-starterBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/smear-cursor.md b/docs/extras/ui/smear-cursor.md index cea2b95533..40e1759cbe 100644 --- a/docs/extras/ui/smear-cursor.md +++ b/docs/extras/ui/smear-cursor.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.smear-cursorBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/ui/treesitter-context.md b/docs/extras/ui/treesitter-context.md index 6702fc5a02..d7bad09730 100644 --- a/docs/extras/ui/treesitter-context.md +++ b/docs/extras/ui/treesitter-context.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.ui.treesitter-contextBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index 415733cd0a..03ff171595 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.chezmoiBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index 1c82710810..411d5449e1 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.dotBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index ba9662fc30..31e525e0d1 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.gituiBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/mini-hipatterns.md b/docs/extras/util/mini-hipatterns.md index 0fe4834e55..2ec0cdf417 100644 --- a/docs/extras/util/mini-hipatterns.md +++ b/docs/extras/util/mini-hipatterns.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.mini-hipatternsBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 5b7c001951..87ac2b4e7d 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.octoBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/project.md b/docs/extras/util/project.md index 762ffb4597..42d0a86ac6 100644 --- a/docs/extras/util/project.md +++ b/docs/extras/util/project.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.projectBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/rest.md b/docs/extras/util/rest.md index ad0f927456..1db866b989 100644 --- a/docs/extras/util/rest.md +++ b/docs/extras/util/rest.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.restBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/util/startuptime.md b/docs/extras/util/startuptime.md index 3927b5a2dd..6f3a4b2406 100644 --- a/docs/extras/util/startuptime.md +++ b/docs/extras/util/startuptime.md @@ -7,7 +7,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.util.startuptimeBelow you can find a list of included plugins and their default settings. +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. diff --git a/docs/extras/vscode.md b/docs/extras/vscode.md index 9bd0650a07..e65c5ce642 100644 --- a/docs/extras/vscode.md +++ b/docs/extras/vscode.md @@ -35,7 +35,7 @@ You can enable the extra with the `:LazyExtras` command. Plugins marked as optional will only be configured if they are installed. ::: -lazyvim.plugins.extras.vscodeBelow you can find a list of included plugins and their default settings. +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. diff --git a/lua/build.lua b/lua/build.lua index 70fd9a27fe..b71d8d33b1 100644 --- a/lua/build.lua +++ b/lua/build.lua @@ -314,7 +314,7 @@ Plugins marked as optional will only be configured if they are installed. You don't need to copy the default settings to your config. They are only shown here for reference. ::: -]]):format(modname, options or ""), +]]):format(options or ""), M.plugins("extras/" .. path:gsub(".*/extras/", "")).content, "", }) From be08d014c16954f62bd5395d58a5b6ce97b8dec2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Dec 2024 22:18:58 +0000 Subject: [PATCH 394/553] chore(build): auto-generate docs --- docs/extras/ai/codeium.md | 1 + docs/extras/editor/fzf.md | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/extras/ai/codeium.md b/docs/extras/ai/codeium.md index 584ca9ad40..460634bc36 100644 --- a/docs/extras/ai/codeium.md +++ b/docs/extras/ai/codeium.md @@ -49,6 +49,7 @@ opts = { { "Exafunction/codeium.nvim", cmd = "Codeium", + event = "InsertEnter", build = ":Codeium Auth", opts = { enable_cmp_source = vim.g.ai_cmp, diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 70f01ff269..21f9c26141 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -79,9 +79,6 @@ opts = function(_, opts) return { "default-title", fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -105,6 +102,9 @@ opts = function(_, opts) winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", + preview = { + scrollbar = false, + }, }, }, fzf_opts.kind == "codeaction" and { winopts = { @@ -223,9 +223,6 @@ end return { "default-title", fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -249,6 +246,9 @@ end winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", + preview = { + scrollbar = false, + }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From 2dbef082c72d9b209efe78f867ffacb2a91e1b0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Dec 2024 08:26:29 +0000 Subject: [PATCH 395/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 21f9c26141..70f01ff269 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -79,6 +79,9 @@ opts = function(_, opts) return { "default-title", fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -102,9 +105,6 @@ opts = function(_, opts) winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", - preview = { - scrollbar = false, - }, }, }, fzf_opts.kind == "codeaction" and { winopts = { @@ -223,6 +223,9 @@ end return { "default-title", fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -246,9 +249,6 @@ end winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", - preview = { - scrollbar = false, - }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From 55a2c17b653fd5eb8dd939e76392b5728bb3234b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 19 Dec 2024 15:20:55 +0000 Subject: [PATCH 396/553] chore(build): auto-generate docs --- docs/extras/ai/supermaven.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/extras/ai/supermaven.md b/docs/extras/ai/supermaven.md index f03b184960..14fc8b9d12 100644 --- a/docs/extras/ai/supermaven.md +++ b/docs/extras/ai/supermaven.md @@ -41,6 +41,11 @@ opts = { ```lua { "supermaven-inc/supermaven-nvim", + event = "InsertEnter", + cmd = { + "SupermavenUseFree", + "SupermavenUsePro", + }, opts = { keymaps = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp From 323db033bf20fc25731aa5c78cfdcae24c913641 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Dec 2024 08:24:52 +0000 Subject: [PATCH 397/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 1cde3bfd0b..09aaa8d705 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -211,7 +211,7 @@ opts = function() end, }, }, - extensions = { "neo-tree", "lazy" }, + extensions = { "neo-tree", "lazy", "fzf" }, } -- do not add trouble symbols if aerial is enabled @@ -345,7 +345,7 @@ end end, }, }, - extensions = { "neo-tree", "lazy" }, + extensions = { "neo-tree", "lazy", "fzf" }, } -- do not add trouble symbols if aerial is enabled From d9057841a40cd2161fe07327bd7a25a5067a1140 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Dec 2024 17:16:44 +0000 Subject: [PATCH 398/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index a2771f7407..950e6444ec 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -201,17 +201,6 @@ opts = { end end - --- NOTE: compat with latest version. Currenlty 0.7.6 - if not vim.g.lazyvim_blink_main then - ---@diagnostic disable-next-line: inject-field - opts.sources.completion = opts.sources.completion or {} - opts.sources.completion.enabled_providers = enabled - if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then - ---@diagnostic disable-next-line: assign-type-mismatch - opts.completion.menu.draw.treesitter = true - end - end - -- Unset custom prop to pass blink.cmp validation opts.sources.compat = nil From 725de34ab2cc888433ee8a5b847c3982821593a7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 20 Dec 2024 18:26:00 +0000 Subject: [PATCH 399/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 54 ++--------------------------------- 1 file changed, 2 insertions(+), 52 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 73dd7b355a..ed50f65133 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -162,52 +162,6 @@ opts = nil
- - -```lua -{ "saadparwaiz1/cmp_luasnip" } -``` - - - -
- -## [blink.compat](https://github.com/saghen/blink.compat) - - - - - -```lua -opts = { impersonate_nvim_cmp = true } -``` - - - - - - -```lua -{ "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } } -``` - - - - - -## [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) - - - - - -```lua -opts = nil -``` - - - - ```lua @@ -279,7 +233,7 @@ end ```lua opts = { - sources = { compat = { "luasnip" } }, + sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -306,12 +260,8 @@ opts = { { "saghen/blink.cmp", optional = true, - dependencies = { - { "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } }, - { "saadparwaiz1/cmp_luasnip" }, - }, opts = { - sources = { compat = { "luasnip" } }, + sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) From 810df08328bb89b0b61604a7ba7d72a91487d4d7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 6 Jan 2025 05:19:09 +0000 Subject: [PATCH 400/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 70f01ff269..47674a5493 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -35,8 +35,9 @@ import TabItem from '@theme/TabItem'; ```lua opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") + local fzf = require("fzf-lua") + local config = fzf.config + local actions = fzf.actions -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" @@ -179,8 +180,9 @@ end "ibhagwan/fzf-lua", cmd = "FzfLua", opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") + local fzf = require("fzf-lua") + local config = fzf.config + local actions = fzf.actions -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" From e5e3dc9effa22b918981a46b3b462a669b807596 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 7 Jan 2025 11:15:42 +0000 Subject: [PATCH 401/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 42 +++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index ed50f65133..1794d6807a 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -233,7 +233,6 @@ end ```lua opts = { - sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -261,7 +260,6 @@ opts = { "saghen/blink.cmp", optional = true, opts = { - sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -284,4 +282,44 @@ opts = { +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + Luasnip sources for blink + + + + + + +```lua +opts = function(_, opts) + table.insert(opts.sources.default, "luasnip") + opts.sources.default = vim.tbl_filter(function(p) + return p ~= "snippets" + end, opts.sources.default) +end +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + table.insert(opts.sources.default, "luasnip") + opts.sources.default = vim.tbl_filter(function(p) + return p ~= "snippets" + end, opts.sources.default) + end, +} +``` + + + + + From 897e79055d21eab96bb0105e4983386150c94db2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 8 Jan 2025 07:17:43 +0000 Subject: [PATCH 402/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 66 ++--------------------------------- 1 file changed, 2 insertions(+), 64 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 1794d6807a..1f51728880 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -234,18 +234,7 @@ end ```lua opts = { snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, + preset = "luasnip", }, } ``` @@ -261,18 +250,7 @@ opts = { optional = true, opts = { snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, + preset = "luasnip", }, }, } @@ -282,44 +260,4 @@ opts = { -## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ - - Luasnip sources for blink - - - - - - -```lua -opts = function(_, opts) - table.insert(opts.sources.default, "luasnip") - opts.sources.default = vim.tbl_filter(function(p) - return p ~= "snippets" - end, opts.sources.default) -end -``` - - - - - - -```lua -{ - "saghen/blink.cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources.default, "luasnip") - opts.sources.default = vim.tbl_filter(function(p) - return p ~= "snippets" - end, opts.sources.default) - end, -} -``` - - - - - From 328d6e4a9035d9febef4cdcf5122c6b6b5df9497 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 14 Jan 2025 22:17:25 +0000 Subject: [PATCH 403/553] chore(build): auto-generate docs --- docs/configuration/general.md | 8 +- docs/extras/editor/fzf.md | 6 + docs/extras/editor/snacks_picker.md | 250 ++++++++++++++++++++++++++++ docs/keymaps.md | 49 ++++++ docs/plugins/editor.md | 1 + docs/plugins/ui.md | 6 + 6 files changed, 316 insertions(+), 4 deletions(-) create mode 100644 docs/extras/editor/snacks_picker.md diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 6baf0ef9cb..19fcee52ed 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -349,12 +349,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.lazygit.log_file() end, { desc = "Lazygit Current File History" }) - map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) - map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (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", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) 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/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 47674a5493..03fe26559b 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -444,6 +444,9 @@ opts = nil ```lua opts = function() + if LazyVim.pick.want() ~= "fzf" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -464,6 +467,9 @@ end { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "fzf" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md new file mode 100644 index 0000000000..608147eb2e --- /dev/null +++ b/docs/extras/editor/snacks_picker.md @@ -0,0 +1,250 @@ +# `Snacks_picker` + + + +:::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" +-- In case you don't want to use `:LazyExtras`, +-- then you need to set the option below. +vim.g.lazyvim_picker = "snacks" +``` + +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'; + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + recommended = true, + + + + + + +```lua +opts = { + picker = {}, +} +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + opts = { + picker = {}, + }, + -- stylua: ignore + keys = { + { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" }, + { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "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)" }, + { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, + { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + -- git + { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + -- Grep + { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, + { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, + { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, + { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, + -- search + { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, + { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, + { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, + { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + }, +} +``` + + + + + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = function(_, opts) + if LazyVim.has("trouble.nvim") then + return vim.tbl_deep_extend("force", opts or {}, { + picker = { + actions = require("trouble.sources.snacks").actions, + win = { + input = { + keys = { + [""] = { + "trouble_open", + mode = { "n", "i" }, + }, + }, + }, + }, + }, + }) + end +end +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + opts = function(_, opts) + if LazyVim.has("trouble.nvim") then + return vim.tbl_deep_extend("force", opts or {}, { + picker = { + actions = require("trouble.sources.snacks").actions, + win = { + input = { + keys = { + [""] = { + "trouble_open", + mode = { "n", "i" }, + }, + }, + }, + }, + }, + }) + end + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function() + if LazyVim.pick.want() ~= "snacks" then + return + end + 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() end, desc = "LSP Symbols", has = "documentSymbol" }, + }) +end +``` + + + + + + +```lua +{ + "neovim/nvim-lspconfig", + opts = function() + if LazyVim.pick.want() ~= "snacks" then + return + end + 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() end, desc = "LSP Symbols", has = "documentSymbol" }, + }) + end, +} +``` + + + + + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/todo-comments.nvim", + optional = true, + -- stylua: ignore + keys = { + { "st", function() Snacks.picker.todo_comments() end, desc = "Todo" }, + { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + }, +} +``` + + + + + + diff --git a/docs/keymaps.md b/docs/keymaps.md index 39ba2d3bcf..7b2511f3c9 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -553,6 +553,55 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | +## [snacks.nvim](https://github.com/folke/snacks.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Buffers | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Git Log | **n** | +| <leader>gs | Git Status | **n** | +| <leader>qp | Projects | **n** | +| <leader>s" | Registers | **n** | +| <leader>sa | Autocmds | **n** | +| <leader>sb | Buffer Lines | **n** | +| <leader>sB | Grep Open Buffers | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Highlights | **n** | +| <leader>sj | Jumps | **n** | +| <leader>sk | Keymaps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Marks | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>sw | Visual selection or word (Root Dir) | **n**, **x** | +| <leader>sW | Visual selection or word (cwd) | **n**, **x** | +| <leader>uC | Colorschemes | **n** | + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>st | Todo | **n** | +| <leader>sT | Todo/Fix/Fixme | **n** | + ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index f8cdc4493f..22319385b1 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -8,6 +8,7 @@ import TabItem from '@theme/TabItem'; ### Includes the following extras - [editor.fzf](/extras/editor/fzf) +- [editor.snacks_picker](/extras/editor/snacks_picker) - [editor.telescope](/extras/editor/telescope) ## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 09aaa8d705..3e3c7e6fce 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -617,6 +617,9 @@ opts = { opts = { dashboard = { preset = { + pick = function(cmd, opts) + return LazyVim.pick(cmd, opts)() + end, header = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z @@ -654,6 +657,9 @@ opts = { opts = { dashboard = { preset = { + pick = function(cmd, opts) + return LazyVim.pick(cmd, opts)() + end, header = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z From 0e2b6f2d7cc374c9e19b98aa47f1fe82c625afe9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 15 Jan 2025 19:14:25 +0000 Subject: [PATCH 404/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 608147eb2e..a6c5720f3f 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -66,7 +66,7 @@ opts = { { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, From 624ebb283d2bde6107eb32ab79c514c59c47cc46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Jan 2025 09:19:10 +0000 Subject: [PATCH 405/553] chore(build): auto-generate docs --- docs/extras/editor/dial.md | 10 ++++++++++ docs/extras/editor/snacks_picker.md | 1 + docs/extras/lang/markdown.md | 6 ++++++ docs/keymaps.md | 1 + 4 files changed, 18 insertions(+) diff --git a/docs/extras/editor/dial.md b/docs/extras/editor/dial.md index 4a5b14090c..5e852ea13b 100644 --- a/docs/extras/editor/dial.md +++ b/docs/extras/editor/dial.md @@ -142,6 +142,11 @@ opts = function() }), }, markdown = { + augend.constant.new({ + elements = { "[ ]", "[x]" }, + word = false, + cyclic = true, + }), augend.misc.alias.markdown_header, }, json = { @@ -299,6 +304,11 @@ end }), }, markdown = { + augend.constant.new({ + elements = { "[ ]", "[x]" }, + word = false, + cyclic = true, + }), augend.misc.alias.markdown_header, }, json = { diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index a6c5720f3f..6c024f15af 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -69,6 +69,7 @@ opts = { { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, -- Grep { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index 35c29547cb..f96e250bd2 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -161,6 +161,9 @@ opts = { sign = false, icons = {}, }, + checkbox = { + enabled = false, + }, } ``` @@ -182,6 +185,9 @@ opts = { sign = false, icons = {}, }, + checkbox = { + enabled = false, + }, }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) diff --git a/docs/keymaps.md b/docs/keymaps.md index 7b2511f3c9..854d9b9ba4 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -570,6 +570,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | | <leader>gc | Git Log | **n** | +| <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | | <leader>qp | Projects | **n** | | <leader>s" | Registers | **n** | From a60cb3221ce0a35d9002ca7ef647d322766609a2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 16 Jan 2025 11:15:07 +0000 Subject: [PATCH 406/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 6c024f15af..f182bd4453 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -183,7 +183,7 @@ opts = function() { "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() end, desc = "LSP Symbols", has = "documentSymbol" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, }) end ``` @@ -207,7 +207,7 @@ end { "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() end, desc = "LSP Symbols", has = "documentSymbol" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, }) end, } From ebb96042d80450891d1430f0f7250f1a8f1bf9ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 Jan 2025 09:19:04 +0000 Subject: [PATCH 407/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 950e6444ec..370fed2557 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -285,9 +285,7 @@ opts = nil ```lua opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = vim.tbl_extend("keep", { - Color = "██", -- Use block instead of icon for color items to make swatches more usable - }, LazyVim.config.icons.kinds) + opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds) end ``` @@ -301,9 +299,7 @@ end "saghen/blink.cmp", opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = vim.tbl_extend("keep", { - Color = "██", -- Use block instead of icon for color items to make swatches more usable - }, LazyVim.config.icons.kinds) + opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds) end, } ``` From 5945bc3011b1720c632eb13e08787f2dc0438865 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 19 Jan 2025 18:23:03 +0000 Subject: [PATCH 408/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index f182bd4453..7d69138275 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -184,6 +184,7 @@ opts = function() { "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" }, }) end ``` @@ -208,6 +209,7 @@ end { "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" }, }) end, } From 24755ef4f9fadba21ded6108807afaa7bb0b8044 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Jan 2025 11:15:27 +0000 Subject: [PATCH 409/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 2 +- docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 7d69138275..a6138099ba 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -94,7 +94,7 @@ opts = { { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index 854d9b9ba4..c30c949617 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -567,12 +567,12 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>ff | Find Files (Root Dir) | **n** | | <leader>fF | Find Files (cwd) | **n** | | <leader>fg | Find Files (git-files) | **n** | +| <leader>fp | Projects | **n** | | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | | <leader>gc | Git Log | **n** | | <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | -| <leader>qp | Projects | **n** | | <leader>s" | Registers | **n** | | <leader>sa | Autocmds | **n** | | <leader>sb | Buffer Lines | **n** | From 1986e852111cb5d8b9d7e9248a2ff897b5a3aed8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Jan 2025 12:37:30 +0000 Subject: [PATCH 410/553] chore(build): auto-generate docs --- docs/extras/lang/java.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index b19ad168cf..0d88c559d8 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -178,6 +178,7 @@ opts = function() -- These depend on nvim-dap, but can additionally be disabled by setting false here. dap = { hotcodereplace = "auto", config_overrides = {} }, + -- Can set this to false to disable main class scan, which is a performance killer for large project dap_main = {}, test = true, settings = { @@ -249,6 +250,7 @@ end -- These depend on nvim-dap, but can additionally be disabled by setting false here. dap = { hotcodereplace = "auto", config_overrides = {} }, + -- Can set this to false to disable main class scan, which is a performance killer for large project dap_main = {}, test = true, settings = { @@ -365,7 +367,9 @@ end if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then -- custom init for Java debugger require("jdtls").setup_dap(opts.dap) - require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + if opts.dap_main then + require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + end -- Java Test require Java debugger to work if opts.test and mason_registry.is_installed("java-test") then From 7219d4817428ef29be072c753ced1f0a2ebe22fa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Jan 2025 20:19:09 +0000 Subject: [PATCH 411/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 49 ++++++++++++++++++++++++++--- docs/extras/lang/sql.md | 2 +- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index a6138099ba..209ca1e934 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -29,16 +29,34 @@ import TabItem from '@theme/TabItem'; ## [snacks.nvim](https://github.com/folke/snacks.nvim) - recommended = true, - - ```lua opts = { - picker = {}, + picker = { + win = { + input = { + keys = { + [""] = { + "toggle_cwd", + mode = { "n", "i" }, + }, + }, + }, + }, + actions = { + ---@param p snacks.Picker + toggle_cwd = function(p) + local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true }) + local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".") + local current = p:cwd() + p:set_cwd(current == root and cwd or root) + p:find() + end, + }, + }, } ``` @@ -51,7 +69,28 @@ opts = { { "folke/snacks.nvim", opts = { - picker = {}, + picker = { + win = { + input = { + keys = { + [""] = { + "toggle_cwd", + mode = { "n", "i" }, + }, + }, + }, + }, + actions = { + ---@param p snacks.Picker + toggle_cwd = function(p) + local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true }) + local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".") + local current = p:cwd() + p:set_cwd(current == root and cwd or root) + p:find() + end, + }, + }, }, -- stylua: ignore keys = { diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 5c0e9dd455..4e6ea462d2 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -99,7 +99,7 @@ opts = nil vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - if LazyVim.has("nvim-cmp") then + if LazyVim.cmp_engine() == "nvim-cmp" then local cmp = require("cmp") -- global sources From ee7451b1548db04e1588f327b2c9a0550d6ab8d8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 11:15:47 +0000 Subject: [PATCH 412/553] chore(build): auto-generate docs --- docs/extras/coding/mini-snippets.md | 332 ++++++++++++++++++++++++++++ 1 file changed, 332 insertions(+) create mode 100644 docs/extras/coding/mini-snippets.md diff --git a/docs/extras/coding/mini-snippets.md b/docs/extras/coding/mini-snippets.md new file mode 100644 index 0000000000..0d4aab1d8c --- /dev/null +++ b/docs/extras/coding/mini-snippets.md @@ -0,0 +1,332 @@ +# `Mini-snippets` + + + +:::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" +-- 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 +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 +-- :h MiniSnippets-session + +-- Example override for your own config: +--[[ +return { +{ +"echasnovski/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 +-- and your own language-specific snippets +-- +-- In order to change opts.snippets, replace the entire table inside your own opts + +local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config") + +opts.snippets = { -- override opts.snippets provided by extra... +-- Load custom file with global snippets first (order matters) +snippets.gen_loader.from_file(config_path .. "/snippets/global.json"), + +-- Load snippets based on current language by reading files from +-- "snippets/" subdirectories from 'runtimepath' directories. +snippets.gen_loader.from_lang(), -- this is the default in the extra... +} +end, +}, +} +--]] +``` + +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'; + +## [mini.snippets](https://github.com/echasnovski/mini.snippets) + + + + + +```lua +opts = function() + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_stop = function() end -- by design, should not stop the session! + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_forward = function() + return jump("next") + end + + local mini_snippets = require("mini.snippets") + return { + snippets = { mini_snippets.gen_loader.from_lang() }, + + -- Following the behavior of vim.snippets, + -- the intended usage of is to be able to temporarily exit into normal mode for quick edits. + -- + -- If you'd rather stop the snippet on , activate the line below in your own config: + -- mappings = { stop = "" }, -- by default, see :h MiniSnippets-session + + expand = { + select = function(snippets, insert) + -- Close completion window on snippet select - vim.ui.select + -- Needed to remove virtual text for fzf-lua and telescope, but not for mini.pick... + local select = expand_select_override or MiniSnippets.default_select + select(snippets, insert) + end, + }, + } +end +``` + + + + + + +```lua +{ + "echasnovski/mini.snippets", + event = "InsertEnter", -- don't depend on other plugins to load... + dependencies = "rafamadriz/friendly-snippets", + opts = function() + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_stop = function() end -- by design, should not stop the session! + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_forward = function() + return jump("next") + end + + local mini_snippets = require("mini.snippets") + return { + snippets = { mini_snippets.gen_loader.from_lang() }, + + -- Following the behavior of vim.snippets, + -- the intended usage of is to be able to temporarily exit into normal mode for quick edits. + -- + -- If you'd rather stop the snippet on , activate the line below in your own config: + -- mappings = { stop = "" }, -- by default, see :h MiniSnippets-session + + expand = { + select = function(snippets, insert) + -- Close completion window on snippet select - vim.ui.select + -- Needed to remove virtual text for fzf-lua and telescope, but not for mini.pick... + local select = expand_select_override or MiniSnippets.default_select + select(snippets, insert) + end, + }, + } + end, +} +``` + + + + + +## [cmp-mini-snippets](https://github.com/abeldekat/cmp-mini-snippets) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ "abeldekat/cmp-mini-snippets" } +``` + + + + + +## [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) _(optional)_ + + nvim-cmp integration + + + + + + +```lua +opts = function(_, opts) + local cmp = require("cmp") + local cmp_config = require("cmp.config") + + opts.snippet = { + expand = function(args) + expand_from_lsp(args.body) + cmp.resubscribe({ "TextChangedI", "TextChangedP" }) + cmp_config.set_onetime({ sources = {} }) + end, + } + + if include_in_completion then + table.insert(opts.sources, { name = "mini_snippets" }) + else + expand_select_override = function(snippets, insert) + -- stylua: ignore + if cmp.visible() then cmp.close() end + MiniSnippets.default_select(snippets, insert) + end + end +end +``` + + + + + + +```lua +{ + "hrsh7th/nvim-cmp", + optional = true, + dependencies = include_in_completion and { "abeldekat/cmp-mini-snippets" } or nil, + opts = function(_, opts) + local cmp = require("cmp") + local cmp_config = require("cmp.config") + + opts.snippet = { + expand = function(args) + expand_from_lsp(args.body) + cmp.resubscribe({ "TextChangedI", "TextChangedP" }) + cmp_config.set_onetime({ sources = {} }) + end, + } + + if include_in_completion then + table.insert(opts.sources, { name = "mini_snippets" }) + else + expand_select_override = function(snippets, insert) + -- stylua: ignore + if cmp.visible() then cmp.close() end + MiniSnippets.default_select(snippets, insert) + end + end + end, + -- stylua: ignore + -- counterpart to defined in cmp.mappings + keys = include_in_completion and { { "", function() jump("prev") end, mode = "i" } } or nil, +} +``` + + + + + +## [blink.cmp](https://github.com/saghen/blink.cmp) _(optional)_ + + blink.cmp integration + + + + + + +```lua +opts = function(_, opts) + -- Return early + if include_in_completion then + opts.snippets = { preset = "mini_snippets" } + return + end + + -- Standalone -- + expand_select_override = function(snippets, insert) + -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select + require("blink.cmp").cancel() + vim.schedule(function() + MiniSnippets.default_select(snippets, insert) + end) + end + -- + -- Blink performs a require on blink.cmp.sources.snippets.default + -- By removing the source, the default engine will not be used + opts.sources.default = vim.tbl_filter(function(source) + return source ~= "snippets" + end, opts.sources.default) + opts.snippets = { -- need to repeat blink's preset here + expand = expand_from_lsp, + active = function() + return MiniSnippets.session.get(false) ~= nil + end, + jump = function(direction) + jump(direction == -1 and "prev" or "next") + end, + } +end +``` + + + + + + +```lua +{ + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + -- Return early + if include_in_completion then + opts.snippets = { preset = "mini_snippets" } + return + end + + -- Standalone -- + expand_select_override = function(snippets, insert) + -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select + require("blink.cmp").cancel() + vim.schedule(function() + MiniSnippets.default_select(snippets, insert) + end) + end + -- + -- Blink performs a require on blink.cmp.sources.snippets.default + -- By removing the source, the default engine will not be used + opts.sources.default = vim.tbl_filter(function(source) + return source ~= "snippets" + end, opts.sources.default) + opts.snippets = { -- need to repeat blink's preset here + expand = expand_from_lsp, + active = function() + return MiniSnippets.session.get(false) ~= nil + end, + jump = function(direction) + jump(direction == -1 and "prev" or "next") + end, + } + end, +} +``` + + + + + + From df082a01a6d9a4ab8cf4d7ed3164831b78e49ac6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 16:24:22 +0000 Subject: [PATCH 413/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 4 +++- docs/keymaps.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 209ca1e934..9e08f858d8 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -106,6 +106,7 @@ opts = { { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, @@ -132,8 +133,9 @@ opts = { { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "su", function() Snacks.picker.undo() end, desc = "Undotree" }, + -- ui { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, } ``` diff --git a/docs/keymaps.md b/docs/keymaps.md index c30c949617..b511697d93 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -591,6 +591,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>sM | Man Pages | **n** | | <leader>sq | Quickfix List | **n** | | <leader>sR | Resume | **n** | +| <leader>su | Undotree | **n** | | <leader>sw | Visual selection or word (Root Dir) | **n**, **x** | | <leader>sW | Visual selection or word (cwd) | **n**, **x** | | <leader>uC | Colorschemes | **n** | From 1eceabdee814fb947d6adfdd017b5413272cb609 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 23 Jan 2025 18:26:02 +0000 Subject: [PATCH 414/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 3 +++ docs/keymaps.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 9e08f858d8..9c32eccbb2 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -100,6 +100,7 @@ opts = { { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, 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)" }, @@ -116,6 +117,7 @@ opts = { { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, -- search @@ -126,6 +128,7 @@ opts = { { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "si", function() Snacks.picker.icons() end, desc = "Icons" }, { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index b511697d93..b5b1349f3d 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -563,6 +563,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>/ | Grep (Root Dir) | **n** | | <leader>: | Command History | **n** | | <leader>fb | Buffers | **n** | +| <leader>fB | Buffers (all) | **n** | | <leader>fc | Find Config File | **n** | | <leader>ff | Find Files (Root Dir) | **n** | | <leader>fF | Find Files (cwd) | **n** | @@ -584,11 +585,13 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>sG | Grep (cwd) | **n** | | <leader>sh | Help Pages | **n** | | <leader>sH | Highlights | **n** | +| <leader>si | Icons | **n** | | <leader>sj | Jumps | **n** | | <leader>sk | Keymaps | **n** | | <leader>sl | Location List | **n** | | <leader>sm | Marks | **n** | | <leader>sM | Man Pages | **n** | +| <leader>sp | Search for Plugin Spec | **n** | | <leader>sq | Quickfix List | **n** | | <leader>sR | Resume | **n** | | <leader>su | Undotree | **n** | From 93649de00fede9bccbb6508e2c32b612309ecd63 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 08:24:25 +0000 Subject: [PATCH 415/553] chore(build): auto-generate docs --- docs/extras/coding/luasnip.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/luasnip.md b/docs/extras/coding/luasnip.md index 1f51728880..5c009f50e9 100644 --- a/docs/extras/coding/luasnip.md +++ b/docs/extras/coding/luasnip.md @@ -107,7 +107,9 @@ opts = {} opts = function() LazyVim.cmp.actions.snippet_forward = function() if require("luasnip").jumpable(1) then - require("luasnip").jump(1) + vim.schedule(function() + require("luasnip").jump(1) + end) return true end end @@ -131,7 +133,9 @@ end opts = function() LazyVim.cmp.actions.snippet_forward = function() if require("luasnip").jumpable(1) then - require("luasnip").jump(1) + vim.schedule(function() + require("luasnip").jump(1) + end) return true end end From 14001aa23f66d54965f5d6f06535727b8739febd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 12:36:45 +0000 Subject: [PATCH 416/553] chore(build): auto-generate docs --- docs/configuration/general.md | 1 - docs/keymaps.md | 1 - 2 files changed, 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 19fcee52ed..b845f27cd1 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -381,7 +381,6 @@ map("t", "", "close", { desc = "Hide Terminal" }) map("t", "", "close", { desc = "which_key_ignore" }) -- windows -map("n", "w", "", { desc = "Windows", remap = true }) map("n", "-", "s", { desc = "Split Window Below", remap = true }) map("n", "|", "v", { desc = "Split Window Right", remap = true }) map("n", "wd", "c", { desc = "Delete Window", remap = true }) diff --git a/docs/keymaps.md b/docs/keymaps.md index b5b1349f3d..cd164de690 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -94,7 +94,6 @@ possible keymaps starting with ``. | <c-/> | Terminal (Root Dir) | **n** | | <c-_> | which_key_ignore | **n**, **t** | | <C-/> | Hide Terminal | **t** | -| <leader>w | Windows | **n** | | <leader>- | Split Window Below | **n** | | <leader>| | Split Window Right | **n** | | <leader>wd | Delete Window | **n** | From 34a9eb6cf1b04ef4b3c62bd3a8eb6844b07f8591 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 16:23:38 +0000 Subject: [PATCH 417/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 1 + docs/keymaps.md | 1 + docs/plugins/ui.md | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 9c32eccbb2..4499262791 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -98,6 +98,7 @@ opts = { { "/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" }, { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "n", function() Snacks.picker.notifications() end, desc = "Notification History" }, -- find { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, { "fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index cd164de690..00e426f539 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -573,6 +573,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>gc | Git Log | **n** | | <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | +| <leader>n | Notification History | **n** | | <leader>s" | Registers | **n** | | <leader>sa | Autocmds | **n** | | <leader>sb | Buffer Lines | **n** | diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 3e3c7e6fce..7812f3667d 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -597,7 +597,13 @@ opts = { }, -- stylua: ignore keys = { - { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, + { "n", function() + if Snacks.config.picker and Snacks.config.picker.enabled then + Snacks.picker.notifications() + else + Snacks.notifier.show_history() + end + end, desc = "Notification History" }, { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, }, } From 71bf7bc839a092ae834a81ea53b8632115f8b39b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 Jan 2025 18:25:52 +0000 Subject: [PATCH 418/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 4499262791..e8cb10866d 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -107,7 +107,7 @@ opts = { { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, + { "fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" }, { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, From 5b60b242c3840d40acdca0296de70e24913b1fc7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 09:10:24 +0100 Subject: [PATCH 419/553] ci: use neovim action --- .github/workflows/deploy.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6c6d398a01..78ee3a7548 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,15 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install Neovim - shell: bash - run: | - mkdir -p /tmp/nvim - wget -q https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage -O /tmp/nvim/nvim.appimage - cd /tmp/nvim - chmod a+x ./nvim.appimage - ./nvim.appimage --appimage-extract - echo "/tmp/nvim/squashfs-root/usr/bin/" >> $GITHUB_PATH + - uses: folke/github/neovim@main - name: Generate docs run: ./scripts/build_docs.sh - name: Push changes From 150e81d948356de79e007a69f46d6fc76cfa04ca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Jan 2025 08:11:00 +0000 Subject: [PATCH 420/553] chore(build): auto-generate docs --- docs/keymaps.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/keymaps.md b/docs/keymaps.md index 00e426f539..44b62fce5e 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -107,6 +107,8 @@ possible keymaps starting with ``. | <leader><tab>] | Next Tab | **n** | | <leader><tab>d | Close Tab | **n** | | <leader><tab>[ | Previous Tab | **n** | +| <Tab> | Jump Next | **s** | +| <S-Tab> | Jump Previous | **i**, **s** | ## LSP From 2838f06fa3b71504c21cf2404a67bd3934b4b16e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Jan 2025 20:19:53 +0000 Subject: [PATCH 421/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 151 ++++++++++++++++++++++++++++ 1 file changed, 151 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index e8cb10866d..27aeb21c20 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -264,6 +264,94 @@ end +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = { + picker = { + win = { + input = { + keys = { + [""] = { "flash", mode = { "n", "i" } }, + ["s"] = { "flash" }, + }, + }, + }, + actions = { + flash = function(picker) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list" + end, + }, + }, + action = function(match) + local idx = picker.list:row2idx(match.pos[1]) + picker.list:move(idx, true) + end, + }) + end, + }, + }, +} +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + opts = { + picker = { + win = { + input = { + keys = { + [""] = { "flash", mode = { "n", "i" } }, + ["s"] = { "flash" }, + }, + }, + }, + actions = { + flash = function(picker) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list" + end, + }, + }, + action = function(match) + local idx = picker.list:row2idx(match.pos[1]) + picker.list:move(idx, true) + end, + }) + end, + }, + }, + }, +} +``` + + + + + ## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) _(optional)_ @@ -295,4 +383,67 @@ opts = nil +## [flash.nvim](https://github.com/folke/flash.nvim) _(optional)_ + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/flash.nvim", + optional = true, + specs = { + { + "folke/snacks.nvim", + opts = { + picker = { + win = { + input = { + keys = { + [""] = { "flash", mode = { "n", "i" } }, + ["s"] = { "flash" }, + }, + }, + }, + actions = { + flash = function(picker) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list" + end, + }, + }, + action = function(match) + local idx = picker.list:row2idx(match.pos[1]) + picker.list:move(idx, true) + end, + }) + end, + }, + }, + }, + }, + }, +} +``` + + + + + From f4ae4111d5292711cdfc71437afef38d966cd616 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 Jan 2025 23:17:39 +0000 Subject: [PATCH 422/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 27aeb21c20..bcd519efa1 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -296,7 +296,7 @@ opts = { }, action = function(match) local idx = picker.list:row2idx(match.pos[1]) - picker.list:move(idx, true) + picker.list:_move(idx, true, true) end, }) end, @@ -338,7 +338,7 @@ opts = { }, action = function(match) local idx = picker.list:row2idx(match.pos[1]) - picker.list:move(idx, true) + picker.list:_move(idx, true, true) end, }) end, @@ -430,7 +430,7 @@ opts = nil }, action = function(match) local idx = picker.list:row2idx(match.pos[1]) - picker.list:move(idx, true) + picker.list:_move(idx, true, true) end, }) end, From a92e06bd46ce20a2bb956a34eeaf3bb4826f2531 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 30 Jan 2025 21:17:10 +0000 Subject: [PATCH 423/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_explorer.md | 76 +++++++++++++++++++++++++++ docs/extras/lang/markdown.md | 2 +- docs/keymaps.md | 10 ++++ 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 docs/extras/editor/snacks_explorer.md diff --git a/docs/extras/editor/snacks_explorer.md b/docs/extras/editor/snacks_explorer.md new file mode 100644 index 0000000000..6d524bad4e --- /dev/null +++ b/docs/extras/editor/snacks_explorer.md @@ -0,0 +1,76 @@ +# `Snacks_explorer` + + + +:::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'; + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + keys = { + { + "fe", + function() + Snacks.picker.explorer({ cwd = LazyVim.root() }) + end, + desc = "Explorer Snacks (root dir)", + }, + { + "fE", + function() + Snacks.picker.explorer() + end, + desc = "Explorer Snacks (cwd)", + }, + { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, + { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, + }, + init = function() + vim.api.nvim_create_autocmd("BufEnter", { + group = vim.api.nvim_create_augroup("snacks_explorer_start_directory", { clear = true }), + desc = "Start Snacks Explorer with directory", + once = true, + callback = function() + local dir = vim.fn.argv(0) --[[@as string]] + if dir ~= "" and vim.fn.isdirectory(dir) == 1 then + Snacks.picker.explorer({ cwd = dir }) + end + end, + }) + end, +} +``` + + + + + + diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index f96e250bd2..d031ae6dcc 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -189,7 +189,7 @@ opts = { enabled = false, }, }, - ft = { "markdown", "norg", "rmd", "org" }, + ft = { "markdown", "norg", "rmd", "org", "codecompanion" }, config = function(_, opts) require("render-markdown").setup(opts) Snacks.toggle({ diff --git a/docs/keymaps.md b/docs/keymaps.md index 44b62fce5e..1d3a969fa5 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -554,6 +554,16 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | +## [snacks.nvim](https://github.com/folke/snacks.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_explorer](/extras/editor/snacks_explorer) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>e | Explorer Snacks (root dir) | **n** | +| <leader>E | Explorer Snacks (cwd) | **n** | +| <leader>fe | Explorer Snacks (root dir) | **n** | +| <leader>fE | Explorer Snacks (cwd) | **n** | + ## [snacks.nvim](https://github.com/folke/snacks.nvim.git) Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) From b1a418a79949e68a0fe19f229cb3e21a82cb8b7a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 Jan 2025 08:23:51 +0000 Subject: [PATCH 424/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_explorer.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/docs/extras/editor/snacks_explorer.md b/docs/extras/editor/snacks_explorer.md index 6d524bad4e..7a88e8aee8 100644 --- a/docs/extras/editor/snacks_explorer.md +++ b/docs/extras/editor/snacks_explorer.md @@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = nil +opts = { explorer = {} } ``` @@ -35,37 +35,25 @@ opts = nil ```lua { "folke/snacks.nvim", + opts = { explorer = {} }, keys = { { "fe", function() - Snacks.picker.explorer({ cwd = LazyVim.root() }) + Snacks.explorer({ cwd = LazyVim.root() }) end, desc = "Explorer Snacks (root dir)", }, { "fE", function() - Snacks.picker.explorer() + Snacks.explorer() end, desc = "Explorer Snacks (cwd)", }, { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, }, - init = function() - vim.api.nvim_create_autocmd("BufEnter", { - group = vim.api.nvim_create_augroup("snacks_explorer_start_directory", { clear = true }), - desc = "Start Snacks Explorer with directory", - once = true, - callback = function() - local dir = vim.fn.argv(0) --[[@as string]] - if dir ~= "" and vim.fn.isdirectory(dir) == 1 then - Snacks.picker.explorer({ cwd = dir }) - end - end, - }) - end, } ``` From c3dad0bc7153a6c8cd6fda6ce9e052a40e10c334 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 Jan 2025 19:14:25 +0000 Subject: [PATCH 425/553] chore(build): auto-generate docs --- docs/extras/ai/copilot.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/extras/ai/copilot.md b/docs/extras/ai/copilot.md index 1c883aa935..ef34ffca14 100644 --- a/docs/extras/ai/copilot.md +++ b/docs/extras/ai/copilot.md @@ -31,6 +31,7 @@ opts = { suggestion = { enabled = not vim.g.ai_cmp, auto_trigger = true, + hide_during_completion = vim.g.ai_cmp, keymap = { accept = false, -- handled by nvim-cmp / blink.cmp next = "", @@ -55,11 +56,12 @@ opts = { "zbirenbaum/copilot.lua", cmd = "Copilot", build = ":Copilot auth", - event = "InsertEnter", + event = "BufReadPost", opts = { suggestion = { enabled = not vim.g.ai_cmp, auto_trigger = true, + hide_during_completion = vim.g.ai_cmp, keymap = { accept = false, -- handled by nvim-cmp / blink.cmp next = "", From a4756982f120cead4c3edb525e96ea2329f6c400 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 Jan 2025 20:19:20 +0000 Subject: [PATCH 426/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 7812f3667d..31650b4ea5 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -37,6 +37,9 @@ opts = { highlight = "Directory", text_align = "left", }, + { + filetype = "snacks_layout_box", + }, }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) @@ -88,6 +91,9 @@ opts = { highlight = "Directory", text_align = "left", }, + { + filetype = "snacks_layout_box", + }, }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) From 3d092f8c7d89cbbe03b138b688b48dc2762bcbeb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Feb 2025 17:15:42 +0000 Subject: [PATCH 427/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index bcd519efa1..30712888e4 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -159,7 +159,11 @@ opts = function(_, opts) if LazyVim.has("trouble.nvim") then return vim.tbl_deep_extend("force", opts or {}, { picker = { - actions = require("trouble.sources.snacks").actions, + actions = { + trouble_open = function(...) + return require("trouble.sources.snacks").actions.trouble_open.action(...) + end, + }, win = { input = { keys = { @@ -188,7 +192,11 @@ end if LazyVim.has("trouble.nvim") then return vim.tbl_deep_extend("force", opts or {}, { picker = { - actions = require("trouble.sources.snacks").actions, + actions = { + trouble_open = function(...) + return require("trouble.sources.snacks").actions.trouble_open.action(...) + end, + }, win = { input = { keys = { From 5c1b7799e76e2b0ba11f5dc67be853df8bb001b1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Feb 2025 23:16:58 +0000 Subject: [PATCH 428/553] chore(build): auto-generate docs --- docs/plugins/ui.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 31650b4ea5..65693d0574 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -703,4 +703,50 @@ opts = { +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + +```lua +opts = function(_, opts) + if not opts.picker then + return + end + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) +end +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + opts = function(_, opts) + if not opts.picker then + return + end + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) + end, +} +``` + + + + + From 5df7b7bfee7e57014674e5c375b440238d12c4b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Feb 2025 07:17:32 +0000 Subject: [PATCH 429/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 3 +++ docs/keymaps.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 30712888e4..3181bd2a3c 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -113,6 +113,7 @@ opts = { { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, -- Grep { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, @@ -123,10 +124,12 @@ opts = { { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, -- search { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + { 's/', function() Snacks.picker.search_history() end, desc = "Search History" }, { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Diagnostics" }, { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, { "si", function() Snacks.picker.icons() end, desc = "Icons" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 1d3a969fa5..6f4f29e671 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -585,14 +585,17 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>gc | Git Log | **n** | | <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | +| <leader>gS | Git Stash | **n** | | <leader>n | Notification History | **n** | | <leader>s" | Registers | **n** | +| <leader>s/ | Search History | **n** | | <leader>sa | Autocmds | **n** | | <leader>sb | Buffer Lines | **n** | | <leader>sB | Grep Open Buffers | **n** | | <leader>sc | Command History | **n** | | <leader>sC | Commands | **n** | | <leader>sd | Diagnostics | **n** | +| <leader>sD | Diagnostics | **n** | | <leader>sg | Grep (Root Dir) | **n** | | <leader>sG | Grep (cwd) | **n** | | <leader>sh | Help Pages | **n** | From 8b261dda747d97c80529e8051b00da4682bb0182 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 5 Feb 2025 14:17:42 +0000 Subject: [PATCH 430/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 2 +- docs/keymaps.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 3181bd2a3c..f9221e74e0 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -129,7 +129,7 @@ opts = { { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, - { "sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Diagnostics" }, + { "sD", function() Snacks.picker.diagnostics_buffer() end, desc = "Buffer Diagnostics" }, { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, { "si", function() Snacks.picker.icons() end, desc = "Icons" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 6f4f29e671..2a0ea885bf 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -595,7 +595,7 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>sc | Command History | **n** | | <leader>sC | Commands | **n** | | <leader>sd | Diagnostics | **n** | -| <leader>sD | Diagnostics | **n** | +| <leader>sD | Buffer Diagnostics | **n** | | <leader>sg | Grep (Root Dir) | **n** | | <leader>sG | Grep (cwd) | **n** | | <leader>sh | Help Pages | **n** | From 46621817e20115d3f89bb724d851a2deef7a8bc8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Feb 2025 23:17:35 +0000 Subject: [PATCH 431/553] chore(build): auto-generate docs --- docs/extras/lang/go.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 64cefa3b37..52ed2ef1d2 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -76,7 +76,6 @@ opts = { rangeVariableTypes = true, }, analyses = { - fieldalignment = true, nilness = true, unusedparams = true, unusedwrite = true, @@ -148,7 +147,6 @@ opts = { rangeVariableTypes = true, }, analyses = { - fieldalignment = true, nilness = true, unusedparams = true, unusedwrite = true, From 45071bf44c5c4b11dcb72ef33bff1e6635072505 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 14:15:42 +0000 Subject: [PATCH 432/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 6 - docs/extras/editor/neo-tree.md | 213 ++++++++++++++ docs/extras/editor/snacks_picker.md | 6 - docs/extras/editor/telescope.md | 437 +++++++++++++++++++++++++++- docs/extras/lang/sql.md | 2 +- docs/keymaps.md | 80 +---- docs/plugins/coding.md | 5 - docs/plugins/editor.md | 199 ------------- 8 files changed, 658 insertions(+), 290 deletions(-) create mode 100644 docs/extras/editor/neo-tree.md diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 03fe26559b..47674a5493 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -444,9 +444,6 @@ opts = nil ```lua opts = function() - if LazyVim.pick.want() ~= "fzf" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -467,9 +464,6 @@ end { "neovim/nvim-lspconfig", opts = function() - if LazyVim.pick.want() ~= "fzf" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/docs/extras/editor/neo-tree.md b/docs/extras/editor/neo-tree.md new file mode 100644 index 0000000000..5d036ff1f8 --- /dev/null +++ b/docs/extras/editor/neo-tree.md @@ -0,0 +1,213 @@ +# `Neo-tree` + + + +:::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'; + +## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) + + file explorer + + + + + + +```lua +opts = { + sources = { "filesystem", "buffers", "git_status" }, + open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, + filesystem = { + bind_to_cwd = false, + follow_current_file = { enabled = true }, + use_libuv_file_watcher = true, + }, + window = { + mappings = { + ["l"] = "open", + ["h"] = "close_node", + [""] = "none", + ["Y"] = { + function(state) + local node = state.tree:get_node() + local path = node:get_id() + vim.fn.setreg("+", path, "c") + end, + desc = "Copy Path to Clipboard", + }, + ["O"] = { + function(state) + require("lazy.util").open(state.tree:get_node().path, { system = true }) + end, + desc = "Open with System Application", + }, + ["P"] = { "toggle_preview", config = { use_float = false } }, + }, + }, + default_component_configs = { + indent = { + with_expanders = true, -- if nil and file nesting is enabled, will enable expanders + expander_collapsed = "", + expander_expanded = "", + expander_highlight = "NeoTreeExpander", + }, + git_status = { + symbols = { + unstaged = "󰄱", + staged = "󰱒", + }, + }, + }, +} +``` + + + + + + +```lua +{ + "nvim-neo-tree/neo-tree.nvim", + cmd = "Neotree", + keys = { + { + "fe", + function() + require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() }) + end, + desc = "Explorer NeoTree (Root Dir)", + }, + { + "fE", + function() + require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() }) + end, + desc = "Explorer NeoTree (cwd)", + }, + { "e", "fe", desc = "Explorer NeoTree (Root Dir)", remap = true }, + { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, + { + "ge", + function() + require("neo-tree.command").execute({ source = "git_status", toggle = true }) + end, + desc = "Git Explorer", + }, + { + "be", + function() + require("neo-tree.command").execute({ source = "buffers", toggle = true }) + end, + desc = "Buffer Explorer", + }, + }, + deactivate = function() + vim.cmd([[Neotree close]]) + end, + init = function() + -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, + -- because `cwd` is not set up properly. + vim.api.nvim_create_autocmd("BufEnter", { + group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), + desc = "Start Neo-tree with directory", + once = true, + callback = function() + if package.loaded["neo-tree"] then + return + else + local stats = vim.uv.fs_stat(vim.fn.argv(0)) + if stats and stats.type == "directory" then + require("neo-tree") + end + end + end, + }) + end, + opts = { + sources = { "filesystem", "buffers", "git_status" }, + open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, + filesystem = { + bind_to_cwd = false, + follow_current_file = { enabled = true }, + use_libuv_file_watcher = true, + }, + window = { + mappings = { + ["l"] = "open", + ["h"] = "close_node", + [""] = "none", + ["Y"] = { + function(state) + local node = state.tree:get_node() + local path = node:get_id() + vim.fn.setreg("+", path, "c") + end, + desc = "Copy Path to Clipboard", + }, + ["O"] = { + function(state) + require("lazy.util").open(state.tree:get_node().path, { system = true }) + end, + desc = "Open with System Application", + }, + ["P"] = { "toggle_preview", config = { use_float = false } }, + }, + }, + default_component_configs = { + indent = { + with_expanders = true, -- if nil and file nesting is enabled, will enable expanders + expander_collapsed = "", + expander_expanded = "", + expander_highlight = "NeoTreeExpander", + }, + git_status = { + symbols = { + unstaged = "󰄱", + staged = "󰱒", + }, + }, + }, + }, + config = function(_, opts) + local function on_move(data) + Snacks.rename.on_rename_file(data.source, data.destination) + end + + local events = require("neo-tree.events") + opts.event_handlers = opts.event_handlers or {} + vim.list_extend(opts.event_handlers, { + { event = events.FILE_MOVED, handler = on_move }, + { event = events.FILE_RENAMED, handler = on_move }, + }) + require("neo-tree").setup(opts) + vim.api.nvim_create_autocmd("TermClose", { + pattern = "*lazygit", + callback = function() + if package.loaded["neo-tree.sources.git_status"] then + require("neo-tree.sources.git_status").refresh() + end + end, + }) + end, +} +``` + + + + + + diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index f9221e74e0..b0ca5ded92 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -229,9 +229,6 @@ end ```lua opts = function() - if LazyVim.pick.want() ~= "snacks" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -254,9 +251,6 @@ end { "neovim/nvim-lspconfig", opts = function() - if LazyVim.pick.want() ~= "snacks" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/docs/extras/editor/telescope.md b/docs/extras/editor/telescope.md index b64ccb6732..a8f06c8a7f 100644 --- a/docs/extras/editor/telescope.md +++ b/docs/extras/editor/telescope.md @@ -27,7 +27,13 @@ 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) +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) + + Fuzzy finder. + The default key bindings to find files will use Telescope's + `find_files` or `git_files` depending on whether the + directory is a git repo. + @@ -35,9 +41,433 @@ import TabItem from '@theme/TabItem'; ```lua opts = function() - if LazyVim.pick.want() ~= "telescope" then + local actions = require("telescope.actions") + + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end + local find_files_no_ignore = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() + end + local find_files_with_hidden = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { hidden = true, default_text = line })() + end + + local function find_command() + if 1 == vim.fn.executable("rg") then + return { "rg", "--files", "--color", "never", "-g", "!.git" } + elseif 1 == vim.fn.executable("fd") then + return { "fd", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("fdfind") then + return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then + return { "find", ".", "-type", "f" } + elseif 1 == vim.fn.executable("where") then + return { "where", "/r", ".", "*" } + end + end + + return { + defaults = { + prompt_prefix = " ", + selection_caret = " ", + -- open files in the first window that is an actual file. + -- use the current window if no other window is available. + get_selection_window = function() + local wins = vim.api.nvim_list_wins() + table.insert(wins, 1, vim.api.nvim_get_current_win()) + for _, win in ipairs(wins) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.bo[buf].buftype == "" then + return win + end + end + return 0 + end, + mappings = { + i = { + [""] = open_with_trouble, + [""] = open_with_trouble, + [""] = find_files_no_ignore, + [""] = find_files_with_hidden, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + }, + n = { + ["q"] = actions.close, + }, + }, + }, + pickers = { + find_files = { + find_command = find_command, + hidden = true, + }, + }, + } +end +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + version = false, -- telescope did only one release, so use HEAD for now + dependencies = { + { + "nvim-telescope/telescope-fzf-native.nvim", + build = (build_cmd ~= "cmake") and "make" + or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + enabled = build_cmd ~= nil, + config = function(plugin) + LazyVim.on_load("telescope.nvim", function() + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end + end) + end, + }, + }, + keys = { + { + ",", + "Telescope buffers sort_mru=true sort_lastused=true", + desc = "Switch Buffer", + }, + { "/", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { ":", "Telescope command_history", desc = "Command History" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + -- find + { + "fb", + "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", + desc = "Buffers", + }, + { "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)" }, + { "fg", "Telescope git_files", desc = "Find Files (git-files)" }, + { "fr", "Telescope oldfiles", desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { cwd = vim.uv.cwd() }), desc = "Recent (cwd)" }, + -- git + { "gc", "Telescope git_commits", desc = "Commits" }, + { "gs", "Telescope git_status", desc = "Status" }, + -- search + { 's"', "Telescope registers", desc = "Registers" }, + { "sa", "Telescope autocommands", desc = "Auto Commands" }, + { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, + { "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" }, + { "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" }, + { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, + { "sj", "Telescope jumplist", desc = "Jumplist" }, + { "sk", "Telescope keymaps", desc = "Key Maps" }, + { "sl", "Telescope loclist", desc = "Location List" }, + { "sM", "Telescope man_pages", desc = "Man Pages" }, + { "sm", "Telescope marks", desc = "Jump to Mark" }, + { "so", "Telescope vim_options", desc = "Options" }, + { "sR", "Telescope resume", desc = "Resume" }, + { "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)" }, + { "uC", LazyVim.pick("colorscheme", { enable_preview = true }), desc = "Colorscheme with Preview" }, + { + "ss", + function() + require("telescope.builtin").lsp_document_symbols({ + symbols = LazyVim.config.get_kind_filter(), + }) + end, + desc = "Goto Symbol", + }, + { + "sS", + function() + require("telescope.builtin").lsp_dynamic_workspace_symbols({ + symbols = LazyVim.config.get_kind_filter(), + }) + end, + desc = "Goto Symbol (Workspace)", + }, + }, + opts = function() + local actions = require("telescope.actions") + + local open_with_trouble = function(...) + return require("trouble.sources.telescope").open(...) + end + local find_files_no_ignore = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { no_ignore = true, default_text = line })() + end + local find_files_with_hidden = function() + local action_state = require("telescope.actions.state") + local line = action_state.get_current_line() + LazyVim.pick("find_files", { hidden = true, default_text = line })() + end + + local function find_command() + if 1 == vim.fn.executable("rg") then + return { "rg", "--files", "--color", "never", "-g", "!.git" } + elseif 1 == vim.fn.executable("fd") then + return { "fd", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("fdfind") then + return { "fdfind", "--type", "f", "--color", "never", "-E", ".git" } + elseif 1 == vim.fn.executable("find") and vim.fn.has("win32") == 0 then + return { "find", ".", "-type", "f" } + elseif 1 == vim.fn.executable("where") then + return { "where", "/r", ".", "*" } + end + end + + return { + defaults = { + prompt_prefix = " ", + selection_caret = " ", + -- open files in the first window that is an actual file. + -- use the current window if no other window is available. + get_selection_window = function() + local wins = vim.api.nvim_list_wins() + table.insert(wins, 1, vim.api.nvim_get_current_win()) + for _, win in ipairs(wins) do + local buf = vim.api.nvim_win_get_buf(win) + if vim.bo[buf].buftype == "" then + return win + end + end + return 0 + end, + mappings = { + i = { + [""] = open_with_trouble, + [""] = open_with_trouble, + [""] = find_files_no_ignore, + [""] = find_files_with_hidden, + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.preview_scrolling_down, + [""] = actions.preview_scrolling_up, + }, + n = { + ["q"] = actions.close, + }, + }, + }, + pickers = { + find_files = { + find_command = find_command, + hidden = true, + }, + }, + } + end, +} +``` + + + + + +## [dressing.nvim](https://github.com/stevearc/dressing.nvim) + + better vim.ui with telescope + + + + + + +```lua +opts = nil +``` + + + + + + +```lua +{ + "stevearc/dressing.nvim", + lazy = true, + init = function() + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.select = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.select(...) + end + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.input = function(...) + require("lazy").load({ plugins = { "dressing.nvim" } }) + return vim.ui.input(...) + end + end, +} +``` + + + + + +## [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) + + Flash Telescope config + + + + + + +```lua +opts = function(_, opts) + if not LazyVim.has("flash.nvim") then return end + local function flash(prompt_bufnr) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" + end, + }, + }, + action = function(match) + local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) + picker:set_selection(match.pos[1] - 1) + end, + }) + end + opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { + mappings = { n = { s = flash }, i = { [""] = flash } }, + }) +end +``` + + + + + + +```lua +{ + "nvim-telescope/telescope.nvim", + optional = true, + opts = function(_, opts) + if not LazyVim.has("flash.nvim") then + return + end + local function flash(prompt_bufnr) + require("flash").jump({ + pattern = "^", + label = { after = { 0, 0 } }, + search = { + mode = "search", + exclude = { + function(win) + return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults" + end, + }, + }, + action = function(match) + local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr) + picker:set_selection(match.pos[1] - 1) + end, + }) + end + opts.defaults = vim.tbl_deep_extend("force", opts.defaults or {}, { + mappings = { n = { s = flash }, i = { [""] = flash } }, + }) + end, +} +``` + + + + + +## [telescope-fzf-native.nvim](https://github.com/nvim-telescope/telescope-fzf-native.nvim) + + + + + +```lua +opts = {} +``` + + + + + + +```lua +{ + "nvim-telescope/telescope-fzf-native.nvim", + build = (build_cmd ~= "cmake") and "make" + or "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + enabled = build_cmd ~= nil, + config = function(plugin) + LazyVim.on_load("telescope.nvim", function() + local ok, err = pcall(require("telescope").load_extension, "fzf") + if not ok then + local lib = plugin.dir .. "/build/libfzf." .. (LazyVim.is_win() and "dll" or "so") + if not vim.uv.fs_stat(lib) then + LazyVim.warn("`telescope-fzf-native.nvim` not built. Rebuilding...") + require("lazy").build({ plugins = { plugin }, show = false }):wait(function() + LazyVim.info("Rebuilding `telescope-fzf-native.nvim` done.\nPlease restart Neovim.") + end) + else + LazyVim.error("Failed to load `telescope-fzf-native.nvim`:\n" .. err) + end + end + end) + end, +} +``` + + + + + +## [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) + + + + + +```lua +opts = function() local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { @@ -58,9 +488,6 @@ end { "neovim/nvim-lspconfig", opts = function() - if LazyVim.pick.want() ~= "telescope" then - return - end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 4e6ea462d2..5719e54d68 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -99,7 +99,7 @@ opts = nil vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - if LazyVim.cmp_engine() == "nvim-cmp" then + if LazyVim.has_extra("coding.nvim-cmp") then local cmp = require("cmp") -- global sources diff --git a/docs/keymaps.md b/docs/keymaps.md index 2a0ea885bf..aaeb9a7e31 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -517,6 +517,18 @@ Part of [lazyvim.plugins.extras.editor.mini-files](/extras/editor/mini-files) | <leader>fm | Open mini.files (Directory of Current File) | **n** | | <leader>fM | Open mini.files (cwd) | **n** | +## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) +Part of [lazyvim.plugins.extras.editor.neo-tree](/extras/editor/neo-tree) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>be | Buffer Explorer | **n** | +| <leader>e | Explorer NeoTree (Root Dir) | **n** | +| <leader>E | Explorer NeoTree (cwd) | **n** | +| <leader>fe | Explorer NeoTree (Root Dir) | **n** | +| <leader>fE | Explorer NeoTree (cwd) | **n** | +| <leader>ge | Git Explorer | **n** | + ## [outline.nvim](https://github.com/hedyhli/outline.nvim.git) Part of [lazyvim.plugins.extras.editor.outline](/extras/editor/outline) @@ -554,74 +566,6 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | -## [snacks.nvim](https://github.com/folke/snacks.nvim.git) -Part of [lazyvim.plugins.extras.editor.snacks_explorer](/extras/editor/snacks_explorer) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>e | Explorer Snacks (root dir) | **n** | -| <leader>E | Explorer Snacks (cwd) | **n** | -| <leader>fe | Explorer Snacks (root dir) | **n** | -| <leader>fE | Explorer Snacks (cwd) | **n** | - -## [snacks.nvim](https://github.com/folke/snacks.nvim.git) -Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Buffers | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fB | Buffers (all) | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fp | Projects | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Git Log | **n** | -| <leader>gd | Git Diff (hunks) | **n** | -| <leader>gs | Git Status | **n** | -| <leader>gS | Git Stash | **n** | -| <leader>n | Notification History | **n** | -| <leader>s" | Registers | **n** | -| <leader>s/ | Search History | **n** | -| <leader>sa | Autocmds | **n** | -| <leader>sb | Buffer Lines | **n** | -| <leader>sB | Grep Open Buffers | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Diagnostics | **n** | -| <leader>sD | Buffer Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Highlights | **n** | -| <leader>si | Icons | **n** | -| <leader>sj | Jumps | **n** | -| <leader>sk | Keymaps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Marks | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>sp | Search for Plugin Spec | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>su | Undotree | **n** | -| <leader>sw | Visual selection or word (Root Dir) | **n**, **x** | -| <leader>sW | Visual selection or word (cwd) | **n**, **x** | -| <leader>uC | Colorschemes | **n** | - -## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) -Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>st | Todo | **n** | -| <leader>sT | Todo/Fix/Fixme | **n** | - ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) diff --git a/docs/plugins/coding.md b/docs/plugins/coding.md index a1c5ab9d61..8f6e3400cc 100644 --- a/docs/plugins/coding.md +++ b/docs/plugins/coding.md @@ -5,11 +5,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -### Includes the following extras - -- [coding.blink](/extras/coding/blink) -- [coding.nvim-cmp](/extras/coding/nvim-cmp) - ## [mini.pairs](https://github.com/echasnovski/mini.pairs) auto pairs diff --git a/docs/plugins/editor.md b/docs/plugins/editor.md index 22319385b1..44e7c9b22c 100644 --- a/docs/plugins/editor.md +++ b/docs/plugins/editor.md @@ -5,205 +5,6 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -### Includes the following extras - -- [editor.fzf](/extras/editor/fzf) -- [editor.snacks_picker](/extras/editor/snacks_picker) -- [editor.telescope](/extras/editor/telescope) - -## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) - - file explorer - - - - - - -```lua -opts = { - sources = { "filesystem", "buffers", "git_status" }, - open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, - filesystem = { - bind_to_cwd = false, - follow_current_file = { enabled = true }, - use_libuv_file_watcher = true, - }, - window = { - mappings = { - ["l"] = "open", - ["h"] = "close_node", - [""] = "none", - ["Y"] = { - function(state) - local node = state.tree:get_node() - local path = node:get_id() - vim.fn.setreg("+", path, "c") - end, - desc = "Copy Path to Clipboard", - }, - ["O"] = { - function(state) - require("lazy.util").open(state.tree:get_node().path, { system = true }) - end, - desc = "Open with System Application", - }, - ["P"] = { "toggle_preview", config = { use_float = false } }, - }, - }, - default_component_configs = { - indent = { - with_expanders = true, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", - expander_highlight = "NeoTreeExpander", - }, - git_status = { - symbols = { - unstaged = "󰄱", - staged = "󰱒", - }, - }, - }, -} -``` - - - - - - -```lua -{ - "nvim-neo-tree/neo-tree.nvim", - cmd = "Neotree", - keys = { - { - "fe", - function() - require("neo-tree.command").execute({ toggle = true, dir = LazyVim.root() }) - end, - desc = "Explorer NeoTree (Root Dir)", - }, - { - "fE", - function() - require("neo-tree.command").execute({ toggle = true, dir = vim.uv.cwd() }) - end, - desc = "Explorer NeoTree (cwd)", - }, - { "e", "fe", desc = "Explorer NeoTree (Root Dir)", remap = true }, - { "E", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, - { - "ge", - function() - require("neo-tree.command").execute({ source = "git_status", toggle = true }) - end, - desc = "Git Explorer", - }, - { - "be", - function() - require("neo-tree.command").execute({ source = "buffers", toggle = true }) - end, - desc = "Buffer Explorer", - }, - }, - deactivate = function() - vim.cmd([[Neotree close]]) - end, - init = function() - -- FIX: use `autocmd` for lazy-loading neo-tree instead of directly requiring it, - -- because `cwd` is not set up properly. - vim.api.nvim_create_autocmd("BufEnter", { - group = vim.api.nvim_create_augroup("Neotree_start_directory", { clear = true }), - desc = "Start Neo-tree with directory", - once = true, - callback = function() - if package.loaded["neo-tree"] then - return - else - local stats = vim.uv.fs_stat(vim.fn.argv(0)) - if stats and stats.type == "directory" then - require("neo-tree") - end - end - end, - }) - end, - opts = { - sources = { "filesystem", "buffers", "git_status" }, - open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" }, - filesystem = { - bind_to_cwd = false, - follow_current_file = { enabled = true }, - use_libuv_file_watcher = true, - }, - window = { - mappings = { - ["l"] = "open", - ["h"] = "close_node", - [""] = "none", - ["Y"] = { - function(state) - local node = state.tree:get_node() - local path = node:get_id() - vim.fn.setreg("+", path, "c") - end, - desc = "Copy Path to Clipboard", - }, - ["O"] = { - function(state) - require("lazy.util").open(state.tree:get_node().path, { system = true }) - end, - desc = "Open with System Application", - }, - ["P"] = { "toggle_preview", config = { use_float = false } }, - }, - }, - default_component_configs = { - indent = { - with_expanders = true, -- if nil and file nesting is enabled, will enable expanders - expander_collapsed = "", - expander_expanded = "", - expander_highlight = "NeoTreeExpander", - }, - git_status = { - symbols = { - unstaged = "󰄱", - staged = "󰱒", - }, - }, - }, - }, - config = function(_, opts) - local function on_move(data) - Snacks.rename.on_rename_file(data.source, data.destination) - end - - local events = require("neo-tree.events") - opts.event_handlers = opts.event_handlers or {} - vim.list_extend(opts.event_handlers, { - { event = events.FILE_MOVED, handler = on_move }, - { event = events.FILE_RENAMED, handler = on_move }, - }) - require("neo-tree").setup(opts) - vim.api.nvim_create_autocmd("TermClose", { - pattern = "*lazygit", - callback = function() - if package.loaded["neo-tree.sources.git_status"] then - require("neo-tree.sources.git_status").refresh() - end - end, - }) - end, -} -``` - - - - - ## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim) search/replace in multiple files From 893ebebbe0ad6bb99e54991516be9281c0fd918f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Feb 2025 15:17:19 +0000 Subject: [PATCH 433/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 40 +++++ docs/keymaps.md | 233 ++++++++++++++-------------- docs/plugins/ui.md | 46 ------ 3 files changed, 155 insertions(+), 164 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index b0ca5ded92..95e0444ef4 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -275,6 +275,46 @@ end +```lua +opts = function(_, opts) + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) +end +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + opts = function(_, opts) + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) + end, +} +``` + + + + + +## [snacks.nvim](https://github.com/folke/snacks.nvim) + + + + + ```lua opts = { picker = { diff --git a/docs/keymaps.md b/docs/keymaps.md index aaeb9a7e31..859f4eb0be 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -165,49 +165,6 @@ possible keymaps starting with ``. | s | Flash | **n**, **o**, **x** | | S | Flash Treesitter | **n**, **o**, **x** | -## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - ## [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim.git) | Key | Description | Mode | @@ -220,17 +177,6 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>cm | Mason | **n** | -## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>be | Buffer Explorer | **n** | -| <leader>e | Explorer NeoTree (Root Dir) | **n** | -| <leader>E | Explorer NeoTree (cwd) | **n** | -| <leader>fe | Explorer NeoTree (Root Dir) | **n** | -| <leader>fE | Explorer NeoTree (cwd) | **n** | -| <leader>ge | Git Explorer | **n** | - ## [noice.nvim](https://github.com/folke/noice.nvim.git) | Key | Description | Mode | @@ -265,10 +211,57 @@ possible keymaps starting with ``. | Key | Description | Mode | | --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Buffers | **n** | | <leader>. | Toggle Scratch Buffer | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | | <leader>dps | Profiler Scratch Buffer | **n** | +| <leader>e | Explorer Snacks (root dir) | **n** | +| <leader>E | Explorer Snacks (cwd) | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fB | Buffers (all) | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>fe | Explorer Snacks (root dir) | **n** | +| <leader>fE | Explorer Snacks (cwd) | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fp | Projects | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Git Log | **n** | +| <leader>gd | Git Diff (hunks) | **n** | +| <leader>gs | Git Status | **n** | +| <leader>gS | Git Stash | **n** | | <leader>n | Notification History | **n** | | <leader>S | Select Scratch Buffer | **n** | +| <leader>s" | Registers | **n** | +| <leader>s/ | Search History | **n** | +| <leader>sa | Autocmds | **n** | +| <leader>sb | Buffer Lines | **n** | +| <leader>sB | Grep Open Buffers | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Diagnostics | **n** | +| <leader>sD | Buffer Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Highlights | **n** | +| <leader>si | Icons | **n** | +| <leader>sj | Jumps | **n** | +| <leader>sk | Keymaps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Marks | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sp | Search for Plugin Spec | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>su | Undotree | **n** | +| <leader>sw | Visual selection or word (Root Dir) | **n**, **x** | +| <leader>sW | Visual selection or word (cwd) | **n**, **x** | +| <leader>uC | Colorschemes | **n** | | <leader>un | Dismiss All Notifications | **n** | ## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) @@ -413,58 +406,6 @@ Part of [lazyvim.plugins.extras.editor.dial](/extras/editor/dial) | g<C-a> | Increment | **n**, **v** | | g<C-x> | Decrement | **n**, **v** | -## [fzf-lua](https://github.com/ibhagwan/fzf-lua.git) -Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader><space> | Find Files (Root Dir) | **n** | -| <leader>, | Switch Buffer | **n** | -| <leader>/ | Grep (Root Dir) | **n** | -| <leader>: | Command History | **n** | -| <leader>fb | Buffers | **n** | -| <leader>fc | Find Config File | **n** | -| <leader>ff | Find Files (Root Dir) | **n** | -| <leader>fF | Find Files (cwd) | **n** | -| <leader>fg | Find Files (git-files) | **n** | -| <leader>fr | Recent | **n** | -| <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Commits | **n** | -| <leader>gs | Status | **n** | -| <leader>s" | Registers | **n** | -| <leader>sa | Auto Commands | **n** | -| <leader>sb | Buffer | **n** | -| <leader>sc | Command History | **n** | -| <leader>sC | Commands | **n** | -| <leader>sd | Document Diagnostics | **n** | -| <leader>sD | Workspace Diagnostics | **n** | -| <leader>sg | Grep (Root Dir) | **n** | -| <leader>sG | Grep (cwd) | **n** | -| <leader>sh | Help Pages | **n** | -| <leader>sH | Search Highlight Groups | **n** | -| <leader>sj | Jumplist | **n** | -| <leader>sk | Key Maps | **n** | -| <leader>sl | Location List | **n** | -| <leader>sm | Jump to Mark | **n** | -| <leader>sM | Man Pages | **n** | -| <leader>sq | Quickfix List | **n** | -| <leader>sR | Resume | **n** | -| <leader>ss | Goto Symbol | **n** | -| <leader>sS | Goto Symbol (Workspace) | **n** | -| <leader>sw | Word (Root Dir) | **n** | -| <leader>sW | Word (cwd) | **n** | -| <leader>sw | Selection (Root Dir) | **v** | -| <leader>sW | Selection (cwd) | **v** | -| <leader>uC | Colorscheme with Preview | **n** | - -## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) -Part of [lazyvim.plugins.extras.editor.fzf](/extras/editor/fzf) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>st | Todo | **n** | -| <leader>sT | Todo/Fix/Fixme | **n** | - ## [harpoon](https://github.com/ThePrimeagen/harpoon.git) Part of [lazyvim.plugins.extras.editor.harpoon2](/extras/editor/harpoon2) @@ -517,18 +458,6 @@ Part of [lazyvim.plugins.extras.editor.mini-files](/extras/editor/mini-files) | <leader>fm | Open mini.files (Directory of Current File) | **n** | | <leader>fM | Open mini.files (cwd) | **n** | -## [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git) -Part of [lazyvim.plugins.extras.editor.neo-tree](/extras/editor/neo-tree) - -| Key | Description | Mode | -| --- | --- | --- | -| <leader>be | Buffer Explorer | **n** | -| <leader>e | Explorer NeoTree (Root Dir) | **n** | -| <leader>E | Explorer NeoTree (cwd) | **n** | -| <leader>fe | Explorer NeoTree (Root Dir) | **n** | -| <leader>fE | Explorer NeoTree (cwd) | **n** | -| <leader>ge | Git Explorer | **n** | - ## [outline.nvim](https://github.com/hedyhli/outline.nvim.git) Part of [lazyvim.plugins.extras.editor.outline](/extras/editor/outline) @@ -566,6 +495,74 @@ Part of [lazyvim.plugins.extras.editor.refactoring](/extras/editor/refactoring) | <leader>rs | Refactor | **v** | | <leader>rx | Extract Variable | **v** | +## [snacks.nvim](https://github.com/folke/snacks.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_explorer](/extras/editor/snacks_explorer) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>e | Explorer Snacks (root dir) | **n** | +| <leader>E | Explorer Snacks (cwd) | **n** | +| <leader>fe | Explorer Snacks (root dir) | **n** | +| <leader>fE | Explorer Snacks (cwd) | **n** | + +## [snacks.nvim](https://github.com/folke/snacks.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader><space> | Find Files (Root Dir) | **n** | +| <leader>, | Buffers | **n** | +| <leader>/ | Grep (Root Dir) | **n** | +| <leader>: | Command History | **n** | +| <leader>fb | Buffers | **n** | +| <leader>fB | Buffers (all) | **n** | +| <leader>fc | Find Config File | **n** | +| <leader>ff | Find Files (Root Dir) | **n** | +| <leader>fF | Find Files (cwd) | **n** | +| <leader>fg | Find Files (git-files) | **n** | +| <leader>fp | Projects | **n** | +| <leader>fr | Recent | **n** | +| <leader>fR | Recent (cwd) | **n** | +| <leader>gc | Git Log | **n** | +| <leader>gd | Git Diff (hunks) | **n** | +| <leader>gs | Git Status | **n** | +| <leader>gS | Git Stash | **n** | +| <leader>n | Notification History | **n** | +| <leader>s" | Registers | **n** | +| <leader>s/ | Search History | **n** | +| <leader>sa | Autocmds | **n** | +| <leader>sb | Buffer Lines | **n** | +| <leader>sB | Grep Open Buffers | **n** | +| <leader>sc | Command History | **n** | +| <leader>sC | Commands | **n** | +| <leader>sd | Diagnostics | **n** | +| <leader>sD | Buffer Diagnostics | **n** | +| <leader>sg | Grep (Root Dir) | **n** | +| <leader>sG | Grep (cwd) | **n** | +| <leader>sh | Help Pages | **n** | +| <leader>sH | Highlights | **n** | +| <leader>si | Icons | **n** | +| <leader>sj | Jumps | **n** | +| <leader>sk | Keymaps | **n** | +| <leader>sl | Location List | **n** | +| <leader>sm | Marks | **n** | +| <leader>sM | Man Pages | **n** | +| <leader>sp | Search for Plugin Spec | **n** | +| <leader>sq | Quickfix List | **n** | +| <leader>sR | Resume | **n** | +| <leader>su | Undotree | **n** | +| <leader>sw | Visual selection or word (Root Dir) | **n**, **x** | +| <leader>sW | Visual selection or word (cwd) | **n**, **x** | +| <leader>uC | Colorschemes | **n** | + +## [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git) +Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_picker) + +| Key | Description | Mode | +| --- | --- | --- | +| <leader>st | Todo | **n** | +| <leader>sT | Todo/Fix/Fixme | **n** | + ## [nvim-ansible](https://github.com/mfussenegger/nvim-ansible.git) Part of [lazyvim.plugins.extras.lang.ansible](/extras/lang/ansible) diff --git a/docs/plugins/ui.md b/docs/plugins/ui.md index 65693d0574..31650b4ea5 100644 --- a/docs/plugins/ui.md +++ b/docs/plugins/ui.md @@ -703,50 +703,4 @@ opts = { -## [snacks.nvim](https://github.com/folke/snacks.nvim) - - - - - -```lua -opts = function(_, opts) - if not opts.picker then - return - end - table.insert(opts.dashboard.preset.keys, 3, { - icon = " ", - key = "p", - desc = "Projects", - action = ":lua Snacks.picker.projects()", - }) -end -``` - - - - - - -```lua -{ - "folke/snacks.nvim", - opts = function(_, opts) - if not opts.picker then - return - end - table.insert(opts.dashboard.preset.keys, 3, { - icon = " ", - key = "p", - desc = "Projects", - action = ":lua Snacks.picker.projects()", - }) - end, -} -``` - - - - - From fb012130696599d9061d7041c2451b4401d02e66 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 10 Feb 2025 23:18:53 +0000 Subject: [PATCH 434/553] chore(build): auto-generate docs --- docs/extras/coding/mini-surround.md | 1 - docs/extras/editor/snacks_explorer.md | 25 ++----------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/docs/extras/coding/mini-surround.md b/docs/extras/coding/mini-surround.md index c03691a35e..46900ec0af 100644 --- a/docs/extras/coding/mini-surround.md +++ b/docs/extras/coding/mini-surround.md @@ -45,7 +45,6 @@ opts = { ```lua { "echasnovski/mini.surround", - recommended = true, keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/docs/extras/editor/snacks_explorer.md b/docs/extras/editor/snacks_explorer.md index 7a88e8aee8..9f75636083 100644 --- a/docs/extras/editor/snacks_explorer.md +++ b/docs/extras/editor/snacks_explorer.md @@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem'; ```lua -opts = { explorer = {} } +opts = nil ``` @@ -33,28 +33,7 @@ opts = { explorer = {} } ```lua -{ - "folke/snacks.nvim", - opts = { explorer = {} }, - keys = { - { - "fe", - function() - Snacks.explorer({ cwd = LazyVim.root() }) - end, - desc = "Explorer Snacks (root dir)", - }, - { - "fE", - function() - Snacks.explorer() - end, - desc = "Explorer Snacks (cwd)", - }, - { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, - { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, - }, -} +"folke/snacks.nvim" ``` From 0ff8079b430d64456ff5dad261c9712cff7bea3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 12 Feb 2025 13:24:31 +0000 Subject: [PATCH 435/553] chore(build): auto-generate docs --- docs/extras/editor/fzf.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/extras/editor/fzf.md b/docs/extras/editor/fzf.md index 47674a5493..21fb14c0c2 100644 --- a/docs/extras/editor/fzf.md +++ b/docs/extras/editor/fzf.md @@ -447,10 +447,10 @@ opts = function() local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + { "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 ``` @@ -467,10 +467,10 @@ end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + { "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, } From fa9c06f821506f72a7f1448f17fcd288872ce81e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Feb 2025 17:16:09 +0000 Subject: [PATCH 436/553] chore(build): auto-generate docs --- docs/extras/coding/neogen.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/extras/coding/neogen.md b/docs/extras/coding/neogen.md index 9b06050614..d3270a726e 100644 --- a/docs/extras/coding/neogen.md +++ b/docs/extras/coding/neogen.md @@ -31,6 +31,7 @@ opts = function(_, opts) local map = { ["LuaSnip"] = "luasnip", + ["mini.snippets"] = "mini", ["nvim-snippy"] = "snippy", ["vim-vsnip"] = "vsnip", } @@ -56,6 +57,7 @@ end ```lua { "danymat/neogen", + dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {}, cmd = "Neogen", keys = { { @@ -73,6 +75,7 @@ end local map = { ["LuaSnip"] = "luasnip", + ["mini.snippets"] = "mini", ["nvim-snippy"] = "snippy", ["vim-vsnip"] = "vsnip", } From 46faf916fb3e455a43a01006af5adb5a29766f02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 08:22:05 +0000 Subject: [PATCH 437/553] chore(build): auto-generate docs --- docs/configuration/general.md | 17 +++- docs/extras/editor/snacks_picker.md | 139 ++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+), 2 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index b845f27cd1..7b431a6554 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -293,8 +293,21 @@ map("n", "l", "Lazy", { desc = "Lazy" }) -- new file map("n", "fn", "enew", { desc = "New File" }) -map("n", "xl", "lopen", { desc = "Location List" }) -map("n", "xq", "copen", { desc = "Quickfix List" }) +-- location list +map("n", "xl", function() + local success, err = pcall(vim.fn.getloclist(0, { winid = 0 }).winid ~= 0 and vim.cmd.lclose or vim.cmd.lopen) + if not success and err then + vim.notify(err, vim.log.levels.ERROR) + end +end, { desc = "Location List" }) + +-- quickfix list +map("n", "xq", function() + local success, err = pcall(vim.fn.getqflist({ winid = 0 }).winid ~= 0 and vim.cmd.cclose or vim.cmd.copen) + if not success and err then + vim.notify(err, vim.log.levels.ERROR) + end +end, { desc = "Quickfix List" }) map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" }) map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" }) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 95e0444ef4..20aafbd464 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -428,6 +428,145 @@ opts = nil +## [alpha-nvim](https://github.com/goolord/alpha-nvim) _(optional)_ + + + + + +```lua +opts = function(_, dashboard) + local button = dashboard.button("p", " " .. " Projects", [[ lua Snacks.picker.projects() ]]) + button.opts.hl = "AlphaButtons" + button.opts.hl_shortcut = "AlphaShortcut" + table.insert(dashboard.section.buttons.val, 4, button) +end +``` + + + + + + +```lua +{ + "goolord/alpha-nvim", + optional = true, + opts = function(_, dashboard) + local button = dashboard.button("p", " " .. " Projects", [[ lua Snacks.picker.projects() ]]) + button.opts.hl = "AlphaButtons" + button.opts.hl_shortcut = "AlphaShortcut" + table.insert(dashboard.section.buttons.val, 4, button) + end, +} +``` + + + + + +## [mini.starter](https://github.com/echasnovski/mini.starter) _(optional)_ + + + + + +```lua +opts = function(_, opts) + local items = { + { + name = "Projects", + action = [[lua Snacks.picker.projects()]], + section = string.rep(" ", 22) .. "Telescope", + }, + } + vim.list_extend(opts.items, items) +end +``` + + + + + + +```lua +{ + "echasnovski/mini.starter", + optional = true, + opts = function(_, opts) + local items = { + { + name = "Projects", + action = [[lua Snacks.picker.projects()]], + section = string.rep(" ", 22) .. "Telescope", + }, + } + vim.list_extend(opts.items, items) + end, +} +``` + + + + + +## [dashboard-nvim](https://github.com/nvimdev/dashboard-nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + if not vim.tbl_get(opts, "config", "center") then + return + end + local projects = { + action = "lua Snacks.picker.projects()", + desc = " Projects", + icon = " ", + key = "p", + } + + projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) + projects.key_format = " %s" + + table.insert(opts.config.center, 3, projects) +end +``` + + + + + + +```lua +{ + "nvimdev/dashboard-nvim", + optional = true, + opts = function(_, opts) + if not vim.tbl_get(opts, "config", "center") then + return + end + local projects = { + action = "lua Snacks.picker.projects()", + desc = " Projects", + icon = " ", + key = "p", + } + + projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc) + projects.key_format = " %s" + + table.insert(opts.config.center, 3, projects) + end, +} +``` + + + + + ## [flash.nvim](https://github.com/folke/flash.nvim) _(optional)_ From a7df2134e497a94a5a0cfbfaff942a19d8a6edd1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 15:18:09 +0000 Subject: [PATCH 438/553] chore(build): auto-generate docs --- docs/extras/editor/snacks_picker.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 20aafbd464..841e50911a 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -170,7 +170,7 @@ opts = function(_, opts) win = { input = { keys = { - [""] = { + [""] = { "trouble_open", mode = { "n", "i" }, }, @@ -203,7 +203,7 @@ end win = { input = { keys = { - [""] = { + [""] = { "trouble_open", mode = { "n", "i" }, }, From dc6f745dbd9b1b8b4d34324dc2bde4c988510145 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 21:16:48 +0000 Subject: [PATCH 439/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 370fed2557..5942ffaf12 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -79,7 +79,6 @@ opts = { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, - cmdline = {}, }, keymap = { @@ -162,7 +161,6 @@ opts = { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, - cmdline = {}, }, keymap = { @@ -172,6 +170,15 @@ opts = { }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } } config = function(_, opts) + -- HACK: remove when next `blink.cmp` stable release is available + -- and just do `opts.cmdline.sources = {}` directly in `opts` + -- Should be greater than current 0.11.0 + if not vim.g.lazyvim_blink_main then + opts.sources["cmdline"] = {} + else + opts.cmdline = opts.cmdline or {} + opts.cmdline.sources = {} + end -- setup compat sources local enabled = opts.sources.default for _, source in ipairs(opts.sources.compat or {}) do From 839fcb7a3906d7d332cce86439e52c36bf5c4c0a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 22:17:18 +0000 Subject: [PATCH 440/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 5942ffaf12..2eb4307264 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -81,6 +81,10 @@ opts = { default = { "lsp", "path", "snippets", "buffer" }, }, + cmdline = { + sources = {}, + }, + keymap = { preset = "enter", [""] = { "select_and_accept" }, @@ -163,6 +167,10 @@ opts = { default = { "lsp", "path", "snippets", "buffer" }, }, + cmdline = { + sources = {}, + }, + keymap = { preset = "enter", [""] = { "select_and_accept" }, @@ -170,15 +178,6 @@ opts = { }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } } config = function(_, opts) - -- HACK: remove when next `blink.cmp` stable release is available - -- and just do `opts.cmdline.sources = {}` directly in `opts` - -- Should be greater than current 0.11.0 - if not vim.g.lazyvim_blink_main then - opts.sources["cmdline"] = {} - else - opts.cmdline = opts.cmdline or {} - opts.cmdline.sources = {} - end -- setup compat sources local enabled = opts.sources.default for _, source in ipairs(opts.sources.compat or {}) do From fa10e6d73f6541a74afc5307d54b4c671f13eac9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 15 Feb 2025 23:16:38 +0000 Subject: [PATCH 441/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 2eb4307264..8ce3de2703 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -82,6 +82,7 @@ opts = { }, cmdline = { + enabled = false, sources = {}, }, @@ -168,6 +169,7 @@ opts = { }, cmdline = { + enabled = false, sources = {}, }, From 769f6cf638cc7b9b0f296567898f6c02d0590e2e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Feb 2025 07:18:38 +0000 Subject: [PATCH 442/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index 8ce3de2703..aa19f2d76d 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -83,7 +83,6 @@ opts = { cmdline = { enabled = false, - sources = {}, }, keymap = { @@ -170,7 +169,6 @@ opts = { cmdline = { enabled = false, - sources = {}, }, keymap = { From 5516b5a541d1e07fcda2102173970ff8ff35f253 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Feb 2025 08:21:52 +0000 Subject: [PATCH 443/553] chore(build): auto-generate docs --- docs/extras/coding/mini-snippets.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/extras/coding/mini-snippets.md b/docs/extras/coding/mini-snippets.md index 0d4aab1d8c..9209ef4747 100644 --- a/docs/extras/coding/mini-snippets.md +++ b/docs/extras/coding/mini-snippets.md @@ -257,21 +257,25 @@ opts = function(_, opts) end -- Standalone -- + local blink = require("blink.cmp") expand_select_override = function(snippets, insert) -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select - require("blink.cmp").cancel() + blink.cancel() vim.schedule(function() MiniSnippets.default_select(snippets, insert) end) end -- -- Blink performs a require on blink.cmp.sources.snippets.default - -- By removing the source, the default engine will not be used + -- By removing the source, that default engine will not be used opts.sources.default = vim.tbl_filter(function(source) return source ~= "snippets" end, opts.sources.default) opts.snippets = { -- need to repeat blink's preset here - expand = expand_from_lsp, + expand = function(snippet) + expand_from_lsp(snippet) + blink.resubscribe() + end, active = function() return MiniSnippets.session.get(false) ~= nil end, @@ -299,21 +303,25 @@ end end -- Standalone -- + local blink = require("blink.cmp") expand_select_override = function(snippets, insert) -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select - require("blink.cmp").cancel() + blink.cancel() vim.schedule(function() MiniSnippets.default_select(snippets, insert) end) end -- -- Blink performs a require on blink.cmp.sources.snippets.default - -- By removing the source, the default engine will not be used + -- By removing the source, that default engine will not be used opts.sources.default = vim.tbl_filter(function(source) return source ~= "snippets" end, opts.sources.default) opts.snippets = { -- need to repeat blink's preset here - expand = expand_from_lsp, + expand = function(snippet) + expand_from_lsp(snippet) + blink.resubscribe() + end, active = function() return MiniSnippets.session.get(false) ~= nil end, From 7066b9b997bdd68b704f3cacb315e768c44d588b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 16 Feb 2025 12:36:44 +0000 Subject: [PATCH 444/553] chore(build): auto-generate docs --- docs/extras/util/octo.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/extras/util/octo.md b/docs/extras/util/octo.md index 87ac2b4e7d..e9c2660a4d 100644 --- a/docs/extras/util/octo.md +++ b/docs/extras/util/octo.md @@ -95,12 +95,14 @@ opts = { ```lua opts = function(_, opts) vim.treesitter.language.register("markdown", "octo") - if LazyVim.has("telescope.nvim") then + if LazyVim.has_extra("editor.telescope") then opts.picker = "telescope" - elseif LazyVim.has("fzf-lua") then + elseif LazyVim.has_extra("editor.fzf") then opts.picker = "fzf-lua" + elseif LazyVim.has_extra("editor.snacks_picker") then + opts.picker = "snacks" else - LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") + LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`") end -- Keep some empty windows in sessions @@ -129,12 +131,14 @@ end "pwntester/octo.nvim", opts = function(_, opts) vim.treesitter.language.register("markdown", "octo") - if LazyVim.has("telescope.nvim") then + if LazyVim.has_extra("editor.telescope") then opts.picker = "telescope" - elseif LazyVim.has("fzf-lua") then + elseif LazyVim.has_extra("editor.fzf") then opts.picker = "fzf-lua" + elseif LazyVim.has_extra("editor.snacks_picker") then + opts.picker = "snacks" else - LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`") + LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`") end -- Keep some empty windows in sessions From 8249f7c61ba30d9d4c63ded0b843915713474437 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Feb 2025 22:17:58 +0000 Subject: [PATCH 445/553] chore(build): auto-generate docs --- docs/configuration/general.md | 2 +- docs/extras/editor/snacks_picker.md | 1 - docs/keymaps.md | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/configuration/general.md b/docs/configuration/general.md index 7b431a6554..fad5a15210 100644 --- a/docs/configuration/general.md +++ b/docs/configuration/general.md @@ -378,7 +378,7 @@ map("n", "qq", "qa", { desc = "Quit All" }) -- highlights under cursor map("n", "ui", vim.show_pos, { desc = "Inspect Pos" }) -map("n", "uI", "InspectTree", { desc = "Inspect Tree" }) +map("n", "uI", function() vim.treesitter.inspect_tree() vim.api.nvim_input("I") end, { desc = "Inspect Tree" }) -- LazyVim Changelog map("n", "L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" }) diff --git a/docs/extras/editor/snacks_picker.md b/docs/extras/editor/snacks_picker.md index 841e50911a..19de86b1f3 100644 --- a/docs/extras/editor/snacks_picker.md +++ b/docs/extras/editor/snacks_picker.md @@ -110,7 +110,6 @@ opts = { { "fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" }, { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git - { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, { "gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" }, diff --git a/docs/keymaps.md b/docs/keymaps.md index 859f4eb0be..362968e564 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -230,7 +230,6 @@ possible keymaps starting with ``. | <leader>fp | Projects | **n** | | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Git Log | **n** | | <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | | <leader>gS | Git Stash | **n** | @@ -523,7 +522,6 @@ Part of [lazyvim.plugins.extras.editor.snacks_picker](/extras/editor/snacks_pick | <leader>fp | Projects | **n** | | <leader>fr | Recent | **n** | | <leader>fR | Recent (cwd) | **n** | -| <leader>gc | Git Log | **n** | | <leader>gd | Git Diff (hunks) | **n** | | <leader>gs | Git Status | **n** | | <leader>gS | Git Stash | **n** | From e859434cdb5b9bd47d207a60213fe98089c3795a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 21 Feb 2025 14:16:59 +0000 Subject: [PATCH 446/553] chore(build): auto-generate docs --- docs/extras/util/chezmoi.md | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/extras/util/chezmoi.md b/docs/extras/util/chezmoi.md index 03ff171595..56779856e5 100644 --- a/docs/extras/util/chezmoi.md +++ b/docs/extras/util/chezmoi.md @@ -78,6 +78,7 @@ opts = { ```lua { "xvzc/chezmoi.nvim", + cmd = { "ChezmoiEdit" }, keys = { { "sz", @@ -237,4 +238,63 @@ end +## [snacks.nvim](https://github.com/folke/snacks.nvim) _(optional)_ + + + + + +```lua +opts = function(_, opts) + local chezmoi_entry = { + icon = " ", + key = "c", + desc = "Config", + action = pick_chezmoi, + } + local config_index + for i = #opts.dashboard.preset.keys, 1, -1 do + if opts.dashboard.preset.keys[i].key == "c" then + table.remove(opts.dashboard.preset.keys, i) + config_index = i + break + end + end + table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry) +end +``` + + + + + + +```lua +{ + "folke/snacks.nvim", + optional = true, + opts = function(_, opts) + local chezmoi_entry = { + icon = " ", + key = "c", + desc = "Config", + action = pick_chezmoi, + } + local config_index + for i = #opts.dashboard.preset.keys, 1, -1 do + if opts.dashboard.preset.keys[i].key == "c" then + table.remove(opts.dashboard.preset.keys, i) + config_index = i + break + end + end + table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry) + end, +} +``` + + + + + From 336048b7ab5533516b535b3f9cc72756f2536827 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 22 Feb 2025 07:16:12 +0000 Subject: [PATCH 447/553] chore(build): auto-generate docs --- docs/extras/coding/blink.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/extras/coding/blink.md b/docs/extras/coding/blink.md index aa19f2d76d..e454846ca0 100644 --- a/docs/extras/coding/blink.md +++ b/docs/extras/coding/blink.md @@ -229,6 +229,7 @@ opts = { items = transform_items and transform_items(ctx, items) or items for _, item in ipairs(items) do item.kind = kind_idx or item.kind + item.kind_icon = LazyVim.config.icons.kinds[item.kind_name] or item.kind_icon or nil end return items end From eac44cd13239c68d2e6efa498b44447f4aff2dab Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Mar 2025 15:19:16 +0000 Subject: [PATCH 448/553] chore(build): auto-generate docs --- docs/extras/ai/copilot-chat.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/extras/ai/copilot-chat.md b/docs/extras/ai/copilot-chat.md index aaab9fb7b8..08f795a644 100644 --- a/docs/extras/ai/copilot-chat.md +++ b/docs/extras/ai/copilot-chat.md @@ -82,16 +82,25 @@ end { "aq", function() - local input = vim.fn.input("Quick Chat: ") - if input ~= "" then - require("CopilotChat").ask(input) - end + vim.ui.input({ + prompt = "Quick Chat: ", + }, function(input) + if input ~= "" then + require("CopilotChat").ask(input) + end + end) end, desc = "Quick Chat (CopilotChat)", mode = { "n", "v" }, }, - -- Show prompts actions with telescope - { "ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } }, + { + "ap", + function() + require("CopilotChat").select_prompt() + end, + desc = "Prompt Actions (CopilotChat)", + mode = { "n", "v" }, + }, }, config = function(_, opts) local chat = require("CopilotChat") From 485d853b1e52533c4e360d036f2d27f7c0dc06e1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 27 Mar 2025 01:40:16 +0000 Subject: [PATCH 449/553] 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 362968e564..ae631f58c0 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -107,8 +107,6 @@ possible keymaps starting with ``. | <leader><tab>] | Next Tab | **n** | | <leader><tab>d | Close Tab | **n** | | <leader><tab>[ | Previous Tab | **n** | -| <Tab> | Jump Next | **s** | -| <S-Tab> | Jump Previous | **i**, **s** | ## LSP From 5cc96146d96bb61ad915088bc3eec4151643cd6f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 12 May 2025 09:24:59 +0000 Subject: [PATCH 450/553] chore(build): auto-generate docs --- docs/extras/formatting/biome.md | 4 +- docs/extras/formatting/black.md | 4 +- docs/extras/formatting/prettier.md | 4 +- docs/extras/lang/ansible.md | 4 +- docs/extras/lang/clangd.md | 6 +-- docs/extras/lang/cmake.md | 2 +- docs/extras/lang/docker.md | 2 +- docs/extras/lang/elm.md | 4 +- docs/extras/lang/go.md | 16 ++++---- docs/extras/lang/haskell.md | 10 ++--- docs/extras/lang/java.md | 6 +-- docs/extras/lang/kotlin.md | 8 ++-- docs/extras/lang/markdown.md | 4 +- docs/extras/lang/omnisharp.md | 4 +- docs/extras/lang/php.md | 4 +- docs/extras/lang/ruby.md | 4 +- docs/extras/lang/rust.md | 4 +- docs/extras/lang/sql.md | 4 +- docs/extras/lang/terraform.md | 4 +- docs/extras/lang/typescript.md | 6 +-- docs/extras/lsp/none-ls.md | 2 +- docs/extras/util/dot.md | 4 +- docs/extras/util/gitui.md | 4 +- docs/keymaps.md | 4 +- docs/plugins/formatting.md | 2 +- docs/plugins/lsp.md | 63 ++++++++++++++++++++++++++---- 26 files changed, 116 insertions(+), 67 deletions(-) diff --git a/docs/extras/formatting/biome.md b/docs/extras/formatting/biome.md index 4cafb2b34a..7779155c9a 100644 --- a/docs/extras/formatting/biome.md +++ b/docs/extras/formatting/biome.md @@ -26,7 +26,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -43,7 +43,7 @@ opts = { ensure_installed = { "biome" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "biome" } }, } ``` diff --git a/docs/extras/formatting/black.md b/docs/extras/formatting/black.md index fcdb98bdd9..cee7a9e135 100644 --- a/docs/extras/formatting/black.md +++ b/docs/extras/formatting/black.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -36,7 +36,7 @@ end ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = function(_, opts) table.insert(opts.ensure_installed, "black") end, diff --git a/docs/extras/formatting/prettier.md b/docs/extras/formatting/prettier.md index cc5d67f52b..b9f931d023 100644 --- a/docs/extras/formatting/prettier.md +++ b/docs/extras/formatting/prettier.md @@ -27,7 +27,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -44,7 +44,7 @@ opts = { ensure_installed = { "prettier" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "prettier" } }, } ``` diff --git a/docs/extras/lang/ansible.md b/docs/extras/lang/ansible.md index 945ee62eb1..f1aaab7d1d 100644 --- a/docs/extras/lang/ansible.md +++ b/docs/extras/lang/ansible.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -34,7 +34,7 @@ opts = { ensure_installed = { "ansible-lint" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "ansible-lint" } }, } ``` diff --git a/docs/extras/lang/clangd.md b/docs/extras/lang/clangd.md index 2080b76d57..71bbaa8579 100644 --- a/docs/extras/lang/clangd.md +++ b/docs/extras/lang/clangd.md @@ -335,7 +335,7 @@ end optional = true, dependencies = { -- Ensure C/C++ debugger is installed - "williamboman/mason.nvim", + "mason-org/mason.nvim", optional = true, opts = { ensure_installed = { "codelldb" } }, }, @@ -383,7 +383,7 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ +## [mason.nvim](https://github.com/mason-org/mason.nvim) _(optional)_ @@ -401,7 +401,7 @@ opts = { ensure_installed = { "codelldb" } } ```lua { -- Ensure C/C++ debugger is installed - "williamboman/mason.nvim", + "mason-org/mason.nvim", optional = true, opts = { ensure_installed = { "codelldb" } }, } diff --git a/docs/extras/lang/cmake.md b/docs/extras/lang/cmake.md index a89528270b..5afda47776 100644 --- a/docs/extras/lang/cmake.md +++ b/docs/extras/lang/cmake.md @@ -43,7 +43,7 @@ opts = { ensure_installed = { "cmake" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) diff --git a/docs/extras/lang/docker.md b/docs/extras/lang/docker.md index bf90b23b18..edf1590581 100644 --- a/docs/extras/lang/docker.md +++ b/docs/extras/lang/docker.md @@ -43,7 +43,7 @@ opts = { ensure_installed = { "dockerfile" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) diff --git a/docs/extras/lang/elm.md b/docs/extras/lang/elm.md index 10982c7dc4..938920e05a 100644 --- a/docs/extras/lang/elm.md +++ b/docs/extras/lang/elm.md @@ -43,7 +43,7 @@ opts = { ensure_installed = { "elm" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -60,7 +60,7 @@ opts = { ensure_installed = { "elm-format" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "elm-format" } }, } ``` diff --git a/docs/extras/lang/go.md b/docs/extras/lang/go.md index 52ed2ef1d2..ed6cebc295 100644 --- a/docs/extras/lang/go.md +++ b/docs/extras/lang/go.md @@ -189,7 +189,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) Ensure Go tools are installed @@ -209,7 +209,7 @@ opts = { ensure_installed = { "goimports", "gofumpt" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "goimports", "gofumpt" } }, } ``` @@ -218,7 +218,7 @@ opts = { ensure_installed = { "goimports", "gofumpt" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -235,7 +235,7 @@ opts = { ensure_installed = { "gomodifytags", "impl" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "gomodifytags", "impl" } }, } ``` @@ -244,7 +244,7 @@ opts = { ensure_installed = { "gomodifytags", "impl" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -261,7 +261,7 @@ opts = { ensure_installed = { "delve" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "delve" } }, } ``` @@ -393,7 +393,7 @@ end optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "gomodifytags", "impl" } }, }, }, @@ -469,7 +469,7 @@ opts = nil optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "delve" } }, }, { diff --git a/docs/extras/lang/haskell.md b/docs/extras/lang/haskell.md index 189ef749ac..277062b2d7 100644 --- a/docs/extras/lang/haskell.md +++ b/docs/extras/lang/haskell.md @@ -82,7 +82,7 @@ opts = {} -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -99,7 +99,7 @@ opts = { ensure_installed = { "haskell-language-server" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "haskell-language-server" } }, } ``` @@ -108,7 +108,7 @@ opts = { ensure_installed = { "haskell-language-server" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -125,7 +125,7 @@ opts = { ensure_installed = { "haskell-debug-adapter" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "haskell-debug-adapter" } }, } ``` @@ -355,7 +355,7 @@ opts = nil optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "haskell-debug-adapter" } }, }, }, diff --git a/docs/extras/lang/java.md b/docs/extras/lang/java.md index 0d88c559d8..46d273559f 100644 --- a/docs/extras/lang/java.md +++ b/docs/extras/lang/java.md @@ -46,7 +46,7 @@ opts = { ensure_installed = { "java" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -63,7 +63,7 @@ opts = { ensure_installed = { "java-debug-adapter", "java-test" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, } ``` @@ -496,7 +496,7 @@ end end, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, }, }, diff --git a/docs/extras/lang/kotlin.md b/docs/extras/lang/kotlin.md index a82eeb8321..a926807297 100644 --- a/docs/extras/lang/kotlin.md +++ b/docs/extras/lang/kotlin.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) Add packages(linting, debug adapter) @@ -37,7 +37,7 @@ opts = { ensure_installed = { "ktlint" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "ktlint" } }, } ``` @@ -136,7 +136,7 @@ opts = { { "mfussenegger/nvim-lint", optional = true, - dependencies = "williamboman/mason.nvim", + dependencies = "mason-org/mason.nvim", opts = { linters_by_ft = { kotlin = { "ktlint" } }, }, @@ -288,7 +288,7 @@ end { "mfussenegger/nvim-dap", optional = true, - dependencies = "williamboman/mason.nvim", + dependencies = "mason-org/mason.nvim", opts = function() local dap = require("dap") if not dap.adapters.kotlin then diff --git a/docs/extras/lang/markdown.md b/docs/extras/lang/markdown.md index d031ae6dcc..18e76211f9 100644 --- a/docs/extras/lang/markdown.md +++ b/docs/extras/lang/markdown.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -34,7 +34,7 @@ opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } }, } ``` diff --git a/docs/extras/lang/omnisharp.md b/docs/extras/lang/omnisharp.md index 879d96f473..a136c3de28 100644 --- a/docs/extras/lang/omnisharp.md +++ b/docs/extras/lang/omnisharp.md @@ -66,7 +66,7 @@ opts = { ensure_installed = { "c_sharp" } } -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -83,7 +83,7 @@ opts = { ensure_installed = { "csharpier", "netcoredbg" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "csharpier", "netcoredbg" } }, } ``` diff --git a/docs/extras/lang/php.md b/docs/extras/lang/php.md index 08c0650c1b..cf776ee750 100644 --- a/docs/extras/lang/php.md +++ b/docs/extras/lang/php.md @@ -103,7 +103,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -125,7 +125,7 @@ opts = { ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "phpcs", diff --git a/docs/extras/lang/ruby.md b/docs/extras/lang/ruby.md index f67b981de2..89e3b56022 100644 --- a/docs/extras/lang/ruby.md +++ b/docs/extras/lang/ruby.md @@ -119,7 +119,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -136,7 +136,7 @@ opts = { ensure_installed = { "erb-formatter", "erb-lint" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "erb-formatter", "erb-lint" } }, } ``` diff --git a/docs/extras/lang/rust.md b/docs/extras/lang/rust.md index 7c76ca494b..b41afadb46 100644 --- a/docs/extras/lang/rust.md +++ b/docs/extras/lang/rust.md @@ -304,7 +304,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) _(optional)_ +## [mason.nvim](https://github.com/mason-org/mason.nvim) _(optional)_ Ensure Rust debugger is installed @@ -330,7 +330,7 @@ end ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", optional = true, opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} diff --git a/docs/extras/lang/sql.md b/docs/extras/lang/sql.md index 5719e54d68..1e7b7f71a9 100644 --- a/docs/extras/lang/sql.md +++ b/docs/extras/lang/sql.md @@ -195,7 +195,7 @@ opts = nil -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) Linters & formatters @@ -215,7 +215,7 @@ opts = { ensure_installed = { "sqlfluff" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "sqlfluff" } }, } ``` diff --git a/docs/extras/lang/terraform.md b/docs/extras/lang/terraform.md index 3a605b5a43..b7db716f7e 100644 --- a/docs/extras/lang/terraform.md +++ b/docs/extras/lang/terraform.md @@ -77,7 +77,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) ensure terraform tools are installed @@ -97,7 +97,7 @@ opts = { ensure_installed = { "tflint" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "tflint" } }, } ``` diff --git a/docs/extras/lang/typescript.md b/docs/extras/lang/typescript.md index bff51eefdf..ed1e86a7c1 100644 --- a/docs/extras/lang/typescript.md +++ b/docs/extras/lang/typescript.md @@ -386,7 +386,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -406,7 +406,7 @@ end ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} table.insert(opts.ensure_installed, "js-debug-adapter") @@ -549,7 +549,7 @@ end optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} table.insert(opts.ensure_installed, "js-debug-adapter") diff --git a/docs/extras/lsp/none-ls.md b/docs/extras/lsp/none-ls.md index d5a87ae9d6..ddb5f4f81c 100644 --- a/docs/extras/lsp/none-ls.md +++ b/docs/extras/lsp/none-ls.md @@ -92,7 +92,7 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) diff --git a/docs/extras/util/dot.md b/docs/extras/util/dot.md index 411d5449e1..f58d86c62d 100644 --- a/docs/extras/util/dot.md +++ b/docs/extras/util/dot.md @@ -51,7 +51,7 @@ opts = { -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -68,7 +68,7 @@ opts = { ensure_installed = { "shellcheck" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "shellcheck" } }, } ``` diff --git a/docs/extras/util/gitui.md b/docs/extras/util/gitui.md index 31e525e0d1..b258db9cf5 100644 --- a/docs/extras/util/gitui.md +++ b/docs/extras/util/gitui.md @@ -17,7 +17,7 @@ They are only shown here for reference. import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) Ensure GitUI tool is installed @@ -37,7 +37,7 @@ opts = { ensure_installed = { "gitui" } } ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "gitui" } }, keys = { { diff --git a/docs/keymaps.md b/docs/keymaps.md index ae631f58c0..856383e340 100644 --- a/docs/keymaps.md +++ b/docs/keymaps.md @@ -169,7 +169,7 @@ possible keymaps starting with ``. | --- | --- | --- | | <leader>sr | Search and Replace | **n**, **v** | -## [mason.nvim](https://github.com/williamboman/mason.nvim.git) +## [mason.nvim](https://github.com/mason-org/mason.nvim.git) | Key | Description | Mode | | --- | --- | --- | @@ -633,7 +633,7 @@ Part of [lazyvim.plugins.extras.util.chezmoi](/extras/util/chezmoi) | --- | --- | --- | | <leader>sz | Chezmoi | **n** | -## [mason.nvim](https://github.com/williamboman/mason.nvim.git) +## [mason.nvim](https://github.com/mason-org/mason.nvim.git) Part of [lazyvim.plugins.extras.util.gitui](/extras/util/gitui) | Key | Description | Mode | diff --git a/docs/plugins/formatting.md b/docs/plugins/formatting.md index db151eeb05..928917c4f5 100644 --- a/docs/plugins/formatting.md +++ b/docs/plugins/formatting.md @@ -161,7 +161,7 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) diff --git a/docs/plugins/lsp.md b/docs/plugins/lsp.md index 8bf86454e2..b0a1c1544d 100644 --- a/docs/plugins/lsp.md +++ b/docs/plugins/lsp.md @@ -155,7 +155,7 @@ end event = "LazyFile", dependencies = { "mason.nvim", - { "williamboman/mason-lspconfig.nvim", config = function() end }, + { "mason-org/mason-lspconfig.nvim", config = function() end }, }, opts = function() ---@class PluginLspOpts @@ -409,7 +409,7 @@ end -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) @@ -427,7 +427,7 @@ opts = nil ```lua { "mason.nvim", - { "williamboman/mason-lspconfig.nvim", config = function() end }, + { "mason-org/mason-lspconfig.nvim", config = function() end }, } ``` @@ -435,7 +435,7 @@ opts = nil -## [mason-lspconfig.nvim](https://github.com/williamboman/mason-lspconfig.nvim) +## [mason-lspconfig.nvim](https://github.com/mason-org/mason-lspconfig.nvim) @@ -451,14 +451,14 @@ opts = {} ```lua -{ "williamboman/mason-lspconfig.nvim", config = function() end } +{ "mason-org/mason-lspconfig.nvim", config = function() end } ``` -## [mason.nvim](https://github.com/williamboman/mason.nvim) +## [mason.nvim](https://github.com/mason-org/mason.nvim) cmdline tools and lsp servers @@ -484,7 +484,7 @@ opts = { ```lua { - "williamboman/mason.nvim", + "mason-org/mason.nvim", cmd = "Mason", keys = { { "cm", "Mason", desc = "Mason" } }, build = ":MasonUpdate", @@ -525,4 +525,53 @@ 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" } +``` + + + + + From 027c3e7a78838a9db23124fb642783fc6466df64 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 15 Sep 2025 05:20:51 +0000 Subject: [PATCH 451/553] 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 452/553] 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 453/553] 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 454/553] 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 455/553] 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 456/553] 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 457/553] 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 458/553] 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 459/553] 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 460/553] 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 461/553] 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 462/553] 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 463/553] 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 464/553] 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 465/553] 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 466/553] 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 467/553] 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 468/553] 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 469/553] 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 470/553] 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 471/553] 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 472/553] 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 473/553] 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 474/553] 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 475/553] 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 476/553] 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 477/553] 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 478/553] 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 479/553] 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 480/553] 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 481/553] 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 482/553] 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 483/553] 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 484/553] 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 485/553] 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 486/553] 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 487/553] 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 488/553] 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 489/553] 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 490/553] 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 491/553] 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 492/553] 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 493/553] 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 494/553] 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 495/553] 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 496/553] 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 497/553] 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 498/553] 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 499/553] 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 500/553] 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 501/553] 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 502/553] 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 503/553] 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 504/553] 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 505/553] 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 506/553] 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 507/553] 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 508/553] 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 509/553] 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 510/553] 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 511/553] 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 512/553] 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 513/553] 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 514/553] 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 515/553] 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 516/553] 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 517/553] 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 518/553] 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 519/553] 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 520/553] 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 521/553] 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 522/553] 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 523/553] 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 524/553] 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 525/553] 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 526/553] 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 527/553] 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 528/553] 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 529/553] 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 530/553] 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 531/553] 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 532/553] 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 533/553] 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 534/553] 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 535/553] 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 536/553] 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 537/553] 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 538/553] 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 539/553] 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 540/553] 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 541/553] 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 542/553] 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 543/553] 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 544/553] 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 545/553] 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 546/553] 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 547/553] 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 548/553] 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 549/553] 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 550/553] 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 551/553] 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 552/553] 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 553/553] 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** |