From 220148f47f175229232eee31982577fbdd637663 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 9 Nov 2024 15:49:39 +0100 Subject: [PATCH 001/496] fix(snacks): noice now honors `Snacks.config.notifier.enabled = false` --- lua/lazyvim/plugins/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index ad646b8e..5d305a75 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -31,7 +31,6 @@ return { ---@type snacks.Config return { toggle = { map = LazyVim.safe_keymap_set }, - notifier = { enabled = not LazyVim.has("noice.nvim") }, terminal = { win = { keys = { From 5b66db294f8dbeccbd76571ba69ef35d1a0a0b6f Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 9 Nov 2024 14:50:33 +0000 Subject: [PATCH 002/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ec46d7d2..b7e4dd5d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 08 +*LazyVim.txt* For Neovim Last change: 2024 November 09 ============================================================================== Table of Contents *LazyVim-table-of-contents* From f57944f926176a9782c5e3f2804bec0132195d77 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:51:45 +0100 Subject: [PATCH 003/496] chore(main): release 13.1.0 (#4733) :robot: I have created a release *beep* *boop* --- ## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09) ### Features * **terraform:** add formatter for packer files ([#4591](https://github.com/LazyVim/LazyVim/issues/4591)) ([4876d11](https://github.com/LazyVim/LazyVim/commit/4876d1137d374af6f39661e402926220517ae4ab)) ### Bug Fixes * **extras:** lazy-load telescope-terraform plugins ([#4667](https://github.com/LazyVim/LazyVim/issues/4667)) ([94b4219](https://github.com/LazyVim/LazyVim/commit/94b42193272569f8005587069733f3ba0610bc9b)) * **options:** make sure spelling works in regular text files ([548fddd](https://github.com/LazyVim/LazyVim/commit/548fddd1d5db65a80b11500e32cfe86e69bc8777)) * **snacks:** noice now honors `Snacks.config.notifier.enabled = false` ([220148f](https://github.com/LazyVim/LazyVim/commit/220148f47f175229232eee31982577fbdd637663)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 2af89238..f045d1cc 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.0.0" + ".": "13.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index ca9ffc6c..9a33475c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09) + + +### Features + +* **terraform:** add formatter for packer files ([#4591](https://github.com/LazyVim/LazyVim/issues/4591)) ([4876d11](https://github.com/LazyVim/LazyVim/commit/4876d1137d374af6f39661e402926220517ae4ab)) + + +### Bug Fixes + +* **extras:** lazy-load telescope-terraform plugins ([#4667](https://github.com/LazyVim/LazyVim/issues/4667)) ([94b4219](https://github.com/LazyVim/LazyVim/commit/94b42193272569f8005587069733f3ba0610bc9b)) +* **options:** make sure spelling works in regular text files ([548fddd](https://github.com/LazyVim/LazyVim/commit/548fddd1d5db65a80b11500e32cfe86e69bc8777)) +* **snacks:** noice now honors `Snacks.config.notifier.enabled = false` ([220148f](https://github.com/LazyVim/LazyVim/commit/220148f47f175229232eee31982577fbdd637663)) + ## [13.0.0](https://github.com/LazyVim/LazyVim/compare/v12.44.1...v13.0.0) (2024-11-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index af389ff6..e48837de 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.0.0" -- x-release-please-version +M.version = "13.1.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 9c9e650530dcd211afd5a8b7f5e3e33e44abd11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Sim=C3=B5es?= Date: Sat, 9 Nov 2024 09:57:48 -0500 Subject: [PATCH 004/496] fix(extras): fix alpha-nvim non-string keycodes (#4735) ## Description The `dashboard.button` function provided by alpha-nvim expects a string keybind, not a function: https://github.com/goolord/alpha-nvim/blob/main/lua/alpha/themes/dashboard.lua#L63 ## Related Issue(s) Fixes https://github.com/LazyVim/LazyVim/issues/3728. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ui/alpha.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/alpha.lua b/lua/lazyvim/plugins/extras/ui/alpha.lua index 1898bd08..33f79ba9 100644 --- a/lua/lazyvim/plugins/extras/ui/alpha.lua +++ b/lua/lazyvim/plugins/extras/ui/alpha.lua @@ -23,11 +23,11 @@ return { 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 "), From 24665fc73651970e5a1e20a63d6031bd99b97637 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 9 Nov 2024 16:13:11 +0100 Subject: [PATCH 005/496] feat(keymaps): leader-bo to close other buffers --- lua/lazyvim/config/keymaps.lua | 3 +++ lua/lazyvim/plugins/ui.lua | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c4160bef..e12ff3f7 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -40,6 +40,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/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 136c372b..0361826e 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -7,7 +7,6 @@ return { 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 b9dae579612ccf1cd749150ff1603ff6dffc2610 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 9 Nov 2024 23:33:05 +0100 Subject: [PATCH 006/496] perf(ui): only enable treesitter folds if the buffer has treesitter highlighting --- lua/lazyvim/util/ui.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 14d0850f..267137dc 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -53,6 +53,11 @@ local skip_check = assert(vim.uv.new_check()) function M.foldexpr() local buf = vim.api.nvim_get_current_buf() + -- no highlight, no foldexpr + if not vim.b[buf].ts_highlight then + return "0" + end + -- still in the same tick and no parser if M.skip_foldexpr[buf] then return "0" From 309d1894484777b66845c26d45ccb1b59e8e68c3 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 10 Nov 2024 07:19:09 +0000 Subject: [PATCH 007/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b7e4dd5d..f1f430a7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 09 +*LazyVim.txt* For Neovim Last change: 2024 November 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 86904d2fb1ef406386b2dad43f42756e09b28182 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 10 Nov 2024 11:27:21 +0100 Subject: [PATCH 008/496] feat(ai): move ai related extras from `coding` to `ai` (#4751) ## Description ## Related Issue(s) ## Screenshots ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/init.lua | 2 +- lua/lazyvim/plugins/extras/{coding => ai}/codeium.lua | 0 lua/lazyvim/plugins/extras/{coding => ai}/copilot-chat.lua | 0 lua/lazyvim/plugins/extras/{coding => ai}/copilot.lua | 0 lua/lazyvim/plugins/extras/{coding => ai}/tabnine.lua | 0 lua/lazyvim/util/json.lua | 7 +++++++ 6 files changed, 8 insertions(+), 1 deletion(-) rename lua/lazyvim/plugins/extras/{coding => ai}/codeium.lua (100%) rename lua/lazyvim/plugins/extras/{coding => ai}/copilot-chat.lua (100%) rename lua/lazyvim/plugins/extras/{coding => ai}/copilot.lua (100%) rename lua/lazyvim/plugins/extras/{coding => ai}/tabnine.lua (100%) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e48837de..5c148a92 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -135,7 +135,7 @@ local defaults = { } M.json = { - version = 6, + version = 7, path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json", data = { version = nil, ---@type string? diff --git a/lua/lazyvim/plugins/extras/coding/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua similarity index 100% rename from lua/lazyvim/plugins/extras/coding/codeium.lua rename to lua/lazyvim/plugins/extras/ai/codeium.lua diff --git a/lua/lazyvim/plugins/extras/coding/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua similarity index 100% rename from lua/lazyvim/plugins/extras/coding/copilot-chat.lua rename to lua/lazyvim/plugins/extras/ai/copilot-chat.lua diff --git a/lua/lazyvim/plugins/extras/coding/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua similarity index 100% rename from lua/lazyvim/plugins/extras/coding/copilot.lua rename to lua/lazyvim/plugins/extras/ai/copilot.lua diff --git a/lua/lazyvim/plugins/extras/coding/tabnine.lua b/lua/lazyvim/plugins/extras/ai/tabnine.lua similarity index 100% rename from lua/lazyvim/plugins/extras/coding/tabnine.lua rename to lua/lazyvim/plugins/extras/ai/tabnine.lua diff --git a/lua/lazyvim/util/json.lua b/lua/lazyvim/util/json.lua index a823606a..f3ca7fcf 100644 --- a/lua/lazyvim/util/json.lua +++ b/lua/lazyvim/util/json.lua @@ -90,6 +90,13 @@ function M.migrate() json.data.extras = vim.tbl_filter(function(extra) return not (extra == "lazyvim.plugins.extras.editor.trouble-v3") end, json.data.extras or {}) + elseif json.data.version == 6 then + local ai = { "copilot", "codeium", "copilot-chat", "tabnine" } + json.data.extras = vim.tbl_map(function(extra) + return extra:gsub("^lazyvim%.plugins%.extras%.coding%.(.*)$", function(name) + return vim.tbl_contains(ai, name) and ("lazyvim.plugins.extras.ai." .. name) or extra + end) + end, json.data.extras or {}) end M.save() From 17a1b846f08db62e3a93c76426db4017ad3cc2eb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 11 Nov 2024 09:37:47 +0100 Subject: [PATCH 009/496] fix(snacks): allow overriding `statuscolumn` through `options.lua` --- lua/lazyvim/config/options.lua | 1 + lua/lazyvim/plugins/init.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 726f869d..bfd77056 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -85,6 +85,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/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 5d305a75..c0e27c14 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -31,6 +31,7 @@ return { ---@type snacks.Config return { toggle = { map = LazyVim.safe_keymap_set }, + statuscolumn = { enabled = false }, -- we set this in options.lua terminal = { win = { keys = { From dcab30f2426a34c3612bc12b2170c508eaa770ef Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 11 Nov 2024 08:38:55 +0000 Subject: [PATCH 010/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f1f430a7..f0ae8f04 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 10 +*LazyVim.txt* For Neovim Last change: 2024 November 11 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 06071dd452baf1e9b8b5aab140553c4f51fa522e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 11 Nov 2024 09:41:43 +0100 Subject: [PATCH 011/496] fix(vscode): added snacks.nvim to allowed plugins for vscode. Fixes #4757 --- lua/lazyvim/plugins/extras/vscode.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index a272d2ce..e941d91c 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -3,6 +3,7 @@ if not vim.g.vscode then end local enabled = { + "LazyVim", "dial.nvim", "flit.nvim", "lazy.nvim", @@ -15,10 +16,10 @@ local enabled = { "nvim-treesitter", "nvim-treesitter-textobjects", "nvim-ts-context-commentstring", + "snacks.nvim", "ts-comments.nvim", "vim-repeat", "yanky.nvim", - "LazyVim", } local Config = require("lazy.core.config") From c22db724351bc7a05c56046c48d23a2be8efe71b Mon Sep 17 00:00:00 2001 From: cbosvik <132846580+cbosvik@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:44:11 +0100 Subject: [PATCH 012/496] feat(rest): add more keymaps to util.rest (#4467) ## Description Add keymaps util.rest extra ## Related Issue(s) n/a ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: janbua Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/util/rest.lua | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/rest.lua b/lua/lazyvim/plugins/extras/util/rest.lua index a8e12154..9f2e6d67 100644 --- a/lua/lazyvim/plugins/extras/util/rest.lua +++ b/lua/lazyvim/plugins/extras/util/rest.lua @@ -9,10 +9,23 @@ return { ft = "http", keys = { { "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" }, + { "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" }, }, opts = {}, }, From fbf881f80b8f0fb2d9e4bc69d04f66323b25c4b9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 11 Nov 2024 10:50:57 +0100 Subject: [PATCH 013/496] feat(ai): better completion/suggestions of AI engines (#4752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description The whole completion / snippets / AI is very tricky: - multiple snippet engines - native snippets on > 0.11 set their own keymaps, but not on 0.10 - multiple completion engines, like `nvim-cmp` and `blink.cmp` - multiple ai completion engines that have a different API - user's preference of showing ai suggestions as completion or not - none of the ai completion engines currently set undo points, which is bad Solution: - [x] added `LazyVim.cmp.actions`, where snippet engines and ai engines can register their action. - [x] an action returns `true` if it succeeded, or `false|nil` otherwise - [x] in a completion engine, we then try running multiple actions and use the fallback if needed - [x] so `` runs `{"snippet_forward", "ai_accept", "fallback"}` - [x] added `vim.g.ai_cmp`. When `true` we try to integrate the AI source in the completion engine. - [x] when `false`, `` should be used to insert the AI suggestion - [x] when `false`, the completion engine's ghost text is disabled - [x] luasnip support for blink (only works with blink `main`) - [x] create undo points when accepting AI suggestions ## Test Matrix | completion | snippets | ai | ai_cmp | tested? | |--------------|--------------|-------------|--------|---------| | nvim-cmp | native | copilot | true | ✅ | | nvim-cmp | native | copilot | false | ✅ | | nvim-cmp | native | codeium | true | ✅ | | nvim-cmp | native | codeium | false | ✅ | | nvim-cmp | luasnip | copilot | true | ✅ | | nvim-cmp | luasnip | copilot | false | ✅ | | nvim-cmp | luasnip | codeium | true | ✅ | | nvim-cmp | luasnip | codeium | false | ✅ | | blink.cmp | native | copilot | true | ✅ | | blink.cmp | native | copilot | false | ✅ | | blink.cmp | native | codeium | true | ✅ | | blink.cmp | native | codeium | false | ✅ | | blink.cmp | luasnip | copilot | true | ✅ | | blink.cmp | luasnip | copilot | false | ✅ | | blink.cmp | luasnip | codeium | true | ✅ | | blink.cmp | luasnip | codeium | false | ✅ | ## Related Issue(s) - [ ] Closes #4702 ## Screenshots ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 10 ++ lua/lazyvim/config/options.lua | 4 + lua/lazyvim/plugins/coding.lua | 19 +--- lua/lazyvim/plugins/extras/ai/codeium.lua | 58 ++++++++-- lua/lazyvim/plugins/extras/ai/copilot.lua | 103 +++++++++--------- lua/lazyvim/plugins/extras/coding/blink.lua | 40 ++++++- lua/lazyvim/plugins/extras/coding/luasnip.lua | 63 +++++++---- lua/lazyvim/util/cmp.lua | 30 +++++ lua/lazyvim/util/lualine.lua | 2 +- 9 files changed, 230 insertions(+), 99 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index e12ff3f7..5a9fbc80 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -180,3 +180,13 @@ map("n", "", "tabnew", { desc = "New Tab" }) 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/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index bfd77056..bc504675 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -11,6 +11,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` diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 8f1d7968..5b2901e3 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -43,6 +43,9 @@ return { cmp.abort() fallback() end, + [""] = function(fallback) + return LazyVim.cmp.map({ "snippet_forward", "ai_accept" }, fallback)() + end, }), sources = cmp.config.sources({ { name = "nvim_lsp" }, @@ -72,9 +75,10 @@ return { 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, } @@ -105,17 +109,6 @@ return { 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, }, -- auto pairs diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index b95ad433..6d2646a1 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -1,18 +1,42 @@ return { + -- codeium + { + "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 = "", + }, + }, + }, + }, + + -- add ai_accept action + { + "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 cmp source { "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", @@ -30,4 +54,18 @@ return { table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("codeium")) end, }, + + { + "saghen/blink.cmp", + optional = true, + 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/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 22ba0c64..69429e33 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -5,8 +5,17 @@ return { "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, @@ -14,6 +23,22 @@ return { }, }, }, + + -- add ai_accept action + { + "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, + }, + + -- lualine { "nvim-lualine/lualine.nvim", optional = true, @@ -55,70 +80,50 @@ return { -- copilot cmp source { "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, - }, - }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, - }, - - { - "saghen/blink.cmp", - optional = true, - specs = { - { - "zbirenbaum/copilot.lua", - event = "InsertEnter", - opts = { - suggestion = { - enabled = true, - auto_trigger = true, - keymap = { accept = false }, + specs = { + { + "nvim-cmp", + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) + end, }, }, }, }, + }, + + -- blink.cmp + { + "saghen/blink.cmp", + optional = true, 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 } }, + }, + specs = { + -- blink has no copilot source, so force enable suggestions + { + "zbirenbaum/copilot.lua", + opts = { suggestion = { enabled = true } }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index eb5d5471..9542db8d 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -1,3 +1,10 @@ +if lazyvim_docs then + -- 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 +end + return { { "hrsh7th/nvim-cmp", @@ -5,8 +12,12 @@ return { }, { "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 @@ -35,7 +46,7 @@ return { auto_show = true, }, ghost_text = { - enabled = true, + enabled = vim.g.ai_cmp, }, }, @@ -45,6 +56,9 @@ return { -- 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" }, @@ -53,8 +67,28 @@ return { 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, }, -- add icons diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 47bd80c4..178cdd0a 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -1,4 +1,8 @@ return { + -- disable builtin snippet support + { "garymjr/nvim-snippets", enabled = false }, + + -- add luasnip { "L3MON4D3/LuaSnip", lazy = true, @@ -12,43 +16,56 @@ return { 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", }, }, + + -- add snippet_forward action + { + "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, + }, + + -- nvim-cmp integration { "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" } }, }, }, + + -- blink.cmp integration { - "garymjr/nvim-snippets", - enabled = false, + "saghen/blink.cmp", + optional = true, + opts = { + accept = { + expand_snippet = function(...) + return require("luasnip").lsp_expand(...) + end, + }, + }, }, } diff --git a/lua/lazyvim/util/cmp.lua b/lua/lazyvim/util/cmp.lua index 5eff81fa..ebe0209b 100644 --- a/lua/lazyvim/util/cmp.lua +++ b/lua/lazyvim/util/cmp.lua @@ -1,6 +1,36 @@ ---@class lazyvim.util.cmp local M = {} +---@alias lazyvim.util.cmp.Action fun():boolean? +---@type table +M.actions = { + -- Native Snippets + snippet_forward = function() + if vim.snippet.active({ direction = 1 }) then + vim.schedule(function() + vim.snippet.jump(1) + end) + return true + end + end, +} + +---@param actions string[] +---@param fallback? string|fun() +function M.map(actions, fallback) + return function() + for _, name in ipairs(actions) do + if M.actions[name] then + local ret = M.actions[name]() + if ret then + return true + end + end + end + return type(fallback) == "function" and fallback() or fallback + end +end + ---@alias Placeholder {n:number, text:string} ---@param snippet string diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index db8311c4..5df789fa 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -7,7 +7,7 @@ function M.cmp_source(name, icon) if not package.loaded["cmp"] then return end - for _, s in ipairs(require("cmp").core.sources) do + for _, s in ipairs(require("cmp").core.sources or {}) do if s.name == name then if s.source:is_available() then started = true From 0137a110c14e1d72b59dbb82ba804b568cdc5b18 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:09:35 +0100 Subject: [PATCH 014/496] chore(main): release 13.2.0 (#4745) :robot: I have created a release *beep* *boop* --- ## [13.2.0](https://github.com/LazyVim/LazyVim/compare/v13.1.0...v13.2.0) (2024-11-11) ### Features * **ai:** better completion/suggestions of AI engines ([#4752](https://github.com/LazyVim/LazyVim/issues/4752)) ([fbf881f](https://github.com/LazyVim/LazyVim/commit/fbf881f80b8f0fb2d9e4bc69d04f66323b25c4b9)) * **ai:** move ai related extras from `coding` to `ai` ([#4751](https://github.com/LazyVim/LazyVim/issues/4751)) ([86904d2](https://github.com/LazyVim/LazyVim/commit/86904d2fb1ef406386b2dad43f42756e09b28182)) * **keymaps:** leader-bo to close other buffers ([24665fc](https://github.com/LazyVim/LazyVim/commit/24665fc73651970e5a1e20a63d6031bd99b97637)) * **rest:** add more keymaps to util.rest ([#4467](https://github.com/LazyVim/LazyVim/issues/4467)) ([c22db72](https://github.com/LazyVim/LazyVim/commit/c22db724351bc7a05c56046c48d23a2be8efe71b)) ### Bug Fixes * **extras:** fix alpha-nvim non-string keycodes ([#4735](https://github.com/LazyVim/LazyVim/issues/4735)) ([9c9e650](https://github.com/LazyVim/LazyVim/commit/9c9e650530dcd211afd5a8b7f5e3e33e44abd11b)) * **snacks:** allow overriding `statuscolumn` through `options.lua` ([17a1b84](https://github.com/LazyVim/LazyVim/commit/17a1b846f08db62e3a93c76426db4017ad3cc2eb)) * **vscode:** added snacks.nvim to allowed plugins for vscode. Fixes [#4757](https://github.com/LazyVim/LazyVim/issues/4757) ([06071dd](https://github.com/LazyVim/LazyVim/commit/06071dd452baf1e9b8b5aab140553c4f51fa522e)) ### Performance Improvements * **ui:** only enable treesitter folds if the buffer has treesitter highlighting ([b9dae57](https://github.com/LazyVim/LazyVim/commit/b9dae579612ccf1cd749150ff1603ff6dffc2610)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index f045d1cc..70cd2de9 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.1.0" + ".": "13.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a33475c..8045be7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## [13.2.0](https://github.com/LazyVim/LazyVim/compare/v13.1.0...v13.2.0) (2024-11-11) + + +### Features + +* **ai:** better completion/suggestions of AI engines ([#4752](https://github.com/LazyVim/LazyVim/issues/4752)) ([fbf881f](https://github.com/LazyVim/LazyVim/commit/fbf881f80b8f0fb2d9e4bc69d04f66323b25c4b9)) +* **ai:** move ai related extras from `coding` to `ai` ([#4751](https://github.com/LazyVim/LazyVim/issues/4751)) ([86904d2](https://github.com/LazyVim/LazyVim/commit/86904d2fb1ef406386b2dad43f42756e09b28182)) +* **keymaps:** leader-bo to close other buffers ([24665fc](https://github.com/LazyVim/LazyVim/commit/24665fc73651970e5a1e20a63d6031bd99b97637)) +* **rest:** add more keymaps to util.rest ([#4467](https://github.com/LazyVim/LazyVim/issues/4467)) ([c22db72](https://github.com/LazyVim/LazyVim/commit/c22db724351bc7a05c56046c48d23a2be8efe71b)) + + +### Bug Fixes + +* **extras:** fix alpha-nvim non-string keycodes ([#4735](https://github.com/LazyVim/LazyVim/issues/4735)) ([9c9e650](https://github.com/LazyVim/LazyVim/commit/9c9e650530dcd211afd5a8b7f5e3e33e44abd11b)) +* **snacks:** allow overriding `statuscolumn` through `options.lua` ([17a1b84](https://github.com/LazyVim/LazyVim/commit/17a1b846f08db62e3a93c76426db4017ad3cc2eb)) +* **vscode:** added snacks.nvim to allowed plugins for vscode. Fixes [#4757](https://github.com/LazyVim/LazyVim/issues/4757) ([06071dd](https://github.com/LazyVim/LazyVim/commit/06071dd452baf1e9b8b5aab140553c4f51fa522e)) + + +### Performance Improvements + +* **ui:** only enable treesitter folds if the buffer has treesitter highlighting ([b9dae57](https://github.com/LazyVim/LazyVim/commit/b9dae579612ccf1cd749150ff1603ff6dffc2610)) + ## [13.1.0](https://github.com/LazyVim/LazyVim/compare/v13.0.0...v13.1.0) (2024-11-09) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5c148a92..3bccdba1 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.1.0" -- x-release-please-version +M.version = "13.2.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ea266e73265e32183acbec0bd39f8108e213770f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 11 Nov 2024 15:44:06 +0100 Subject: [PATCH 015/496] fix(lualine): normalize paths before calculating pretty path. Fixes #4763 --- lua/lazyvim/util/lualine.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 5df789fa..08308c56 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -91,6 +91,7 @@ function M.pretty_path(opts) return "" end + path = LazyVim.norm(path) local root = LazyVim.root.get({ normalize = true }) local cwd = LazyVim.root.cwd() From 5df382765b2bbeb5f3168b3597f33c419f31a2a7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 13 Nov 2024 17:20:50 +0100 Subject: [PATCH 016/496] refactor(lualine): status component --- lua/lazyvim/plugins/extras/ai/copilot.lua | 39 +++++-------------- lua/lazyvim/util/lualine.lua | 46 +++++++++++++---------- 2 files changed, 36 insertions(+), 49 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 69429e33..30d05ca1 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -44,36 +44,17 @@ return { 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 + 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, }, diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 08308c56..c759e6dc 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -1,9 +1,33 @@ ---@class lazyvim.util.lualine local M = {} +---@param icon string +---@param status fun(): nil|"ok"|"error"|"pending" +function M.status(icon, status) + local colors = { + ok = LazyVim.ui.fg("Special"), + error = LazyVim.ui.fg("DiagnosticError"), + pending = LazyVim.ui.fg("DiagnosticWarn"), + } + return { + function() + return icon + end, + cond = function() + return status() ~= nil + end, + color = function() + return colors[status()] or colors.ok + end, + } +end + +---@param name string +---@param icon? string function M.cmp_source(name, icon) + icon = icon or LazyVim.config.icons.kinds[name:sub(1, 1):upper() .. name:sub(2)] local started = false - local function status() + return M.status(icon, function() if not package.loaded["cmp"] then return end @@ -20,25 +44,7 @@ function M.cmp_source(name, icon) return "ok" end end - end - - local colors = { - ok = LazyVim.ui.fg("Special"), - error = LazyVim.ui.fg("DiagnosticError"), - pending = LazyVim.ui.fg("DiagnosticWarn"), - } - - return { - function() - return icon or LazyVim.config.icons.kinds[name:sub(1, 1):upper() .. name:sub(2)] - end, - cond = function() - return status() ~= nil - end, - color = function() - return colors[status()] or colors.ok - end, - } + end) end ---@param component any From b98b048ec61b263f1d764fe5e4baba2913240597 Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 13 Nov 2024 16:22:02 +0000 Subject: [PATCH 017/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f0ae8f04..449401af 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 11 +*LazyVim.txt* For Neovim Last change: 2024 November 13 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c1e8e3c80d1d9d44e3795022b3f7d2703abccec6 Mon Sep 17 00:00:00 2001 From: Nybkox Date: Wed, 13 Nov 2024 17:49:47 +0100 Subject: [PATCH 018/496] feat(extras): add supermaven (#3491) Add fast copilot alternative --------- Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Co-authored-by: Folke Lemaitre --- lua/lazyvim/config/init.lua | 1 + lua/lazyvim/plugins/extras/ai/supermaven.lua | 107 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/ai/supermaven.lua diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 3bccdba1..c6817a86 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -88,6 +88,7 @@ local defaults = { Snippet = " ", String = " ", Struct = "󰆼 ", + Supermaven = " ", TabNine = "󰏚 ", Text = " ", TypeParameter = " ", diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua new file mode 100644 index 00000000..57734ac4 --- /dev/null +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -0,0 +1,107 @@ +return { + { + "supermaven-inc/supermaven-nvim", + opts = { + keymaps = { + accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp + }, + disable_inline_completion = vim.g.ai_cmp, + }, + }, + + -- add ai_accept action + { + "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, + }, + + -- cmp integration + { + "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 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 + { + "saghen/blink.cmp", + optional = true, + opts = { + windows = { ghost_text = { enabled = false } }, + }, + dependencies = { + { + "supermaven-nvim", + opts = { + disable_inline_completion = false, + }, + }, + }, + }, + + { + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.cmp_source("supermaven")) + end, + }, + + { + "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 a7eca056096486b20ce37b20979c0d712e49fe76 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 13 Nov 2024 18:28:58 +0100 Subject: [PATCH 019/496] feat(copilot): added support for blink.cmp source --- lua/lazyvim/plugins/extras/ai/copilot.lua | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 30d05ca1..d78e654d 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -97,14 +97,25 @@ return { { "saghen/blink.cmp", optional = true, - opts = { - windows = { ghost_text = { enabled = false } }, - }, - specs = { - -- blink has no copilot source, so force enable suggestions + dependencies = { { - "zbirenbaum/copilot.lua", - opts = { suggestion = { enabled = true } }, + "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" }, + }, + }, + }, + }, + }, }, }, }, From 5e485d39b4cc5aca1aedae4d441fb2bfb3bfbf67 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 13 Nov 2024 19:00:07 +0100 Subject: [PATCH 020/496] fix(dial.nvim): added boolean and logical toggles to default group. Fixes #4515 --- lua/lazyvim/plugins/extras/editor/dial.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index 4bfb285d..1fdfcd95 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -118,6 +118,9 @@ return { 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 From 0819f9396e94a4188522b6739ade3d6024d2b8a7 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:20:48 +0200 Subject: [PATCH 021/496] fix(fzf): decouple `defaults` from `opts` to easy switch profiles (#4190) ## Description This decouples `defaults` from `opts`, so that if users switch to another profile they can take advantage of the profile's default settings and prompts. I use `default-title` either way. I just stumbled upon this when I tried the rest profiles and thought maybe there would be users who would prefer to have the default prompts if they chose another profile. ## Related Issue(s) No ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/editor/fzf.lua | 32 +++++++++++++---------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index e23af81b..c70a6f14 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -74,18 +74,6 @@ return { 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 = {} }, @@ -98,7 +86,8 @@ return { end end - return vim.tbl_deep_extend("force", defaults, { + return { + "default-title", fzf_colors = true, fzf_opts = { ["--no-scrollbar"] = true, @@ -186,9 +175,24 @@ return { 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 1d7b9a1a61596a61019d5d84be9ed679d90c4a38 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 13 Nov 2024 21:11:32 +0100 Subject: [PATCH 022/496] perf(treesitter): better foldtext and foldexpr --- lua/lazyvim/util/ui.lua | 71 ++++++++--------------------------------- 1 file changed, 14 insertions(+), 57 deletions(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 267137dc..ceb6e47c 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,23 +1,23 @@ ---@class lazyvim.util.ui local M = {} +-- foldtext for Neovim < 0.10.0 function M.foldtext() - local ok = pcall(vim.treesitter.get_parser, vim.api.nvim_get_current_buf()) - local ret = ok and vim.treesitter.foldtext and vim.treesitter.foldtext() - if not ret or type(ret) == "string" then - ret = { { vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1], {} } } - end - table.insert(ret, { " " .. LazyVim.config.icons.misc.dots }) + return vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1] +end - if not vim.treesitter.foldtext then - return table.concat( - vim.tbl_map(function(line) - return line[1] - end, ret), - " " - ) +-- optimized treesitter foldexpr for Neovim >= 0.10.0 +function M.foldexpr() + local buf = vim.api.nvim_get_current_buf() + if vim.b[buf].ts_folds == nil then + -- as long as we don't have a filetype, don't bother + -- checking if treesitter is available (it won't) + if vim.bo[buf].filetype == "" then + return "0" + end + vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf) end - return ret + return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0" end ---@return {fg?:string}? @@ -47,49 +47,6 @@ function M.color(name, bg) return color and string.format("#%06x", color) or nil end -M.skip_foldexpr = {} ---@type table -local skip_check = assert(vim.uv.new_check()) - -function M.foldexpr() - local buf = vim.api.nvim_get_current_buf() - - -- no highlight, no foldexpr - if not vim.b[buf].ts_highlight then - return "0" - end - - -- still in the same tick and no parser - if M.skip_foldexpr[buf] then - return "0" - end - - -- don't use treesitter folds for terminal - if vim.bo[buf].buftype == "terminal" then - return "0" - end - - -- as long as we don't have a filetype, don't bother - -- checking if treesitter is available (it won't) - if vim.bo[buf].filetype == "" then - return "0" - end - - local ok = pcall(vim.treesitter.get_parser, buf) - - if ok then - return vim.treesitter.foldexpr() - end - - -- no parser available, so mark it as skip - -- in the next tick, all skip marks will be reset - M.skip_foldexpr[buf] = true - skip_check:start(function() - M.skip_foldexpr = {} - skip_check:stop() - end) - return "0" -end - function M.maximize() ---@type {k:string, v:any}[]? local maximized = nil From 3ac62a4364780412fb791d459f908ca7a9232919 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 13 Nov 2024 21:14:29 +0100 Subject: [PATCH 023/496] refactor(ui): cleanup fg/color --- lua/lazyvim/util/ui.lua | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index ceb6e47c..bcd5ff3b 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -22,29 +22,9 @@ end ---@return {fg?:string}? function M.fg(name) - local color = M.color(name) - return color and { fg = color } or nil -end - ----@param name string ----@param bg? boolean ----@return string? -function M.color(name, bg) - ---@type {foreground?:number}? - ---@diagnostic disable-next-line: deprecated - local hl = vim.api.nvim_get_hl and vim.api.nvim_get_hl(0, { name = name, link = false }) - or vim.api.nvim_get_hl_by_name(name, true) - ---@diagnostic disable-next-line: undefined-field - ---@type string? - local color = nil - if hl then - if bg then - color = hl.bg or hl.background - else - color = hl.fg or hl.foreground - end - end - return color and string.format("#%06x", color) or nil + local hl = vim.api.nvim_get_hl(0, { name = name, link = false }) + local fg = hl and hl.fg or hl.foreground + return fg and { fg = string.format("#%06x", fg) } or nil end function M.maximize() From e50b43544f1261d140bc391a9a1de6e3923b490d Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Thu, 14 Nov 2024 23:53:27 +0900 Subject: [PATCH 024/496] fix(lualine): dynamically fetch the color used in lualine (#4788) ## Description The color used in lualine was previously static and did not update dynamically when a new colorscheme was applied. This resulted in inconsistencies between the theme and the lualine colors, as the 'local' color table returned the highlight color defined during initialization. This pull request resolves the issue by ensuring that the lualine colors are always in sync with the current colorscheme. It achieves this by using `LazyVim.ui.fg(HIGHLIGHT)` to dynamically fetch the appropriate highlight colors, making the lualine colors responsive to colorscheme changes. ## Related Issue(s) ## Screenshots **Before** ![image](https://github.com/user-attachments/assets/6b78483b-4a64-4ec3-a902-a0d1ed10a992) **After** ![image](https://github.com/user-attachments/assets/3f73ec26-cbf1-4ff7-873f-6c7b2c13c481) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/lualine.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index c759e6dc..b6722968 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -5,9 +5,9 @@ local M = {} ---@param status fun(): nil|"ok"|"error"|"pending" function M.status(icon, status) local colors = { - ok = LazyVim.ui.fg("Special"), - error = LazyVim.ui.fg("DiagnosticError"), - pending = LazyVim.ui.fg("DiagnosticWarn"), + ok = "Special", + error = "DiagnosticError", + pending = "DiagnosticWarn", } return { function() @@ -17,7 +17,7 @@ function M.status(icon, status) return status() ~= nil end, color = function() - return colors[status()] or colors.ok + return LazyVim.ui.fg(colors[status()] or colors.ok) end, } end @@ -145,7 +145,9 @@ function M.root_dir(opts) parent = true, other = true, icon = "󱉭 ", - color = LazyVim.ui.fg("Special"), + color = function() + return LazyVim.ui.fg("Special") + end, }, opts or {}) local function get() From 86b2c23e2aae17e6a887e296e140307e873c8195 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 14 Nov 2024 14:54:39 +0000 Subject: [PATCH 025/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 449401af..bd1758b9 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 13 +*LazyVim.txt* For Neovim Last change: 2024 November 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From deb9fd85b150e50053e127f94f3df6273a9f5faf Mon Sep 17 00:00:00 2001 From: Matthew Sia <71731492+matthewsia98@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:32:52 -0500 Subject: [PATCH 026/496] fix(lsp): wrap signature_help (#4791) ## Description Related to 7616816. Without wrap `lsp_doc_border` does not work ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 5eacba92..5310101f 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -21,7 +21,7 @@ function M.get() { "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" }, - { "", vim.lsp.buf.signature_help, mode = "i", 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", "v" }, has = "codeAction" }, { "cc", vim.lsp.codelens.run, desc = "Run Codelens", mode = { "n", "v" }, has = "codeLens" }, { "cC", vim.lsp.codelens.refresh, desc = "Refresh & Display Codelens", mode = { "n" }, has = "codeLens" }, From c0b623c332b42b3d75e78e06fa1912417bfca71f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 14 Nov 2024 23:52:59 +0100 Subject: [PATCH 027/496] fix(snacks): explicitely enable snakcs plugins --- lua/lazyvim/plugins/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index c0e27c14..34d67963 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -30,6 +30,10 @@ return { opts = function() ---@type snacks.Config return { + notifier = { enabled = true }, + quickfile = { enabled = true }, + bigfile = { enabled = true }, + words = { enabled = true }, toggle = { map = LazyVim.safe_keymap_set }, statuscolumn = { enabled = false }, -- we set this in options.lua terminal = { From ad3e2b635401fbc575cdbefea73ade477320da2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:55:29 +0100 Subject: [PATCH 028/496] chore(main): release 13.3.0 (#4765) :robot: I have created a release *beep* *boop* --- ## [13.3.0](https://github.com/LazyVim/LazyVim/compare/v13.2.0...v13.3.0) (2024-11-14) ### Features * **copilot:** added support for blink.cmp source ([a7eca05](https://github.com/LazyVim/LazyVim/commit/a7eca056096486b20ce37b20979c0d712e49fe76)) * **extras:** add supermaven ([#3491](https://github.com/LazyVim/LazyVim/issues/3491)) ([c1e8e3c](https://github.com/LazyVim/LazyVim/commit/c1e8e3c80d1d9d44e3795022b3f7d2703abccec6)) ### Bug Fixes * **dial.nvim:** added boolean and logical toggles to default group. Fixes [#4515](https://github.com/LazyVim/LazyVim/issues/4515) ([5e485d3](https://github.com/LazyVim/LazyVim/commit/5e485d39b4cc5aca1aedae4d441fb2bfb3bfbf67)) * **fzf:** decouple `defaults` from `opts` to easy switch profiles ([#4190](https://github.com/LazyVim/LazyVim/issues/4190)) ([0819f93](https://github.com/LazyVim/LazyVim/commit/0819f9396e94a4188522b6739ade3d6024d2b8a7)) * **lsp:** wrap signature_help ([#4791](https://github.com/LazyVim/LazyVim/issues/4791)) ([deb9fd8](https://github.com/LazyVim/LazyVim/commit/deb9fd85b150e50053e127f94f3df6273a9f5faf)) * **lualine:** dynamically fetch the color used in lualine ([#4788](https://github.com/LazyVim/LazyVim/issues/4788)) ([e50b435](https://github.com/LazyVim/LazyVim/commit/e50b43544f1261d140bc391a9a1de6e3923b490d)) * **lualine:** normalize paths before calculating pretty path. Fixes [#4763](https://github.com/LazyVim/LazyVim/issues/4763) ([ea266e7](https://github.com/LazyVim/LazyVim/commit/ea266e73265e32183acbec0bd39f8108e213770f)) * **snacks:** explicitely enable snakcs plugins ([c0b623c](https://github.com/LazyVim/LazyVim/commit/c0b623c332b42b3d75e78e06fa1912417bfca71f)) ### Performance Improvements * **treesitter:** better foldtext and foldexpr ([1d7b9a1](https://github.com/LazyVim/LazyVim/commit/1d7b9a1a61596a61019d5d84be9ed679d90c4a38)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 70cd2de9..34b9205f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.2.0" + ".": "13.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8045be7c..b34ca6e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [13.3.0](https://github.com/LazyVim/LazyVim/compare/v13.2.0...v13.3.0) (2024-11-14) + + +### Features + +* **copilot:** added support for blink.cmp source ([a7eca05](https://github.com/LazyVim/LazyVim/commit/a7eca056096486b20ce37b20979c0d712e49fe76)) +* **extras:** add supermaven ([#3491](https://github.com/LazyVim/LazyVim/issues/3491)) ([c1e8e3c](https://github.com/LazyVim/LazyVim/commit/c1e8e3c80d1d9d44e3795022b3f7d2703abccec6)) + + +### Bug Fixes + +* **dial.nvim:** added boolean and logical toggles to default group. Fixes [#4515](https://github.com/LazyVim/LazyVim/issues/4515) ([5e485d3](https://github.com/LazyVim/LazyVim/commit/5e485d39b4cc5aca1aedae4d441fb2bfb3bfbf67)) +* **fzf:** decouple `defaults` from `opts` to easy switch profiles ([#4190](https://github.com/LazyVim/LazyVim/issues/4190)) ([0819f93](https://github.com/LazyVim/LazyVim/commit/0819f9396e94a4188522b6739ade3d6024d2b8a7)) +* **lsp:** wrap signature_help ([#4791](https://github.com/LazyVim/LazyVim/issues/4791)) ([deb9fd8](https://github.com/LazyVim/LazyVim/commit/deb9fd85b150e50053e127f94f3df6273a9f5faf)) +* **lualine:** dynamically fetch the color used in lualine ([#4788](https://github.com/LazyVim/LazyVim/issues/4788)) ([e50b435](https://github.com/LazyVim/LazyVim/commit/e50b43544f1261d140bc391a9a1de6e3923b490d)) +* **lualine:** normalize paths before calculating pretty path. Fixes [#4763](https://github.com/LazyVim/LazyVim/issues/4763) ([ea266e7](https://github.com/LazyVim/LazyVim/commit/ea266e73265e32183acbec0bd39f8108e213770f)) +* **snacks:** explicitely enable snakcs plugins ([c0b623c](https://github.com/LazyVim/LazyVim/commit/c0b623c332b42b3d75e78e06fa1912417bfca71f)) + + +### Performance Improvements + +* **treesitter:** better foldtext and foldexpr ([1d7b9a1](https://github.com/LazyVim/LazyVim/commit/1d7b9a1a61596a61019d5d84be9ed679d90c4a38)) + ## [13.2.0](https://github.com/LazyVim/LazyVim/compare/v13.1.0...v13.2.0) (2024-11-11) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index c6817a86..6e4b0d41 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.2.0" -- x-release-please-version +M.version = "13.3.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 07a046867dc3407b30801e539ab026fb7c180e7b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 15 Nov 2024 06:25:26 +0100 Subject: [PATCH 029/496] fix(copilot): don't enable blink when using copilot when blink is not installed. Fixes #4795 --- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index d78e654d..4fd3119c 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -79,6 +79,7 @@ return { specs = { { "nvim-cmp", + optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) table.insert(opts.sources, 1, { @@ -104,6 +105,7 @@ return { specs = { { "blink.cmp", + optional = true, opts = { sources = { providers = { From bbd5c8a7714f40a63c4556246a6623cd82b63623 Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 15 Nov 2024 05:26:21 +0000 Subject: [PATCH 030/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index bd1758b9..6686c46c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 14 +*LazyVim.txt* For Neovim Last change: 2024 November 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From bb289f4345835d98df7d0dfd4a26fd0dffa7e89a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:29:54 +0100 Subject: [PATCH 031/496] chore(main): release 13.3.1 (#4796) :robot: I have created a release *beep* *boop* --- ## [13.3.1](https://github.com/LazyVim/LazyVim/compare/v13.3.0...v13.3.1) (2024-11-15) ### Bug Fixes * **copilot:** don't enable blink when using copilot when blink is not installed. Fixes [#4795](https://github.com/LazyVim/LazyVim/issues/4795) ([07a0468](https://github.com/LazyVim/LazyVim/commit/07a046867dc3407b30801e539ab026fb7c180e7b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 34b9205f..a5daeaba 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.3.0" + ".": "13.3.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b34ca6e0..5ae8ce20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [13.3.1](https://github.com/LazyVim/LazyVim/compare/v13.3.0...v13.3.1) (2024-11-15) + + +### Bug Fixes + +* **copilot:** don't enable blink when using copilot when blink is not installed. Fixes [#4795](https://github.com/LazyVim/LazyVim/issues/4795) ([07a0468](https://github.com/LazyVim/LazyVim/commit/07a046867dc3407b30801e539ab026fb7c180e7b)) + ## [13.3.0](https://github.com/LazyVim/LazyVim/compare/v13.2.0...v13.3.0) (2024-11-14) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 6e4b0d41..c5487ef0 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.3.0" -- x-release-please-version +M.version = "13.3.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 7a1414b5e5950bde34b9bdc0dbc3dd20109f2ac9 Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sat, 16 Nov 2024 07:31:50 +0100 Subject: [PATCH 032/496] feat(copilot-chat): remove deprecated options (#4802) - Diagnostic help was deprecated and now just proxies to prompt actions (by default diagnostics are auto included in all selections so this feature was no longer necessary) - Selecton is now visual || buffer by default so the custom selection config is no longer needed too Signed-off-by: Tomas Slusny --- lua/lazyvim/plugins/extras/ai/copilot-chat.lua | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index 042ab8ff..2e399d11 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -24,16 +24,11 @@ return { 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 = { @@ -66,8 +61,6 @@ return { 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" } }, }, From ffce089a9f1268ff73c7de7c4f45e1a366dc4d34 Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Sat, 16 Nov 2024 15:32:07 +0900 Subject: [PATCH 033/496] feat(blink): auto-enable catppuccin integration (#4799) ## Description Auto enable `blink_cmp` integration in catppuccin if the theme plugin is loaded. ## Related Issue(s) ## Screenshots **Before** ![before](https://github.com/user-attachments/assets/918d5110-fd05-4468-9259-bf7164569521) **After** ![after](https://github.com/user-attachments/assets/0d02d0c6-2b31-41cd-8b26-fbf74a86e498) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 9542db8d..bb65afc3 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -121,4 +121,12 @@ return { }, }, }, + -- catppuccin support + { + "catppuccin", + optional = true, + opts = { + integrations = { blink_cmp = true }, + }, + }, } From 767d873f93369068606135f421baa6a8b208d6cd Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 16 Nov 2024 06:32:40 +0000 Subject: [PATCH 034/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6686c46c..1fc8b9d2 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 15 +*LazyVim.txt* For Neovim Last change: 2024 November 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8235126a321eaae093f319398ffec5949f1ab8be Mon Sep 17 00:00:00 2001 From: xiaojianzheng <1272209235@qq.com> Date: Sat, 16 Nov 2024 14:33:27 +0800 Subject: [PATCH 035/496] feat(dial): support vue filetype (#4785) ## Description support vue filetype ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/dial.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index 1fdfcd95..5e17c76b 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -98,7 +98,10 @@ return { return { dials_by_ft = { css = "css", + vue = "vue", javascript = "typescript", + typescript = "typescript", + typescriptreact = "typescript", javascriptreact = "typescript", json = "json", lua = "lua", @@ -106,8 +109,6 @@ return { python = "python", sass = "css", scss = "css", - typescript = "typescript", - typescriptreact = "typescript", yaml = "yaml", }, groups = { @@ -122,6 +123,14 @@ return { 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) From b8407f4b128891c3bdf35a2c403ba23d1e01f3ff Mon Sep 17 00:00:00 2001 From: Alexey Svirshchevskiy Date: Sat, 16 Nov 2024 07:34:21 +0100 Subject: [PATCH 036/496] feat(extras): add biome formatter (#4448) ## Description This PR adds biome as a conform/null-ls formatter. When using biome lsp formatting directly, the syntax highlighting is flickering. However, it works great when formatting is configured with conform. To avoid conflicts with Prettier, it is recommended to set `vim.g.lazyvim_prettier_needs_config = true` In this case, both prettier and biome formatters could be activated simultaneously. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/formatting/biome.lua | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/formatting/biome.lua diff --git a/lua/lazyvim/plugins/extras/formatting/biome.lua b/lua/lazyvim/plugins/extras/formatting/biome.lua new file mode 100644 index 00000000..1a4e274c --- /dev/null +++ b/lua/lazyvim/plugins/extras/formatting/biome.lua @@ -0,0 +1,59 @@ +---@diagnostic disable: inject-field +if lazyvim_docs then + -- Enable this option to avoid conflicts with Prettier. + vim.g.lazyvim_prettier_needs_config = true +end + +-- https://biomejs.dev/internals/language-support/ +local supported = { + "astro", + "css", + "graphql", + -- "html", + "javascript", + "javascriptreact", + "json", + "jsonc", + -- "markdown", + "svelte", + "typescript", + "typescriptreact", + "vue", + -- "yaml", +} + +return { + { + "williamboman/mason.nvim", + opts = { ensure_installed = { "biome" } }, + }, + + { + "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 support + { + "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, + }, +} From 1c5a330b6be8007088d84361fee5d2b08771598c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 16 Nov 2024 06:47:51 +0100 Subject: [PATCH 037/496] feat(vscode): automatically enable the vscode extra when running in vscode --- lua/lazyvim/plugins/xtras.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index c2b52cb6..fe17cc13 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -27,6 +27,9 @@ LazyVim.plugin.save_core() if vim.tbl_contains(compat, v) then table.insert(extras, 1, "lazyvim.plugins.compat.nvim-" .. v) end +if vim.g.vscode then + table.insert(extras, 1, "lazyvim.plugins.extras.vscode") +end table.sort(extras, function(a, b) local pa = prios[a] or 50 From 1db2af267eeb9046550ac29bd543f3b3021cdd7b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 16 Nov 2024 07:39:48 +0100 Subject: [PATCH 038/496] fix(terminal): set shellcmdflags for powershell to recommended values. Closes #4805 --- lua/lazyvim/util/terminal.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/terminal.lua b/lua/lazyvim/util/terminal.lua index b9345c1d..0e1af758 100644 --- a/lua/lazyvim/util/terminal.lua +++ b/lua/lazyvim/util/terminal.lua @@ -18,13 +18,13 @@ function M.setup(shell) -- Setting shell command flags vim.o.shellcmdflag = - "-NoLogo -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';" + "-NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();$PSDefaultParameterValues['Out-File:Encoding']='utf8';$PSStyle.OutputRendering='plaintext';Remove-Alias -Force -ErrorAction SilentlyContinue tee;" -- Setting shell redirection vim.o.shellredir = '2>&1 | %%{ "$_" } | Out-File %s; exit $LastExitCode' -- Setting shell pipe - vim.o.shellpipe = '2>&1 | %%{ "$_" } | Tee-Object %s; exit $LastExitCode' + vim.o.shellpipe = '2>&1 | %%{ "$_" } | tee %s; exit $LastExitCode' -- Setting shell quote options vim.o.shellquote = "" From 704c29110d578186f0ca3eac67b753ddf52541fc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:09:51 +0100 Subject: [PATCH 039/496] chore(main): release 13.4.0 (#4806) :robot: I have created a release *beep* *boop* --- ## [13.4.0](https://github.com/LazyVim/LazyVim/compare/v13.3.1...v13.4.0) (2024-11-16) ### Features * **blink:** auto-enable catppuccin integration ([#4799](https://github.com/LazyVim/LazyVim/issues/4799)) ([ffce089](https://github.com/LazyVim/LazyVim/commit/ffce089a9f1268ff73c7de7c4f45e1a366dc4d34)) * **copilot-chat:** remove deprecated options ([#4802](https://github.com/LazyVim/LazyVim/issues/4802)) ([7a1414b](https://github.com/LazyVim/LazyVim/commit/7a1414b5e5950bde34b9bdc0dbc3dd20109f2ac9)) * **dial:** support vue filetype ([#4785](https://github.com/LazyVim/LazyVim/issues/4785)) ([8235126](https://github.com/LazyVim/LazyVim/commit/8235126a321eaae093f319398ffec5949f1ab8be)) * **extras:** add biome formatter ([#4448](https://github.com/LazyVim/LazyVim/issues/4448)) ([b8407f4](https://github.com/LazyVim/LazyVim/commit/b8407f4b128891c3bdf35a2c403ba23d1e01f3ff)) * **vscode:** automatically enable the vscode extra when running in vscode ([1c5a330](https://github.com/LazyVim/LazyVim/commit/1c5a330b6be8007088d84361fee5d2b08771598c)) ### Bug Fixes * **terminal:** set shellcmdflags for powershell to recommended values. Closes [#4805](https://github.com/LazyVim/LazyVim/issues/4805) ([1db2af2](https://github.com/LazyVim/LazyVim/commit/1db2af267eeb9046550ac29bd543f3b3021cdd7b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a5daeaba..14c24765 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.3.1" + ".": "13.4.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ae8ce20..94187139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [13.4.0](https://github.com/LazyVim/LazyVim/compare/v13.3.1...v13.4.0) (2024-11-16) + + +### Features + +* **blink:** auto-enable catppuccin integration ([#4799](https://github.com/LazyVim/LazyVim/issues/4799)) ([ffce089](https://github.com/LazyVim/LazyVim/commit/ffce089a9f1268ff73c7de7c4f45e1a366dc4d34)) +* **copilot-chat:** remove deprecated options ([#4802](https://github.com/LazyVim/LazyVim/issues/4802)) ([7a1414b](https://github.com/LazyVim/LazyVim/commit/7a1414b5e5950bde34b9bdc0dbc3dd20109f2ac9)) +* **dial:** support vue filetype ([#4785](https://github.com/LazyVim/LazyVim/issues/4785)) ([8235126](https://github.com/LazyVim/LazyVim/commit/8235126a321eaae093f319398ffec5949f1ab8be)) +* **extras:** add biome formatter ([#4448](https://github.com/LazyVim/LazyVim/issues/4448)) ([b8407f4](https://github.com/LazyVim/LazyVim/commit/b8407f4b128891c3bdf35a2c403ba23d1e01f3ff)) +* **vscode:** automatically enable the vscode extra when running in vscode ([1c5a330](https://github.com/LazyVim/LazyVim/commit/1c5a330b6be8007088d84361fee5d2b08771598c)) + + +### Bug Fixes + +* **terminal:** set shellcmdflags for powershell to recommended values. Closes [#4805](https://github.com/LazyVim/LazyVim/issues/4805) ([1db2af2](https://github.com/LazyVim/LazyVim/commit/1db2af267eeb9046550ac29bd543f3b3021cdd7b)) + ## [13.3.1](https://github.com/LazyVim/LazyVim/compare/v13.3.0...v13.3.1) (2024-11-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index c5487ef0..5547e479 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.3.1" -- x-release-please-version +M.version = "13.4.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From af9553135da3c42ff83824db0f9dfaaa9ad5973f Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Mon, 18 Nov 2024 10:05:28 +0100 Subject: [PATCH 040/496] feat(copilot-chat): remove call to nvim-cmp integration (#4822) nvim-cmp integration was removed in favour of custom autocomplete (it was pointless trying to support all the new completion plugins when its 15 lines to implement something plugin specific) Signed-off-by: Tomas Slusny --- lua/lazyvim/plugins/extras/ai/copilot-chat.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index 2e399d11..32d6366f 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -66,9 +66,6 @@ return { }, 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 5c5ae903c932372a782c738c81bc7123580912e7 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 18 Nov 2024 09:06:35 +0000 Subject: [PATCH 041/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1fc8b9d2..21c673cc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 16 +*LazyVim.txt* For Neovim Last change: 2024 November 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 6dcf5d7159d13a21d3148779b5b80048573fcdf1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 18 Nov 2024 21:26:55 +0100 Subject: [PATCH 042/496] fix(tabnine): dont call CmpTabnineHub in build. Fixes #4828 --- lua/lazyvim/plugins/extras/ai/tabnine.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/tabnine.lua b/lua/lazyvim/plugins/extras/ai/tabnine.lua index 1c92a25d..b75db9ec 100644 --- a/lua/lazyvim/plugins/extras/ai/tabnine.lua +++ b/lua/lazyvim/plugins/extras/ai/tabnine.lua @@ -8,7 +8,6 @@ return { "tzachar/cmp-tabnine", build = { LazyVim.is_win() and "pwsh -noni .\\install.ps1" or "./install.sh", - ":CmpTabnineHub", }, dependencies = "hrsh7th/nvim-cmp", opts = { From 33557ae68b76954df0288603f39b3f0181bada52 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 18 Nov 2024 21:27:21 +0100 Subject: [PATCH 043/496] fix(lualine): dont show statusline on snacks_dashboard --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 0361826e..c5d8b043 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -84,7 +84,7 @@ return { 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 0352f944c34a3aa8a949102a2fe2ded7a1da3cd0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 18 Nov 2024 21:27:34 +0100 Subject: [PATCH 044/496] perf(ui): never show folds on dashboards --- lua/lazyvim/util/ui.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index bcd5ff3b..a93da5e6 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -15,7 +15,11 @@ function M.foldexpr() if vim.bo[buf].filetype == "" then return "0" end - vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf) + if vim.bo[buf].filetype:find("dashboard") then + vim.b[buf].ts_folds = false + else + vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf) + end end return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0" end From a07db1a72334bf6550683d5f9132d806febed1cd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 18 Nov 2024 23:32:49 +0100 Subject: [PATCH 045/496] feat(snacks): use `snacks.dashboard` as the default dashboard. moved `dashboard-nvim` to extras (#4832) ## Description Snacks has a new dashboard plugin that will be LazyVim's default. Check the docs at https://github.com/folke/snacks.nvim/blob/main/docs/dashboard.md ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- NEWS.md | 7 ++ lua/lazyvim/plugins/extras/ui/alpha.lua | 3 +- .../plugins/extras/ui/dashboard-nvim.lua | 68 +++++++++++++++ .../plugins/extras/ui/mini-starter.lua | 3 +- lua/lazyvim/plugins/init.lua | 6 +- lua/lazyvim/plugins/ui.lua | 85 ++++++------------- 6 files changed, 104 insertions(+), 68 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua diff --git a/NEWS.md b/NEWS.md index b2bb693b..1b9c1593 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,13 @@ ## 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/lua/lazyvim/plugins/extras/ui/alpha.lua b/lua/lazyvim/plugins/extras/ui/alpha.lua index 33f79ba9..2a25a3e7 100644 --- a/lua/lazyvim/plugins/extras/ui/alpha.lua +++ b/lua/lazyvim/plugins/extras/ui/alpha.lua @@ -1,7 +1,6 @@ return { - { "nvimdev/dashboard-nvim", enabled = false }, - { "echasnovski/mini.starter", enabled = false }, + { "folke/snacks.nvim", opts = { dashboard = { enabled = false } } }, -- Dashboard. This runs when neovim starts, and is what displays -- the "LAZYVIM" banner. { diff --git a/lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua b/lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua new file mode 100644 index 00000000..4bda3fe5 --- /dev/null +++ b/lua/lazyvim/plugins/extras/ui/dashboard-nvim.lua @@ -0,0 +1,68 @@ +return { + { "folke/snacks.nvim", opts = { dashboard = { enabled = false } } }, + { + "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/lua/lazyvim/plugins/extras/ui/mini-starter.lua b/lua/lazyvim/plugins/extras/ui/mini-starter.lua index 6407345c..c1bd7bc1 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-starter.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-starter.lua @@ -1,8 +1,7 @@ -- start screen return { -- disable alpha - { "goolord/alpha-nvim", enabled = false }, - { "nvimdev/dashboard-nvim", enabled = false }, + { "folke/snacks.nvim", opts = { dashboard = { enabled = false } } }, -- enable mini.starter { diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 34d67963..cf587454 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -30,11 +30,9 @@ return { opts = function() ---@type snacks.Config return { + bigfile = { enabled = true }, notifier = { enabled = true }, quickfile = { enabled = true }, - bigfile = { enabled = true }, - words = { enabled = true }, - toggle = { map = LazyVim.safe_keymap_set }, statuscolumn = { enabled = false }, -- we set this in options.lua terminal = { win = { @@ -46,6 +44,8 @@ return { }, }, }, + toggle = { map = LazyVim.safe_keymap_set }, + words = { enabled = true }, } end, keys = { diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index c5d8b043..d52c6741 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -307,68 +307,31 @@ return { { "MunifTanjim/nui.nvim", lazy = true }, { - "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 2786fdb6e2eb0a8e640042fd1cfe8b2febdf7e40 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:34:15 +0100 Subject: [PATCH 046/496] chore(main): release 13.5.0 (#4823) :robot: I have created a release *beep* *boop* --- ## [13.5.0](https://github.com/LazyVim/LazyVim/compare/v13.4.0...v13.5.0) (2024-11-18) ### Features * **copilot-chat:** remove call to nvim-cmp integration ([#4822](https://github.com/LazyVim/LazyVim/issues/4822)) ([af95531](https://github.com/LazyVim/LazyVim/commit/af9553135da3c42ff83824db0f9dfaaa9ad5973f)) * **snacks:** use `snacks.dashboard` as the default dashboard. moved `dashboard-nvim` to extras ([#4832](https://github.com/LazyVim/LazyVim/issues/4832)) ([a07db1a](https://github.com/LazyVim/LazyVim/commit/a07db1a72334bf6550683d5f9132d806febed1cd)) ### Bug Fixes * **lualine:** dont show statusline on snacks_dashboard ([33557ae](https://github.com/LazyVim/LazyVim/commit/33557ae68b76954df0288603f39b3f0181bada52)) * **tabnine:** dont call CmpTabnineHub in build. Fixes [#4828](https://github.com/LazyVim/LazyVim/issues/4828) ([6dcf5d7](https://github.com/LazyVim/LazyVim/commit/6dcf5d7159d13a21d3148779b5b80048573fcdf1)) ### Performance Improvements * **ui:** never show folds on dashboards ([0352f94](https://github.com/LazyVim/LazyVim/commit/0352f944c34a3aa8a949102a2fe2ded7a1da3cd0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 14c24765..5a0323e7 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.4.0" + ".": "13.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 94187139..ab111a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [13.5.0](https://github.com/LazyVim/LazyVim/compare/v13.4.0...v13.5.0) (2024-11-18) + + +### Features + +* **copilot-chat:** remove call to nvim-cmp integration ([#4822](https://github.com/LazyVim/LazyVim/issues/4822)) ([af95531](https://github.com/LazyVim/LazyVim/commit/af9553135da3c42ff83824db0f9dfaaa9ad5973f)) +* **snacks:** use `snacks.dashboard` as the default dashboard. moved `dashboard-nvim` to extras ([#4832](https://github.com/LazyVim/LazyVim/issues/4832)) ([a07db1a](https://github.com/LazyVim/LazyVim/commit/a07db1a72334bf6550683d5f9132d806febed1cd)) + + +### Bug Fixes + +* **lualine:** dont show statusline on snacks_dashboard ([33557ae](https://github.com/LazyVim/LazyVim/commit/33557ae68b76954df0288603f39b3f0181bada52)) +* **tabnine:** dont call CmpTabnineHub in build. Fixes [#4828](https://github.com/LazyVim/LazyVim/issues/4828) ([6dcf5d7](https://github.com/LazyVim/LazyVim/commit/6dcf5d7159d13a21d3148779b5b80048573fcdf1)) + + +### Performance Improvements + +* **ui:** never show folds on dashboards ([0352f94](https://github.com/LazyVim/LazyVim/commit/0352f944c34a3aa8a949102a2fe2ded7a1da3cd0)) + ## [13.4.0](https://github.com/LazyVim/LazyVim/compare/v13.3.1...v13.4.0) (2024-11-16) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5547e479..02d7d558 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.4.0" -- x-release-please-version +M.version = "13.5.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 0bb1da6d57a32495ed4159f8933d074674066d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen?= <53434466+HeadCookie@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:02:56 +0000 Subject: [PATCH 047/496] fix(extras): add blink.cmp integration for SQL extra (#4833) ## Description This PR adds blink.cmp integration with `vim-dadbod-completion` in the SQL extras module. It allows blink.cmp to use the dadbod provider for SQL autocompletion in Neovim. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/sql.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index a4b426ba..c9382942 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -122,6 +122,25 @@ return { end, }, + -- blink.cmp integration + { + "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", + }, + }, + -- Linters & formatters { "williamboman/mason.nvim", From 9c310043657fc11db0946ca4a328f29941b72b02 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 19 Nov 2024 07:31:28 +0100 Subject: [PATCH 048/496] fix(snacks): cleaner way to adjust keys preset --- lua/lazyvim/plugins/extras/util/project.lua | 16 ++++++++++++++ lua/lazyvim/plugins/ui.lua | 24 +++++++++++---------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/project.lua b/lua/lazyvim/plugins/extras/util/project.lua index 5d399125..01a25bc2 100644 --- a/lua/lazyvim/plugins/extras/util/project.lua +++ b/lua/lazyvim/plugins/extras/util/project.lua @@ -152,6 +152,9 @@ return { "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", @@ -165,4 +168,17 @@ return { table.insert(opts.config.center, 3, projects) end, }, + + { + "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/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index d52c6741..866e2ba9 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -319,17 +319,19 @@ return { ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], - ---@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 f198eef6e5dc2993f5011c0e5ea6475a24fa4fa1 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 19 Nov 2024 06:32:29 +0000 Subject: [PATCH 049/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 21c673cc..ba19a416 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 18 +*LazyVim.txt* For Neovim Last change: 2024 November 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 59615281f80f68fb91a9e428835c8164a6a6f99f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 19 Nov 2024 08:49:51 +0100 Subject: [PATCH 050/496] fix(copilot): work-around to get copilot working again on nightly --- lua/lazyvim/plugins/extras/ai/copilot.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4fd3119c..9240ac13 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -22,6 +22,15 @@ return { 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, }, -- add ai_accept action From b873f9a7e7ca77f329b40b17741ee244520a1306 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 19 Nov 2024 09:03:00 +0100 Subject: [PATCH 051/496] fix(snacks): make sure early notifications show up in noice --- lua/lazyvim/plugins/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index cf587454..8ea946ea 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -57,5 +57,14 @@ return { desc = "Dismiss All Notifications", }, }, + config = function(_, opts) + local notify = vim.notify + require("snacks").setup(opts) + -- HACK: restore vim.notify after snacks setup and let noice.nvim take over + -- this is needed to have early notifications show up in noice history + if LazyVim.has("noice.nvim") then + vim.notify = notify + end + end, }, } From 4df9392cb8c597193411b668d49a3882941e816b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 19 Nov 2024 09:35:42 +0100 Subject: [PATCH 052/496] fix(snacks): alignment of header --- lua/lazyvim/plugins/ui.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 866e2ba9..828d4d01 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -312,12 +312,12 @@ return { dashboard = { preset = { header = [[ - ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z - ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z - ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z - ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z - ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ - ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ + ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z + ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z + ██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z + ██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z + ███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║ + ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ]], -- stylua: ignore ---@type snacks.dashboard.Item[] From fc2eae5fafad8ea6135cbf7c5d65077b7030c622 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:47:23 +0100 Subject: [PATCH 053/496] chore(main): release 13.5.1 (#4835) :robot: I have created a release *beep* *boop* --- ## [13.5.1](https://github.com/LazyVim/LazyVim/compare/v13.5.0...v13.5.1) (2024-11-19) ### Bug Fixes * **copilot:** work-around to get copilot working again on nightly ([5961528](https://github.com/LazyVim/LazyVim/commit/59615281f80f68fb91a9e428835c8164a6a6f99f)) * **extras:** add blink.cmp integration for SQL extra ([#4833](https://github.com/LazyVim/LazyVim/issues/4833)) ([0bb1da6](https://github.com/LazyVim/LazyVim/commit/0bb1da6d57a32495ed4159f8933d074674066d20)) * **snacks:** alignment of header ([4df9392](https://github.com/LazyVim/LazyVim/commit/4df9392cb8c597193411b668d49a3882941e816b)) * **snacks:** cleaner way to adjust keys preset ([9c31004](https://github.com/LazyVim/LazyVim/commit/9c310043657fc11db0946ca4a328f29941b72b02)) * **snacks:** make sure early notifications show up in noice ([b873f9a](https://github.com/LazyVim/LazyVim/commit/b873f9a7e7ca77f329b40b17741ee244520a1306)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 11 +++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 5a0323e7..91a13bb0 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.5.0" + ".": "13.5.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index ab111a3d..470c491b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [13.5.1](https://github.com/LazyVim/LazyVim/compare/v13.5.0...v13.5.1) (2024-11-19) + + +### Bug Fixes + +* **copilot:** work-around to get copilot working again on nightly ([5961528](https://github.com/LazyVim/LazyVim/commit/59615281f80f68fb91a9e428835c8164a6a6f99f)) +* **extras:** add blink.cmp integration for SQL extra ([#4833](https://github.com/LazyVim/LazyVim/issues/4833)) ([0bb1da6](https://github.com/LazyVim/LazyVim/commit/0bb1da6d57a32495ed4159f8933d074674066d20)) +* **snacks:** alignment of header ([4df9392](https://github.com/LazyVim/LazyVim/commit/4df9392cb8c597193411b668d49a3882941e816b)) +* **snacks:** cleaner way to adjust keys preset ([9c31004](https://github.com/LazyVim/LazyVim/commit/9c310043657fc11db0946ca4a328f29941b72b02)) +* **snacks:** make sure early notifications show up in noice ([b873f9a](https://github.com/LazyVim/LazyVim/commit/b873f9a7e7ca77f329b40b17741ee244520a1306)) + ## [13.5.0](https://github.com/LazyVim/LazyVim/compare/v13.4.0...v13.5.0) (2024-11-18) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 02d7d558..24153855 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.5.0" -- x-release-please-version +M.version = "13.5.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 86dc548ff9564a37524c2f9259eeb8603a70d5d5 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:27:07 +0200 Subject: [PATCH 054/496] fix(keymaps): `gitbrowse` also in Visual mode (#4818) ## Description If https://github.com/folke/snacks.nvim/pull/89 gets accepted, then we should also update the keymap for Visual mode ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 5a9fbc80..2b86010f 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -139,7 +139,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 4d596cf4b4dcb369b2aef7e4d09635416b6c5a3f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:35:35 +0100 Subject: [PATCH 055/496] chore(main): release 13.5.2 (#4840) :robot: I have created a release *beep* *boop* --- ## [13.5.2](https://github.com/LazyVim/LazyVim/compare/v13.5.1...v13.5.2) (2024-11-19) ### Bug Fixes * **keymaps:** `gitbrowse` also in Visual mode ([#4818](https://github.com/LazyVim/LazyVim/issues/4818)) ([86dc548](https://github.com/LazyVim/LazyVim/commit/86dc548ff9564a37524c2f9259eeb8603a70d5d5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 91a13bb0..90bbf794 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.5.1" + ".": "13.5.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 470c491b..e4bf532f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [13.5.2](https://github.com/LazyVim/LazyVim/compare/v13.5.1...v13.5.2) (2024-11-19) + + +### Bug Fixes + +* **keymaps:** `gitbrowse` also in Visual mode ([#4818](https://github.com/LazyVim/LazyVim/issues/4818)) ([86dc548](https://github.com/LazyVim/LazyVim/commit/86dc548ff9564a37524c2f9259eeb8603a70d5d5)) + ## [13.5.1](https://github.com/LazyVim/LazyVim/compare/v13.5.0...v13.5.1) (2024-11-19) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 24153855..4c442294 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.5.1" -- x-release-please-version +M.version = "13.5.2" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 30f556d17aaf7ac74f0553faebed2cf298b65820 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 20 Nov 2024 09:48:29 +0100 Subject: [PATCH 056/496] fix(copilot): remove tmp nightly fix --- lua/lazyvim/plugins/extras/ai/copilot.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 9240ac13..4fd3119c 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -22,15 +22,6 @@ return { 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, }, -- add ai_accept action From 63150fa4c5ec8a6f5c56e9035599a8c8e32dc8ed Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 20 Nov 2024 08:49:27 +0000 Subject: [PATCH 057/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ba19a416..3074eb97 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 19 +*LazyVim.txt* For Neovim Last change: 2024 November 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 2108028cde19184bf8ea1a00065b5a099b1928e1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 22 Nov 2024 06:54:44 +0100 Subject: [PATCH 058/496] fix(dial): make sure defaults are part of every group. Fixes #4868 --- lua/lazyvim/plugins/extras/editor/dial.lua | 28 ++++++---------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index 5e17c76b..e296624a 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -106,14 +106,13 @@ return { 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, @@ -124,25 +123,14 @@ return { 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", }), @@ -154,27 +142,25 @@ return { 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 ba8f6b0215969ea31da8e9f94bf75618606c5e19 Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 22 Nov 2024 05:55:52 +0000 Subject: [PATCH 059/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3074eb97..0fd67be0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 20 +*LazyVim.txt* For Neovim Last change: 2024 November 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From adcbfc72fd8d0808d78bdfe0940d98c6432c4ef0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:41:06 +0100 Subject: [PATCH 060/496] chore(main): release 13.5.3 (#4845) :robot: I have created a release *beep* *boop* --- ## [13.5.3](https://github.com/LazyVim/LazyVim/compare/v13.5.2...v13.5.3) (2024-11-22) ### Bug Fixes * **copilot:** remove tmp nightly fix ([30f556d](https://github.com/LazyVim/LazyVim/commit/30f556d17aaf7ac74f0553faebed2cf298b65820)) * **dial:** make sure defaults are part of every group. Fixes [#4868](https://github.com/LazyVim/LazyVim/issues/4868) ([2108028](https://github.com/LazyVim/LazyVim/commit/2108028cde19184bf8ea1a00065b5a099b1928e1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 90bbf794..eb6a06d3 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.5.2" + ".": "13.5.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e4bf532f..5975d4ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [13.5.3](https://github.com/LazyVim/LazyVim/compare/v13.5.2...v13.5.3) (2024-11-22) + + +### Bug Fixes + +* **copilot:** remove tmp nightly fix ([30f556d](https://github.com/LazyVim/LazyVim/commit/30f556d17aaf7ac74f0553faebed2cf298b65820)) +* **dial:** make sure defaults are part of every group. Fixes [#4868](https://github.com/LazyVim/LazyVim/issues/4868) ([2108028](https://github.com/LazyVim/LazyVim/commit/2108028cde19184bf8ea1a00065b5a099b1928e1)) + ## [13.5.2](https://github.com/LazyVim/LazyVim/compare/v13.5.1...v13.5.2) (2024-11-19) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4c442294..35edf2f9 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.5.2" -- x-release-please-version +M.version = "13.5.3" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 2c37492461bf6af09a3e940f8b3ea0a123608bfd Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Fri, 22 Nov 2024 03:25:33 -0800 Subject: [PATCH 061/496] fix(snacks): remove lazygit requirement for git browse/blame keymaps (#4869) ## Description The Snacks keymaps for `gitbrowse()` and `git.blame_line()` were in a conditional checking if `lazygit` is installed. But both work without `lazygit`. ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 2b86010f..3283b0d8 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -138,13 +138,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" }) From ecfaed3cc1cbe3013f1201594adde2ea0022c455 Mon Sep 17 00:00:00 2001 From: thisisrandy Date: Fri, 22 Nov 2024 15:05:43 -0800 Subject: [PATCH 062/496] fix(dial): add and/or augend to python ft (#4875) ## Description The python language includes the keywords `and` or `or` for logical operations. The current `dial.nvim` config does not include an augend for swapping these keywords. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/dial.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index e296624a..a9f7bb26 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -108,6 +108,7 @@ return { markdown = "markdown", sass = "css", scss = "css", + python = "python", }, groups = { default = { @@ -151,6 +152,11 @@ return { cyclic = true, -- "or" is incremented into "and". }), }, + python = { + augend.constant.new({ + elements = { "and", "or" }, + }), + }, }, } end, From 5659786893ead10782e2b603c0754d83a0ae78d6 Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Mon, 25 Nov 2024 01:28:26 +0900 Subject: [PATCH 063/496] feat(colorscheme): enable catppuccin snacks integration by default (#4882) ## Description Enable catppuccin's snacks integration by default. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 9087c3ad..93a89668 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -44,6 +44,7 @@ return { noice = true, notify = true, semantic_tokens = true, + snacks = true, telescope = true, treesitter = true, treesitter_context = true, From a03f796097878881509f6f8c3b572319c7095aff Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 24 Nov 2024 16:30:10 +0000 Subject: [PATCH 064/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0fd67be0..aed48916 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 22 +*LazyVim.txt* For Neovim Last change: 2024 November 24 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 91a3c663a7ab6c9ce782e1ff0fd6bc9315f2a670 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 24 Nov 2024 22:03:43 +0100 Subject: [PATCH 065/496] fix(blink): make sure blink.compat is setup correctly when used in extras --- lua/lazyvim/plugins/extras/coding/blink.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index bb65afc3..9bc66d7e 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -21,7 +21,12 @@ return { 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", @@ -39,7 +44,6 @@ return { nerd_font_variant = "mono", windows = { autocomplete = { - -- draw = "reversed", winblend = vim.o.pumblend, }, documentation = { From eb525c680d0423f5addb12e10f87ce5b81fc0d9e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 24 Nov 2024 23:03:03 +0100 Subject: [PATCH 066/496] fix(lazydev): use luals' bundled luv library --- lua/lazyvim/plugins/coding.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 5b2901e3..86b4bdd8 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -183,15 +183,13 @@ return { 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" } }, }, }, }, - -- Manage libuv types with lazy. Plugin will never be loaded - { "Bilal2453/luvit-meta", lazy = true }, -- Add lazydev source to cmp { "hrsh7th/nvim-cmp", From c979225c372f04c3ba4b2f74c3b9c102ddd5f364 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:57:02 +0200 Subject: [PATCH 067/496] fix(octo): upstream changed mappings to `localleader` (#4850) ## Description As of this [PR](https://github.com/pwntester/octo.nvim/pull/681) `` got changed to ``. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/util/octo.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index a8286265..9412e54c 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -22,13 +22,16 @@ return { { "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 }, }, From 30fac4206a393b05736199873bac87ecdfacd2a0 Mon Sep 17 00:00:00 2001 From: Michael Kwan Date: Mon, 25 Nov 2024 08:57:17 -0500 Subject: [PATCH 068/496] fix(java): minisurround jdtls keybind conflict (#4886) ## Description Fixes the keybind conflict with jdtls and mini-surround plugin. When pressing "\" or "\" to start the surround once the java language server starts, it replaces the surround bind with "goto super" and "goto subjects". When pressing "\" quickly, it attempts the command "goto super". When pressing "\" slowly, it brings up "which-key" and the surround bind works. ## Related Issue(s) None ## Screenshots Pressing "\" quickly ![image](https://github.com/user-attachments/assets/8fbaf39f-72cd-4d7d-bcf7-035faa7650e8) Pressing "\" slowly ![image](https://github.com/user-attachments/assets/2ec4d1f3-f900-413c-8351-26cb8a5cbafc) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 6b83fe29..9be1ea9c 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -197,8 +197,8 @@ return { { "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" }, }, }) From 55be9a1648d58d9c7265cb6eb2fab2740ddaeb66 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 25 Nov 2024 13:58:01 +0000 Subject: [PATCH 069/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index aed48916..1918884d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 24 +*LazyVim.txt* For Neovim Last change: 2024 November 25 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 37dbb63c61fc7e53ae65a70f6417be34698a7d6f Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Mon, 25 Nov 2024 22:59:25 +0900 Subject: [PATCH 070/496] docs(readme): enhance the quality of the Chinese translation (#4860) ## Description Enhance the quality of the Chinese README. ### Changes 1. Complete the translation of the untranslated sections. 2. Correct inaccuracies in existing translations. 3. Revise the language to sound more natural and idiomatic. 4. Adjust punctuation and paragraph structure to align with Chinese typography standards. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- README-CN.md | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/README-CN.md b/README-CN.md index b78a398a..76fa3870 100644 --- a/README-CN.md +++ b/README-CN.md @@ -36,9 +36,9 @@ -LazyVim 是由 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 驱动的一套 Neovim 配置,可以轻松自定义和扩展您的配置。 -不必在从头开始或使用预制发行版之间做选择, -LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性,以及默认预配置的便利性。 +LazyVim 是一个基于 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 的 Neovim 配置方案,让定制和扩展变得简单直观。 +您不必再在“从零配置”和“使用预制发行版”之间做选择,LazyVim +提供了一个两全其美的方式——既可以享受默认配置带来的便利,又能根据个人需求来灵活调整各项设置。 ![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png) @@ -46,24 +46,24 @@ LazyVim 提供了两全其美的方式 - 根据需要调整配置的灵活性, ## ✨ 特性 -- 🔥 将你的 Neovim 变成一个成熟的 IDE -- 💤 使用 [lazy.nvim](https://github.com/folke/lazy.nvim) 轻松自定义和扩展您的配置 +- 🔥 将你的 Neovim 打造为一个功能完备的 IDE +- 💤 使用 [lazy.nvim](https://github.com/folke/lazy.nvim) 轻松自定义和扩展您的设置 - 🚀 快如闪电 - 🧹 选项、自动命令和键盘映射的合理预设 -- 📦 预配置了大量插件,随时可用 +- 📦 内置大量精心优化的预配置插件,开箱即用 -## ⚡️ 要求 +## ⚡️ 环境要求 - Neovim >= **0.9.0** (需要用 **LuaJIT** 构建) - Git >= **2.19.0** (用于部分克隆支持) - 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_** - 一个用于 `nvim-treesitter` 的 **C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements) -## 🚀 入门 +## 🚀 开始使用 -您可以在 [此处](https://github.com/LazyVim/starter) 找到 **LazyVim** 的入门模板 +您可以在 [此处](https://github.com/LazyVim/starter) 找到 **LazyVim** 的初始模板 -
在 Docker 中尝试 +
在 Docker 中尝鲜 ```sh docker run -w /root -it --rm alpine:edge sh -uelic ' @@ -91,7 +91,7 @@ docker run -w /root -it --rm alpine:edge sh -uelic ' git clone https://github.com/LazyVim/starter ~/.config/nvim ``` -- 删除 `.git` 文件夹,以便稍后将其添加到您自己的存储库 +- 删除 `.git` 文件夹,以便稍后将其添加到您自己的仓库 ```sh rm -rf ~/.config/nvim/.git @@ -109,22 +109,23 @@ docker run -w /root -it --rm alpine:edge sh -uelic ' --- -[@elijahmanor](https://github.com/elijahmanor) 制作了一段很棒的视频,其中包含入门演练。 +[@elijahmanor](https://github.com/elijahmanor) 制作了一个很棒的视频,可以带领你快速入门。 -[![Watch the video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) +[![查看这个视频](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) -[@dusty-phillips](https://github.com/dusty-phillips) 正在编写一本名为 -[LazyVim for Ambitious Developers](https://lazyvim-ambitious-devs.phillips.codes) -的书,该书可在线免费获得。 +[@dusty-phillips](https://github.com/dusty-phillips) 为 LazyVim 编写了一本全面的书籍 +[《LazyVim for Ambitious Developers》](https://lazyvim-ambitious-devs.phillips.codes) +,可在线上免费阅读。 ## 📂 文件结构 -config 下的文件会在适当的时候自动加载,所以你不需要手动引入这些文件。 -**LazyVim** 带有一组默认配置文件,这些文件将在您的配置**之前**加载。 -看[这里](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config) +config 下的文件会在适当的时候被自动加载,所以你不需要手动引入这些文件。 -您可以在 `lua/plugins/` 下添加自定义插件配置(specs)。 -[lazy.nvim](https://github.com/folke/lazy.nvim) 会自动加载这些文件。 +**LazyVim** 带有一组默认配置文件,这些文件会在您的配置**之前**被加载。 +请看[这里](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config) + +您可以在 `lua/plugins/` 下添加自定义插件配置。 +[lazy.nvim](https://github.com/folke/lazy.nvim) 会自动加载此目录中的全部文件。
 ~/.config/nvim
@@ -141,6 +142,6 @@ config 下的文件会在适当的时候自动加载,所以你不需要手动
 └── init.lua
 
-## ⚙️ Configuration +## ⚙️ 设置 -参考[文档](https://lazyvim.github.io/) +请参阅[官方文档](https://lazyvim.github.io/) From 85e41180654f6cd6c7975442b3a4877b4b4fd475 Mon Sep 17 00:00:00 2001 From: Tim Macfarlane Date: Mon, 25 Nov 2024 14:59:55 +0100 Subject: [PATCH 071/496] fix(lsp): don't leak keymaps from LSP server configs (#4849) ## Description I found an issue where if I'm editing files of different types, say for example `.cs` and `.py` files, they will naturally load the corresponding LSPs for each language. However, if one of those LSPs has keys defined in their `server` config section, then those key maps will leak into the other, so in this case, the `gd` (go to definition) mapping intended for `.cs` buffers is now present in `.py` buffers, causing it not to work. This is currently the case with the `omnisharp` LSP, as it defines a `gd` key map, see: https://github.com/LazyVim/LazyVim/blob/63150fa4c5ec8a6f5c56e9035599a8c8e32dc8ed/lua/lazyvim/plugins/extras/lang/omnisharp.lua#L53-L61 The fix here is to shallow clone the "global" LSP keymaps before adding the LSP server-specific keymaps so the LSP keymaps aren't added to the global ones. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 5310101f..1b62a911 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -67,7 +67,7 @@ function M.resolve(buffer) if not Keys.resolve then return {} end - local spec = M.get() + local spec = vim.tbl_extend("force", {}, M.get()) local opts = LazyVim.opts("nvim-lspconfig") local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do From cdf3f1f2bdc4e57de506a9d7c55fa7e0131be692 Mon Sep 17 00:00:00 2001 From: Ben Elan Date: Mon, 25 Nov 2024 06:00:36 -0800 Subject: [PATCH 072/496] feat(snacks): add keymap to copy url from gitbrowse (#4870) ## Description Adds a `gY` keymap that copies the URL from `Snacks.gitbrowse()` to the clipboard. This is a feature in other git browse plugins like `vim-rhubarb`, so other people will probably be looking for this when migrating like I did. Let me know if you'd prefer a different key combination, thanks! ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 3283b0d8..f92bcd51 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -144,7 +144,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" }) From c9102bc35185284ddce28eb216fd125fa0e0fa8b Mon Sep 17 00:00:00 2001 From: Michael Kwan Date: Tue, 26 Nov 2024 03:13:01 -0500 Subject: [PATCH 073/496] fix(java): give java a default nvim-dap config (#4261) ## Description Currently, there are no Java configurations for nvim-dap upon enabling the Java extras. This requires debugging configurations to be setup manually afterwards. (This is unlike many other language extras which do have nvim-dap support "out of the box") This pr creates an initial configuration for nvim-dap which lets it attach to a debugging process on port 5005. (such as a spring boot application) More can be added if there are any experienced Java devs here. ## Related Issue(s) None ## Screenshots Error message: ![image](https://github.com/user-attachments/assets/5922cf48-6ac7-4a2a-8785-1f9b958089e4) Java remote debugging open: ![image](https://github.com/user-attachments/assets/dfbe7c5b-2308-4aa4-a236-487605e4c75a) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 9be1ea9c..f4c07320 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -40,6 +40,20 @@ return { { "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 d5734087e42ab349b2f3550e253caf599dca27c6 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 26 Nov 2024 08:14:53 +0000 Subject: [PATCH 074/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1918884d..05ebb2c4 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 25 +*LazyVim.txt* For Neovim Last change: 2024 November 26 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 9eccb5d2defef4c1fe63719528b20bb210e1ef0c Mon Sep 17 00:00:00 2001 From: Jakob Pfender Date: Tue, 26 Nov 2024 16:12:56 +0100 Subject: [PATCH 075/496] fix(sql): only use cmp if it is available (#4891) ## Description The blink and sql extras are currently conflicting because the sql extra has a hard dependency on nvim-cmp, which is disabled by the blink extra. Introducing a check for cmp in the sql extra resolves this. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Jakob Pfender --- lua/lazyvim/plugins/extras/lang/sql.lua | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index c9382942..cf6096c4 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,19 +48,21 @@ return { 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 c02275919e8238f2a333bedb4eca8d138b4ea567 Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:39:05 -0800 Subject: [PATCH 076/496] fix(ui): disable indent-blankline on `ft=snacks_dashboard` (#4895) ## Description `indent-blankline.nvim` would act on the snacks dashboard if it was somehow loaded while the dashboard is still open. ## Related Issue(s) ## Screenshots Fixes this: ![image](https://github.com/user-attachments/assets/1f77cf1d-c9c1-48d1-9bf3-8508782e8dd1) ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/ui.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 828d4d01..518d363f 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -216,6 +216,7 @@ return { "mason", "neo-tree", "notify", + "snacks_dashboard", "snacks_notif", "snacks_terminal", "snacks_win", From 66459f9361316fc4f723c8ac12f4fdc44f195b12 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 27 Nov 2024 17:09:59 +0100 Subject: [PATCH 077/496] fix(mini.animate): disable when in Neovide --- lua/lazyvim/plugins/extras/ui/mini-animate.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index 925a9f80..df4587cc 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -3,7 +3,8 @@ return { "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 @@ -32,7 +33,7 @@ return { }):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" }), }, @@ -48,6 +49,6 @@ return { end, }), }, - } + }) end, } From 40dba869254309865fcdabbc6d8c6b8e187c2444 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 27 Nov 2024 17:10:22 +0100 Subject: [PATCH 078/496] feat(extras): added extra for `smear-cursor.nvim` --- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/ui/smear-cursor.lua diff --git a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua new file mode 100644 index 00000000..772b746c --- /dev/null +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -0,0 +1,18 @@ +return { + "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 }, + }, + }, + }, +} From 13dc88a3173bf7313a2510b8927c1fe78cfaa35e Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 27 Nov 2024 16:11:17 +0000 Subject: [PATCH 079/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 05ebb2c4..f5635ce3 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 26 +*LazyVim.txt* For Neovim Last change: 2024 November 27 ============================================================================== Table of Contents *LazyVim-table-of-contents* From ed10d3cf19dfb99d38bda0e09be3296571113670 Mon Sep 17 00:00:00 2001 From: Igor Guerrero Date: Thu, 28 Nov 2024 00:21:00 -0600 Subject: [PATCH 080/496] fix(sql): fix autocomplete, it was using the wrong plugin name on the `LazyVim.has` check (#4900) ## Description `LazyVim.has` was called with the wrong plugin name. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index cf6096c4..2e4f881f 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,7 +48,7 @@ return { 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 76fbed6de59defbe30f79d5a1d6d9a3e27614901 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 28 Nov 2024 06:22:02 +0000 Subject: [PATCH 081/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f5635ce3..6a8fb731 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 27 +*LazyVim.txt* For Neovim Last change: 2024 November 28 ============================================================================== Table of Contents *LazyVim-table-of-contents* From efcba66a2262b2c956a4203f522026f03af9c903 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 28 Nov 2024 07:38:49 +0100 Subject: [PATCH 082/496] fix(blink): updated to config to reflect breaking changes --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 4 +++- lua/lazyvim/plugins/extras/coding/blink.lua | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 57734ac4..7ecfd0b5 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -64,8 +64,10 @@ return { { "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/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 9bc66d7e..45426640 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -42,12 +42,13 @@ return { -- 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, From 7bb954fd1d096dc68217611e696fc02dbca7cf50 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 28 Nov 2024 07:39:10 +0100 Subject: [PATCH 083/496] fix(blink): fixed luasnip completions for blink --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 178cdd0a..d07f481a 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -60,10 +60,24 @@ return { { "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 1847e3fb25cb29a9bc1c662cabe6984509733595 Mon Sep 17 00:00:00 2001 From: gengdz <1583751445@qq.com> Date: Thu, 28 Nov 2024 15:49:40 +0800 Subject: [PATCH 084/496] =?UTF-8?q?feat(lang):=20add=20maxInlayHintLength?= =?UTF-8?q?=20for=20vtsls=20to=20resolve=20inlay=20hint=20to=E2=80=A6=20(#?= =?UTF-8?q?4902)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description feat(lang): add maxInlayHintLength for vtsls to resolve inlay hint too long ## Related Issue(s) * https://github.com/neovim/neovim/issues/27240 * https://github.com/yioneko/vtsls/pull/173 ## Screenshots before ![image](https://github.com/user-attachments/assets/5bc53695-7457-4f8f-bd03-b4de29f6f80d) after ![image](https://github.com/user-attachments/assets/c9281173-4198-4bf2-84cf-33c5d1984550) ## Checklist - [ x ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/typescript.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index dd5ca25c..6d7ae673 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -44,6 +44,7 @@ return { enableMoveToFileCodeAction = true, autoUseWorkspaceTsdk = true, experimental = { + maxInlayHintLength = 30, completion = { enableServerSideFuzzyMatch = true, }, From 2263b94439a14c133358d1abe4c0d7eef914105e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 28 Nov 2024 21:51:21 +0100 Subject: [PATCH 085/496] fix(blink): icons --- lua/lazyvim/plugins/extras/coding/blink.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 45426640..47c598c2 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -100,7 +100,8 @@ return { { "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 275c78665e0534dfb62de34fc1a47e2f0f87acdb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 29 Nov 2024 14:30:47 +0100 Subject: [PATCH 086/496] feat(smear-cursor): enable `cursor_color = "none"`, to show trail using color of target text fg color --- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua index 772b746c..070d2623 100644 --- a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -4,6 +4,7 @@ return { cond = vim.g.neovide == nil, opts = { hide_target_hack = true, + cursor_color = "none", }, specs = { -- disable mini.animate cursor From 2fc7697786e72e02db91dd2242d1407f5b80856b Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 29 Nov 2024 13:31:50 +0000 Subject: [PATCH 087/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6a8fb731..2373c5ae 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 28 +*LazyVim.txt* For Neovim Last change: 2024 November 29 ============================================================================== Table of Contents *LazyVim-table-of-contents* From be0cb9622dd47a5f62fbb32ac6f485a33a253119 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Dec 2024 09:29:18 +0100 Subject: [PATCH 088/496] feat(snacks): added leader-n to show notification history --- lua/lazyvim/plugins/init.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 8ea946ea..06548f82 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -48,14 +48,10 @@ return { words = { enabled = true }, } end, + -- stylua: ignore keys = { - { - "un", - function() - Snacks.notifier.hide() - end, - desc = "Dismiss All Notifications", - }, + { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, + { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, }, config = function(_, opts) local notify = vim.notify From e05379babc99b43e6c97743ba4800449c9c78f60 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Dec 2024 09:30:49 +0100 Subject: [PATCH 089/496] feat(snacks): added leader-S to select a previous scratch buffer --- lua/lazyvim/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 06548f82..6400f86b 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -50,6 +50,7 @@ return { end, -- stylua: ignore keys = { + { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, }, From 6d42f1084d14025d67accbbcbbe9686de505ed96 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Dec 2024 09:31:24 +0100 Subject: [PATCH 090/496] feat(snacks): added leader-. to toggle a scratch buffer. Uses `count` for new scratch buffers --- lua/lazyvim/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 6400f86b..d7a4c5ea 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -50,6 +50,7 @@ return { end, -- stylua: ignore keys = { + { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, From c8bd062ef82a0127f228e04a44e17e1806383f8f Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 1 Dec 2024 08:32:23 +0000 Subject: [PATCH 091/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 2373c5ae..fb70e18e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 November 29 +*LazyVim.txt* For Neovim Last change: 2024 December 01 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 7bdc205e7da3c24d0d3b838ed9d7fdcd62a0ac1d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 09:38:42 +0100 Subject: [PATCH 092/496] chore(main): release 13.6.0 (#4872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [13.6.0](https://github.com/LazyVim/LazyVim/compare/v13.5.3...v13.6.0) (2024-12-01) ### Features * **colorscheme:** enable catppuccin snacks integration by default ([#4882](https://github.com/LazyVim/LazyVim/issues/4882)) ([5659786](https://github.com/LazyVim/LazyVim/commit/5659786893ead10782e2b603c0754d83a0ae78d6)) * **extras:** added extra for `smear-cursor.nvim` ([40dba86](https://github.com/LazyVim/LazyVim/commit/40dba869254309865fcdabbc6d8c6b8e187c2444)) * **lang:** add maxInlayHintLength for vtsls to resolve inlay hint to… ([#4902](https://github.com/LazyVim/LazyVim/issues/4902)) ([1847e3f](https://github.com/LazyVim/LazyVim/commit/1847e3fb25cb29a9bc1c662cabe6984509733595)) * **smear-cursor:** enable `cursor_color = "none"`, to show trail using color of target text fg color ([275c786](https://github.com/LazyVim/LazyVim/commit/275c78665e0534dfb62de34fc1a47e2f0f87acdb)) * **snacks:** add keymap to copy url from gitbrowse ([#4870](https://github.com/LazyVim/LazyVim/issues/4870)) ([cdf3f1f](https://github.com/LazyVim/LazyVim/commit/cdf3f1f2bdc4e57de506a9d7c55fa7e0131be692)) * **snacks:** added leader-. to toggle a scratch buffer. Uses `count` for new scratch buffers ([6d42f10](https://github.com/LazyVim/LazyVim/commit/6d42f1084d14025d67accbbcbbe9686de505ed96)) * **snacks:** added leader-n to show notification history ([be0cb96](https://github.com/LazyVim/LazyVim/commit/be0cb9622dd47a5f62fbb32ac6f485a33a253119)) * **snacks:** added leader-S to select a previous scratch buffer ([e05379b](https://github.com/LazyVim/LazyVim/commit/e05379babc99b43e6c97743ba4800449c9c78f60)) ### Bug Fixes * **blink:** fixed luasnip completions for blink ([7bb954f](https://github.com/LazyVim/LazyVim/commit/7bb954fd1d096dc68217611e696fc02dbca7cf50)) * **blink:** icons ([2263b94](https://github.com/LazyVim/LazyVim/commit/2263b94439a14c133358d1abe4c0d7eef914105e)) * **blink:** make sure blink.compat is setup correctly when used in extras ([91a3c66](https://github.com/LazyVim/LazyVim/commit/91a3c663a7ab6c9ce782e1ff0fd6bc9315f2a670)) * **blink:** updated to config to reflect breaking changes ([efcba66](https://github.com/LazyVim/LazyVim/commit/efcba66a2262b2c956a4203f522026f03af9c903)) * **dial:** add and/or augend to python ft ([#4875](https://github.com/LazyVim/LazyVim/issues/4875)) ([ecfaed3](https://github.com/LazyVim/LazyVim/commit/ecfaed3cc1cbe3013f1201594adde2ea0022c455)) * **java:** give java a default nvim-dap config ([#4261](https://github.com/LazyVim/LazyVim/issues/4261)) ([c9102bc](https://github.com/LazyVim/LazyVim/commit/c9102bc35185284ddce28eb216fd125fa0e0fa8b)) * **java:** minisurround jdtls keybind conflict ([#4886](https://github.com/LazyVim/LazyVim/issues/4886)) ([30fac42](https://github.com/LazyVim/LazyVim/commit/30fac4206a393b05736199873bac87ecdfacd2a0)) * **lazydev:** use luals' bundled luv library ([eb525c6](https://github.com/LazyVim/LazyVim/commit/eb525c680d0423f5addb12e10f87ce5b81fc0d9e)) * **lsp:** don't leak keymaps from LSP server configs ([#4849](https://github.com/LazyVim/LazyVim/issues/4849)) ([85e4118](https://github.com/LazyVim/LazyVim/commit/85e41180654f6cd6c7975442b3a4877b4b4fd475)) * **mini.animate:** disable when in Neovide ([66459f9](https://github.com/LazyVim/LazyVim/commit/66459f9361316fc4f723c8ac12f4fdc44f195b12)) * **octo:** upstream changed mappings to `localleader` ([#4850](https://github.com/LazyVim/LazyVim/issues/4850)) ([c979225](https://github.com/LazyVim/LazyVim/commit/c979225c372f04c3ba4b2f74c3b9c102ddd5f364)) * **snacks:** remove lazygit requirement for git browse/blame keymaps ([#4869](https://github.com/LazyVim/LazyVim/issues/4869)) ([2c37492](https://github.com/LazyVim/LazyVim/commit/2c37492461bf6af09a3e940f8b3ea0a123608bfd)) * **sql:** fix autocomplete, it was using the wrong plugin name on the `LazyVim.has` check ([#4900](https://github.com/LazyVim/LazyVim/issues/4900)) ([ed10d3c](https://github.com/LazyVim/LazyVim/commit/ed10d3cf19dfb99d38bda0e09be3296571113670)) * **sql:** only use cmp if it is available ([#4891](https://github.com/LazyVim/LazyVim/issues/4891)) ([9eccb5d](https://github.com/LazyVim/LazyVim/commit/9eccb5d2defef4c1fe63719528b20bb210e1ef0c)) * **ui:** disable indent-blankline on `ft=snacks_dashboard` ([#4895](https://github.com/LazyVim/LazyVim/issues/4895)) ([c022759](https://github.com/LazyVim/LazyVim/commit/c02275919e8238f2a333bedb4eca8d138b4ea567)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 33 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index eb6a06d3..a05bcac5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.5.3" + ".": "13.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5975d4ae..a9446473 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # Changelog +## [13.6.0](https://github.com/LazyVim/LazyVim/compare/v13.5.3...v13.6.0) (2024-12-01) + + +### Features + +* **colorscheme:** enable catppuccin snacks integration by default ([#4882](https://github.com/LazyVim/LazyVim/issues/4882)) ([5659786](https://github.com/LazyVim/LazyVim/commit/5659786893ead10782e2b603c0754d83a0ae78d6)) +* **extras:** added extra for `smear-cursor.nvim` ([40dba86](https://github.com/LazyVim/LazyVim/commit/40dba869254309865fcdabbc6d8c6b8e187c2444)) +* **lang:** add maxInlayHintLength for vtsls to resolve inlay hint to… ([#4902](https://github.com/LazyVim/LazyVim/issues/4902)) ([1847e3f](https://github.com/LazyVim/LazyVim/commit/1847e3fb25cb29a9bc1c662cabe6984509733595)) +* **smear-cursor:** enable `cursor_color = "none"`, to show trail using color of target text fg color ([275c786](https://github.com/LazyVim/LazyVim/commit/275c78665e0534dfb62de34fc1a47e2f0f87acdb)) +* **snacks:** add keymap to copy url from gitbrowse ([#4870](https://github.com/LazyVim/LazyVim/issues/4870)) ([cdf3f1f](https://github.com/LazyVim/LazyVim/commit/cdf3f1f2bdc4e57de506a9d7c55fa7e0131be692)) +* **snacks:** added leader-. to toggle a scratch buffer. Uses `count` for new scratch buffers ([6d42f10](https://github.com/LazyVim/LazyVim/commit/6d42f1084d14025d67accbbcbbe9686de505ed96)) +* **snacks:** added leader-n to show notification history ([be0cb96](https://github.com/LazyVim/LazyVim/commit/be0cb9622dd47a5f62fbb32ac6f485a33a253119)) +* **snacks:** added leader-S to select a previous scratch buffer ([e05379b](https://github.com/LazyVim/LazyVim/commit/e05379babc99b43e6c97743ba4800449c9c78f60)) + + +### Bug Fixes + +* **blink:** fixed luasnip completions for blink ([7bb954f](https://github.com/LazyVim/LazyVim/commit/7bb954fd1d096dc68217611e696fc02dbca7cf50)) +* **blink:** icons ([2263b94](https://github.com/LazyVim/LazyVim/commit/2263b94439a14c133358d1abe4c0d7eef914105e)) +* **blink:** make sure blink.compat is setup correctly when used in extras ([91a3c66](https://github.com/LazyVim/LazyVim/commit/91a3c663a7ab6c9ce782e1ff0fd6bc9315f2a670)) +* **blink:** updated to config to reflect breaking changes ([efcba66](https://github.com/LazyVim/LazyVim/commit/efcba66a2262b2c956a4203f522026f03af9c903)) +* **dial:** add and/or augend to python ft ([#4875](https://github.com/LazyVim/LazyVim/issues/4875)) ([ecfaed3](https://github.com/LazyVim/LazyVim/commit/ecfaed3cc1cbe3013f1201594adde2ea0022c455)) +* **java:** give java a default nvim-dap config ([#4261](https://github.com/LazyVim/LazyVim/issues/4261)) ([c9102bc](https://github.com/LazyVim/LazyVim/commit/c9102bc35185284ddce28eb216fd125fa0e0fa8b)) +* **java:** minisurround jdtls keybind conflict ([#4886](https://github.com/LazyVim/LazyVim/issues/4886)) ([30fac42](https://github.com/LazyVim/LazyVim/commit/30fac4206a393b05736199873bac87ecdfacd2a0)) +* **lazydev:** use luals' bundled luv library ([eb525c6](https://github.com/LazyVim/LazyVim/commit/eb525c680d0423f5addb12e10f87ce5b81fc0d9e)) +* **lsp:** don't leak keymaps from LSP server configs ([#4849](https://github.com/LazyVim/LazyVim/issues/4849)) ([85e4118](https://github.com/LazyVim/LazyVim/commit/85e41180654f6cd6c7975442b3a4877b4b4fd475)) +* **mini.animate:** disable when in Neovide ([66459f9](https://github.com/LazyVim/LazyVim/commit/66459f9361316fc4f723c8ac12f4fdc44f195b12)) +* **octo:** upstream changed mappings to `localleader` ([#4850](https://github.com/LazyVim/LazyVim/issues/4850)) ([c979225](https://github.com/LazyVim/LazyVim/commit/c979225c372f04c3ba4b2f74c3b9c102ddd5f364)) +* **snacks:** remove lazygit requirement for git browse/blame keymaps ([#4869](https://github.com/LazyVim/LazyVim/issues/4869)) ([2c37492](https://github.com/LazyVim/LazyVim/commit/2c37492461bf6af09a3e940f8b3ea0a123608bfd)) +* **sql:** fix autocomplete, it was using the wrong plugin name on the `LazyVim.has` check ([#4900](https://github.com/LazyVim/LazyVim/issues/4900)) ([ed10d3c](https://github.com/LazyVim/LazyVim/commit/ed10d3cf19dfb99d38bda0e09be3296571113670)) +* **sql:** only use cmp if it is available ([#4891](https://github.com/LazyVim/LazyVim/issues/4891)) ([9eccb5d](https://github.com/LazyVim/LazyVim/commit/9eccb5d2defef4c1fe63719528b20bb210e1ef0c)) +* **ui:** disable indent-blankline on `ft=snacks_dashboard` ([#4895](https://github.com/LazyVim/LazyVim/issues/4895)) ([c022759](https://github.com/LazyVim/LazyVim/commit/c02275919e8238f2a333bedb4eca8d138b4ea567)) + ## [13.5.3](https://github.com/LazyVim/LazyVim/compare/v13.5.2...v13.5.3) (2024-11-22) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 35edf2f9..828cb82a 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.5.3" -- x-release-please-version +M.version = "13.6.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4bf3a392234f4c4421af644683d95d8aab945382 Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:57:55 -0800 Subject: [PATCH 093/496] fix(ui): disable mini.indentscope on `ft=snacks_dashboard` (#4928) ## Description mini.indentscope would act on the snacks dashboard if it was somehow loaded while the dashboard is still open. ## Related Issue(s) I forgot about mini.indentscope in #4895 :) ## Screenshots **Actually** fixes this: ![image](https://github.com/user-attachments/assets/1f77cf1d-c9c1-48d1-9bf3-8508782e8dd1) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ui/mini-indentscope.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua index 3c49d83b..d7d503c8 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua @@ -23,6 +23,7 @@ return { "mason", "neo-tree", "notify", + "snacks_dashboard", "snacks_notif", "snacks_terminal", "snacks_win", From 0d6026a3e8a255cf825ad293de101bc1e1a667eb Mon Sep 17 00:00:00 2001 From: "Andreas Petersen (Guldberg)" Date: Mon, 2 Dec 2024 07:35:04 +0100 Subject: [PATCH 094/496] fix(copilot): CopilotChat.nvim has moved to main (#4931) ## Description CopilotChat.nvim has moved to main ([ref](https://github.com/CopilotC-Nvim/CopilotChat.nvim/issues/665)) ## Related Issue(s) https://github.com/CopilotC-Nvim/CopilotChat.nvim/issues/665 ## Screenshots ![image](https://github.com/user-attachments/assets/2970e3c0-04af-49e9-974b-d535e47b9c12) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot-chat.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index 32d6366f..e71f4db1 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -17,7 +17,7 @@ end return { { "CopilotC-Nvim/CopilotChat.nvim", - branch = "canary", + branch = "main", cmd = "CopilotChat", opts = function() local user = vim.env.USER or "User" From fefcda543127bb9d6cf67a4ae3757b9c29bdabcc Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 2 Dec 2024 06:36:02 +0000 Subject: [PATCH 095/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index fb70e18e..1c43901a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 01 +*LazyVim.txt* For Neovim Last change: 2024 December 02 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 0a9447c1b1776c2d8d7b7d495538ddfab7c6cd08 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Dec 2024 19:43:06 +0100 Subject: [PATCH 096/496] feat(blink): enabled treesitter highlighting --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 47c598c2..a4554f30 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -45,6 +45,7 @@ return { completion = { menu = { winblend = vim.o.pumblend, + draw = { treesitter = true }, }, documentation = { auto_show = true, From 03e203bfbe1e5de38cfc0082e5d1b720cab83c0e Mon Sep 17 00:00:00 2001 From: Sergey Kochetkov Date: Mon, 2 Dec 2024 20:22:55 +0100 Subject: [PATCH 097/496] feat(snacks): silence copy url keymap (#4939) ## Description Silences keymap introduced in related PR ## Related PR(s) https://github.com/LazyVim/LazyVim/pull/4870 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index f92bcd51..f55fefe1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -146,7 +146,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 d71471151b8906155e048ea3d3fe2fa7d651990e Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:51:25 -0800 Subject: [PATCH 098/496] fix(supermaven): blink.cmp integration (#4941) ## Description Supermaven completion now works with the latest release of blink.cmp and blink.compat. I'll also take a look at the other ai extras soon. ~A draft for now, until some issues with ghost text are resolved, see https://github.com/Saghen/blink.cmp/issues/257. Alternatively, enabling the supermaven extra could disable ghost text.~ ## Screenshots ![image](https://github.com/user-attachments/assets/feb8003d-85c5-49a4-80df-7f57b240d371) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 29 ++++---------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 7ecfd0b5..eaabdd66 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -44,38 +44,19 @@ return { }, -- 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 { "saghen/blink.cmp", optional = true, ---@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 9ec253b9b6bf9673f610035d741a345d6be7a44f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Dec 2024 22:34:37 +0100 Subject: [PATCH 099/496] fix(ui): properly clear maximize state on exit. See #4934 --- lua/lazyvim/util/ui.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index a93da5e6..4abd46cc 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -34,7 +34,8 @@ end function M.maximize() ---@type {k:string, v:any}[]? local maximized = nil - return Snacks.toggle({ + local ret + ret = Snacks.toggle({ name = "Maximize", get = function() return maximized ~= nil @@ -54,11 +55,10 @@ function M.maximize() -- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that -- `VimLeavePre` might be another consideration? Not sure about differences between the 2 vim.api.nvim_create_autocmd("ExitPre", { - once = true, group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }), desc = "Restore width/height when close Neovim while maximized", callback = function() - M.maximize.set(false) + ret:set(false) end, }) else @@ -70,6 +70,7 @@ function M.maximize() end end, }) + return ret end return M From 4a626a81372df74c3ea33b435e91b127ef55a796 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 2 Dec 2024 23:46:11 +0100 Subject: [PATCH 100/496] refactor(ui): cleanup maximize code --- lua/lazyvim/util/ui.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 4abd46cc..5d141a37 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -34,8 +34,7 @@ end function M.maximize() ---@type {k:string, v:any}[]? local maximized = nil - local ret - ret = Snacks.toggle({ + local toggle = Snacks.toggle({ name = "Maximize", get = function() return maximized ~= nil @@ -52,15 +51,6 @@ function M.maximize() set("winminwidth", 10) set("winminheight", 4) vim.cmd("wincmd =") - -- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that - -- `VimLeavePre` might be another consideration? Not sure about differences between the 2 - vim.api.nvim_create_autocmd("ExitPre", { - group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }), - desc = "Restore width/height when close Neovim while maximized", - callback = function() - ret:set(false) - end, - }) else for _, opt in ipairs(maximized) do vim.o[opt.k] = opt.v @@ -70,7 +60,19 @@ function M.maximize() end end, }) - return ret + + -- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that + -- `VimLeavePre` might be another consideration? Not sure about differences between the 2 + vim.api.nvim_create_autocmd("ExitPre", { + group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }), + desc = "Restore width/height when close Neovim while maximized", + callback = function() + if toggle:get() then + toggle:set(false) + end + end, + }) + return toggle end return M From f841ecf6bdde98a0983e44171b1ad8513e159e29 Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:06:58 -0800 Subject: [PATCH 101/496] feat(extras.ai): blink.cmp integration and kind overrides for menu drawing (#4942) ## Description blink.cmp integration for codeium and copilot, and correct menu drawing for codeium, copilot, and supermaven. I've simplified the blink.cmp config a bit for these extras (especially for copilot, which was extremely nested) by only including the blink.cmp spec if vim.g.ai_cmp is true. Multiple AI extras can now be enabled at the same time with blink.cmp. blink.cmp ghost text is now always enabled. Although some ai plugins always display virtual text, at worst it overlaps with blink's ghost text and is not noticable. Lastly, I can't test copilot because I don't have a subscription, nor do I want to sign up for one, but it should work just as well as the others. ## Screenshots With Codeium: ![image](https://github.com/user-attachments/assets/1485ee3f-1cba-440f-8a82-ec69b4a3f473) Multiple extras enabled at the same time: ![image](https://github.com/user-attachments/assets/4364ee45-d79b-4f97-a4c0-cf2a2b6433c6) ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/ai/codeium.lua | 12 +++--- lua/lazyvim/plugins/extras/ai/copilot.lua | 34 ++++++--------- lua/lazyvim/plugins/extras/ai/supermaven.lua | 15 +++---- lua/lazyvim/plugins/extras/ai/tabnine.lua | 44 ++++++++++++-------- lua/lazyvim/plugins/extras/coding/blink.lua | 25 ++++++++++- 5 files changed, 73 insertions(+), 57 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index 6d2646a1..70adaaf8 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -55,17 +55,15 @@ return { end, }, - { + vim.g.ai_cmp and { "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, - }, - }, + } or nil, } diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4fd3119c..cfe54aa5 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -94,31 +94,23 @@ return { }, }, - -- blink.cmp - { + vim.g.ai_cmp and { "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" }, - }, - }, - }, + dependencies = { "giuxtaposition/blink-cmp-copilot" }, + opts = { + sources = { + completion = { + enabled_providers = { "copilot" }, + }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + kind = "Copilot", }, }, }, }, - }, + } or nil, } diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index eaabdd66..35a955ca 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -43,22 +43,17 @@ return { end, }, - -- blink.cmp integration - { + vim.g.ai_cmp and { "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, - }, - }, + } or nil, { "nvim-lualine/lualine.nvim", diff --git a/lua/lazyvim/plugins/extras/ai/tabnine.lua b/lua/lazyvim/plugins/extras/ai/tabnine.lua index b75db9ec..f1df9f7d 100644 --- a/lua/lazyvim/plugins/extras/ai/tabnine.lua +++ b/lua/lazyvim/plugins/extras/ai/tabnine.lua @@ -1,25 +1,22 @@ return { -- Tabnine cmp source + { + "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, + }, + { "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, { @@ -36,6 +33,19 @@ return { end) end, }, + + { + "saghen/blink.cmp", + optional = true, + dependencies = { "tzachar/cmp-tabnine", "saghen/blink.compat" }, + opts = { + sources = { + compat = { "cmp_tabnine" }, + providers = { cmp_tabnine = { kind = "TabNine" } }, + }, + }, + }, + -- Show TabNine status in lualine { "nvim-lualine/lualine.nvim", diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index a4554f30..67344187 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -44,8 +44,9 @@ return { nerd_font_variant = "mono", completion = { menu = { - winblend = vim.o.pumblend, - draw = { treesitter = true }, + draw = { + treesitter = true, + }, }, documentation = { auto_show = true, @@ -93,6 +94,26 @@ return { 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 efc95dc6aaed3d09ea4eaefe21f668f24da2ae2e Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 3 Dec 2024 20:08:00 +0000 Subject: [PATCH 102/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1c43901a..d5168434 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 02 +*LazyVim.txt* For Neovim Last change: 2024 December 03 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 090ca75d3b326280a67e727ef77e15920a90e3c9 Mon Sep 17 00:00:00 2001 From: jyuan0 Date: Thu, 5 Dec 2024 02:46:15 -0500 Subject: [PATCH 103/496] fix(blink): update config for latest changes (#4953) ## Description Update the blink.cmp config for the latest changes. Mainly fixing the experimental `auto_brackets` support (moved under the `completion` key). The other changes are either the same as the defaults, or commented out - they were simply updated to reflect the new config format. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 67344187..ef6a04c7 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -33,16 +33,22 @@ return { ---@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, @@ -57,11 +63,9 @@ return { }, }, - -- 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 From 097b9e2f275c7d0f68178fda57bada5e22d93c2c Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 5 Dec 2024 07:47:07 +0000 Subject: [PATCH 104/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d5168434..241c66f5 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 03 +*LazyVim.txt* For Neovim Last change: 2024 December 05 ============================================================================== Table of Contents *LazyVim-table-of-contents* From bfe29fb01330d2bfdfe14582133907217f4b8192 Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:10:44 -0800 Subject: [PATCH 105/496] fix(ui): actually disable mini-indentscope on snacks_dashboard (#4947) ## Description Disables mini.indentscope for the buffer on which the `SnacksDashboardOpened` autocmd is called. ## Related Issue(s) closes #4944 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ui/mini-indentscope.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua index d7d503c8..e3117e26 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua @@ -34,6 +34,13 @@ return { 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, }, { From 12e37529e718b926e7513d0397e32771aeb6e049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Kothe?= Date: Thu, 5 Dec 2024 05:11:11 -0300 Subject: [PATCH 106/496] fix(tex): specify filetype for l (#4905) ## Description Specify the filetype for the keymap `l` to ensure that this keybinding group only appears when editing TeX files. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/tex.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/tex.lua b/lua/lazyvim/plugins/extras/lang/tex.lua index 870a3fda..9ced69e1 100644 --- a/lua/lazyvim/plugins/extras/lang/tex.lua +++ b/lua/lazyvim/plugins/extras/lang/tex.lua @@ -30,7 +30,7 @@ return { vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog" end, keys = { - { "l", "", desc = "+vimtex" }, + { "l", "", desc = "+vimtex", ft = "tex" }, }, }, From 83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Thu, 5 Dec 2024 00:11:40 -0800 Subject: [PATCH 107/496] fix(extras.treesitter-context): change event back to `LazyFile` (#4940) ## Description Load treesitter-context on `LazyFile` instead of `VeryLazy`. IMHO it didn't make sense to load the plugin earlier just so that the toggle is available, especially when the toggle won't actually have any effect anything until a file is opened. ~Previously, treesitter-context was loaded on `VeryLazy` and its toggle map in `opt`, which also `require`d it. Now, mapping happens in config, after treesitter-context is setup (also how toggle is handled in other extras, eg for render-markdown).~ ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ui/treesitter-context.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-context.lua b/lua/lazyvim/plugins/extras/ui/treesitter-context.lua index ba9565a1..866e72f2 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-context.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-context.lua @@ -1,7 +1,7 @@ -- Show context of the current function return { "nvim-treesitter/nvim-treesitter-context", - event = "VeryLazy", + event = "LazyFile", opts = function() local tsc = require("treesitter-context") Snacks.toggle({ From 8232651c4a4a80da34f8b6c1742b04144ae4b959 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 5 Dec 2024 09:18:16 +0100 Subject: [PATCH 108/496] feat(toggle): added leader-A to toggle tabline. Closes #4951 --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index f55fefe1..f35e4db9 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -128,6 +128,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 From ea794ffd94adeb2b1d2870ed97dbd3f000d911b3 Mon Sep 17 00:00:00 2001 From: Matteo Bigoi <1781140+crisidev@users.noreply.github.com> Date: Thu, 5 Dec 2024 08:20:34 +0000 Subject: [PATCH 109/496] feat(rust): add bacon-ls and improve debugging (#3212) ## Changes **NOTE: the PR will be in draft until https://github.com/mason-org/mason-registry/pull/5774 is not merged** Some improvements in the Rust extra - Set `codelldb` adapter for rustacean.nvim - Add support for [bacon-ls](https://github.com/crisidev/bacon-ls) ([blog post](https://lmno.lol/crisidev/bacon-language-server)) `bacon-ls` can be used as an alternative to `rust-analyzer` for diagnostics, improving `rust-analyzer` performances. This is configured by `vim.g.lazyvim_rust_diagnostics`, which can be set to `rust-analyzer` or `bacon-lsp`. screenshot --------- Co-authored-by: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> --- lua/lazyvim/plugins/extras/lang/rust.lua | 39 ++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 583981d4..b01a61ff 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -1,3 +1,13 @@ +if lazyvim_docs then + -- 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" +end + +local diagnostics = vim.g.lazyvim_rust_diagnostics or "rust-analyzer" + return { recommended = function() return LazyVim.extras.wants({ @@ -35,7 +45,13 @@ return { { "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, }, { @@ -62,8 +78,12 @@ return { 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 = { @@ -77,6 +97,16 @@ return { }, }, 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( @@ -92,6 +122,9 @@ return { "neovim/nvim-lspconfig", opts = { servers = { + bacon_ls = { + enabled = diagnostics == "bacon-ls", + }, rust_analyzer = { enabled = false }, }, }, From 8a3321d827e58dbf09ec123cc24bc7a2d96dd117 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:22:10 +0100 Subject: [PATCH 110/496] chore(main): release 13.7.0 (#4929) :robot: I have created a release *beep* *boop* --- ## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05) ### Features * **blink:** enabled treesitter highlighting ([0a9447c](https://github.com/LazyVim/LazyVim/commit/0a9447c1b1776c2d8d7b7d495538ddfab7c6cd08)) * **extras.ai:** blink.cmp integration and kind overrides for menu drawing ([#4942](https://github.com/LazyVim/LazyVim/issues/4942)) ([f841ecf](https://github.com/LazyVim/LazyVim/commit/f841ecf6bdde98a0983e44171b1ad8513e159e29)) * **rust:** add bacon-ls and improve debugging ([#3212](https://github.com/LazyVim/LazyVim/issues/3212)) ([ea794ff](https://github.com/LazyVim/LazyVim/commit/ea794ffd94adeb2b1d2870ed97dbd3f000d911b3)) * **snacks:** silence copy url keymap ([#4939](https://github.com/LazyVim/LazyVim/issues/4939)) ([03e203b](https://github.com/LazyVim/LazyVim/commit/03e203bfbe1e5de38cfc0082e5d1b720cab83c0e)) * **toggle:** added leader-A to toggle tabline. Closes [#4951](https://github.com/LazyVim/LazyVim/issues/4951) ([8232651](https://github.com/LazyVim/LazyVim/commit/8232651c4a4a80da34f8b6c1742b04144ae4b959)) ### Bug Fixes * **blink:** update config for latest changes ([#4953](https://github.com/LazyVim/LazyVim/issues/4953)) ([090ca75](https://github.com/LazyVim/LazyVim/commit/090ca75d3b326280a67e727ef77e15920a90e3c9)) * **copilot:** CopilotChat.nvim has moved to main ([#4931](https://github.com/LazyVim/LazyVim/issues/4931)) ([0d6026a](https://github.com/LazyVim/LazyVim/commit/0d6026a3e8a255cf825ad293de101bc1e1a667eb)) * **extras.treesitter-context:** change event back to `LazyFile` ([#4940](https://github.com/LazyVim/LazyVim/issues/4940)) ([83017ff](https://github.com/LazyVim/LazyVim/commit/83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d)) * **supermaven:** blink.cmp integration ([#4941](https://github.com/LazyVim/LazyVim/issues/4941)) ([d714711](https://github.com/LazyVim/LazyVim/commit/d71471151b8906155e048ea3d3fe2fa7d651990e)) * **tex:** specify filetype for <localleader>l ([#4905](https://github.com/LazyVim/LazyVim/issues/4905)) ([12e3752](https://github.com/LazyVim/LazyVim/commit/12e37529e718b926e7513d0397e32771aeb6e049)) * **ui:** actually disable mini-indentscope on snacks_dashboard ([#4947](https://github.com/LazyVim/LazyVim/issues/4947)) ([bfe29fb](https://github.com/LazyVim/LazyVim/commit/bfe29fb01330d2bfdfe14582133907217f4b8192)) * **ui:** disable mini.indentscope on `ft=snacks_dashboard` ([#4928](https://github.com/LazyVim/LazyVim/issues/4928)) ([4bf3a39](https://github.com/LazyVim/LazyVim/commit/4bf3a392234f4c4421af644683d95d8aab945382)) * **ui:** properly clear maximize state on exit. See [#4934](https://github.com/LazyVim/LazyVim/issues/4934) ([9ec253b](https://github.com/LazyVim/LazyVim/commit/9ec253b9b6bf9673f610035d741a345d6be7a44f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a05bcac5..c6631505 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.6.0" + ".": "13.7.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a9446473..5421ba1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05) + + +### Features + +* **blink:** enabled treesitter highlighting ([0a9447c](https://github.com/LazyVim/LazyVim/commit/0a9447c1b1776c2d8d7b7d495538ddfab7c6cd08)) +* **extras.ai:** blink.cmp integration and kind overrides for menu drawing ([#4942](https://github.com/LazyVim/LazyVim/issues/4942)) ([f841ecf](https://github.com/LazyVim/LazyVim/commit/f841ecf6bdde98a0983e44171b1ad8513e159e29)) +* **rust:** add bacon-ls and improve debugging ([#3212](https://github.com/LazyVim/LazyVim/issues/3212)) ([ea794ff](https://github.com/LazyVim/LazyVim/commit/ea794ffd94adeb2b1d2870ed97dbd3f000d911b3)) +* **snacks:** silence copy url keymap ([#4939](https://github.com/LazyVim/LazyVim/issues/4939)) ([03e203b](https://github.com/LazyVim/LazyVim/commit/03e203bfbe1e5de38cfc0082e5d1b720cab83c0e)) +* **toggle:** added leader-A to toggle tabline. Closes [#4951](https://github.com/LazyVim/LazyVim/issues/4951) ([8232651](https://github.com/LazyVim/LazyVim/commit/8232651c4a4a80da34f8b6c1742b04144ae4b959)) + + +### Bug Fixes + +* **blink:** update config for latest changes ([#4953](https://github.com/LazyVim/LazyVim/issues/4953)) ([090ca75](https://github.com/LazyVim/LazyVim/commit/090ca75d3b326280a67e727ef77e15920a90e3c9)) +* **copilot:** CopilotChat.nvim has moved to main ([#4931](https://github.com/LazyVim/LazyVim/issues/4931)) ([0d6026a](https://github.com/LazyVim/LazyVim/commit/0d6026a3e8a255cf825ad293de101bc1e1a667eb)) +* **extras.treesitter-context:** change event back to `LazyFile` ([#4940](https://github.com/LazyVim/LazyVim/issues/4940)) ([83017ff](https://github.com/LazyVim/LazyVim/commit/83017ff28afa8b8ddf9254564d8b4a9c96ec3f7d)) +* **supermaven:** blink.cmp integration ([#4941](https://github.com/LazyVim/LazyVim/issues/4941)) ([d714711](https://github.com/LazyVim/LazyVim/commit/d71471151b8906155e048ea3d3fe2fa7d651990e)) +* **tex:** specify filetype for <localleader>l ([#4905](https://github.com/LazyVim/LazyVim/issues/4905)) ([12e3752](https://github.com/LazyVim/LazyVim/commit/12e37529e718b926e7513d0397e32771aeb6e049)) +* **ui:** actually disable mini-indentscope on snacks_dashboard ([#4947](https://github.com/LazyVim/LazyVim/issues/4947)) ([bfe29fb](https://github.com/LazyVim/LazyVim/commit/bfe29fb01330d2bfdfe14582133907217f4b8192)) +* **ui:** disable mini.indentscope on `ft=snacks_dashboard` ([#4928](https://github.com/LazyVim/LazyVim/issues/4928)) ([4bf3a39](https://github.com/LazyVim/LazyVim/commit/4bf3a392234f4c4421af644683d95d8aab945382)) +* **ui:** properly clear maximize state on exit. See [#4934](https://github.com/LazyVim/LazyVim/issues/4934) ([9ec253b](https://github.com/LazyVim/LazyVim/commit/9ec253b9b6bf9673f610035d741a345d6be7a44f)) + ## [13.6.0](https://github.com/LazyVim/LazyVim/compare/v13.5.3...v13.6.0) (2024-12-01) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 828cb82a..d4e1fb95 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.6.0" -- x-release-please-version +M.version = "13.7.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From b2f750558a3737879f8151e741e7a3988886e37f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 5 Dec 2024 09:52:47 +0100 Subject: [PATCH 111/496] fix(keymaps): toggle name --- lua/lazyvim/config/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index f35e4db9..31934117 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -127,8 +127,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 From 5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6 Mon Sep 17 00:00:00 2001 From: Felix Rath Date: Fri, 6 Dec 2024 16:35:27 +0100 Subject: [PATCH 112/496] fix(rust): only use mason.nvim if it is present (#4963) ## Description Fix the lang/rust extra for users that don't use mason. Uses the fix suggested in https://github.com/LazyVim/LazyVim/issues/4957#issuecomment-2521787846, which works perfectly! ## Related Issue(s) Fixes https://github.com/LazyVim/LazyVim/issues/4957 ## Screenshots n/a ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Felix Rath --- lua/lazyvim/plugins/extras/lang/rust.lua | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index b01a61ff..eec3ce2d 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -97,16 +97,18 @@ return { }, }, 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 d424a02554caf33fdad0244c1a51b7c3b58bbac7 Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 6 Dec 2024 15:36:29 +0000 Subject: [PATCH 113/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 241c66f5..d47c7359 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 05 +*LazyVim.txt* For Neovim Last change: 2024 December 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 2ebba15e1274f5437a418ddacfe9dbf342fd8a18 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 7 Dec 2024 11:57:21 +0100 Subject: [PATCH 114/496] feat(git): added toggles for gitsigns.nvim and mini.diff --- lua/lazyvim/plugins/editor.lua | 14 +++++++++++ .../plugins/extras/editor/mini-diff.lua | 23 +++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index bac949fc..2610081b 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -300,6 +300,20 @@ return { end, }, }, + { + "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, + }, -- better diagnostics list and others { diff --git a/lua/lazyvim/plugins/extras/editor/mini-diff.lua b/lua/lazyvim/plugins/extras/editor/mini-diff.lua index 6e5040ad..682103eb 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-diff.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-diff.lua @@ -29,6 +29,29 @@ return { }, }, }, + { + "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 integration { From 0d717329027fd06bda3dd632599ffed3664c5de7 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 7 Dec 2024 10:58:17 +0000 Subject: [PATCH 115/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d47c7359..b9154a47 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 06 +*LazyVim.txt* For Neovim Last change: 2024 December 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3f4b1ff00364d089e19f4b3c738fd5298243fadb Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 7 Dec 2024 20:52:13 +0100 Subject: [PATCH 116/496] fix(mini.diff): toggle --- lua/lazyvim/plugins/extras/editor/mini-diff.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/mini-diff.lua b/lua/lazyvim/plugins/extras/editor/mini-diff.lua index 682103eb..fe25c11e 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-diff.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-diff.lua @@ -35,10 +35,10 @@ return { 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 From 7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 7 Dec 2024 20:52:48 +0100 Subject: [PATCH 117/496] fix(dot): kitty ft with bash treesitter highlights --- lua/lazyvim/plugins/extras/util/dot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index ba2f627d..e24b9fe0 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -39,11 +39,12 @@ return { 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 3c605f547c594b509d83f8677bb7609c005edea5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 21:53:24 +0100 Subject: [PATCH 118/496] chore(main): release 13.8.0 (#4955) :robot: I have created a release *beep* *boop* --- ## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07) ### Features * **git:** added toggles for gitsigns.nvim and mini.diff ([2ebba15](https://github.com/LazyVim/LazyVim/commit/2ebba15e1274f5437a418ddacfe9dbf342fd8a18)) ### Bug Fixes * **dot:** kitty ft with bash treesitter highlights ([7ef2dfd](https://github.com/LazyVim/LazyVim/commit/7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217)) * **keymaps:** toggle name ([b2f7505](https://github.com/LazyVim/LazyVim/commit/b2f750558a3737879f8151e741e7a3988886e37f)) * **mini.diff:** toggle ([3f4b1ff](https://github.com/LazyVim/LazyVim/commit/3f4b1ff00364d089e19f4b3c738fd5298243fadb)) * **rust:** only use mason.nvim if it is present ([#4963](https://github.com/LazyVim/LazyVim/issues/4963)) ([5ddad99](https://github.com/LazyVim/LazyVim/commit/5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c6631505..c9031c19 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.7.0" + ".": "13.8.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5421ba1f..7bac3051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07) + + +### Features + +* **git:** added toggles for gitsigns.nvim and mini.diff ([2ebba15](https://github.com/LazyVim/LazyVim/commit/2ebba15e1274f5437a418ddacfe9dbf342fd8a18)) + + +### Bug Fixes + +* **dot:** kitty ft with bash treesitter highlights ([7ef2dfd](https://github.com/LazyVim/LazyVim/commit/7ef2dfd3ba9a3dffaa8c57c1bb5e130b9aa74217)) +* **keymaps:** toggle name ([b2f7505](https://github.com/LazyVim/LazyVim/commit/b2f750558a3737879f8151e741e7a3988886e37f)) +* **mini.diff:** toggle ([3f4b1ff](https://github.com/LazyVim/LazyVim/commit/3f4b1ff00364d089e19f4b3c738fd5298243fadb)) +* **rust:** only use mason.nvim if it is present ([#4963](https://github.com/LazyVim/LazyVim/issues/4963)) ([5ddad99](https://github.com/LazyVim/LazyVim/commit/5ddad99bac203e87e6f78f3ab7567a49b0d1d8a6)) + ## [13.7.0](https://github.com/LazyVim/LazyVim/compare/v13.6.0...v13.7.0) (2024-12-05) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d4e1fb95..02568c65 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.7.0" -- x-release-please-version +M.version = "13.8.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 71ea193cf6ee9e8021be2e8c7f277f757779c1ac Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 8 Dec 2024 20:54:21 +0000 Subject: [PATCH 119/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b9154a47..e3563379 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 07 +*LazyVim.txt* For Neovim Last change: 2024 December 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 99c361f708924ddc63599115580bda537cc7f119 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 10 Dec 2024 00:31:34 +0100 Subject: [PATCH 120/496] fix(autocmds): remove snacks_win from close_with_q, since they have their own keymaps --- lua/lazyvim/config/autocmds.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index 7e6018fa..a86594a3 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -66,7 +66,6 @@ vim.api.nvim_create_autocmd("FileType", { "neotest-summary", "notify", "qf", - "snacks_win", "spectre_panel", "startuptime", "tsplayground", From 4b86cf99007219671ed96fa59385d1d1896178c5 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 9 Dec 2024 23:32:30 +0000 Subject: [PATCH 121/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e3563379..fc4d4920 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 08 +*LazyVim.txt* For Neovim Last change: 2024 December 09 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 1519cd6da7bd1e2a32993b96044e8c8f8fff45be Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 10 Dec 2024 12:09:38 +0100 Subject: [PATCH 122/496] chore: remove dead code. Closes #4985 --- lua/lazyvim/util/cmp.lua | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lua/lazyvim/util/cmp.lua b/lua/lazyvim/util/cmp.lua index ebe0209b..34bb44c4 100644 --- a/lua/lazyvim/util/cmp.lua +++ b/lua/lazyvim/util/cmp.lua @@ -100,20 +100,6 @@ function M.add_missing_snippet_docs(window) end end -function M.visible() - ---@module 'blink.cmp' - local blink = package.loaded["blink.cmp"] - if blink then - return blink.windows and blink.windows.autocomplete.win:is_open() - end - ---@module 'cmp' - local cmp = package.loaded["cmp"] - if cmp then - return cmp.core.view:visible() - end - return false -end - -- This is a better implementation of `cmp.confirm`: -- * check if the completion menu is visible without waiting for running sources -- * create an undo point before confirming From e2c189e066258d7e5c0e391708449195f735f5ff Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 10 Dec 2024 11:10:44 +0000 Subject: [PATCH 123/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index fc4d4920..9b01f8bf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 09 +*LazyVim.txt* For Neovim Last change: 2024 December 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 9ad1c49b67a5c4330e366cde41ab11b156de03f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?deniz=20g=C3=B6k=C3=A7in?= <33603535+dgokcin@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:13:01 +0100 Subject: [PATCH 124/496] feat(vscode): add vscode-specific keymaps and sync undo/redo with vscode (#4983) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary This pull request introduces several new keymaps specifically for VSCode when using LazyVim. These changes aim to enhance the integration between VSCode and LazyVim by adding keymaps for, tab navigation, and syncing nvim undo/redo actions with vscode undo/redo. ## Changes - Synced undo/redo lists with VSCode using `VSCodeNotify`: (check https://github.com/vscode-neovim/vscode-neovim/issues/1139 for more details) - `u` for undo - `` for redo - Enabled navigation of VSCode tabs similar to LazyVim buffers: - `` to go to the previous editor - `` to go to the next editor ## Additional Notes These changes are intended to improve the user experience for those who use LazyVim within VSCode by providing more intuitive and consistent keybindings. Please test these keymaps to ensure they work as expected in your VSCode setup. Co-authored-by: Deniz Gökçin --- lua/lazyvim/plugins/extras/vscode.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index e941d91c..e32069c7 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -33,9 +33,18 @@ end vim.api.nvim_create_autocmd("User", { pattern = "LazyVimKeymapsDefaults", callback = function() + -- VSCode-specific keymaps for search and navigation vim.keymap.set("n", "", "Find") vim.keymap.set("n", "/", [[lua require('vscode').action('workbench.action.findInFiles')]]) vim.keymap.set("n", "ss", [[lua require('vscode').action('workbench.action.gotoSymbol')]]) + + -- Keep undo/redo lists in sync with VsCode + vim.keymap.set("n", "u", "call VSCodeNotify('undo')") + vim.keymap.set("n", "", "call VSCodeNotify('redo')") + + -- Navigate VSCode tabs like lazyvim buffers + vim.keymap.set("n", "", "call VSCodeNotify('workbench.action.previousEditor')") + vim.keymap.set("n", "", "call VSCodeNotify('workbench.action.nextEditor')") end, }) From 439340bd8a970aa23d513aea96c93e84b3af42dc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 11 Dec 2024 10:57:07 +0100 Subject: [PATCH 125/496] fix(blink): config breaking changes. Fixes #4990 --- lua/lazyvim/plugins/extras/ai/copilot.lua | 4 +--- lua/lazyvim/plugins/extras/coding/blink.lua | 24 ++++++++++----------- lua/lazyvim/plugins/extras/lang/sql.lua | 4 +--- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index cfe54aa5..fc014fa6 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -100,9 +100,7 @@ return { dependencies = { "giuxtaposition/blink-cmp-copilot" }, opts = { sources = { - completion = { - enabled_providers = { "copilot" }, - }, + default = { "copilot" }, providers = { copilot = { name = "copilot", diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index ef6a04c7..234ede72 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -17,6 +17,7 @@ return { opts_extend = { "sources.completion.enabled_providers", "sources.compat", + "sources.default", }, dependencies = { "rafamadriz/friendly-snippets", @@ -70,10 +71,7 @@ return { -- 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 = { @@ -87,7 +85,7 @@ return { ---@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", @@ -99,6 +97,12 @@ return { 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} @@ -136,15 +140,9 @@ return { "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/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 2e4f881f..075182d6 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -130,9 +130,7 @@ return { optional = true, opts = { sources = { - completion = { - enabled_providers = { "dadbod" }, - }, + default = { "dadbod" }, providers = { dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" }, }, From 87915a1f23cfe7008a0591ad264830678600a5bb Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 11 Dec 2024 09:58:12 +0000 Subject: [PATCH 126/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 9b01f8bf..d31dd913 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 10 +*LazyVim.txt* For Neovim Last change: 2024 December 11 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8c79ab601af19b5370d560aa619567371ac70d86 Mon Sep 17 00:00:00 2001 From: Valentin Degenne Date: Wed, 11 Dec 2024 11:13:57 +0100 Subject: [PATCH 127/496] feat(luasnip): add default user snippet location (#4987) ## Description Loads snippets in user directories if it exists. ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index d07f481a..8a5adfe9 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -14,6 +14,7 @@ return { "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, }, }, From 475e3f32b82db0cc497f712953993dcce4f048c6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:29:18 +0100 Subject: [PATCH 128/496] chore(main): release 13.9.0 (#4979) :robot: I have created a release *beep* *boop* --- ## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11) ### Features * **luasnip:** add default user snippet location ([#4987](https://github.com/LazyVim/LazyVim/issues/4987)) ([8c79ab6](https://github.com/LazyVim/LazyVim/commit/8c79ab601af19b5370d560aa619567371ac70d86)) * **vscode:** add vscode-specific keymaps and sync undo/redo with vscode ([#4983](https://github.com/LazyVim/LazyVim/issues/4983)) ([9ad1c49](https://github.com/LazyVim/LazyVim/commit/9ad1c49b67a5c4330e366cde41ab11b156de03f2)) ### Bug Fixes * **autocmds:** remove snacks_win from close_with_q, since they have their own keymaps ([99c361f](https://github.com/LazyVim/LazyVim/commit/99c361f708924ddc63599115580bda537cc7f119)) * **blink:** config breaking changes. Fixes [#4990](https://github.com/LazyVim/LazyVim/issues/4990) ([439340b](https://github.com/LazyVim/LazyVim/commit/439340bd8a970aa23d513aea96c93e84b3af42dc)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c9031c19..f36fac34 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.8.0" + ".": "13.9.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bac3051..06653e5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11) + + +### Features + +* **luasnip:** add default user snippet location ([#4987](https://github.com/LazyVim/LazyVim/issues/4987)) ([8c79ab6](https://github.com/LazyVim/LazyVim/commit/8c79ab601af19b5370d560aa619567371ac70d86)) +* **vscode:** add vscode-specific keymaps and sync undo/redo with vscode ([#4983](https://github.com/LazyVim/LazyVim/issues/4983)) ([9ad1c49](https://github.com/LazyVim/LazyVim/commit/9ad1c49b67a5c4330e366cde41ab11b156de03f2)) + + +### Bug Fixes + +* **autocmds:** remove snacks_win from close_with_q, since they have their own keymaps ([99c361f](https://github.com/LazyVim/LazyVim/commit/99c361f708924ddc63599115580bda537cc7f119)) +* **blink:** config breaking changes. Fixes [#4990](https://github.com/LazyVim/LazyVim/issues/4990) ([439340b](https://github.com/LazyVim/LazyVim/commit/439340bd8a970aa23d513aea96c93e84b3af42dc)) + ## [13.8.0](https://github.com/LazyVim/LazyVim/compare/v13.7.0...v13.8.0) (2024-12-07) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 02568c65..0090b5cf 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.8.0" -- x-release-please-version +M.version = "13.9.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From cee60a6d3040181ac9c5b709d79e80e180b34d48 Mon Sep 17 00:00:00 2001 From: Stefan Boca <45266795+stefanboca@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:29:08 -0800 Subject: [PATCH 129/496] fix(blink): set kind to int, not string, if overriding (#4999) ## Description when sorting completion results, blink compares kinds, which can result in an error if the kind is a string ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 234ede72..94ee6b9f 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -107,7 +107,12 @@ return { 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 @@ -115,7 +120,7 @@ return { 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 69e8867a0f54c677c9b7e478e9ab08956f5cbc46 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 12 Dec 2024 05:30:09 +0000 Subject: [PATCH 130/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d31dd913..d11867af 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 11 +*LazyVim.txt* For Neovim Last change: 2024 December 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 31af2075423d0e6d3c4f10ab299498471afe4ea0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:47:07 +0100 Subject: [PATCH 131/496] chore(main): release 13.9.1 (#5003) :robot: I have created a release *beep* *boop* --- ## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12) ### Bug Fixes * **blink:** set kind to int, not string, if overriding ([#4999](https://github.com/LazyVim/LazyVim/issues/4999)) ([cee60a6](https://github.com/LazyVim/LazyVim/commit/cee60a6d3040181ac9c5b709d79e80e180b34d48)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index f36fac34..2395b1f5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.9.0" + ".": "13.9.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 06653e5f..d9dd45fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12) + + +### Bug Fixes + +* **blink:** set kind to int, not string, if overriding ([#4999](https://github.com/LazyVim/LazyVim/issues/4999)) ([cee60a6](https://github.com/LazyVim/LazyVim/commit/cee60a6d3040181ac9c5b709d79e80e180b34d48)) + ## [13.9.0](https://github.com/LazyVim/LazyVim/compare/v13.8.0...v13.9.0) (2024-12-11) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 0090b5cf..b1132523 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.9.0" -- x-release-please-version +M.version = "13.9.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ae2340f60a012df125c87fe46e6d98d0be04bd10 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 06:55:18 +0100 Subject: [PATCH 132/496] feat(pick)!: make fzf the default picker for LazyVim --- lua/lazyvim/util/pick.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index 7ab2b482..fa9ff821 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -45,7 +45,7 @@ end function M.want() vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" if vim.g.lazyvim_picker == "auto" then - return LazyVim.has_extra("editor.fzf") and "fzf" or "telescope" + return LazyVim.has_extra("editor.telescope") and "telescope" or "fzf" end return vim.g.lazyvim_picker end From 44c712aa31e7e05971259841e1f87c9f3d9c6cd5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 06:59:52 +0100 Subject: [PATCH 133/496] feat(which-key): make `helix` the default which-key preset --- lua/lazyvim/plugins/editor.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 2610081b..31ee1c38 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -176,6 +176,7 @@ return { event = "VeryLazy", opts_extend = { "spec" }, opts = { + preset = "helix", defaults = {}, spec = { { From 9b07544e89ecead354ef0f17ebc3127f3fa5bbd8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:02:12 +0100 Subject: [PATCH 134/496] fix(mini.animate): disable `snacks.scroll` when `mini.animate` is enabled --- .../plugins/extras/ui/mini-animate.lua | 106 ++++++++++-------- 1 file changed, 58 insertions(+), 48 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index df4587cc..bbd3e587 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -1,54 +1,64 @@ -- animations return { - "echasnovski/mini.animate", - recommended = true, - event = "VeryLazy", - 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 - local key = "" - vim.keymap.set({ "", "i" }, key, function() - mouse_scrolled = true - return key - end, { expr = true }) - end + -- disable snacks scroll when animate is enabled + { + "snacks.nvim", + opts = { + scroll = { enabled = false }, + }, + }, - vim.api.nvim_create_autocmd("FileType", { - pattern = "grug-far", - callback = function() - vim.b.minianimate_disable = true - end, - }) + -- setup animate + { + "echasnovski/mini.animate", + event = "VeryLazy", + 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 + local key = "" + vim.keymap.set({ "", "i" }, key, function() + mouse_scrolled = true + return key + end, { expr = true }) + 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") + vim.api.nvim_create_autocmd("FileType", { + pattern = "grug-far", + callback = function() + vim.b.minianimate_disable = true + end, + }) - local animate = require("mini.animate") - return vim.tbl_deep_extend("force", opts, { - resize = { - timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), - }, - scroll = { - timing = animate.gen_timing.linear({ duration = 150, unit = "total" }), - subscroll = animate.gen_subscroll.equal({ - predicate = function(total_scroll) - if mouse_scrolled then - mouse_scrolled = false - return false - end - return total_scroll > 1 - 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") + + local animate = require("mini.animate") + return vim.tbl_deep_extend("force", opts, { + resize = { + timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), + }, + scroll = { + timing = animate.gen_timing.linear({ duration = 150, unit = "total" }), + subscroll = animate.gen_subscroll.equal({ + predicate = function(total_scroll) + if mouse_scrolled then + mouse_scrolled = false + return false + end + return total_scroll > 1 + end, + }), + }, + }) + end, + }, } From 94fdc421a11b960e116888658dd9b2b85c3b58fc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:06:26 +0100 Subject: [PATCH 135/496] feat(snacks)!: use `snacks.indent` and moved `indent-blankline` to extras --- .../plugins/extras/ui/indent-blankline.lua | 51 +++++++++++++++++++ lua/lazyvim/plugins/init.lua | 1 + lua/lazyvim/plugins/ui.lua | 44 ---------------- 3 files changed, 52 insertions(+), 44 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/ui/indent-blankline.lua diff --git a/lua/lazyvim/plugins/extras/ui/indent-blankline.lua b/lua/lazyvim/plugins/extras/ui/indent-blankline.lua new file mode 100644 index 00000000..0745eee7 --- /dev/null +++ b/lua/lazyvim/plugins/extras/ui/indent-blankline.lua @@ -0,0 +1,51 @@ +return { + -- disable snacks indent when animate is enabled + { + "snacks.nvim", + opts = { + indent = { enabled = false }, + }, + }, + { + "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/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index d7a4c5ea..5d83c940 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -34,6 +34,7 @@ return { notifier = { enabled = true }, quickfile = { enabled = true }, statuscolumn = { enabled = false }, -- we set this in options.lua + indent = { enabled = true }, terminal = { win = { keys = { diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 518d363f..818ca3a7 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -185,50 +185,6 @@ return { end, }, - -- indent guides for Neovim - { - "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", - }, - -- Highly experimental plugin that completely replaces the UI for messages, cmdline and the popupmenu. { "folke/noice.nvim", From 1a1a48497c53e232b0f525baab87d5f23a2205b2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:06:41 +0100 Subject: [PATCH 136/496] feat(snacks): enable `snacks.scroll` --- lua/lazyvim/plugins/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 5d83c940..8c55e992 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -34,6 +34,7 @@ return { notifier = { enabled = true }, quickfile = { enabled = true }, statuscolumn = { enabled = false }, -- we set this in options.lua + scroll = { enabled = true }, indent = { enabled = true }, terminal = { win = { From d904a1ef47638e4defede775a7f0966fb8e0a2b4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:09:09 +0100 Subject: [PATCH 137/496] feat(snacks)!: use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects --- lua/lazyvim/plugins/coding.lua | 1 - lua/lazyvim/plugins/init.lua | 1 + lua/lazyvim/util/mini.lua | 42 +--------------------------------- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 86b4bdd8..dc470791 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -160,7 +160,6 @@ return { { "%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 diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 8c55e992..af04f699 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -35,6 +35,7 @@ return { quickfile = { enabled = true }, statuscolumn = { enabled = false }, -- we set this in options.lua scroll = { enabled = true }, + scope = { enabled = true }, indent = { enabled = true }, terminal = { win = { diff --git a/lua/lazyvim/util/mini.lua b/lua/lazyvim/util/mini.lua index 28d38f5b..e6f0d082 100644 --- a/lua/lazyvim/util/mini.lua +++ b/lua/lazyvim/util/mini.lua @@ -1,47 +1,6 @@ ---@class lazyvim.util.mini local M = {} ----@alias Mini.ai.loc {line:number, col:number} ----@alias Mini.ai.region {from:Mini.ai.loc, to:Mini.ai.loc} - --- Mini.ai indent text object --- For "a", it will include the non-whitespace line surrounding the indent block. --- "a" is line-wise, "i" is character-wise. -function M.ai_indent(ai_type) - local spaces = (" "):rep(vim.o.tabstop) - local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false) - local indents = {} ---@type {line: number, indent: number, text: string}[] - - for l, line in ipairs(lines) do - if not line:find("^%s*$") then - indents[#indents + 1] = { line = l, indent = #line:gsub("\t", spaces):match("^%s*"), text = line } - end - end - - local ret = {} ---@type (Mini.ai.region | {indent: number})[] - - for i = 1, #indents do - if i == 1 or indents[i - 1].indent < indents[i].indent then - local from, to = i, i - for j = i + 1, #indents do - if indents[j].indent < indents[i].indent then - break - end - to = j - end - from = ai_type == "a" and from > 1 and from - 1 or from - to = ai_type == "a" and to < #indents and to + 1 or to - ret[#ret + 1] = { - indent = indents[i].indent, - from = { line = indents[from].line, col = ai_type == "a" and 1 or indents[from].indent + 1 }, - to = { line = indents[to].line, col = #indents[to].text }, - } - end - end - - return ret -end - -- taken from MiniExtra.gen_ai_spec.buffer function M.ai_buffer(ai_type) local start_line, end_line = 1, vim.fn.line("$") @@ -92,6 +51,7 @@ function M.ai_whichkey(opts) { "}", desc = "{} with ws" }, } + ---@type wk.Spec[] local ret = { mode = { "o", "x" } } ---@type table local mappings = vim.tbl_extend("force", {}, { From 2cbfb9b6b7b9b4bb1c9ce94ad02ab0a851310fc0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:22:24 +0100 Subject: [PATCH 138/496] feat(cmp)!: moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine --- lua/lazyvim/config/options.lua | 6 + lua/lazyvim/plugins/coding.lua | 119 +---------------- lua/lazyvim/plugins/compat/nvim-0_9.lua | 3 + .../plugins/extras/coding/nvim-cmp.lua | 122 ++++++++++++++++++ lua/lazyvim/util/init.lua | 9 ++ lua/lazyvim/util/pick.lua | 1 + 6 files changed, 147 insertions(+), 113 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/coding/nvim-cmp.lua diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index bc504675..47ced41a 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -11,6 +11,12 @@ vim.g.autoformat = true -- 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 diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index dc470791..adc76177 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,113 +1,14 @@ return { - - -- auto completion { - "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, - } + import = "lazyvim.plugins.extras.coding.nvim-cmp", + enabled = function() + return LazyVim.cmp_engine() == "nvim-cmp" end, - main = "lazyvim.util.cmp", }, - - -- snippets { - "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 + import = "lazyvim.plugins.extras.coding.blink", + enabled = function() + return LazyVim.cmp_engine() == "blink.cmp" end, }, @@ -189,12 +90,4 @@ return { }, }, }, - -- Add lazydev source to cmp - { - "hrsh7th/nvim-cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources, { name = "lazydev", group_index = 0 }) - end, - }, } diff --git a/lua/lazyvim/plugins/compat/nvim-0_9.lua b/lua/lazyvim/plugins/compat/nvim-0_9.lua index 4f971b6f..81514ef8 100644 --- a/lua/lazyvim/plugins/compat/nvim-0_9.lua +++ b/lua/lazyvim/plugins/compat/nvim-0_9.lua @@ -4,6 +4,9 @@ return { { "garymjr/nvim-snippets", enabled = false }, { import = "lazyvim.plugins.extras.coding.luasnip" }, + -- Use nvim-cmp instead of blink.cmp + { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, + -- Use mini.comment instead of ts-comments { "folke/ts-comments.nvim", enabled = false }, { import = "lazyvim.plugins.extras.coding.mini-comment" }, diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua new file mode 100644 index 00000000..0cf36647 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -0,0 +1,122 @@ +return { + + -- Setup nvim-cmp + { + "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", + }, + + -- Add lazydev source to cmp + { + "hrsh7th/nvim-cmp", + optional = true, + opts = function(_, opts) + table.insert(opts.sources, { name = "lazydev", group_index = 0 }) + end, + }, + + -- snippets + { + "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, + }, +} diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 8d94f582..c831606a 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -265,4 +265,13 @@ function M.memoize(fn) end end +---@return "nvim-cmp" | "blink.cmp" +function M.cmp_engine() + vim.g.lazyvim_cmp = vim.g.lazyvim_cmp or "auto" + if vim.g.lazyvim_cmp == "auto" then + return LazyVim.has_extra("nvim-cmp") and "nvim-cmp" or "blink.cmp" + end + return vim.g.lazyvim_cmp +end + return M diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index fa9ff821..526025a3 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -42,6 +42,7 @@ function M.register(picker) return true end +---@return "telescope" | "fzf" function M.want() vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" if vim.g.lazyvim_picker == "auto" then From 152f9d113fa2b4fc2af72d2846c4dd68c31b7596 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:22:24 +0100 Subject: [PATCH 139/496] feat(cmp)!: moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine --- lua/lazyvim/plugins/extras/coding/blink.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 94ee6b9f..fb71597b 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -6,10 +6,6 @@ if lazyvim_docs then end return { - { - "hrsh7th/nvim-cmp", - enabled = false, - }, { "saghen/blink.cmp", version = not vim.g.lazyvim_blink_main and "*", From e389a5ada955c253771ff5c9f8301e2f17c206d2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:29:24 +0100 Subject: [PATCH 140/496] feat(snacks): use `Snacks.zen.zoom()` instead of custom **maximize** --- lua/lazyvim/config/keymaps.lua | 2 +- lua/lazyvim/util/ui.lua | 44 ---------------------------------- 2 files changed, 1 insertion(+), 45 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 31934117..02f35fc8 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -175,7 +175,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.ui.maximize():map("wm") +Snacks.toggle.zoom():map("wm") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 5d141a37..26d8490f 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -31,48 +31,4 @@ function M.fg(name) return fg and { fg = string.format("#%06x", fg) } or nil end -function M.maximize() - ---@type {k:string, v:any}[]? - local maximized = nil - local toggle = Snacks.toggle({ - name = "Maximize", - get = function() - return maximized ~= nil - end, - set = function(state) - if state then - maximized = {} - local function set(k, v) - table.insert(maximized, 1, { k = k, v = vim.o[k] }) - vim.o[k] = v - end - set("winwidth", 999) - set("winheight", 999) - set("winminwidth", 10) - set("winminheight", 4) - vim.cmd("wincmd =") - else - for _, opt in ipairs(maximized) do - vim.o[opt.k] = opt.v - end - maximized = nil - vim.cmd("wincmd =") - end - end, - }) - - -- `QuitPre` seems to be executed even if we quit a normal window, so we don't want that - -- `VimLeavePre` might be another consideration? Not sure about differences between the 2 - vim.api.nvim_create_autocmd("ExitPre", { - group = vim.api.nvim_create_augroup("lazyvim_restore_max_exit_pre", { clear = true }), - desc = "Restore width/height when close Neovim while maximized", - callback = function() - if toggle:get() then - toggle:set(false) - end - end, - }) - return toggle -end - return M From 6d774ba8f21f87aaa8bf9dbeb0a84b747541b349 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 07:36:09 +0100 Subject: [PATCH 141/496] fix(ui): use `Snacks.util.color` instead of `LazyVim.ui.fg` --- lua/lazyvim/plugins/ui.lua | 8 ++++---- lua/lazyvim/util/deprecated.lua | 9 +++++++++ lua/lazyvim/util/lualine.lua | 4 ++-- lua/lazyvim/util/ui.lua | 7 ------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 818ca3a7..cf6b22f0 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -109,25 +109,25 @@ return { { 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", diff --git a/lua/lazyvim/util/deprecated.lua b/lua/lazyvim/util/deprecated.lua index 43d73fcf..375bc9ca 100644 --- a/lua/lazyvim/util/deprecated.lua +++ b/lua/lazyvim/util/deprecated.lua @@ -13,6 +13,12 @@ M.moved = { ui = { statuscolumn = { "Snacks.statuscolumn" }, bufremove = { "Snacks.bufdelete" }, + fg = { + "{ fg = Snacks.util.color(...) }", + fn = function(...) + return { fg = Snacks.util.color(...) } + end, + }, }, } @@ -33,6 +39,9 @@ function M.decorate(name, mod) if M.moved[name][k] then local to = M.moved[name][k][1] LazyVim.deprecate("LazyVim." .. name .. "." .. k, to) + if M.moved[name][k].fn then + return M.moved[name][k].fn + end local ret = vim.tbl_get(_G, unpack(vim.split(to, ".", { plain = true }))) return ret end diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index b6722968..5f4f1885 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -17,7 +17,7 @@ function M.status(icon, status) return status() ~= nil end, color = function() - return LazyVim.ui.fg(colors[status()] or colors.ok) + return { fg = Snacks.util.color(colors[status()] or colors.ok) } end, } end @@ -146,7 +146,7 @@ function M.root_dir(opts) other = true, icon = "󱉭 ", color = function() - return LazyVim.ui.fg("Special") + return { fg = Snacks.util.color("Special") } end, }, opts or {}) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 26d8490f..3460b0ab 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -24,11 +24,4 @@ function M.foldexpr() return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0" end ----@return {fg?:string}? -function M.fg(name) - local hl = vim.api.nvim_get_hl(0, { name = name, link = false }) - local fg = hl and hl.fg or hl.foreground - return fg and { fg = string.format("#%06x", fg) } or nil -end - return M From 7bc8490d46e002d624f45037fc507e8dd10d4b70 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:07:29 +0100 Subject: [PATCH 142/496] feat(lualine): add snacks profiler status --- lua/lazyvim/plugins/ui.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index cf6b22f0..45c2d275 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -105,6 +105,7 @@ return { { LazyVim.lualine.pretty_path() }, }, lualine_x = { + Snacks.profiler.status(), -- stylua: ignore { function() return require("noice").api.status.command.get() end, From 9b973882b8bcbab32f850da7c553cdc6388af4ad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:07:48 +0100 Subject: [PATCH 143/496] feat(keymaps): added leader-uD to toggle dim mode --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 02f35fc8..17c6adb1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -131,6 +131,7 @@ 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") if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end From f2e1cac965e41d7761073856b11bea223cac1e4d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:08:01 +0100 Subject: [PATCH 144/496] feat(keymaps): added leader-Z to toggle zoom --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 17c6adb1..271c920a 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -176,7 +176,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 }) -Snacks.toggle.zoom():map("wm") +Snacks.toggle.zoom():map("wm"):map("Z") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) From e6d6a096b34ad887b9f954a3f43bcc3fd7833f73 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:08:13 +0100 Subject: [PATCH 145/496] feat(keymaps): added leader-z to toggle zen mode --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 271c920a..4c69ad08 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -177,6 +177,7 @@ 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 }) Snacks.toggle.zoom():map("wm"):map("Z") +Snacks.toggle.zen():map("z") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) From 88e77b0e2439a27d06e95e89839227f1e9446c74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:45:02 +0100 Subject: [PATCH 146/496] fix(nvim-cmp): specs --- lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index 0cf36647..cf8f5725 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -48,6 +48,7 @@ return { end, }), sources = cmp.config.sources({ + { name = "lazydev" }, { name = "nvim_lsp" }, { name = "path" }, }, { @@ -86,19 +87,9 @@ return { main = "lazyvim.util.cmp", }, - -- Add lazydev source to cmp - { - "hrsh7th/nvim-cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources, { name = "lazydev", group_index = 0 }) - end, - }, - -- snippets { "nvim-cmp", - optional = true, dependencies = { { "garymjr/nvim-snippets", From 303980d267577972bb12e34ef152a0e8b9a953e2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 08:45:25 +0100 Subject: [PATCH 147/496] feat(snacks): added leader-ua to toggle global animations --- lua/lazyvim/config/keymaps.lua | 1 + lua/lazyvim/config/options.lua | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 4c69ad08..ea9c487b 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -132,6 +132,7 @@ Snacks.toggle.option("showtabline", {off = 0, on = vim.o.showtabline > 0 and vim 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") if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 47ced41a..0bbaacba 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -5,6 +5,10 @@ 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 From ba632c500da56532c122539c45fe3511fd894a05 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 09:37:47 +0100 Subject: [PATCH 148/496] refactor(snacks): move snacks specs to ui/util so that they show up in the generated docs --- lua/lazyvim/plugins/init.lua | 42 +----------------------------------- lua/lazyvim/plugins/ui.lua | 22 ++++++++++++++++++- lua/lazyvim/plugins/util.lua | 29 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index af04f699..c06fa9bc 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -10,16 +10,6 @@ end require("lazyvim.config").init() --- Terminal Mappings -local function term_nav(dir) - ---@param self snacks.terminal - return function(self) - return self:is_floating() and "" or vim.schedule(function() - vim.cmd.wincmd(dir) - end) - end -end - return { { "folke/lazy.nvim", version = "*" }, { "LazyVim/LazyVim", priority = 10000, lazy = false, opts = {}, cond = true, version = "*" }, @@ -27,37 +17,7 @@ return { "folke/snacks.nvim", priority = 1000, lazy = false, - opts = function() - ---@type snacks.Config - return { - bigfile = { enabled = true }, - notifier = { enabled = true }, - quickfile = { enabled = true }, - statuscolumn = { enabled = false }, -- we set this in options.lua - scroll = { enabled = true }, - scope = { enabled = true }, - indent = { 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" }, - }, - }, - }, - toggle = { map = LazyVim.safe_keymap_set }, - words = { enabled = true }, - } - end, - -- stylua: ignore - keys = { - { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, - { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, - { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, - { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, - }, + opts = {}, config = function(_, opts) local notify = vim.notify require("snacks").setup(opts) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 45c2d275..127168e4 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -265,7 +265,27 @@ return { { "MunifTanjim/nui.nvim", lazy = true }, { - "folke/snacks.nvim", + "snacks.nvim", + opts = { + indent = { 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 = { + { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, + { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, + { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, + { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, + }, + }, + + { + "snacks.nvim", opts = { dashboard = { preset = { diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index 22a3e734..d52a091a 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -1,5 +1,34 @@ +-- Terminal Mappings +local function term_nav(dir) + ---@param self snacks.terminal + return function(self) + return self:is_floating() and "" or vim.schedule(function() + vim.cmd.wincmd(dir) + end) + end +end + return { + -- Snacks utils + { + "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" }, + }, + }, + }, + }, + }, + -- Session management. This saves your session in the background, -- keeping track of open buffers, window arrangement, and more. -- You can restore sessions when returning through the dashboard. From ec92fa85586b4082f04b30ad94cb98b24463665e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 11:07:29 +0100 Subject: [PATCH 149/496] fix(git): make nvim-cmp optional for the git extra --- lua/lazyvim/plugins/extras/lang/git.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/git.lua b/lua/lazyvim/plugins/extras/lang/git.lua index 0fc92c4d..c8dadb3b 100644 --- a/lua/lazyvim/plugins/extras/lang/git.lua +++ b/lua/lazyvim/plugins/extras/lang/git.lua @@ -10,6 +10,7 @@ return { { "nvim-cmp", + optional = true, dependencies = { { "petertriho/cmp-git", opts = {} }, }, From b3ac642317cd60e9b35869068dd74fe779a22146 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 11:18:55 +0100 Subject: [PATCH 150/496] feat(snacks): added leader-ug to toggle indent guides --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index ea9c487b..b2dd725a 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -133,6 +133,7 @@ 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") if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end From cded8d4d2808250db5ea864fb8e479fd8b5a4a2c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 11:19:09 +0100 Subject: [PATCH 151/496] feat(snacks): added leader-uS to toggle scroll --- lua/lazyvim/config/keymaps.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index b2dd725a..6c761c9d 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -134,6 +134,7 @@ Snacks.toggle.option("background", { off = "light", on = "dark" , name = "Dark B Snacks.toggle.dim():map("uD") Snacks.toggle.animate():map("ua") Snacks.toggle.indent():map("ug") +Snacks.toggle.scroll():map("uS") if vim.lsp.inlay_hint then Snacks.toggle.inlay_hints():map("uh") end From 54bece17b390453ea0beac41e419394d5e0d69ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 12:03:17 +0100 Subject: [PATCH 152/496] feat(snacks): added `snacks.input` --- lua/lazyvim/plugins/ui.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 127168e4..7fdc2462 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -268,6 +268,7 @@ return { "snacks.nvim", opts = { indent = { enabled = true }, + input = { enabled = true }, notifier = { enabled = true }, scope = { enabled = true }, scroll = { enabled = true }, From 2acedaa3a8312e53d84a299bd82d616e1c26328a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 12:14:12 +0100 Subject: [PATCH 153/496] feat(zen): zoom with leader-wm and leader-uZ. zen with leader-uz --- lua/lazyvim/config/keymaps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 6c761c9d..d4483181 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -179,8 +179,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 }) -Snacks.toggle.zoom():map("wm"):map("Z") -Snacks.toggle.zen():map("z") +Snacks.toggle.zoom():map("wm"):map("uZ") +Snacks.toggle.zen():map("uz") -- tabs map("n", "l", "tablast", { desc = "Last Tab" }) From a8332c6d50106cf35e45953cdaa463cbb6c5b085 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 12:29:43 +0100 Subject: [PATCH 154/496] feat(snacks): added profiler keymaps --- lua/lazyvim/config/keymaps.lua | 2 ++ lua/lazyvim/plugins/editor.lua | 2 ++ lua/lazyvim/plugins/extras/dap/core.lua | 3 +-- lua/lazyvim/plugins/ui.lua | 2 -- lua/lazyvim/plugins/util.lua | 6 ++++++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index d4483181..a49dbadb 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -135,6 +135,8 @@ 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 diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 31ee1c38..f6a98605 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -183,6 +183,8 @@ return { 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/lua/lazyvim/plugins/extras/dap/core.lua b/lua/lazyvim/plugins/extras/dap/core.lua index b0582673..d84b71bf 100644 --- a/lua/lazyvim/plugins/extras/dap/core.lua +++ b/lua/lazyvim/plugins/extras/dap/core.lua @@ -33,7 +33,6 @@ return { -- 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" }, @@ -46,7 +45,7 @@ return { { "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/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7fdc2462..2bb2c644 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -278,8 +278,6 @@ return { }, -- stylua: ignore keys = { - { ".", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" }, - { "S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" }, { "n", function() Snacks.notifier.show_history() end, desc = "Notification History" }, { "un", function() Snacks.notifier.hide() end, desc = "Dismiss All Notifications" }, }, diff --git a/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index d52a091a..8d8aa220 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -27,6 +27,12 @@ return { }, }, }, + -- 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" }, + }, }, -- Session management. This saves your session in the background, From bdc865b291ad12331163e36d3ebc62449734e375 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 12:50:04 +0100 Subject: [PATCH 155/496] style: typo --- lua/lazyvim/plugins/extras/ui/indent-blankline.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ui/indent-blankline.lua b/lua/lazyvim/plugins/extras/ui/indent-blankline.lua index 0745eee7..fe87f9dd 100644 --- a/lua/lazyvim/plugins/extras/ui/indent-blankline.lua +++ b/lua/lazyvim/plugins/extras/ui/indent-blankline.lua @@ -1,5 +1,5 @@ return { - -- disable snacks indent when animate is enabled + -- disable snacks indent when indent-blankline is enabled { "snacks.nvim", opts = { From 34d2bdcac6fabe5d02e157bffa3475391ca1f7ec Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 13:32:56 +0100 Subject: [PATCH 156/496] fix(copliot): restructure copilot-cmp spec --- lua/lazyvim/plugins/extras/ai/copilot.lua | 100 +++++++++++----------- 1 file changed, 51 insertions(+), 49 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index fc014fa6..da90fa5b 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -58,57 +58,59 @@ return { end, }, - -- copilot cmp source - { - "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") - 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", - optional = true, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - table.insert(opts.sources, 1, { - name = "copilot", - group_index = 1, - priority = 100, - }) - end, + vim.g.ai_cmp + and { + -- copilot cmp source + { + "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 = { + { + "nvim-cmp", + optional = true, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, 1, { + name = "copilot", + group_index = 1, + priority = 100, + }) + end, + }, + }, + }, }, }, - }, - }, - }, - - vim.g.ai_cmp and { - "saghen/blink.cmp", - optional = true, - dependencies = { "giuxtaposition/blink-cmp-copilot" }, - opts = { - sources = { - default = { "copilot" }, - providers = { - copilot = { - name = "copilot", - module = "blink-cmp-copilot", - kind = "Copilot", + { + "saghen/blink.cmp", + optional = true, + dependencies = { "giuxtaposition/blink-cmp-copilot" }, + opts = { + sources = { + default = { "copilot" }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + kind = "Copilot", + }, + }, + }, }, }, - }, - }, - } or nil, + } + or nil, } From 3a67abdf6d5a764e8a1ded542a054176a30329d6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 13:41:14 +0100 Subject: [PATCH 157/496] docs: updated NEWS.md --- NEWS.md | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/NEWS.md b/NEWS.md index 1b9c1593..0ecba126 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,60 @@ # 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. @@ -21,6 +76,8 @@ - `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) @@ -48,6 +105,8 @@ - moved `neoconf.nvim` to extras. Project specific LSP settings can be done with a `.lazy.lua` file instead. +--- + ## 11.x - **Keymaps:** @@ -107,6 +166,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) From a9a273d041e2dd0e5654b5b492fd29138259fe68 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 14:45:47 +0100 Subject: [PATCH 158/496] fix: fqn for nvim-cmp --- lua/lazyvim/plugins/extras/ai/codeium.lua | 2 +- lua/lazyvim/plugins/extras/ai/copilot.lua | 4 ++-- lua/lazyvim/plugins/extras/ai/tabnine.lua | 2 +- lua/lazyvim/plugins/extras/coding/luasnip.lua | 2 +- lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 2 +- lua/lazyvim/plugins/extras/lang/clangd.lua | 2 +- lua/lazyvim/plugins/extras/lang/git.lua | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index 70adaaf8..c347c6c3 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -34,7 +34,7 @@ return { -- codeium cmp source { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "codeium.nvim" }, opts = function(_, opts) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index da90fa5b..0c1a1b26 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -62,7 +62,7 @@ return { and { -- copilot cmp source { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { -- this will only be evaluated if nvim-cmp is enabled { @@ -79,7 +79,7 @@ return { end, specs = { { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, ---@param opts cmp.ConfigSchema opts = function(_, opts) diff --git a/lua/lazyvim/plugins/extras/ai/tabnine.lua b/lua/lazyvim/plugins/extras/ai/tabnine.lua index f1df9f7d..cc974d0a 100644 --- a/lua/lazyvim/plugins/extras/ai/tabnine.lua +++ b/lua/lazyvim/plugins/extras/ai/tabnine.lua @@ -14,7 +14,7 @@ return { }, { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "tzachar/cmp-tabnine" }, ---@param opts cmp.ConfigSchema diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 8a5adfe9..f0f815b4 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -39,7 +39,7 @@ return { -- nvim-cmp integration { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { "saadparwaiz1/cmp_luasnip" }, opts = function(_, opts) diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index cf8f5725..3ec15c83 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -89,7 +89,7 @@ return { -- snippets { - "nvim-cmp", + "hrsh7th/nvim-cmp", dependencies = { { "garymjr/nvim-snippets", diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index dccbc9cb..e553136e 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -103,7 +103,7 @@ return { }, { - "nvim-cmp", + "hrsh7th/nvim-cmp", opts = function(_, opts) table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores")) end, diff --git a/lua/lazyvim/plugins/extras/lang/git.lua b/lua/lazyvim/plugins/extras/lang/git.lua index c8dadb3b..8399d620 100644 --- a/lua/lazyvim/plugins/extras/lang/git.lua +++ b/lua/lazyvim/plugins/extras/lang/git.lua @@ -9,7 +9,7 @@ return { }, { - "nvim-cmp", + "hrsh7th/nvim-cmp", optional = true, dependencies = { { "petertriho/cmp-git", opts = {} }, From 94be6fb78786e9a53e914db9d5cfab09b13225ba Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 16:43:25 +0100 Subject: [PATCH 159/496] fix(clangd): nvim-cmp optional --- lua/lazyvim/plugins/extras/lang/clangd.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index e553136e..f3493ce1 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -104,6 +104,7 @@ return { { "hrsh7th/nvim-cmp", + optional = true, opts = function(_, opts) table.insert(opts.sorting.comparators, 1, require("clangd_extensions.cmp_scores")) end, From 98c77f1de479b12bc29dc8339fbfe694959d99ed Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 16:44:28 +0100 Subject: [PATCH 160/496] fix(mini.indentscope): disable snacks and indent-blankline scope --- lua/lazyvim/plugins/extras/ui/mini-indentscope.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua index e3117e26..91ec1d45 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua @@ -43,11 +43,24 @@ return { }) end, }, + + -- disable inent-blankline scope when mini-indentscope is enabled { "lukas-reineke/indent-blankline.nvim", + optional = true, event = "LazyFile", opts = { scope = { enabled = false }, }, }, + + -- disable snacks scroll when mini-indentscope is enabled + { + "snacks.nvim", + opts = { + indent = { + scope = { enabled = false }, + }, + }, + }, } From c4b0d6d0d1ee11c07c0ab4ed3f87f97b76a6f592 Mon Sep 17 00:00:00 2001 From: iniw Date: Thu, 12 Dec 2024 12:51:34 -0300 Subject: [PATCH 161/496] fix(clangd): avoid nil-indexing the completion sorting comparators (#5011) ## Description This prevents the following popup appearing when opening nvim: ``` Failed to run `config` for nvim-cmp .../lazy/LazyVim/lua/lazyvim/plugins/extras/lang/clangd.lua:108: attempt to index field 'sorting' (a nil value) # stacktrace: - /LazyVim/lua/lazyvim/plugins/extras/lang/clangd.lua:108 _in_ **values** - ~/.config/nvim/lua/config/lazy.lua:17 - ~/.config/nvim/init.lua:2 ``` ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clangd.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index f3493ce1..ae245d54 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -106,6 +106,8 @@ return { "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, }, From adf8db69ed91f8c15fe3cf37df9dc0801dbaeb39 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 16:54:34 +0100 Subject: [PATCH 162/496] fix(nvim-cmp): set high prio for loading the nvim-cmp extra to prevent issues with opts --- lua/lazyvim/plugins/xtras.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index fe17cc13..ebb0dd89 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -2,6 +2,7 @@ local prios = { ["lazyvim.plugins.extras.test.core"] = 1, ["lazyvim.plugins.extras.dap.core"] = 1, + ["lazyvim.plugins.extras.coding.nvim-cmp"] = 2, ["lazyvim.plugins.extras.ui.edgy"] = 2, ["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.coding.blink"] = 5, From 8b8e322b68d6f48fced33c125f9c599f52eebda6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 12 Dec 2024 17:38:42 +0100 Subject: [PATCH 163/496] docs: fixed keymaps in NEWS --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 0ecba126..300b48b9 100644 --- a/NEWS.md +++ b/NEWS.md @@ -45,8 +45,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 21b02f056d924d0a3cb3513b163e3dbdfa9c15ec Mon Sep 17 00:00:00 2001 From: Ughur Alakbarov <58857108+ugur-a@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:15:53 +0100 Subject: [PATCH 164/496] fix(java): only use mason-registry if mason installed (#4991) ## Description The current config breaks when mason is not installed (e.g. for Nix users). This PR makes the mason-related functionality (which, as of now, consists only of finding `lombok`) dependent on mason being installed. As noted in the commit, this does make it impossible to use lombok without mason, but I'm unaware of any other method of finding it (which is why mason-registry was used in the first place, I assume) Please note that I'm not very experienced with Lua and the code might be not the most idiomatic one. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/extras/lang/java.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index f4c07320..25b99f97 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -85,8 +85,12 @@ return { 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. @@ -107,10 +111,7 @@ return { -- 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) From aad0edbf749bcbe16e9ef8d2a65a19dd3fe2bd87 Mon Sep 17 00:00:00 2001 From: iniw Date: Thu, 12 Dec 2024 14:58:39 -0300 Subject: [PATCH 165/496] fix(java): only setup debug adapter config if mason is installed (#5013) ## Description This prevents the following error when opening java files when mason is disabled (e.g: NixOS) ``` Failed to run `config` for nvim-jdtls ...im/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:149: module 'mason-registry' not found: no field package.preload['mason-registry'] cache_loader: module mason-registry not found cache_loader_lib: module mason-registry not found no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/share/lua/5.1/mason-registry.lua' no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/share/lua/5.1/mason-registry/init.lua' no file '/nix/store/j3563y13yim4m7qdwk0m8h22648wbifj-luajit-2.1.1713773202-env/lib/lua/5.1/mason-registry.so' # stacktrace: - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:149 _in_ **config** - /nix/store/xgn4baapvvk35ssi47bsmmyawl83917g-neovim-unwrapped-0.10.2/share/nvim/runtime/filetype.lua:36 - /nix/store/xgn4baapvvk35ssi47bsmmyawl83917g-neovim-unwrapped-0.10.2/share/nvim/runtime/filetype.lua:35 ``` ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 25b99f97..34227837 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -148,7 +148,12 @@ return { -- 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 = { @@ -240,7 +245,12 @@ return { }, }) - 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 5b1b6b29d717adeffb0528cffef9f1a3972d3701 Mon Sep 17 00:00:00 2001 From: iniw Date: Thu, 12 Dec 2024 15:37:08 -0300 Subject: [PATCH 166/496] fix(java): only setup debug adapter config if mason is installed (for real this time) (#5014) ## Description This one *actually* fixes the issue, sorry about my previous PR. --- lua/lazyvim/plugins/extras/lang/java.lua | 114 +++++++++++------------ 1 file changed, 54 insertions(+), 60 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 34227837..520776fe 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -146,34 +146,30 @@ return { 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) @@ -245,45 +241,43 @@ return { }, }) - 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) + 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({ - { - mode = "n", - buffer = args.buf, - { "t", group = "test" }, + -- 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({ { - "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", + 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" }, }, - { - "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" }, - }, - }) + }) + end end end From 29460318f302b6dceaf16bd06c45cb3ed58d5fd8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 00:25:51 +0100 Subject: [PATCH 167/496] fix(blink): unset sources.compat. Fixes #5016. Closes #5017 --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index fb71597b..eed1a232 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -92,6 +92,7 @@ return { table.insert(enabled, source) end end + opts.sources.compat = nil -- TODO: remove when blink made a new release > 0.7.6 if not vim.g.lazyvim_blink_main then From d95e530c02cbb2bcf36da5bb3e235780bdf6d239 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 00:33:52 +0100 Subject: [PATCH 168/496] fix(blink): remove unneeded code --- lua/lazyvim/plugins/extras/coding/blink.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index eed1a232..70e0cdeb 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -94,12 +94,6 @@ return { end opts.sources.compat = nil - -- 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} From a396a2462fdb487bf319afaa2ae14dc9122f70d6 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 13 Dec 2024 00:23:41 -0600 Subject: [PATCH 169/496] docs(README): add fzf dependencies to docker (#5020) ## Description With the picker and completion changes, fzf and curl need to be installed as part of the try it with docker instructions. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- README-CN.md | 2 +- README-DE.md | 2 +- README-JP.md | 2 +- README-KO.md | 2 +- README-PT.md | 2 +- README.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README-CN.md b/README-CN.md index 76fa3870..83e5abfd 100644 --- a/README-CN.md +++ b/README-CN.md @@ -67,7 +67,7 @@ LazyVim 是一个基于 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 的 ```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 diff --git a/README-DE.md b/README-DE.md index a9522c84..c087d7c6 100644 --- a/README-DE.md +++ b/README-DE.md @@ -68,7 +68,7 @@ Sie können eine Startvorlage für **LazyVim** [hier](https://github.com/LazyVim ```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 diff --git a/README-JP.md b/README-JP.md index 316ede80..d81f2cb9 100644 --- a/README-JP.md +++ b/README-JP.md @@ -67,7 +67,7 @@ LazyVimは、ゼロから始めるか、あらかじめ作成されたディス ```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 diff --git a/README-KO.md b/README-KO.md index eb5cdb1d..84d28017 100644 --- a/README-KO.md +++ b/README-KO.md @@ -65,7 +65,7 @@ LazyVim은 [💤 lazy.nvim](https://github.com/folke/lazy.nvim)를 기반으로 ```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 diff --git a/README-PT.md b/README-PT.md index 7fb8572e..65d8c625 100644 --- a/README-PT.md +++ b/README-PT.md @@ -70,7 +70,7 @@ Podes encontrar uma template **LazyVim** starter para começar, [aqui](https://g ```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 diff --git a/README.md b/README.md index c9a9ead3..4d379504 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ You can find a starter template for **LazyVim** [here](https://github.com/LazyVi ```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 b0808cb31f1ddd2770379630588b8b93a3623367 Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 13 Dec 2024 06:24:40 +0000 Subject: [PATCH 170/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d11867af..cd702db2 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 12 +*LazyVim.txt* For Neovim Last change: 2024 December 13 ============================================================================== Table of Contents *LazyVim-table-of-contents* @@ -68,7 +68,7 @@ Try it with Docker ~ >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 29c4dea4e75b82ad4b06c21e360eefa3951a3fba Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Fri, 13 Dec 2024 01:25:42 -0500 Subject: [PATCH 171/496] fix(blink): unset provider.kind (#5024) ## Description Unsets `sources.providers[provider].kind` custom properties to pass blink.cmp config validation. ## Related Issue(s) ## Screenshots ![Screenshot 2024-12-12 at 23 21 47](https://github.com/user-attachments/assets/21866a51-d0d5-4ee5-9cc3-3ce7f2eb6415) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 70e0cdeb..40d42b32 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -92,6 +92,8 @@ return { 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 @@ -115,6 +117,9 @@ return { end return items end + + -- Unset custom prop to pass blink.cmp validation + provider.kind = nil end end From 94f6df048fbecfdf2f65ab96156b713555df40dc Mon Sep 17 00:00:00 2001 From: iniw Date: Fri, 13 Dec 2024 03:28:09 -0300 Subject: [PATCH 172/496] feat(rust): exclude bad directories from rust-analyzer (#5021) ## Description rust-analyzer is unfortunately not smart enough to use a folder's .gitignore (or similar) when looking for rust files to analyze, meaning that when it finds a large enough folder (e.g: .git, .direnv) it completely dies going through it searching for rust files. This commit adds a filter of common folders that are big enough to potentially choke rust-analyzer. The list could be amended in the future. ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/rust.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index eec3ce2d..e5304b56 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -92,6 +92,19 @@ return { ["async-recursion"] = { "async_recursion" }, }, }, + files = { + excludeDirs = { + ".direnv", + ".git", + ".github", + ".gitlab", + "bin", + "node_modules", + "target", + "venv", + ".venv", + }, + }, }, }, }, From 20eff4fc3f55fbeb1e415f0cc5a2d1f3019e5da6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 09:31:42 +0100 Subject: [PATCH 173/496] fix(blink): disable cmdline integration for now since it doesn't work well with the enter keymap --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 40d42b32..10eab616 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -68,6 +68,7 @@ return { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, + cmdline = {}, }, keymap = { From f3a919d23d322952a20abb76837211ef7e053235 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:39:33 +0100 Subject: [PATCH 174/496] chore(main): release 14.0.0 (#5008) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0) (2024-12-13) ### ⚠ BREAKING CHANGES * **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine * **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine * **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects * **snacks:** use `snacks.indent` and moved `indent-blankline` to extras * **pick:** make fzf the default picker for LazyVim ### Features * **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([152f9d1](https://github.com/LazyVim/LazyVim/commit/152f9d113fa2b4fc2af72d2846c4dd68c31b7596)) * **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([2cbfb9b](https://github.com/LazyVim/LazyVim/commit/2cbfb9b6b7b9b4bb1c9ce94ad02ab0a851310fc0)) * **keymaps:** added leader-uD to toggle dim mode ([9b97388](https://github.com/LazyVim/LazyVim/commit/9b973882b8bcbab32f850da7c553cdc6388af4ad)) * **keymaps:** added leader-z to toggle zen mode ([e6d6a09](https://github.com/LazyVim/LazyVim/commit/e6d6a096b34ad887b9f954a3f43bcc3fd7833f73)) * **keymaps:** added leader-Z to toggle zoom ([f2e1cac](https://github.com/LazyVim/LazyVim/commit/f2e1cac965e41d7761073856b11bea223cac1e4d)) * **lualine:** add snacks profiler status ([7bc8490](https://github.com/LazyVim/LazyVim/commit/7bc8490d46e002d624f45037fc507e8dd10d4b70)) * **pick:** make fzf the default picker for LazyVim ([ae2340f](https://github.com/LazyVim/LazyVim/commit/ae2340f60a012df125c87fe46e6d98d0be04bd10)) * **rust:** exclude bad directories from rust-analyzer ([#5021](https://github.com/LazyVim/LazyVim/issues/5021)) ([94f6df0](https://github.com/LazyVim/LazyVim/commit/94f6df048fbecfdf2f65ab96156b713555df40dc)) * **snacks:** added `snacks.input` ([54bece1](https://github.com/LazyVim/LazyVim/commit/54bece17b390453ea0beac41e419394d5e0d69ff)) * **snacks:** added leader-ua to toggle global animations ([303980d](https://github.com/LazyVim/LazyVim/commit/303980d267577972bb12e34ef152a0e8b9a953e2)) * **snacks:** added leader-ug to toggle indent guides ([b3ac642](https://github.com/LazyVim/LazyVim/commit/b3ac642317cd60e9b35869068dd74fe779a22146)) * **snacks:** added leader-uS to toggle scroll ([cded8d4](https://github.com/LazyVim/LazyVim/commit/cded8d4d2808250db5ea864fb8e479fd8b5a4a2c)) * **snacks:** added profiler keymaps ([a8332c6](https://github.com/LazyVim/LazyVim/commit/a8332c6d50106cf35e45953cdaa463cbb6c5b085)) * **snacks:** enable `snacks.scroll` ([1a1a484](https://github.com/LazyVim/LazyVim/commit/1a1a48497c53e232b0f525baab87d5f23a2205b2)) * **snacks:** use `snacks.indent` and moved `indent-blankline` to extras ([94fdc42](https://github.com/LazyVim/LazyVim/commit/94fdc421a11b960e116888658dd9b2b85c3b58fc)) * **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects ([d904a1e](https://github.com/LazyVim/LazyVim/commit/d904a1ef47638e4defede775a7f0966fb8e0a2b4)) * **snacks:** use `Snacks.zen.zoom()` instead of custom **maximize** ([e389a5a](https://github.com/LazyVim/LazyVim/commit/e389a5ada955c253771ff5c9f8301e2f17c206d2)) * **which-key:** make `helix` the default which-key preset ([44c712a](https://github.com/LazyVim/LazyVim/commit/44c712aa31e7e05971259841e1f87c9f3d9c6cd5)) * **zen:** zoom with leader-wm and leader-uZ. zen with leader-uz ([2acedaa](https://github.com/LazyVim/LazyVim/commit/2acedaa3a8312e53d84a299bd82d616e1c26328a)) ### Bug Fixes * **blink:** disable cmdline integration for now since it doesn't work well with the enter keymap ([20eff4f](https://github.com/LazyVim/LazyVim/commit/20eff4fc3f55fbeb1e415f0cc5a2d1f3019e5da6)) * **blink:** remove unneeded code ([d95e530](https://github.com/LazyVim/LazyVim/commit/d95e530c02cbb2bcf36da5bb3e235780bdf6d239)) * **blink:** unset provider.kind ([#5024](https://github.com/LazyVim/LazyVim/issues/5024)) ([29c4dea](https://github.com/LazyVim/LazyVim/commit/29c4dea4e75b82ad4b06c21e360eefa3951a3fba)) * **blink:** unset sources.compat. Fixes [#5016](https://github.com/LazyVim/LazyVim/issues/5016). Closes [#5017](https://github.com/LazyVim/LazyVim/issues/5017) ([2946031](https://github.com/LazyVim/LazyVim/commit/29460318f302b6dceaf16bd06c45cb3ed58d5fd8)) * **clangd:** avoid nil-indexing the completion sorting comparators ([#5011](https://github.com/LazyVim/LazyVim/issues/5011)) ([c4b0d6d](https://github.com/LazyVim/LazyVim/commit/c4b0d6d0d1ee11c07c0ab4ed3f87f97b76a6f592)) * **clangd:** nvim-cmp optional ([94be6fb](https://github.com/LazyVim/LazyVim/commit/94be6fb78786e9a53e914db9d5cfab09b13225ba)) * **copliot:** restructure copilot-cmp spec ([34d2bdc](https://github.com/LazyVim/LazyVim/commit/34d2bdcac6fabe5d02e157bffa3475391ca1f7ec)) * fqn for nvim-cmp ([a9a273d](https://github.com/LazyVim/LazyVim/commit/a9a273d041e2dd0e5654b5b492fd29138259fe68)) * **git:** make nvim-cmp optional for the git extra ([ec92fa8](https://github.com/LazyVim/LazyVim/commit/ec92fa85586b4082f04b30ad94cb98b24463665e)) * **java:** only setup debug adapter config if mason is installed ([#5013](https://github.com/LazyVim/LazyVim/issues/5013)) ([aad0edb](https://github.com/LazyVim/LazyVim/commit/aad0edbf749bcbe16e9ef8d2a65a19dd3fe2bd87)) * **java:** only setup debug adapter config if mason is installed (for real this time) ([#5014](https://github.com/LazyVim/LazyVim/issues/5014)) ([5b1b6b2](https://github.com/LazyVim/LazyVim/commit/5b1b6b29d717adeffb0528cffef9f1a3972d3701)) * **java:** only use mason-registry if mason installed ([#4991](https://github.com/LazyVim/LazyVim/issues/4991)) ([21b02f0](https://github.com/LazyVim/LazyVim/commit/21b02f056d924d0a3cb3513b163e3dbdfa9c15ec)) * **mini.animate:** disable `snacks.scroll` when `mini.animate` is enabled ([9b07544](https://github.com/LazyVim/LazyVim/commit/9b07544e89ecead354ef0f17ebc3127f3fa5bbd8)) * **mini.indentscope:** disable snacks and indent-blankline scope ([98c77f1](https://github.com/LazyVim/LazyVim/commit/98c77f1de479b12bc29dc8339fbfe694959d99ed)) * **nvim-cmp:** set high prio for loading the nvim-cmp extra to prevent issues with opts ([adf8db6](https://github.com/LazyVim/LazyVim/commit/adf8db69ed91f8c15fe3cf37df9dc0801dbaeb39)) * **nvim-cmp:** specs ([88e77b0](https://github.com/LazyVim/LazyVim/commit/88e77b0e2439a27d06e95e89839227f1e9446c74)) * **ui:** use `Snacks.util.color` instead of `LazyVim.ui.fg` ([6d774ba](https://github.com/LazyVim/LazyVim/commit/6d774ba8f21f87aaa8bf9dbeb0a84b747541b349)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 54 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 2395b1f5..c5f7d75e 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "13.9.1" + ".": "14.0.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d9dd45fb..35d3cb83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,59 @@ # Changelog +## [14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0) (2024-12-13) + + +### ⚠ BREAKING CHANGES + +* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine +* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine +* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects +* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras +* **pick:** make fzf the default picker for LazyVim + +### Features + +* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([152f9d1](https://github.com/LazyVim/LazyVim/commit/152f9d113fa2b4fc2af72d2846c4dd68c31b7596)) +* **cmp:** moved `nvim-cmp` to extras and prefer `blink.cmp` on Neovim >= `0.10` as default completion engine ([2cbfb9b](https://github.com/LazyVim/LazyVim/commit/2cbfb9b6b7b9b4bb1c9ce94ad02ab0a851310fc0)) +* **keymaps:** added leader-uD to toggle dim mode ([9b97388](https://github.com/LazyVim/LazyVim/commit/9b973882b8bcbab32f850da7c553cdc6388af4ad)) +* **keymaps:** added leader-z to toggle zen mode ([e6d6a09](https://github.com/LazyVim/LazyVim/commit/e6d6a096b34ad887b9f954a3f43bcc3fd7833f73)) +* **keymaps:** added leader-Z to toggle zoom ([f2e1cac](https://github.com/LazyVim/LazyVim/commit/f2e1cac965e41d7761073856b11bea223cac1e4d)) +* **lualine:** add snacks profiler status ([7bc8490](https://github.com/LazyVim/LazyVim/commit/7bc8490d46e002d624f45037fc507e8dd10d4b70)) +* **pick:** make fzf the default picker for LazyVim ([ae2340f](https://github.com/LazyVim/LazyVim/commit/ae2340f60a012df125c87fe46e6d98d0be04bd10)) +* **rust:** exclude bad directories from rust-analyzer ([#5021](https://github.com/LazyVim/LazyVim/issues/5021)) ([94f6df0](https://github.com/LazyVim/LazyVim/commit/94f6df048fbecfdf2f65ab96156b713555df40dc)) +* **snacks:** added `snacks.input` ([54bece1](https://github.com/LazyVim/LazyVim/commit/54bece17b390453ea0beac41e419394d5e0d69ff)) +* **snacks:** added leader-ua to toggle global animations ([303980d](https://github.com/LazyVim/LazyVim/commit/303980d267577972bb12e34ef152a0e8b9a953e2)) +* **snacks:** added leader-ug to toggle indent guides ([b3ac642](https://github.com/LazyVim/LazyVim/commit/b3ac642317cd60e9b35869068dd74fe779a22146)) +* **snacks:** added leader-uS to toggle scroll ([cded8d4](https://github.com/LazyVim/LazyVim/commit/cded8d4d2808250db5ea864fb8e479fd8b5a4a2c)) +* **snacks:** added profiler keymaps ([a8332c6](https://github.com/LazyVim/LazyVim/commit/a8332c6d50106cf35e45953cdaa463cbb6c5b085)) +* **snacks:** enable `snacks.scroll` ([1a1a484](https://github.com/LazyVim/LazyVim/commit/1a1a48497c53e232b0f525baab87d5f23a2205b2)) +* **snacks:** use `snacks.indent` and moved `indent-blankline` to extras ([94fdc42](https://github.com/LazyVim/LazyVim/commit/94fdc421a11b960e116888658dd9b2b85c3b58fc)) +* **snacks:** use `snacks.scope` indent objects in favor of custom `mini.ai` indent objects ([d904a1e](https://github.com/LazyVim/LazyVim/commit/d904a1ef47638e4defede775a7f0966fb8e0a2b4)) +* **snacks:** use `Snacks.zen.zoom()` instead of custom **maximize** ([e389a5a](https://github.com/LazyVim/LazyVim/commit/e389a5ada955c253771ff5c9f8301e2f17c206d2)) +* **which-key:** make `helix` the default which-key preset ([44c712a](https://github.com/LazyVim/LazyVim/commit/44c712aa31e7e05971259841e1f87c9f3d9c6cd5)) +* **zen:** zoom with leader-wm and leader-uZ. zen with leader-uz ([2acedaa](https://github.com/LazyVim/LazyVim/commit/2acedaa3a8312e53d84a299bd82d616e1c26328a)) + + +### Bug Fixes + +* **blink:** disable cmdline integration for now since it doesn't work well with the enter keymap ([20eff4f](https://github.com/LazyVim/LazyVim/commit/20eff4fc3f55fbeb1e415f0cc5a2d1f3019e5da6)) +* **blink:** remove unneeded code ([d95e530](https://github.com/LazyVim/LazyVim/commit/d95e530c02cbb2bcf36da5bb3e235780bdf6d239)) +* **blink:** unset provider.kind ([#5024](https://github.com/LazyVim/LazyVim/issues/5024)) ([29c4dea](https://github.com/LazyVim/LazyVim/commit/29c4dea4e75b82ad4b06c21e360eefa3951a3fba)) +* **blink:** unset sources.compat. Fixes [#5016](https://github.com/LazyVim/LazyVim/issues/5016). Closes [#5017](https://github.com/LazyVim/LazyVim/issues/5017) ([2946031](https://github.com/LazyVim/LazyVim/commit/29460318f302b6dceaf16bd06c45cb3ed58d5fd8)) +* **clangd:** avoid nil-indexing the completion sorting comparators ([#5011](https://github.com/LazyVim/LazyVim/issues/5011)) ([c4b0d6d](https://github.com/LazyVim/LazyVim/commit/c4b0d6d0d1ee11c07c0ab4ed3f87f97b76a6f592)) +* **clangd:** nvim-cmp optional ([94be6fb](https://github.com/LazyVim/LazyVim/commit/94be6fb78786e9a53e914db9d5cfab09b13225ba)) +* **copliot:** restructure copilot-cmp spec ([34d2bdc](https://github.com/LazyVim/LazyVim/commit/34d2bdcac6fabe5d02e157bffa3475391ca1f7ec)) +* fqn for nvim-cmp ([a9a273d](https://github.com/LazyVim/LazyVim/commit/a9a273d041e2dd0e5654b5b492fd29138259fe68)) +* **git:** make nvim-cmp optional for the git extra ([ec92fa8](https://github.com/LazyVim/LazyVim/commit/ec92fa85586b4082f04b30ad94cb98b24463665e)) +* **java:** only setup debug adapter config if mason is installed ([#5013](https://github.com/LazyVim/LazyVim/issues/5013)) ([aad0edb](https://github.com/LazyVim/LazyVim/commit/aad0edbf749bcbe16e9ef8d2a65a19dd3fe2bd87)) +* **java:** only setup debug adapter config if mason is installed (for real this time) ([#5014](https://github.com/LazyVim/LazyVim/issues/5014)) ([5b1b6b2](https://github.com/LazyVim/LazyVim/commit/5b1b6b29d717adeffb0528cffef9f1a3972d3701)) +* **java:** only use mason-registry if mason installed ([#4991](https://github.com/LazyVim/LazyVim/issues/4991)) ([21b02f0](https://github.com/LazyVim/LazyVim/commit/21b02f056d924d0a3cb3513b163e3dbdfa9c15ec)) +* **mini.animate:** disable `snacks.scroll` when `mini.animate` is enabled ([9b07544](https://github.com/LazyVim/LazyVim/commit/9b07544e89ecead354ef0f17ebc3127f3fa5bbd8)) +* **mini.indentscope:** disable snacks and indent-blankline scope ([98c77f1](https://github.com/LazyVim/LazyVim/commit/98c77f1de479b12bc29dc8339fbfe694959d99ed)) +* **nvim-cmp:** set high prio for loading the nvim-cmp extra to prevent issues with opts ([adf8db6](https://github.com/LazyVim/LazyVim/commit/adf8db69ed91f8c15fe3cf37df9dc0801dbaeb39)) +* **nvim-cmp:** specs ([88e77b0](https://github.com/LazyVim/LazyVim/commit/88e77b0e2439a27d06e95e89839227f1e9446c74)) +* **ui:** use `Snacks.util.color` instead of `LazyVim.ui.fg` ([6d774ba](https://github.com/LazyVim/LazyVim/commit/6d774ba8f21f87aaa8bf9dbeb0a84b747541b349)) + ## [13.9.1](https://github.com/LazyVim/LazyVim/compare/v13.9.0...v13.9.1) (2024-12-12) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index b1132523..6cf2dac6 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "13.9.1" -- x-release-please-version +M.version = "14.0.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 5a503c556adf0bcc0d2b40d84cf5a84f9b378f65 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 16:57:47 +0100 Subject: [PATCH 175/496] docs: fix NEWS link to blink.cmp --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 300b48b9..34241e69 100644 --- a/NEWS.md +++ b/NEWS.md @@ -10,7 +10,7 @@ With these changes, default **LazyVim** is now just `34` 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) +- [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 `nvim-cmp` extra ### Removed Plugins From 0fd7140a6de936edb27a4ba4f4825153ae801c21 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 17:21:37 +0100 Subject: [PATCH 176/496] fix(NEWS): typo --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 34241e69..9d00ddd6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,9 +9,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 + - 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 `nvim-cmp` extra + - to use **nvim-cmp** instead, enable the `coding.nvim-cmp` extra ### Removed Plugins From 9a0d14dcf5a6e91a54f1afc1378a85f09dec9ae8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:27:22 +0100 Subject: [PATCH 177/496] chore(main): release 14.0.1 (#5033) :robot: I have created a release *beep* *boop* --- ## [14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1) (2024-12-13) ### Bug Fixes * **NEWS:** typo ([0fd7140](https://github.com/LazyVim/LazyVim/commit/0fd7140a6de936edb27a4ba4f4825153ae801c21)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c5f7d75e..b2abfd3a 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.0.0" + ".": "14.0.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d3cb83..5c1010bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1) (2024-12-13) + + +### Bug Fixes + +* **NEWS:** typo ([0fd7140](https://github.com/LazyVim/LazyVim/commit/0fd7140a6de936edb27a4ba4f4825153ae801c21)) + ## [14.0.0](https://github.com/LazyVim/LazyVim/compare/v13.9.1...v14.0.0) (2024-12-13) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 6cf2dac6..c963bf46 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.0.0" -- x-release-please-version +M.version = "14.0.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 009e3587be1badc04c9a8b8b459e8555b405509c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 19:53:18 +0100 Subject: [PATCH 178/496] fix(cmp): wrong extras check for nvim-cmp --- lua/lazyvim/util/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index c831606a..188544c3 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -269,7 +269,7 @@ end function M.cmp_engine() vim.g.lazyvim_cmp = vim.g.lazyvim_cmp or "auto" if vim.g.lazyvim_cmp == "auto" then - return LazyVim.has_extra("nvim-cmp") and "nvim-cmp" or "blink.cmp" + return LazyVim.has_extra("coding.nvim-cmp") and "nvim-cmp" or "blink.cmp" end return vim.g.lazyvim_cmp end From 60b77045d57d5473e50042b9b879c9c1054e6a10 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 19:56:03 +0100 Subject: [PATCH 179/496] fix(cmp): disable nvim-cmp/blink.cmp when needed --- lua/lazyvim/plugins/extras/coding/blink.lua | 5 +++++ lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 10eab616..c32e8544 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -6,6 +6,11 @@ if lazyvim_docs then end return { + { + "hrsh7th/nvim-cmp", + optional = true, + enabled = false, + }, { "saghen/blink.cmp", version = not vim.g.lazyvim_blink_main and "*", diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index 3ec15c83..cdada25a 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -1,4 +1,9 @@ return { + { + "saghen/blink.cmp", + enabled = false, + optional = true, + }, -- Setup nvim-cmp { From d2ba0473f0a33892947a633aa155f3111b4906e5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 19:58:07 +0100 Subject: [PATCH 180/496] chore(main): release 14.0.2 (#5042) :robot: I have created a release *beep* *boop* --- ## [14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2) (2024-12-13) ### Bug Fixes * **cmp:** disable nvim-cmp/blink.cmp when needed ([60b7704](https://github.com/LazyVim/LazyVim/commit/60b77045d57d5473e50042b9b879c9c1054e6a10)) * **cmp:** wrong extras check for nvim-cmp ([009e358](https://github.com/LazyVim/LazyVim/commit/009e3587be1badc04c9a8b8b459e8555b405509c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b2abfd3a..8bfa7ed7 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.0.1" + ".": "14.0.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c1010bb..52625d6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2) (2024-12-13) + + +### Bug Fixes + +* **cmp:** disable nvim-cmp/blink.cmp when needed ([60b7704](https://github.com/LazyVim/LazyVim/commit/60b77045d57d5473e50042b9b879c9c1054e6a10)) +* **cmp:** wrong extras check for nvim-cmp ([009e358](https://github.com/LazyVim/LazyVim/commit/009e3587be1badc04c9a8b8b459e8555b405509c)) + ## [14.0.1](https://github.com/LazyVim/LazyVim/compare/v14.0.0...v14.0.1) (2024-12-13) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index c963bf46..6aeab070 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.0.1" -- x-release-please-version +M.version = "14.0.2" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4488cb24f72e04dd5adb2e7c0388a51c2b36f4f0 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Fri, 13 Dec 2024 14:18:25 -0500 Subject: [PATCH 181/496] feat(blink): use block vs. icon for colors (#5037) ## Description Replace use of icon for `Color` kind with block characters for `blink.cmp` autocomplete items to make swatches more usable. This also makes the `blink.cmp` built-in Tailwind integration better match `nvim-cmp`. **Note:** I didn't want to replace the default `LazyVim.config.icons.kinds.Color` in case it's used by other plugins (e.g. context), but didn't actually find any real uses, so perhaps that could be done instead? Figured best to leave those untouched as they can be more generically used as actual icons, and are not always guaranteed to have custom highlights applied. ## Related Issue(s) None. ## Screenshots ### Old ![Screenshot 2024-12-13 at 12 18 47](https://github.com/user-attachments/assets/1e73dac9-728d-47ba-8df1-4445b0143177) ### New ![Screenshot 2024-12-13 at 12 18 13](https://github.com/user-attachments/assets/1ff042f1-eda4-4a1b-afcd-658075666eeb) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index c32e8544..a2235520 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -139,6 +139,9 @@ return { 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 1517ec9bb46b454d253186aff5e5abd41e96d723 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 21:08:45 +0100 Subject: [PATCH 182/496] fix(blink): add backward compat for config --- lua/lazyvim/plugins/extras/coding/blink.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index a2235520..4219330a 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -99,6 +99,12 @@ return { 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 From d30e9e31ebfbb3d079e7e17a948ab1ccb086d618 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:10:19 +0100 Subject: [PATCH 183/496] chore(main): release 14.1.0 (#5043) :robot: I have created a release *beep* *boop* --- ## [14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0) (2024-12-13) ### Features * **blink:** use block vs. icon for colors ([#5037](https://github.com/LazyVim/LazyVim/issues/5037)) ([4488cb2](https://github.com/LazyVim/LazyVim/commit/4488cb24f72e04dd5adb2e7c0388a51c2b36f4f0)) ### Bug Fixes * **blink:** add backward compat for config ([1517ec9](https://github.com/LazyVim/LazyVim/commit/1517ec9bb46b454d253186aff5e5abd41e96d723)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8bfa7ed7..e6218b66 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.0.2" + ".": "14.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 52625d6c..5be6f715 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0) (2024-12-13) + + +### Features + +* **blink:** use block vs. icon for colors ([#5037](https://github.com/LazyVim/LazyVim/issues/5037)) ([4488cb2](https://github.com/LazyVim/LazyVim/commit/4488cb24f72e04dd5adb2e7c0388a51c2b36f4f0)) + + +### Bug Fixes + +* **blink:** add backward compat for config ([1517ec9](https://github.com/LazyVim/LazyVim/commit/1517ec9bb46b454d253186aff5e5abd41e96d723)) + ## [14.0.2](https://github.com/LazyVim/LazyVim/compare/v14.0.1...v14.0.2) (2024-12-13) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 6aeab070..c81f20d3 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.0.2" -- x-release-please-version +M.version = "14.1.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 08a7f7e3f92aeced3092c5ec462d784f765e8654 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Fri, 13 Dec 2024 23:37:25 +0200 Subject: [PATCH 184/496] fix(blink): `draw.treesitter` expects table (#5044) ## Description If you would like to enable more sources feel free. I just went with the recommended setting in blink's default configuration. Although on their repo the have it to empty table, but I assumed since you had it to `true` you would at least want the `lsp` source. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 4219330a..bb1a917f 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -53,7 +53,7 @@ return { }, menu = { draw = { - treesitter = true, + treesitter = { "lsp" }, }, }, documentation = { From 63eab6d9a54b6d9e93d3cc445d57014bbe8cc271 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 22:46:09 +0100 Subject: [PATCH 185/496] fix(blink): compat with 0.7.6 --- lua/lazyvim/plugins/extras/coding/blink.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index bb1a917f..883a4d54 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -99,10 +99,13 @@ return { 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 opts.sources.completion = opts.sources.completion or {} opts.sources.completion.enabled_providers = enabled + if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then + opts.completion.menu.draw.treesitter = true + end end -- Unset custom prop to pass blink.cmp validation From b07378dde40f1fa98b099cbd496129f5ca376e2c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 22:54:38 +0100 Subject: [PATCH 186/496] fix(blink): only override color symbol kind for blink --- lua/lazyvim/plugins/extras/coding/blink.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 883a4d54..39de51b8 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -147,10 +147,9 @@ return { "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 5105f3c029ee5804d90c2159db8139eed52bf25d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 13 Dec 2024 22:54:52 +0100 Subject: [PATCH 187/496] style(blink): make luals happy --- lua/lazyvim/plugins/extras/coding/blink.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 39de51b8..c99b833c 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: missing-fields if lazyvim_docs then -- set to `true` to follow the main branch -- you need to have a working rust toolchain to build the plugin @@ -101,9 +102,11 @@ return { --- 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 @@ -119,6 +122,7 @@ return { 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[] From 6503e59db32e241eae68073b1a105d508dec0c02 Mon Sep 17 00:00:00 2001 From: Valentin Degenne Date: Sat, 14 Dec 2024 00:05:56 +0100 Subject: [PATCH 188/496] style(keymaps): stylua (#5006) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🧼💦🫧 --- lua/lazyvim/config/keymaps.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index a49dbadb..99e65c34 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -122,21 +122,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 3866fbcd40dfd52f4012dfbb434208a9f953cf05 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 14 Dec 2024 07:42:24 +0100 Subject: [PATCH 189/496] feat(blink): add `` to keymaps --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index c99b833c..a3b34c2e 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -79,6 +79,7 @@ return { keymap = { preset = "enter", + [""] = { "select_and_accept" }, [""] = { LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), "fallback", From 1efb37948559e20e0e49fd0784c57d163f27cd97 Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 14 Dec 2024 06:43:23 +0000 Subject: [PATCH 190/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index cd702db2..3f288a5a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 13 +*LazyVim.txt* For Neovim Last change: 2024 December 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 380cea97bf92fda3ad4ae14d1d4d37acffe5019a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 14 Dec 2024 07:44:00 +0100 Subject: [PATCH 191/496] fix(health): added `fzf` to healthchecks --- lua/lazyvim/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 4822de86..9977da33 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -17,7 +17,7 @@ function M.check() error("Neovim >= 0.9.0 is required") end - for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit" }) do + for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf" }) do local name = type(cmd) == "string" and cmd or vim.inspect(cmd) local commands = type(cmd) == "string" and { cmd } or cmd ---@cast commands string[] From dc4345a5ee23ffb4aad50c01eca49d5bc47a96c3 Mon Sep 17 00:00:00 2001 From: Vicente Roa <79950811+vicenteroa@users.noreply.github.com> Date: Sat, 14 Dec 2024 03:52:58 -0300 Subject: [PATCH 192/496] docs(README): translate README.md to Spanish (#5054) ## Description This pull request translates the README.md file from English to Spanish to provide Spanish-speaking users with an easier way to understand the setup and features of LazyVim. The translation includes all sections of the original file, ensuring that the core documentation remains intact while making it more accessible to a broader audience. ## Related Issue(s) None. ## Screenshots None. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- README-ES.md | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 README-ES.md diff --git a/README-ES.md b/README-ES.md new file mode 100644 index 00000000..06e64f96 --- /dev/null +++ b/README-ES.md @@ -0,0 +1,145 @@ +
+ +
+ +
+ +

+ Instalar + · + Configurar + · + Documentación +

+ + + +LazyVim es una configuración de Neovim impulsada por [💤 lazy.nvim](https://github.com/folke/lazy.nvim) que facilita la personalización y extensión de tu configuración. En lugar de tener que elegir entre comenzar desde cero o usar una distribución predefinida, LazyVim ofrece lo mejor de ambos mundos: la flexibilidad para ajustar tu configuración según sea necesario, junto con la conveniencia de una configuración preconfigurada. + +![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png) + +![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png) + +## ✨ Características + +- 🔥 Convierte tu Neovim en un IDE completo +- 💤 Personaliza y extiende fácilmente tu configuración con [lazy.nvim](https://github.com/folke/lazy.nvim) +- 🚀 Extremadamente rápido +- 🧹 Ajustes predeterminados sensatos para opciones, autocmds y combinaciones de teclas +- 📦 Viene con una gran cantidad de plugins preconfigurados y listos para usar + +## ⚡️ Requisitos + +- Neovim >= **0.9.0** (debe ser compilado con **LuaJIT**) +- Git >= **2.19.0** (para soporte de clones parciales) +- una [Fuente Nerd](https://www.nerdfonts.com/) **_(opcional)_** +- un compilador **C** para `nvim-treesitter`. Consulta [aquí](https://github.com/nvim-treesitter/nvim-treesitter#requirements) + +## 🚀 Empezando + +Puedes encontrar una plantilla de inicio para **LazyVim** [aquí](https://github.com/LazyVim/starter) + +
Probarlo con Docker + +```sh +docker run -w /root -it --rm alpine:edge sh -uelic ' + apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update + git clone https://github.com/LazyVim/starter ~/.config/nvim + cd ~/.config/nvim + nvim +' +``` + +
+ +
Instalar el LazyVim Starter + +- Haz una copia de seguridad de tus archivos actuales de Neovim: + + ```sh + mv ~/.config/nvim ~/.config/nvim.bak + mv ~/.local/share/nvim ~/.local/share/nvim.bak + ``` + +- Clona el starter + + ```sh + git clone https://github.com/LazyVim/starter ~/.config/nvim + ``` + +- Elimina la carpeta `.git`, para que puedas agregarla a tu propio repositorio más tarde + + ```sh + rm -rf ~/.config/nvim/.git + ``` + +- ¡Inicia Neovim! + + ```sh + nvim + ``` + + Consulta los comentarios en los archivos sobre cómo personalizar **LazyVim**. + +
+ +--- + +Hay un excelente video creado por [@elijahmanor](https://github.com/elijahmanor) con una guía para empezar. + +[![Ver el video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) + +[@dusty-phillips](https://github.com/dusty-phillips) escribió un libro completo llamado +[LazyVim para Desarrolladores Ambiciosos](https://lazyvim-ambitious-devs.phillips.codes) +disponible de forma gratuita en línea. + +## 📂 Estructura de Archivos + +Los archivos dentro de la configuración se cargarán automáticamente en el momento adecuado, +por lo que no necesitas requerir esos archivos manualmente. +**LazyVim** viene con un conjunto de archivos de configuración predeterminados que se cargarán +**_antes_** que los tuyos. Consulta [aquí](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config) + +Puedes agregar tus especificaciones de plugins personalizadas en `lua/plugins/`. Todos los archivos allí +serán cargados automáticamente por [lazy.nvim](https://github.com/folke/lazy.nvim) + +
+~/.config/nvim
+├── lua
+│   ├── config
+│   │   ├── autocmds.lua
+│   │   ├── keymaps.lua
+│   │   ├── lazy.lua
+│   │   └── options.lua
+│   └── plugins
+│       ├── spec1.lua
+│       ├── **
+│       └── spec2.lua
+└── init.lua
+
+ +## ⚙️ Configuración + +Consulta la [documentación](https://lazyvim.github.io) From 5de15329fb5f7a846140fca96f9c5587245d63c1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 14 Dec 2024 14:42:17 +0100 Subject: [PATCH 193/496] fix(health): added curl to health checks --- lua/lazyvim/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 9977da33..9fdc5a56 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -17,7 +17,7 @@ function M.check() error("Neovim >= 0.9.0 is required") end - for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf" }) do + for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do local name = type(cmd) == "string" and cmd or vim.inspect(cmd) local commands = type(cmd) == "string" and { cmd } or cmd ---@cast commands string[] From c2175397a7e7d67c31b057c6b84e652688f1d874 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:31:01 +0100 Subject: [PATCH 194/496] chore(main): release 14.2.0 (#5048) :robot: I have created a release *beep* *boop* --- ## [14.2.0](https://github.com/LazyVim/LazyVim/compare/v14.1.0...v14.2.0) (2024-12-14) ### Features * **blink:** add `<c-y>` to keymaps ([3866fbc](https://github.com/LazyVim/LazyVim/commit/3866fbcd40dfd52f4012dfbb434208a9f953cf05)) ### Bug Fixes * **blink:** `draw.treesitter` expects table ([#5044](https://github.com/LazyVim/LazyVim/issues/5044)) ([08a7f7e](https://github.com/LazyVim/LazyVim/commit/08a7f7e3f92aeced3092c5ec462d784f765e8654)) * **blink:** compat with 0.7.6 ([63eab6d](https://github.com/LazyVim/LazyVim/commit/63eab6d9a54b6d9e93d3cc445d57014bbe8cc271)) * **blink:** only override color symbol kind for blink ([b07378d](https://github.com/LazyVim/LazyVim/commit/b07378dde40f1fa98b099cbd496129f5ca376e2c)) * **health:** added `fzf` to healthchecks ([380cea9](https://github.com/LazyVim/LazyVim/commit/380cea97bf92fda3ad4ae14d1d4d37acffe5019a)) * **health:** added curl to health checks ([5de1532](https://github.com/LazyVim/LazyVim/commit/5de15329fb5f7a846140fca96f9c5587245d63c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index e6218b66..220aa850 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.1.0" + ".": "14.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5be6f715..2599d7bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [14.2.0](https://github.com/LazyVim/LazyVim/compare/v14.1.0...v14.2.0) (2024-12-14) + + +### Features + +* **blink:** add `<c-y>` to keymaps ([3866fbc](https://github.com/LazyVim/LazyVim/commit/3866fbcd40dfd52f4012dfbb434208a9f953cf05)) + + +### Bug Fixes + +* **blink:** `draw.treesitter` expects table ([#5044](https://github.com/LazyVim/LazyVim/issues/5044)) ([08a7f7e](https://github.com/LazyVim/LazyVim/commit/08a7f7e3f92aeced3092c5ec462d784f765e8654)) +* **blink:** compat with 0.7.6 ([63eab6d](https://github.com/LazyVim/LazyVim/commit/63eab6d9a54b6d9e93d3cc445d57014bbe8cc271)) +* **blink:** only override color symbol kind for blink ([b07378d](https://github.com/LazyVim/LazyVim/commit/b07378dde40f1fa98b099cbd496129f5ca376e2c)) +* **health:** added `fzf` to healthchecks ([380cea9](https://github.com/LazyVim/LazyVim/commit/380cea97bf92fda3ad4ae14d1d4d37acffe5019a)) +* **health:** added curl to health checks ([5de1532](https://github.com/LazyVim/LazyVim/commit/5de15329fb5f7a846140fca96f9c5587245d63c1)) + ## [14.1.0](https://github.com/LazyVim/LazyVim/compare/v14.0.2...v14.1.0) (2024-12-13) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index c81f20d3..5549aae2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.1.0" -- x-release-please-version +M.version = "14.2.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From bd6ca6bda7ca0a648ed10281bc89bd6595053982 Mon Sep 17 00:00:00 2001 From: Daniele Date: Sat, 14 Dec 2024 22:33:27 +0100 Subject: [PATCH 195/496] docs(README): translate README.md to Italian (#5060) ## Description Add an Italian translation of the main `README.md` to `README-IT.md` file to make LazyVim more accessible to Italian-speaking users, just like we did for other languages. The translation maintains all original formatting, links and images while providing natural Italian language text. ## Related Issue(s) None ## Screenshots None ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- README-IT.md | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 README-IT.md diff --git a/README-IT.md b/README-IT.md new file mode 100644 index 00000000..3ab7419a --- /dev/null +++ b/README-IT.md @@ -0,0 +1,150 @@ +
+ +
+ +
+ +

+ Installazione + · + Configurazione + · + Documentazione +

+ + + +LazyVim è una configurazione di Neovim basata su [💤 lazy.nvim](https://github.com/folke/lazy.nvim) +che rende semplice personalizzare ed estendere la tua configurazione. +Piuttosto che dover scegliere tra partire da zero o utilizzare una +distribuzione preconfigurata, LazyVim offre il meglio di entrambi i mondi: +la flessibilità di modificare la tua configurazione come necessario, +insieme alla comodità di un setup preconfigurato. + +![image](https://user-images.githubusercontent.com/292349/211285846-0b7bb3bf-0462-4029-b64c-4ee1d037fc1c.png) + +![image](https://user-images.githubusercontent.com/292349/213447056-92290767-ea16-430c-8727-ce994c93e9cc.png) + +## ✨ Caratteristiche + +- 🔥 Trasforma il tuo Neovim in un IDE completo +- 💤 Personalizza ed estendi facilmente la tua configurazione con [lazy.nvim](https://github.com/folke/lazy.nvim) +- 🚀 Estremamente veloce +- 🧹 Impostazioni di default ottimizzate per opzioni, AutoCmd e scorciatoie da tastiera +- 📦 Distribuito con una vasta gamma di plugin preconfigurati e pronti all'uso + +## ⚡️ Requisiti + +- Neovim >= **0.9.0** (deve essere compilato con **LuaJIT**) +- Git >= **2.19.0** (per supportare cloni parziali) +- a [Nerd Font](https://www.nerdfonts.com/) **_(opzionale)_** +- un compilatore **C** per `nvim-treesitter`. Leggi [qui](https://github.com/nvim-treesitter/nvim-treesitter#requirements) + +## 🚀 Per iniziare + +Puoi trovare un template per **LazyVim** [qui](https://github.com/LazyVim/starter) + +
Provalo con Docker + +```sh +docker run -w /root -it --rm alpine:edge sh -uelic ' + apk add git lazygit fzf curl neovim ripgrep alpine-sdk --update + git clone https://github.com/LazyVim/starter ~/.config/nvim + cd ~/.config/nvim + nvim +' +``` + +
+ +
Installa il LazyVim Starter + +- Fai un backup dei tuoi file di Neovim attuali: + + ```sh + mv ~/.config/nvim ~/.config/nvim.bak + mv ~/.local/share/nvim ~/.local/share/nvim.bak + ``` + +- Clona lo Starter + + ```sh + git clone https://github.com/LazyVim/starter ~/.config/nvim + ``` + +- Rimuovi la cartella `.git`, così puoi aggiungerla al tuo repo in seguito + + ```sh + rm -rf ~/.config/nvim/.git + ``` + +- Avvia Neovim! + + ```sh + nvim + ``` + + Consulta i commenti nei file su come personalizzare **LazyVim**. + +
+ +--- + +Qui un video creato da [@elijahmanor](https://github.com/elijahmanor) con una guida per iniziare. + +[![Guarda il video](https://img.youtube.com/vi/N93cTbtLCIM/hqdefault.jpg)](https://www.youtube.com/watch?v=N93cTbtLCIM) + +[@dusty-phillips](https://github.com/dusty-phillips) ha scritto un libro comprensivo chiamato +[LazyVim per Sviluppatori Ambiziosi](https://lazyvim-ambitious-devs.phillips.codes) +che è disponibile gratuitamente online. + +## 📂 Struttura dei file + +I file presenti nella configurazione verranno caricati automaticamente al momento +più opportuno, quindi non è necessario richiamare manualmente quei file. +**LazyVim** ha un set di configurazioni predefinite che verranno caricate +prima delle tue. Vedi [qui](https://github.com/LazyVim/LazyVim/tree/main/lua/lazyvim/config) + +Puoi aggiungere i tuoi plugin personalizzati sotto `lua/plugins/`. Tutti +i file presenti verranno automaticamente caricati da [lazy.nvim](https://github.com/folke/lazy.nvim) + +
+~/.config/nvim
+├── lua
+│   ├── config
+│   │   ├── autocmds.lua
+│   │   ├── keymaps.lua
+│   │   ├── lazy.lua
+│   │   └── options.lua
+│   └── plugins
+│       ├── spec1.lua
+│       ├── **
+│       └── spec2.lua
+└── init.lua
+
+ +## ⚙️ Configurazione + +Consulta la [documentazione](https://lazyvim.github.io) From 195a6e611495da9dbb1afef4b470926cc2535f19 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 08:27:03 +0100 Subject: [PATCH 196/496] feat(config): better icon for snippets --- lua/lazyvim/config/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5549aae2..d5d80deb 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -85,7 +85,7 @@ local defaults = { Package = " ", Property = " ", Reference = " ", - Snippet = " ", + Snippet = "󱄽 ", String = " ", Struct = "󰆼 ", Supermaven = " ", From 15c81fdbb839f0c657fe4c077114475e82f423fe Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 08:27:43 +0100 Subject: [PATCH 197/496] feat(keymaps): stop native snippets on escape. Closes #5083 --- lua/lazyvim/config/keymaps.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 99e65c34..a4c8f353 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -4,6 +4,14 @@ -- 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 }) @@ -45,9 +53,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( From eead9dff8475f184bcceeefa792febbc49d6ba25 Mon Sep 17 00:00:00 2001 From: folke Date: Sun, 15 Dec 2024 07:37:13 +0000 Subject: [PATCH 198/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3f288a5a..9898262c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 14 +*LazyVim.txt* For Neovim Last change: 2024 December 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 413566af591e9152f156944bff35c89d5d973148 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 08:59:45 +0100 Subject: [PATCH 199/496] fix(blink): super-tab and ai completions --- lua/lazyvim/plugins/extras/coding/blink.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index a3b34c2e..706473f4 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -101,6 +101,21 @@ return { 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 From 8fe3b5eec8cab66bef61a402ad3a788de1096425 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:00:11 +0100 Subject: [PATCH 200/496] chore(main): release 14.3.0 (#5087) :robot: I have created a release *beep* *boop* --- ## [14.3.0](https://github.com/LazyVim/LazyVim/compare/v14.2.0...v14.3.0) (2024-12-15) ### Features * **config:** better icon for snippets ([195a6e6](https://github.com/LazyVim/LazyVim/commit/195a6e611495da9dbb1afef4b470926cc2535f19)) * **keymaps:** stop native snippets on escape. Closes [#5083](https://github.com/LazyVim/LazyVim/issues/5083) ([15c81fd](https://github.com/LazyVim/LazyVim/commit/15c81fdbb839f0c657fe4c077114475e82f423fe)) ### Bug Fixes * **blink:** super-tab and ai completions ([413566a](https://github.com/LazyVim/LazyVim/commit/413566af591e9152f156944bff35c89d5d973148)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 220aa850..102b96e6 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.2.0" + ".": "14.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2599d7bb..6961ebaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [14.3.0](https://github.com/LazyVim/LazyVim/compare/v14.2.0...v14.3.0) (2024-12-15) + + +### Features + +* **config:** better icon for snippets ([195a6e6](https://github.com/LazyVim/LazyVim/commit/195a6e611495da9dbb1afef4b470926cc2535f19)) +* **keymaps:** stop native snippets on escape. Closes [#5083](https://github.com/LazyVim/LazyVim/issues/5083) ([15c81fd](https://github.com/LazyVim/LazyVim/commit/15c81fdbb839f0c657fe4c077114475e82f423fe)) + + +### Bug Fixes + +* **blink:** super-tab and ai completions ([413566a](https://github.com/LazyVim/LazyVim/commit/413566af591e9152f156944bff35c89d5d973148)) + ## [14.2.0](https://github.com/LazyVim/LazyVim/compare/v14.1.0...v14.2.0) (2024-12-14) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d5d80deb..b9c5225f 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.2.0" -- x-release-please-version +M.version = "14.3.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ef9102677f9b7a31d0bb7cfcd76f24401a7385fc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 11:46:21 +0100 Subject: [PATCH 201/496] feat(keymaps): unlink luasnip on `esc` --- lua/lazyvim/config/keymaps.lua | 4 +--- lua/lazyvim/plugins/extras/coding/luasnip.lua | 6 ++++++ lua/lazyvim/util/cmp.lua | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index a4c8f353..45c89c4a 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -7,9 +7,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/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index f0f815b4..6b16ba90 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -34,6 +34,12 @@ return { 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, }, diff --git a/lua/lazyvim/util/cmp.lua b/lua/lazyvim/util/cmp.lua index 34bb44c4..0641c892 100644 --- a/lua/lazyvim/util/cmp.lua +++ b/lua/lazyvim/util/cmp.lua @@ -13,6 +13,11 @@ M.actions = { return true end end, + snippet_stop = function() + if vim.snippet then + vim.snippet.stop() + end + end, } ---@param actions string[] From 6bc56e4e8142e3d453f2fbfea8ace62fcfc3750f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 18:33:50 +0100 Subject: [PATCH 202/496] feat(blink): boost results from ai providers and enable async, to get much faster completions --- lua/lazyvim/plugins/extras/ai/codeium.lua | 8 +++++++- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 ++ lua/lazyvim/plugins/extras/ai/supermaven.lua | 8 +++++++- lua/lazyvim/plugins/extras/ai/tabnine.lua | 8 +++++++- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index c347c6c3..d2d29a00 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -62,7 +62,13 @@ return { opts = { sources = { compat = { "codeium" }, - providers = { codeium = { kind = "Codeium" } }, + providers = { + codeium = { + kind = "Codeium", + score_offset = 100, + async = true, + }, + }, }, }, } or nil, diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 0c1a1b26..4651c689 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -106,6 +106,8 @@ return { name = "copilot", module = "blink-cmp-copilot", kind = "Copilot", + score_offset = 100, + async = true, }, }, }, diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 35a955ca..67954474 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -50,7 +50,13 @@ return { opts = { sources = { compat = { "supermaven" }, - providers = { supermaven = { kind = "Supermaven" } }, + providers = { + supermaven = { + kind = "Supermaven", + score_offset = 100, + async = true, + }, + }, }, }, } or nil, diff --git a/lua/lazyvim/plugins/extras/ai/tabnine.lua b/lua/lazyvim/plugins/extras/ai/tabnine.lua index cc974d0a..06d02dc2 100644 --- a/lua/lazyvim/plugins/extras/ai/tabnine.lua +++ b/lua/lazyvim/plugins/extras/ai/tabnine.lua @@ -41,7 +41,13 @@ return { opts = { sources = { compat = { "cmp_tabnine" }, - providers = { cmp_tabnine = { kind = "TabNine" } }, + providers = { + cmp_tabnine = { + kind = "TabNine", + score_offset = 100, + async = true, + }, + }, }, }, }, From 8f113a514c130cba8d0f79acdd091d18ef997829 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 18:39:48 +0100 Subject: [PATCH 203/496] fix(keymaps): better escape --- lua/lazyvim/config/keymaps.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 45c89c4a..c618578b 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -4,12 +4,6 @@ -- 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 }) @@ -51,6 +45,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( From 89314cb2aae76b434122592ac8da264fa689bdff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 15 Dec 2024 18:44:24 +0100 Subject: [PATCH 204/496] fix(blink): allow overriding `` key. Fixes #5095. Closes #5099 --- lua/lazyvim/plugins/extras/coding/blink.lua | 37 +++++++++++---------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 706473f4..d99c3d29 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -80,10 +80,6 @@ return { keymap = { preset = "enter", [""] = { "select_and_accept" }, - [""] = { - LazyVim.cmp.map({ "snippet_forward", "ai_accept" }), - "fallback", - }, }, }, ---@param opts blink.cmp.Config | { sources: { compat: string[] } } @@ -101,19 +97,26 @@ return { 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 From c8d8dd0ab6b4db711b33a79835cbac3b389b37f4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 20:26:59 +0100 Subject: [PATCH 205/496] chore(main): release 14.4.0 (#5089) :robot: I have created a release *beep* *boop* --- ## [14.4.0](https://github.com/LazyVim/LazyVim/compare/v14.3.0...v14.4.0) (2024-12-15) ### Features * **blink:** boost results from ai providers and enable async, to get much faster completions ([6bc56e4](https://github.com/LazyVim/LazyVim/commit/6bc56e4e8142e3d453f2fbfea8ace62fcfc3750f)) * **keymaps:** unlink luasnip on `esc` ([ef91026](https://github.com/LazyVim/LazyVim/commit/ef9102677f9b7a31d0bb7cfcd76f24401a7385fc)) ### Bug Fixes * **blink:** allow overriding `<Tab>` key. Fixes [#5095](https://github.com/LazyVim/LazyVim/issues/5095). Closes [#5099](https://github.com/LazyVim/LazyVim/issues/5099) ([89314cb](https://github.com/LazyVim/LazyVim/commit/89314cb2aae76b434122592ac8da264fa689bdff)) * **keymaps:** better escape ([8f113a5](https://github.com/LazyVim/LazyVim/commit/8f113a514c130cba8d0f79acdd091d18ef997829)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 102b96e6..43bda57f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.3.0" + ".": "14.4.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6961ebaa..23cbf257 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [14.4.0](https://github.com/LazyVim/LazyVim/compare/v14.3.0...v14.4.0) (2024-12-15) + + +### Features + +* **blink:** boost results from ai providers and enable async, to get much faster completions ([6bc56e4](https://github.com/LazyVim/LazyVim/commit/6bc56e4e8142e3d453f2fbfea8ace62fcfc3750f)) +* **keymaps:** unlink luasnip on `esc` ([ef91026](https://github.com/LazyVim/LazyVim/commit/ef9102677f9b7a31d0bb7cfcd76f24401a7385fc)) + + +### Bug Fixes + +* **blink:** allow overriding `<Tab>` key. Fixes [#5095](https://github.com/LazyVim/LazyVim/issues/5095). Closes [#5099](https://github.com/LazyVim/LazyVim/issues/5099) ([89314cb](https://github.com/LazyVim/LazyVim/commit/89314cb2aae76b434122592ac8da264fa689bdff)) +* **keymaps:** better escape ([8f113a5](https://github.com/LazyVim/LazyVim/commit/8f113a514c130cba8d0f79acdd091d18ef997829)) + ## [14.3.0](https://github.com/LazyVim/LazyVim/compare/v14.2.0...v14.3.0) (2024-12-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index b9c5225f..4e10593c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.3.0" -- x-release-please-version +M.version = "14.4.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 22015e0b4835ae148c19b459bf494fe5f72b415b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 08:17:09 +0100 Subject: [PATCH 206/496] feat(blink): increase lazydev scores --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index d99c3d29..788c1bdc 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -187,6 +187,7 @@ return { lazydev = { name = "LazyDev", module = "lazydev.integrations.blink", + score_offset = 100, -- show at a higher priority than lsp }, }, }, From 7019295373668f88c0c33c2c24b9d97b14c519cc Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 16 Dec 2024 07:18:15 +0000 Subject: [PATCH 207/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 9898262c..ac7d9e9a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 15 +*LazyVim.txt* For Neovim Last change: 2024 December 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 5ea3cfa48e6ac88b90282da86dba7799f67b2e30 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 16:19:22 +0100 Subject: [PATCH 208/496] fix(blink): add `vim.snippet` fixes to blink (was already added to cmp). Fixes #5067 --- lua/lazyvim/plugins/extras/coding/blink.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 788c1bdc..e71f8fe4 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -36,6 +36,11 @@ return { ---@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 d0251155ab2a293136c933b4e925e1fa16d39a2d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 17:41:07 +0100 Subject: [PATCH 209/496] fix(illuminate): disable snacks.words when illuminate extra is enabled. Fixes #5125 --- lua/lazyvim/plugins/extras/editor/illuminate.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/illuminate.lua b/lua/lazyvim/plugins/extras/editor/illuminate.lua index 59aada0a..0db00655 100644 --- a/lua/lazyvim/plugins/extras/editor/illuminate.lua +++ b/lua/lazyvim/plugins/extras/editor/illuminate.lua @@ -2,6 +2,9 @@ -- This works with LSP, Treesitter, and regexp matching to find the other -- instances. return { + -- disable snacks words + { "snacks.nvim", opts = { words = { enabled = false } } }, + { "RRethy/vim-illuminate", event = "LazyFile", From 301135b2749affe71645c610001c8253ae78c591 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 17:45:50 +0100 Subject: [PATCH 210/496] fix(vscode): disable some snacks plugins in vscode. Closes #5124 --- lua/lazyvim/plugins/extras/vscode.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index e32069c7..b9b1e0b1 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -28,6 +28,7 @@ Config.options.change_detection.enabled = false Config.options.defaults.cond = function(plugin) return vim.tbl_contains(enabled, plugin.name) or plugin.vscode end +vim.g.snacks_animate = false -- Add some vscode specific keymaps vim.api.nvim_create_autocmd("User", { @@ -53,6 +54,15 @@ function LazyVim.terminal() end return { + { + "snacks.nvim", + opts = { + indent = { enabled = false }, + scroll = { enabled = false }, + notifier = { enabled = false }, + statuscolumn = { enabled = false }, + }, + }, { "LazyVim/LazyVim", config = function(_, opts) From 0b6d1c00506a6ea6af51646e6ec7212ac89f86e5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 17:47:07 +0100 Subject: [PATCH 211/496] style(lsp): remove refs to `document_highlight`, which is no longer used --- lua/lazyvim/plugins/extras/editor/illuminate.lua | 4 ---- lua/lazyvim/plugins/lsp/init.lua | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/illuminate.lua b/lua/lazyvim/plugins/extras/editor/illuminate.lua index 0db00655..66c45937 100644 --- a/lua/lazyvim/plugins/extras/editor/illuminate.lua +++ b/lua/lazyvim/plugins/extras/editor/illuminate.lua @@ -56,8 +56,4 @@ return { { "[[", desc = "Prev Reference" }, }, }, - { - "neovim/nvim-lspconfig", - opts = { document_highlight = { enabled = false } }, - }, } diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index eb37acc3..6ba4597f 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -46,10 +46,6 @@ return { codelens = { enabled = false, }, - -- Enable lsp cursor word highlighting - document_highlight = { - enabled = true, - }, -- add any global capabilities here capabilities = { workspace = { From 2cf3d234bfc31a1a4eda282ddabc12987f762893 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 18:09:44 +0100 Subject: [PATCH 212/496] fix(blink): don't trigger automatically on insert --- lua/lazyvim/plugins/extras/coding/blink.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index e71f8fe4..8773cb29 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -57,6 +57,9 @@ return { enabled = true, }, }, + trigger = { + show_on_insert_on_trigger_character = false, + }, menu = { draw = { treesitter = { "lsp" }, From 0f3a1201861e6d6e8834aa8937dcf3e4a70a937a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 16 Dec 2024 20:28:01 +0100 Subject: [PATCH 213/496] fix(blink): remove show_on_insert_on_trigger_character since this has been fixed for {} and others --- lua/lazyvim/plugins/extras/coding/blink.lua | 3 --- 1 file changed, 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 8773cb29..e71f8fe4 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -57,9 +57,6 @@ return { enabled = true, }, }, - trigger = { - show_on_insert_on_trigger_character = false, - }, menu = { draw = { treesitter = { "lsp" }, From 2d7a04be47b94010fd6c1a2be0283c0d4e5738ae Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Mon, 16 Dec 2024 14:29:13 -0500 Subject: [PATCH 214/496] refactor(blink): use upstream keymap fn (#5130) ## Description Replace re-defined super-tab `` keymap function with the original upstream one, so upstream fixes can propagate. Related to #5127 ## Related Issue(s) none ## Screenshots none ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index e71f8fe4..139bf6c4 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -106,13 +106,7 @@ return { 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 25ee13ce29ad8c4e10d677e641955cfd3c810fb5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 17 Dec 2024 07:08:34 +0100 Subject: [PATCH 215/496] fix(supermaven): don't attach to bigfile and some snacks ft. Fixes #5139 --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index 67954474..e491fd85 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -6,6 +6,7 @@ return { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp }, disable_inline_completion = vim.g.ai_cmp, + ignore_filetypes = { "bigfile", "snacks_input", "snacks_notif" }, }, }, From 1599187175eca74da52e94d7d65a1e08bcedccd9 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 17 Dec 2024 06:09:33 +0000 Subject: [PATCH 216/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ac7d9e9a..4e391e96 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 16 +*LazyVim.txt* For Neovim Last change: 2024 December 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 447e260a62ffd50b0113c20db0e63108baf44b44 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:04:54 +0100 Subject: [PATCH 217/496] chore(main): release 14.5.0 (#5109) :robot: I have created a release *beep* *boop* --- ## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) ### Features * **blink:** increase lazydev scores ([22015e0](https://github.com/LazyVim/LazyVim/commit/22015e0b4835ae148c19b459bf494fe5f72b415b)) ### Bug Fixes * **blink:** add `vim.snippet` fixes to blink (was already added to cmp). Fixes [#5067](https://github.com/LazyVim/LazyVim/issues/5067) ([5ea3cfa](https://github.com/LazyVim/LazyVim/commit/5ea3cfa48e6ac88b90282da86dba7799f67b2e30)) * **blink:** don't trigger automatically on insert ([2cf3d23](https://github.com/LazyVim/LazyVim/commit/2cf3d234bfc31a1a4eda282ddabc12987f762893)) * **blink:** remove show_on_insert_on_trigger_character since this has been fixed for {} and others ([0f3a120](https://github.com/LazyVim/LazyVim/commit/0f3a1201861e6d6e8834aa8937dcf3e4a70a937a)) * **illuminate:** disable snacks.words when illuminate extra is enabled. Fixes [#5125](https://github.com/LazyVim/LazyVim/issues/5125) ([d025115](https://github.com/LazyVim/LazyVim/commit/d0251155ab2a293136c933b4e925e1fa16d39a2d)) * **supermaven:** don't attach to bigfile and some snacks ft. Fixes [#5139](https://github.com/LazyVim/LazyVim/issues/5139) ([25ee13c](https://github.com/LazyVim/LazyVim/commit/25ee13ce29ad8c4e10d677e641955cfd3c810fb5)) * **vscode:** disable some snacks plugins in vscode. Closes [#5124](https://github.com/LazyVim/LazyVim/issues/5124) ([301135b](https://github.com/LazyVim/LazyVim/commit/301135b2749affe71645c610001c8253ae78c591)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 43bda57f..1a2b85d2 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.4.0" + ".": "14.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 23cbf257..f9ffbf67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) + + +### Features + +* **blink:** increase lazydev scores ([22015e0](https://github.com/LazyVim/LazyVim/commit/22015e0b4835ae148c19b459bf494fe5f72b415b)) + + +### Bug Fixes + +* **blink:** add `vim.snippet` fixes to blink (was already added to cmp). Fixes [#5067](https://github.com/LazyVim/LazyVim/issues/5067) ([5ea3cfa](https://github.com/LazyVim/LazyVim/commit/5ea3cfa48e6ac88b90282da86dba7799f67b2e30)) +* **blink:** don't trigger automatically on insert ([2cf3d23](https://github.com/LazyVim/LazyVim/commit/2cf3d234bfc31a1a4eda282ddabc12987f762893)) +* **blink:** remove show_on_insert_on_trigger_character since this has been fixed for {} and others ([0f3a120](https://github.com/LazyVim/LazyVim/commit/0f3a1201861e6d6e8834aa8937dcf3e4a70a937a)) +* **illuminate:** disable snacks.words when illuminate extra is enabled. Fixes [#5125](https://github.com/LazyVim/LazyVim/issues/5125) ([d025115](https://github.com/LazyVim/LazyVim/commit/d0251155ab2a293136c933b4e925e1fa16d39a2d)) +* **supermaven:** don't attach to bigfile and some snacks ft. Fixes [#5139](https://github.com/LazyVim/LazyVim/issues/5139) ([25ee13c](https://github.com/LazyVim/LazyVim/commit/25ee13ce29ad8c4e10d677e641955cfd3c810fb5)) +* **vscode:** disable some snacks plugins in vscode. Closes [#5124](https://github.com/LazyVim/LazyVim/issues/5124) ([301135b](https://github.com/LazyVim/LazyVim/commit/301135b2749affe71645c610001c8253ae78c591)) + ## [14.4.0](https://github.com/LazyVim/LazyVim/compare/v14.3.0...v14.4.0) (2024-12-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4e10593c..574e56af 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.4.0" -- x-release-please-version +M.version = "14.5.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 751803f98bf3baaf7db1c1e2ddd28e082396124a Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 18 Dec 2024 20:49:13 +0800 Subject: [PATCH 218/496] feat(colorscheme): add fzf integration to catppuccin (#5175) ## Description ## Related Issue(s) ## Screenshots ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 93a89668..fa611bf4 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -19,6 +19,7 @@ return { cmp = true, dashboard = true, flash = true, + fzf = true, grug_far = true, gitsigns = true, headlines = true, From 28d3ee49709978eb350e5c6bfe1f2ce36138c1d3 Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 18 Dec 2024 12:50:24 +0000 Subject: [PATCH 219/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 4e391e96..d2aa5d34 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 17 +*LazyVim.txt* For Neovim Last change: 2024 December 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e Mon Sep 17 00:00:00 2001 From: Uzzal Devkota Date: Thu, 19 Dec 2024 03:13:04 +0545 Subject: [PATCH 220/496] fix(fzf): fzf.lua compatible hidden scrollbar (#5177) ## Description `--no-scrollbar` option is not supported by [fzf-lua](https://github.com/ibhagwan/fzf-lua) The recommended way is to set `winopts.preview.scrollbar=false` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..cf11d8ee 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,9 +89,6 @@ return { return { "default-title", fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -115,6 +112,9 @@ return { 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 b51279c6d727a09cd3d2bf3c9d0cf829810280bb Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:28:39 +0100 Subject: [PATCH 221/496] fix(codeium): doesnt automatically load when `vim.g.ai_cmp` is set to false (#5182) ## Description I think the title of the PR says it all. Before the user has to manually load/trigger the plugin via the cmd (`:Codeium Auth`) or by requiring. PS: The copilot extra also has this event. ~~PPS: Ive also noticed that supermaven doesnt have this event setup, perhaps it suffers to the same issue when this option is disabled?~~ Edit: For the PPS, have tested supermaven, i can confirm, it loads properly. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/codeium.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index d2d29a00..8d37d750 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -4,6 +4,7 @@ return { { "Exafunction/codeium.nvim", cmd = "Codeium", + event = "InsertEnter", build = ":Codeium Auth", opts = { enable_cmp_source = vim.g.ai_cmp, From c40692c1b0a95492eead8cc093972c634d54043b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 19 Dec 2024 08:29:06 +0100 Subject: [PATCH 222/496] revert: fix(fzf): fzf.lua compatible hidden scrollbar (#5177) This reverts commit 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index cf11d8ee..c70a6f14 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,6 +89,9 @@ return { return { "default-title", fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -112,9 +115,6 @@ return { 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 2c2aa625464f29ee556c0980dbb3bccae45a1001 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 19 Dec 2024 07:30:13 +0000 Subject: [PATCH 223/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d2aa5d34..121bf4af 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 18 +*LazyVim.txt* For Neovim Last change: 2024 December 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a3a28bf8e43f7239316942c2f2bac6e74b28586b Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:41:11 +0100 Subject: [PATCH 224/496] perf(supermaven): add lazy-loading (#5183) ## Description As title, somehow these events have been forgotten, ive checked the git history of it aswell. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index e491fd85..5d30f49c 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -1,6 +1,11 @@ return { { "supermaven-inc/supermaven-nvim", + event = "InsertEnter", + cmd = { + "SupermavenUseFree", + "SupermavenUsePro", + }, opts = { keymaps = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp From 7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0 Mon Sep 17 00:00:00 2001 From: milanglacier Date: Fri, 20 Dec 2024 03:11:44 -0500 Subject: [PATCH 225/496] feat(lualine): add fzf extensions. (#5203) ## Description Similar to #5175, add `fzf` integration with lualine. Note that similar to #5175, integration with `fzf` is included unconditionally. I think we don't need to check if the users choose `fzf` as their default picker to conditionally add the fzf integration with lualine. ## Screenshots **Before**: Screenshot 2024-12-19 at 17 58 30 **After**: Screenshot 2024-12-19 at 17 59 28 --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 2bb2c644..c4cb2a7b 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -159,7 +159,7 @@ return { end, }, }, - extensions = { "neo-tree", "lazy" }, + extensions = { "neo-tree", "lazy", "fzf" }, } -- do not add trouble symbols if aerial is enabled From c1ee761dd88ec71fa9c9eb9706828598e7522c5d Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 20 Dec 2024 08:12:41 +0000 Subject: [PATCH 226/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 121bf4af..c584bc23 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 19 +*LazyVim.txt* For Neovim Last change: 2024 December 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 857f330c2139c328cfce0251b11713dc179d6a81 Mon Sep 17 00:00:00 2001 From: Igor Guerrero Date: Fri, 20 Dec 2024 11:10:45 -0600 Subject: [PATCH 227/496] fix(blink): remove compatibility with 0.7.6 release (#5212) ## Description With the version update 5 mins ago, I got an error with this setting. I'm not sure if removal is the correct way to fix this but it does runs well on my local. - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 139bf6c4..81762b8d 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -118,17 +118,6 @@ return { 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 86de9c9e443572b0244ee9bbdcf5f10ecaabaf74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 20 Dec 2024 18:35:22 +0100 Subject: [PATCH 228/496] fix(luasnip): use blink's luasnip source. Closes #5211 --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 6b16ba90..352bf659 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -67,12 +67,8 @@ return { { "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 d0c366e4d861b848bdc710696d5311dca2c6d540 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:36:49 +0100 Subject: [PATCH 229/496] chore(main): release 14.6.0 (#5176) :robot: I have created a release *beep* *boop* --- ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) ### Features * **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) * **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) ### Bug Fixes * **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) * **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) * **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) * **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) ### Performance Improvements * **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) ### Reverts * fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 26 ++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 1a2b85d2..a1d48029 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.5.0" + ".": "14.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ffbf67..429db78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) + + +### Features + +* **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) +* **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) + + +### Bug Fixes + +* **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) +* **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) +* **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) +* **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) + + +### Performance Improvements + +* **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) + + +### Reverts + +* fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) + ## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 574e56af..606ed797 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.5.0" -- x-release-please-version +M.version = "14.6.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4e746d0e5625662e1f121b39f63836b653ed728b Mon Sep 17 00:00:00 2001 From: William Heryanto Date: Mon, 6 Jan 2025 11:52:36 +0700 Subject: [PATCH 230/496] fix(nlua): debugger not responding (#5319) ## Description Reference: https://github.com/jbyuki/one-small-step-for-vimkind/issues/45#issuecomment-2125749906 Fix nlua debug adapter not responding, which for some reason because of `fzf-lua`. ## Related Issue(s) ## Screenshots No screenshot instead I'm providing how to reproduce with assumption `dap.nlua` extra is enabled. Steps: 1. Launch the nlua `:lua require'osv'.launch({port=8086})` 2. Attach from any neovim instance to the debugger 1. Run the debugger - Can do `dc`; or - Can do `:lua require'dap'.continue()` 2. Choose `Attach to running Neovim instance (port = 8086)` 3. Prior to this changes, debugger will got timeout like the following ```text Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or `nlua` configuration. Check the logs for errors (:help dap.set_log_level) ``` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..aa26f6e1 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -45,8 +45,9 @@ return { "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 c8159b6abff959d1b029c87260edc05e8420a213 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 6 Jan 2025 04:53:25 +0000 Subject: [PATCH 231/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c584bc23..501d0fdc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 20 +*LazyVim.txt* For Neovim Last change: 2025 January 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 05c3447558fa6eef7ae3c0d3e7ed1c281572274d Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:04:17 +0200 Subject: [PATCH 232/496] fix(luasnip): correctly remove duplicate snippets (#5214) ## Description Remove `snippets` from `opts.sources.default` when Luasnip is enabled to not get duplicate snippets. ## Related Issue(s) Fixes #5210 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 352bf659..54339e3e 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -68,7 +68,6 @@ return { "saghen/blink.cmp", optional = true, opts = { - sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -85,4 +84,16 @@ return { }, }, }, + + -- Luasnip sources for blink + { + "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 c1319cb7acfa4b9fb15121b5f6178eb4fb2db629 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 7 Jan 2025 11:05:24 +0000 Subject: [PATCH 233/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 501d0fdc..87ede8e0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 06 +*LazyVim.txt* For Neovim Last change: 2025 January 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8d2d9a9bd965aab0a752f24ec327d2f391a8406b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 8 Jan 2025 07:41:44 +0100 Subject: [PATCH 234/496] fix(blink): added new luasnip preset --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 54339e3e..8b3daed7 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -69,31 +69,8 @@ return { 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", }, }, }, - - -- Luasnip sources for blink - { - "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 41f40b73d94f12cd6aa2d87bfee8808e76e80d5d Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 8 Jan 2025 06:42:41 +0000 Subject: [PATCH 235/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 87ede8e0..3d00d26d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 07 +*LazyVim.txt* For Neovim Last change: 2025 January 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From d1529f650fdd89cb620258bdeca5ed7b558420c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:58:56 +0100 Subject: [PATCH 236/496] chore(main): release 14.6.1 (#5320) :robot: I have created a release *beep* *boop* --- ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) ### Bug Fixes * **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) * **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) * **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a1d48029..114400ff 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.0" + ".": "14.6.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 429db78c..2ea4a272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) + + +### Bug Fixes + +* **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) +* **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) +* **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) + ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 606ed797..fbe6b74c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.0" -- x-release-please-version +M.version = "14.6.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 13044c298ed1837a2d938b64710528d359dc8407 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 14 Jan 2025 22:54:12 +0100 Subject: [PATCH 237/496] feat(extras): added extra for snacks picker (#5368) ## Description See https://github.com/folke/snacks.nvim/pull/445 NOTE: I'm **not** going to replace `fzf-lua` anytime soon. Learned my lessons with that one :) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 8 +- lua/lazyvim/plugins/editor.lua | 6 + lua/lazyvim/plugins/extras/editor/fzf.lua | 3 + .../plugins/extras/editor/snacks_picker.lua | 127 ++++++++++++++++++ lua/lazyvim/plugins/ui.lua | 3 + lua/lazyvim/util/pick.lua | 6 +- 6 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/editor/snacks_picker.lua diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c618578b..48726b02 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -150,12 +150,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/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f6a98605..95a1f7b9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -397,4 +397,10 @@ return { return LazyVim.pick.want() == "telescope" end, }, + { + import = "lazyvim.plugins.extras.editor.snacks_picker", + enabled = function() + return LazyVim.pick.want() == "snacks" + end, + }, } diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..d4cd4093 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -286,6 +286,9 @@ return { { "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/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua new file mode 100644 index 00000000..c64775c2 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -0,0 +1,127 @@ +if lazyvim_docs then + -- In case you don't want to use `:LazyExtras`, + -- then you need to set the option below. + vim.g.lazyvim_picker = "snacks" +end + +---@module 'snacks' + +---@type LazyPicker +local picker = { + name = "snacks", + commands = { + files = "files", + live_grep = "grep", + oldfiles = "recent", + }, + + ---@param source string + ---@param opts? snacks.picker.Config + open = function(source, opts) + return Snacks.picker.pick(source, opts) + end, +} +if not LazyVim.pick.register(picker) then + return {} +end + +return { + desc = "Fast and modern file picker", + -- recommended = true, + { + "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" }, + }, + }, + { + "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, + }, + { + "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, + }, + { + "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/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index c4cb2a7b..d556d1f1 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -288,6 +288,9 @@ return { opts = { dashboard = { preset = { + pick = function(cmd, opts) + return LazyVim.pick(cmd, opts)() + end, header = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index 526025a3..2736d7a5 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -42,11 +42,13 @@ function M.register(picker) return true end ----@return "telescope" | "fzf" +---@return "telescope" | "fzf" | "snacks" function M.want() vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" if vim.g.lazyvim_picker == "auto" then - return LazyVim.has_extra("editor.telescope") and "telescope" or "fzf" + return LazyVim.has_extra("editor.snacks_picker") and "snacks" + or LazyVim.has_extra("editor.telescope") and "telescope" + or "fzf" end return vim.g.lazyvim_picker end From 52dae02c436e03de721d73b81b671624f9414b8c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:55:09 +0000 Subject: [PATCH 238/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3d00d26d..1ec65752 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 08 +*LazyVim.txt* For Neovim Last change: 2025 January 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3660c52017462dfc472ff436261100a98ebea34d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:44:06 +0100 Subject: [PATCH 239/496] chore(main): release 14.7.0 (#5398) :robot: I have created a release *beep* *boop* --- ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) ### Features * **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 114400ff..7a337949 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.1" + ".": "14.7.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea4a272..f48b40b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) + + +### Features + +* **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) + ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index fbe6b74c..102ace9d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.1" -- x-release-please-version +M.version = "14.7.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 8307b0fe506a38417f3b7835e2c4b43d9a970946 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:53:56 +0200 Subject: [PATCH 240/496] fix(snacks.picker): fix mapping for `Recent (cwd)` (#5407) ## Description The mapping `fR` was showing all recent files instead of the ones in the `cwd` only. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index c64775c2..522c4ce5 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -46,7 +46,7 @@ return { { "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 6aefa8ec3ea1918957dd7c30de4c8db18a34e0b4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:54:50 +0000 Subject: [PATCH 241/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1ec65752..c5ca33d7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 14 +*LazyVim.txt* For Neovim Last change: 2025 January 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 09:58:28 +0100 Subject: [PATCH 242/496] feat(snacks): added git diff keymap to pick hunks with leader-gd --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 522c4ce5..4036a4f0 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -49,6 +49,7 @@ return { { "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" }, From 915aab99ef950ae4a7d8b3f967de3412f366bfd9 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:59:38 +0000 Subject: [PATCH 243/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c5ca33d7..0e78cf3d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 15 +*LazyVim.txt* For Neovim Last change: 2025 January 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b19f2070b847a3067436f4d16a0cc5b84a9f9819 Mon Sep 17 00:00:00 2001 From: Yusuf Aktepe Date: Thu, 16 Jan 2025 12:01:30 +0300 Subject: [PATCH 244/496] feat(dial): add checkbox augend for markdown (#5411) ## Description Added support for markdown checkboxes. ( **[ ]** <-> **[x]** ) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/dial.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index a9f7bb26..602b747c 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -140,6 +140,11 @@ return { }), }, markdown = { + augend.constant.new({ + elements = { "[ ]", "[x]" }, + word = false, + cyclic = true, + }), augend.misc.alias.markdown_header, }, json = { From 4f31bfab86402c819e5ea1e18b3c5d139628c864 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 10:05:30 +0100 Subject: [PATCH 245/496] fix(markdown): disable checkbox rendering since it's annoying to edit --- lua/lazyvim/plugins/extras/lang/markdown.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index e7977cb5..a73fe114 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -104,6 +104,9 @@ return { sign = false, icons = {}, }, + checkbox = { + enabled = false, + }, }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) From df7426eefa79d5dfa2fcbe2f381abfb2cca70bad Mon Sep 17 00:00:00 2001 From: Riri Date: Thu, 16 Jan 2025 18:37:59 +0800 Subject: [PATCH 246/496] fix(snacks.picker): respect lazyvim.config.kind_filter (#5415) ## Description Currently, snacks.picker does not filter symbols based on the kind_filter configured in lazyvim. This PR addresses that issue. ## Screenshots nil ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: ding.zhao --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 4036a4f0..601fcf1b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -112,7 +112,7 @@ return { { "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 b729e653182abab3089903baf62a8d5b65bfe36d Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Fri, 17 Jan 2025 04:00:30 -0500 Subject: [PATCH 247/496] refactor(blink): color swatch icon upstreamed (#5141) ## Description I've upstreamed the block char vs. icon replacement for Tailwind colors so we shouldn't need this here anymore. I've replaced it by extending the default blink icons instead, just in case they introduce an icon which isn't yet covered by Lazy's, it would still show up (unlikely, but better, no?). ## Related Issue(s) none ## Screenshots none ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 81762b8d..45e393e1 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -158,9 +158,7 @@ return { "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 b574f01af7ab5eaccdef16db60c1fdd94e8ff12d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:01:25 +0000 Subject: [PATCH 248/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0e78cf3d..e076c4bf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 16 +*LazyVim.txt* For Neovim Last change: 2025 January 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 970d1a05da37554aa17b671c869431a7b387d8be Mon Sep 17 00:00:00 2001 From: Imron Gamidli <36050790+gogamid@users.noreply.github.com> Date: Sat, 18 Jan 2025 14:52:25 +0100 Subject: [PATCH 249/496] feat(chezmoi): add snacks picker integration for chezmoi files (#5429) ## Description We have a new picker Snacks picker, it means telescope and fzf-lua can be uninstalled. But chezmoi files still listed only with telescope and fzf-lua. In this pr we add snacks.picker integration if the user has chosen snacks.picker in the LazyVimExtras. --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 633f3008..cffa6749 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -19,6 +19,38 @@ local pick_chezmoi = function() }, } fzf_lua.fzf_exec(results, opts) + elseif LazyVim.pick.picker.name == "snacks" then + local results = require("chezmoi.commands").list({ + args = { + "--path-style", + "absolute", + "--include", + "files", + "--exclude", + "externals", + }, + }) + local items = {} + + for _, czFile in ipairs(results) do + table.insert(items, { + text = czFile, + file = czFile, + }) + end + + ---@type snacks.picker.Config + local opts = { + items = items, + confirm = function(picker, item) + picker:close() + require("chezmoi.commands").edit({ + targets = { item.text }, + args = { "--watch" }, + }) + end, + } + Snacks.picker.pick(opts) end end From 4e8d75144de92e62eb58c87f61938118d3b1e37c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:53:19 +0000 Subject: [PATCH 250/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e076c4bf..d40afbc0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 17 +*LazyVim.txt* For Neovim Last change: 2025 January 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8787ec1227e10123ad7291cf916020d9a8626525 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 Jan 2025 18:33:47 +0100 Subject: [PATCH 251/496] feat(snacks.picker): added leader-sS to search lsp workspace symbols --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 601fcf1b..bd4d7677 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -113,6 +113,7 @@ return { { "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 8f58fe0b62ddd3ed23816ca7ae3b6d369a565dc5 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:34:47 +0000 Subject: [PATCH 252/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d40afbc0..bd9b385d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 18 +*LazyVim.txt* For Neovim Last change: 2025 January 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From eb7b453b48ab7e3008013e0edf2822f622111e97 Mon Sep 17 00:00:00 2001 From: Daniel Chong Date: Mon, 20 Jan 2025 23:55:51 +1300 Subject: [PATCH 253/496] fix(snacks.picker): fix mapping for Projects for consistency (#5433) ## Description `fp` is the mapping for Telescope and fzf for [Projects](https://www.lazyvim.org/extras/util/project). This PR makes this shortcut consistent for snacks picker. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index bd4d7677..e286dff3 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -74,7 +74,7 @@ return { { "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" }, }, }, { From 0e5d17537a433b0e8dc6d5e88eb4df4e69dbefc2 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:56:42 +0000 Subject: [PATCH 254/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index bd9b385d..23f8a322 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 19 +*LazyVim.txt* For Neovim Last change: 2025 January 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 66c3577bc779d31a7c2addd47de7cc6d215795ba Mon Sep 17 00:00:00 2001 From: Junyi Liu Date: Mon, 20 Jan 2025 07:16:14 -0500 Subject: [PATCH 255/496] perf(java): setting opts.dap_main to false to disable main class scan (#5391) ## Description For large Java project, calling `require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)` has a huge performance impact on the LSP. I tested on a Java project with 3.7K java source files and 12K other files, a simple go_definition can take about 20-30 seconds. This change allow user to set the `opts.dap_main` to false so we can skip the main class scan. By using the `.lazy.lua` project specific setting, we can easily customize this option per project. ## Related Issue(s) #5387 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 520776fe..236c86c9 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -130,6 +130,7 @@ return { -- 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 = { @@ -246,7 +247,9 @@ return { 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 2bea40c447b72e54ffb2d5cddc98d7798990796f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:50:28 +0100 Subject: [PATCH 256/496] chore(main): release 14.8.0 (#5409) :robot: I have created a release *beep* *boop* --- ## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) ### Features * **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) * **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) * **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) * **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) ### Bug Fixes * **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) * **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) * **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) * **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) ### Performance Improvements * **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 7a337949..b3c4f00b 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.7.0" + ".": "14.8.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f48b40b9..1057fb57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) + + +### Features + +* **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) +* **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) +* **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) +* **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) + + +### Bug Fixes + +* **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) +* **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) +* **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) +* **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) + + +### Performance Improvements + +* **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) + ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 102ace9d..8a0b2ced 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.7.0" -- x-release-please-version +M.version = "14.8.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:01 +0100 Subject: [PATCH 257/496] fix(root): pass args to root.get --- lua/lazyvim/util/root.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index b723b227..fc6d6d7d 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -1,8 +1,8 @@ ---@class lazyvim.util.root ---@overload fun(): string local M = setmetatable({}, { - __call = function(m) - return m.get() + __call = function(m, ...) + return m.get(...) end, }) From 6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:23 +0100 Subject: [PATCH 258/496] feat(snacks.picker): added alt-c to toggle between cwd/root dir --- .../plugins/extras/editor/snacks_picker.lua | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e286dff3..2b623179 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -27,11 +27,32 @@ end return { desc = "Fast and modern file picker", - -- recommended = true, + recommended = true, { "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 = { From c7a7ab51129692927ae47f4e57ce22d10d48467e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:30:39 +0100 Subject: [PATCH 259/496] fix(vscode): diabled some snacks plugins. Fixes #5364 --- lua/lazyvim/plugins/extras/vscode.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index b9b1e0b1..5115a2b4 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -57,9 +57,14 @@ return { { "snacks.nvim", opts = { + bigfile = { enabled = false }, + dashboard = { enabled = false }, indent = { enabled = false }, - scroll = { enabled = false }, + input = { enabled = false }, notifier = { enabled = false }, + picker = { enabled = false }, + quickfile = { enabled = false }, + scroll = { enabled = false }, statuscolumn = { enabled = false }, }, }, From 1e83b4f843f88678189df81b1c88a400c53abdbc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:32:17 +0100 Subject: [PATCH 260/496] fix(sql): better nvim-cmp check. Closes #5188 --- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 075182d6..83de5ee1 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,7 +48,7 @@ return { 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 8b4e6ff70d682cad3b1f4999623c3f0ac639fa82 Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:03:36 +0000 Subject: [PATCH 261/496] feat(snippets): an extra for mini.snippets (#5274) ## Description Mini.snippets, a plugin to manage and expand snippets, is currently in [beta](https://github.com/echasnovski/mini.nvim/issues/1428). I think the plugin is a very interesting alternative to `luasnip`. The following `lazydoc` will be added: ```lua if lazyvim_docs then -- 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 -- Using default mini.snippets, completion suggestions might appear directly after inserting a snippet -- This extra prevents that from happening. -- Motivation: A better display of the current snippet. -- Also, those completions do not appear when using luasnip or native snippets -- -- Set to `false` to enable completion suggestions directly after inserting a snippet vim.g.lazyvim_mini_snippets_override_expand_insert = 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, }, } --]] end ``` It's possible to use the code from this PR directly in your own configuration: 1. Copy the code to lua/extras/coding/mini_snippets.lua in your config folder 2. Restart nvim and enable the "user" extra for `mini.snippets` 3. Restart nvim ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: abeldekat --- .../plugins/extras/coding/mini-snippets.lua | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/coding/mini-snippets.lua diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua new file mode 100644 index 00000000..f68af110 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -0,0 +1,167 @@ +if lazyvim_docs then + -- 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, + }, + } +--]] +end + +local include_in_completion = vim.g.lazyvim_mini_snippets_in_completion == nil + or vim.g.lazyvim_mini_snippets_in_completion + +local function expand_from_lsp(snippet) + local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert + insert({ body = snippet }) +end + +local function jump(direction) + local is_active = MiniSnippets.session.get(false) ~= nil + if is_active then + MiniSnippets.session.jump(direction) + return true + end +end + +---@type fun(snippets, insert) | nil +local expand_select_override = nil + +return { + -- disable builtin snippet support: + { "garymjr/nvim-snippets", optional = true, enabled = false }, + -- disable luasnip: + { "L3MON4D3/LuaSnip", optional = true, enabled = false }, + + -- add mini.snippets + desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)", + { + "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, + }, + + -- nvim-cmp integration + { + "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 integration + { + "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 7fb320700ad0162be33ce816f2ba6f9dda41883f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:04:34 +0000 Subject: [PATCH 262/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 23f8a322..285451bb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 20 +*LazyVim.txt* For Neovim Last change: 2025 January 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 332b32080c52727a16db90e06989caa0c378caa1 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 10:51:36 -0500 Subject: [PATCH 263/496] feat(snacks.picker): added su to search undotree (#5447) ## Description As it reads on the title ;) ## Related Issue(s) None. ## Screenshots ![Screenshot 2025-01-22 at 14 02 30](https://github.com/user-attachments/assets/f8d2ba88-f279-4715-8120-7610c58bd269) ![Screenshot 2025-01-22 at 14 03 04](https://github.com/user-attachments/assets/08bc1b26-f49c-4f25-ad66-1166a3f72605) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 2b623179..f47a2b29 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -68,6 +68,7 @@ return { { "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)" }, @@ -94,8 +95,9 @@ return { { "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" }, }, }, { From eea52be3447502dde77d9e6fa75fd597a0b5a86a Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 13:19:48 -0500 Subject: [PATCH 264/496] feat(snacks.picker): added si to search icons (#5460) ## Description As it reads on the tin can. ## Related Issue(s) N/A ## Screenshots ![Screenshot 2025-01-23 at 11 49 49](https://github.com/user-attachments/assets/6c4d0e9a-0a8e-4128-9ef1-b7954ece2bc7) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index f47a2b29..fd08004b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -88,6 +88,7 @@ return { { "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" }, From 7cf4185dc4d1fe49ad004d33a6703603fb4500ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:19 +0100 Subject: [PATCH 265/496] feat(snacks.picker): added `leader-sp` to search for plugin spec --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index fd08004b..e7a99239 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -78,6 +78,7 @@ return { { "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 From 83bf6360a1f28a3fc1afe31ae300247fc01c7a90 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:47 +0100 Subject: [PATCH 266/496] feat(snacks.picker): added `leader-fB` to find any buffer (including hidden & nofile) --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e7a99239..48bb7861 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -62,6 +62,7 @@ return { { "", 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)" }, From 0350934d56579f3e6a9d40fa47313b2970d74772 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:19:01 +0200 Subject: [PATCH 267/496] fix(luasnip): schedule `jump` to be compatible with blink, nvim-cmp still works after change (#5470) ## Description Schedule `jump` in Luasnip `snippet_forward`, so that it doesn't get stuck before the last placeholder. ## Related Issue(s) Fixes #5469 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 8b3daed7..85ed2fd5 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -30,7 +30,9 @@ return { 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 a3b459c1a58f6f8048f5259484e166090542400d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 28 Jan 2025 08:20:18 +0000 Subject: [PATCH 268/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 285451bb..cc9c3d9d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 23 +*LazyVim.txt* For Neovim Last change: 2025 January 28 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 132986a624b49bf740161d90ce94f16dd5ea5883 Mon Sep 17 00:00:00 2001 From: iniw Date: Tue, 28 Jan 2025 08:42:48 -0300 Subject: [PATCH 269/496] fix(keymaps): remove unneeded and ambiguous `w` keymap (#5459) ## Description The `w` mapping, described as "Windows", was causing potentially timeout-related bugs with many other mappings that also started with `w`. The problems caused by this are described in detail in issue #5456 and in discussion #4157. @dpetka2001 Suggested removing it as an experiment, which I tried and found to work. ## Checklist - [X] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 48726b02..3e3829d1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -182,7 +182,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 }) From 01a70cc60ed2760afc819510177fb8d12a371b25 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 28 Jan 2025 17:22:17 +0100 Subject: [PATCH 270/496] feat(snacks.picker): use snacks picker for notifications when enabled --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + lua/lazyvim/plugins/ui.lua | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 48bb7861..e6110175 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -60,6 +60,7 @@ return { { "/", 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/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index d556d1f1..6e03a217 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -278,7 +278,13 @@ return { }, -- 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 f0d2629bd859eeac343999b0fe145f9beb227c4a Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 28 Jan 2025 19:55:02 +0200 Subject: [PATCH 271/496] fix(snacks): use `Snacks.picker` for recent files (#5485) ## Description Use `Snacks.picker` for recent files instead of `LazyVim.pick`, because `root_dir` is being propagated to `opts.cwd` and does not correctly filter out recent files when inside nested directories. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e6110175..19a8faf3 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -69,7 +69,7 @@ return { { "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 5d24aa63111af68fbada8c97fedb75b07b8c3c92 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 20:18:43 +0100 Subject: [PATCH 272/496] feat(snacks.picker): flash.nvim integration --- .../plugins/extras/editor/snacks_picker.lua | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 19a8faf3..85e6fe72 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -153,4 +153,45 @@ return { { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, }, }, + { + "folke/snacks.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 63a39ef8cfe9641f1e621473dfc859c8032a4169 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:19:59 +0000 Subject: [PATCH 273/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index cc9c3d9d..ea390859 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 28 +*LazyVim.txt* For Neovim Last change: 2025 January 29 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3de7b24cf6ed844772ea047476a400c56d5f4b42 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 21:06:36 +0100 Subject: [PATCH 274/496] fix(snacks.picker): snacks => flash --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 85e6fe72..f6f16791 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -154,7 +154,7 @@ return { }, }, { - "folke/snacks.nvim", + "folke/flash.nvim", optional = true, specs = { { From b5cd0d0e27081be3ef1905475a0fe541b7661870 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 29 Jan 2025 23:21:59 +0100 Subject: [PATCH 275/496] fix(snacks.picker): flash integration --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index f6f16791..b6b6deee 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -184,7 +184,7 @@ return { }, 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 e20d9afcbc980510093a3753a3991d8c934cbb75 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 15:21:01 +0100 Subject: [PATCH 276/496] feat(snacks): extra for snacks explorer (replacement for neo-tree) --- .../plugins/extras/editor/snacks_explorer.lua | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/editor/snacks_explorer.lua diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua new file mode 100644 index 00000000..b45342f2 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -0,0 +1,37 @@ +return { + { "nvim-neo-tree/neo-tree.nvim", enabled = false }, + { + "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, + }, +} From e9db488acaa04f1a9eca6d022e57fed4271b8af8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 30 Jan 2025 21:38:56 +0100 Subject: [PATCH 277/496] feat(markdown): added markdown support for codecompanion --- lua/lazyvim/plugins/extras/lang/markdown.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index a73fe114..8b07985b 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -108,7 +108,7 @@ return { enabled = false, }, }, - ft = { "markdown", "norg", "rmd", "org" }, + ft = { "markdown", "norg", "rmd", "org", "codecompanion" }, config = function(_, opts) require("render-markdown").setup(opts) Snacks.toggle({ From 0dee310e90c5cedcb5b96f41acd8d4d3811d15df Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 30 Jan 2025 20:40:13 +0000 Subject: [PATCH 278/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ea390859..5c0ff0a2 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 29 +*LazyVim.txt* For Neovim Last change: 2025 January 30 ============================================================================== Table of Contents *LazyVim-table-of-contents* From eb8ddea8c9438c34e71db097eb77a44185dd1093 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 22:07:58 +0100 Subject: [PATCH 279/496] chore(main): release 14.9.0 (#5438) :robot: I have created a release *beep* *boop* --- ## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30) ### Features * **markdown:** added markdown support for codecompanion ([e9db488](https://github.com/LazyVim/LazyVim/commit/e9db488acaa04f1a9eca6d022e57fed4271b8af8)) * **snacks.picker:** added <leader>si to search icons ([#5460](https://github.com/LazyVim/LazyVim/issues/5460)) ([eea52be](https://github.com/LazyVim/LazyVim/commit/eea52be3447502dde77d9e6fa75fd597a0b5a86a)) * **snacks.picker:** added <leader>su to search undotree ([#5447](https://github.com/LazyVim/LazyVim/issues/5447)) ([332b320](https://github.com/LazyVim/LazyVim/commit/332b32080c52727a16db90e06989caa0c378caa1)) * **snacks.picker:** added `leader-fB` to find any buffer (including hidden & nofile) ([83bf636](https://github.com/LazyVim/LazyVim/commit/83bf6360a1f28a3fc1afe31ae300247fc01c7a90)) * **snacks.picker:** added `leader-sp` to search for plugin spec ([7cf4185](https://github.com/LazyVim/LazyVim/commit/7cf4185dc4d1fe49ad004d33a6703603fb4500ff)) * **snacks.picker:** added alt-c to toggle between cwd/root dir ([6be7c4f](https://github.com/LazyVim/LazyVim/commit/6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a)) * **snacks.picker:** flash.nvim integration ([5d24aa6](https://github.com/LazyVim/LazyVim/commit/5d24aa63111af68fbada8c97fedb75b07b8c3c92)) * **snacks.picker:** use snacks picker for notifications when enabled ([01a70cc](https://github.com/LazyVim/LazyVim/commit/01a70cc60ed2760afc819510177fb8d12a371b25)) * **snacks:** extra for snacks explorer (replacement for neo-tree) ([e20d9af](https://github.com/LazyVim/LazyVim/commit/e20d9afcbc980510093a3753a3991d8c934cbb75)) * **snippets:** an extra for mini.snippets ([#5274](https://github.com/LazyVim/LazyVim/issues/5274)) ([8b4e6ff](https://github.com/LazyVim/LazyVim/commit/8b4e6ff70d682cad3b1f4999623c3f0ac639fa82)) ### Bug Fixes * **keymaps:** remove unneeded and ambiguous `<leader>w` keymap ([#5459](https://github.com/LazyVim/LazyVim/issues/5459)) ([132986a](https://github.com/LazyVim/LazyVim/commit/132986a624b49bf740161d90ce94f16dd5ea5883)) * **luasnip:** schedule `jump` to be compatible with blink, nvim-cmp still works after change ([#5470](https://github.com/LazyVim/LazyVim/issues/5470)) ([0350934](https://github.com/LazyVim/LazyVim/commit/0350934d56579f3e6a9d40fa47313b2970d74772)) * **root:** pass args to root.get ([dc8512f](https://github.com/LazyVim/LazyVim/commit/dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8)) * **snacks.picker:** flash integration ([b5cd0d0](https://github.com/LazyVim/LazyVim/commit/b5cd0d0e27081be3ef1905475a0fe541b7661870)) * **snacks.picker:** snacks => flash ([3de7b24](https://github.com/LazyVim/LazyVim/commit/3de7b24cf6ed844772ea047476a400c56d5f4b42)) * **snacks:** use `Snacks.picker` for recent files ([#5485](https://github.com/LazyVim/LazyVim/issues/5485)) ([f0d2629](https://github.com/LazyVim/LazyVim/commit/f0d2629bd859eeac343999b0fe145f9beb227c4a)) * **sql:** better nvim-cmp check. Closes [#5188](https://github.com/LazyVim/LazyVim/issues/5188) ([1e83b4f](https://github.com/LazyVim/LazyVim/commit/1e83b4f843f88678189df81b1c88a400c53abdbc)) * **vscode:** diabled some snacks plugins. Fixes [#5364](https://github.com/LazyVim/LazyVim/issues/5364) ([c7a7ab5](https://github.com/LazyVim/LazyVim/commit/c7a7ab51129692927ae47f4e57ce22d10d48467e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 28 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b3c4f00b..d1d210f5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.8.0" + ".": "14.9.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1057fb57..7c9c762e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30) + + +### Features + +* **markdown:** added markdown support for codecompanion ([e9db488](https://github.com/LazyVim/LazyVim/commit/e9db488acaa04f1a9eca6d022e57fed4271b8af8)) +* **snacks.picker:** added <leader>si to search icons ([#5460](https://github.com/LazyVim/LazyVim/issues/5460)) ([eea52be](https://github.com/LazyVim/LazyVim/commit/eea52be3447502dde77d9e6fa75fd597a0b5a86a)) +* **snacks.picker:** added <leader>su to search undotree ([#5447](https://github.com/LazyVim/LazyVim/issues/5447)) ([332b320](https://github.com/LazyVim/LazyVim/commit/332b32080c52727a16db90e06989caa0c378caa1)) +* **snacks.picker:** added `leader-fB` to find any buffer (including hidden & nofile) ([83bf636](https://github.com/LazyVim/LazyVim/commit/83bf6360a1f28a3fc1afe31ae300247fc01c7a90)) +* **snacks.picker:** added `leader-sp` to search for plugin spec ([7cf4185](https://github.com/LazyVim/LazyVim/commit/7cf4185dc4d1fe49ad004d33a6703603fb4500ff)) +* **snacks.picker:** added alt-c to toggle between cwd/root dir ([6be7c4f](https://github.com/LazyVim/LazyVim/commit/6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a)) +* **snacks.picker:** flash.nvim integration ([5d24aa6](https://github.com/LazyVim/LazyVim/commit/5d24aa63111af68fbada8c97fedb75b07b8c3c92)) +* **snacks.picker:** use snacks picker for notifications when enabled ([01a70cc](https://github.com/LazyVim/LazyVim/commit/01a70cc60ed2760afc819510177fb8d12a371b25)) +* **snacks:** extra for snacks explorer (replacement for neo-tree) ([e20d9af](https://github.com/LazyVim/LazyVim/commit/e20d9afcbc980510093a3753a3991d8c934cbb75)) +* **snippets:** an extra for mini.snippets ([#5274](https://github.com/LazyVim/LazyVim/issues/5274)) ([8b4e6ff](https://github.com/LazyVim/LazyVim/commit/8b4e6ff70d682cad3b1f4999623c3f0ac639fa82)) + + +### Bug Fixes + +* **keymaps:** remove unneeded and ambiguous `<leader>w` keymap ([#5459](https://github.com/LazyVim/LazyVim/issues/5459)) ([132986a](https://github.com/LazyVim/LazyVim/commit/132986a624b49bf740161d90ce94f16dd5ea5883)) +* **luasnip:** schedule `jump` to be compatible with blink, nvim-cmp still works after change ([#5470](https://github.com/LazyVim/LazyVim/issues/5470)) ([0350934](https://github.com/LazyVim/LazyVim/commit/0350934d56579f3e6a9d40fa47313b2970d74772)) +* **root:** pass args to root.get ([dc8512f](https://github.com/LazyVim/LazyVim/commit/dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8)) +* **snacks.picker:** flash integration ([b5cd0d0](https://github.com/LazyVim/LazyVim/commit/b5cd0d0e27081be3ef1905475a0fe541b7661870)) +* **snacks.picker:** snacks => flash ([3de7b24](https://github.com/LazyVim/LazyVim/commit/3de7b24cf6ed844772ea047476a400c56d5f4b42)) +* **snacks:** use `Snacks.picker` for recent files ([#5485](https://github.com/LazyVim/LazyVim/issues/5485)) ([f0d2629](https://github.com/LazyVim/LazyVim/commit/f0d2629bd859eeac343999b0fe145f9beb227c4a)) +* **sql:** better nvim-cmp check. Closes [#5188](https://github.com/LazyVim/LazyVim/issues/5188) ([1e83b4f](https://github.com/LazyVim/LazyVim/commit/1e83b4f843f88678189df81b1c88a400c53abdbc)) +* **vscode:** diabled some snacks plugins. Fixes [#5364](https://github.com/LazyVim/LazyVim/issues/5364) ([c7a7ab5](https://github.com/LazyVim/LazyVim/commit/c7a7ab51129692927ae47f4e57ce22d10d48467e)) + ## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 8a0b2ced..cbe0a571 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.8.0" -- x-release-please-version +M.version = "14.9.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4f006f1fba5fdaa0150c544ad7966b96ec9cb04a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 08:32:46 +0100 Subject: [PATCH 280/496] feat(snacks.explorer): enabled netrw integration --- .../plugins/extras/editor/snacks_explorer.lua | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index b45342f2..27da61f8 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -2,6 +2,7 @@ return { { "nvim-neo-tree/neo-tree.nvim", enabled = false }, { "folke/snacks.nvim", + opts = { explorer = {} }, keys = { { "fe", @@ -20,18 +21,5 @@ return { { "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 0e94534dd93d4cb53006390e8a7548b9d6fa3146 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 08:33:15 +0100 Subject: [PATCH 281/496] style(picker.explorer): use shortcut --- lua/lazyvim/plugins/extras/editor/snacks_explorer.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index 27da61f8..aa87e85c 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -7,14 +7,14 @@ return { { "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)", }, From 3242ab8cff7d49e429320b9ec43c4be1f6e46dfe Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 31 Jan 2025 07:34:07 +0000 Subject: [PATCH 282/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5c0ff0a2..fa81c82c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 30 +*LazyVim.txt* For Neovim Last change: 2025 January 31 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 4a81a370d7868d7db32042f69b0fc5a6218059c5 Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:11:26 +0000 Subject: [PATCH 283/496] feat(snippets): mini.snippets is out of beta (#5505) ## Description mini.snippets is out of beta, so I adjusted the description for the extra accordingly ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: abeldekat --- lua/lazyvim/plugins/extras/coding/mini-snippets.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index f68af110..5ce82c80 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -61,7 +61,7 @@ return { { "L3MON4D3/LuaSnip", optional = true, enabled = false }, -- add mini.snippets - desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)", + desc = "Manage and expand snippets (alternative to Luasnip)", { "echasnovski/mini.snippets", event = "InsertEnter", -- don't depend on other plugins to load... From 8f4e9b8c1e43e354d91529484aedca54f04bdcf6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 20:10:48 +0100 Subject: [PATCH 284/496] fix(copilot): remove load on BufReadPost instead of InsertEnter --- lua/lazyvim/plugins/extras/ai/copilot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4651c689..4f1d54f2 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -5,11 +5,12 @@ return { "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 3500d6a826a32d06d921f3e22342734c61ef09fe Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 31 Jan 2025 20:33:15 +0100 Subject: [PATCH 285/496] feat(bufferline): support for snacks picker sidebars --- lua/lazyvim/plugins/ui.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 6e03a217..7985825a 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -37,6 +37,9 @@ return { highlight = "Directory", text_align = "left", }, + { + filetype = "snacks_layout_box", + }, }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) From 1a4d948e0dae360836187be8c86283d7e814b7ef Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 2 Feb 2025 18:03:13 +0100 Subject: [PATCH 286/496] perf(snacks_picker): lazy-load trouble open action --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index b6b6deee..9685c369 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -110,7 +110,11 @@ return { 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 7f8e797d2b0adf1e17a6278957c68a910b01c846 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 2 Feb 2025 17:04:34 +0000 Subject: [PATCH 287/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index fa81c82c..50d40e8e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 31 +*LazyVim.txt* For Neovim Last change: 2025 February 02 ============================================================================== Table of Contents *LazyVim-table-of-contents* From fb256f2b688cb7ac9875f704fe6c00f27efc2354 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 2 Feb 2025 23:34:05 +0100 Subject: [PATCH 288/496] feat(snacks.picker): add projects picker to dashboard if snacks picker is enabled --- lua/lazyvim/plugins/ui.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7985825a..0669054d 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -325,4 +325,18 @@ return { }, }, }, + { + "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 ab304426527723e116742cd7862fc976f876107c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 5 Feb 2025 08:00:58 +0100 Subject: [PATCH 289/496] feat(snacks.picker): some extra keymaps --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 9685c369..143d459a 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -75,6 +75,7 @@ return { { "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" }, @@ -85,10 +86,12 @@ return { { "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" }, From 634f3ea28f84ceaac76e8d2a827024e4beeaeaa4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 5 Feb 2025 07:02:02 +0000 Subject: [PATCH 290/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 50d40e8e..b645e69e 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 02 +*LazyVim.txt* For Neovim Last change: 2025 February 05 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3e8fddcd54ee57ab6c00353ff37a4e9d7df361bd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 5 Feb 2025 14:41:29 +0100 Subject: [PATCH 291/496] style(snacks.picker): buffer diagnostics keymap desc --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 143d459a..bd160f26 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -91,7 +91,7 @@ return { { "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" }, From 23a1bbdae90f37aab4a86bfb4c113531a28e7f71 Mon Sep 17 00:00:00 2001 From: RohitB <19793591+rbhanot4739@users.noreply.github.com> Date: Fri, 7 Feb 2025 02:09:37 +0530 Subject: [PATCH 292/496] feat(refactoring): fallback to using vim ui select for refactoring.nvim (#5540) ## Description Fallback to using `require("refactoring").select_refactor()` if neither of `telescope` or `fzf-lua` is installed. Since `select_refactor()` uses `vim.ui.select` internally, it can use `snacks.picker` if it is enabled. ## Related Issue(s) ## Screenshots ## Checklist - [ x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/refactoring.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 29920347..832940e9 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -1,10 +1,10 @@ local pick = function() + local refactoring = require("refactoring") if LazyVim.pick.picker.name == "telescope" then return require("telescope").extensions.refactoring.refactors() elseif LazyVim.pick.picker.name == "fzf" then local fzf_lua = require("fzf-lua") - local results = require("refactoring").get_refactors() - local refactoring = require("refactoring") + local results = refactoring.get_refactors() local opts = { fzf_opts = {}, @@ -16,6 +16,8 @@ local pick = function() }, } fzf_lua.fzf_exec(results, opts) + else + refactoring.select_refactor() end end From 94d0ac0a0cae69ecdba4aebd062c18fee68ce5f2 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 6 Feb 2025 20:40:54 +0000 Subject: [PATCH 293/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b645e69e..f2f14206 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 05 +*LazyVim.txt* For Neovim Last change: 2025 February 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 5c9732733de62a4e15988826f53d16a4dfdf960c Mon Sep 17 00:00:00 2001 From: cjon256 <3659487+cjon256@users.noreply.github.com> Date: Fri, 7 Feb 2025 18:09:03 -0500 Subject: [PATCH 294/496] fix(go): update go.lua to eliminate fieldalignment from analyses (#5170) ## Description Removed a setting from the go lang plugin. The setting now just causes an error: LSP[gopls] Invalid settings: setting option "analyses": this setting is deprecated, use "the 'fieldalignment' analyzer was removed in gopls/v0.17.0; instead, hover over struct fields to see size/offset information (https://go.dev/issue/66861)" instead ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Note: submitted similar request as f96aac6 but was rejected by CI/CD for naming reasons. Changing the name did not help. Retrying. --- lua/lazyvim/plugins/extras/lang/go.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index b9544cfd..bf3b22ee 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -37,7 +37,6 @@ return { rangeVariableTypes = true, }, analyses = { - fieldalignment = true, nilness = true, unusedparams = true, unusedwrite = true, From a10706e819b9f40bd3493304be4d75cd69fdf45a Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:10:27 +0000 Subject: [PATCH 295/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f2f14206..43127781 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 06 +*LazyVim.txt* For Neovim Last change: 2025 February 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 597cd8ffa3c54471df860c4036a8c20e123292b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 8 Feb 2025 00:10:47 +0100 Subject: [PATCH 296/496] chore(main): release 14.10.0 (#5500) :robot: I have created a release *beep* *boop* --- ## [14.10.0](https://github.com/LazyVim/LazyVim/compare/v14.9.0...v14.10.0) (2025-02-07) ### Features * **bufferline:** support for snacks picker sidebars ([3500d6a](https://github.com/LazyVim/LazyVim/commit/3500d6a826a32d06d921f3e22342734c61ef09fe)) * **refactoring:** fallback to using vim ui select for refactoring.nvim ([#5540](https://github.com/LazyVim/LazyVim/issues/5540)) ([23a1bbd](https://github.com/LazyVim/LazyVim/commit/23a1bbdae90f37aab4a86bfb4c113531a28e7f71)) * **snacks.explorer:** enabled netrw integration ([4f006f1](https://github.com/LazyVim/LazyVim/commit/4f006f1fba5fdaa0150c544ad7966b96ec9cb04a)) * **snacks.picker:** add projects picker to dashboard if snacks picker is enabled ([fb256f2](https://github.com/LazyVim/LazyVim/commit/fb256f2b688cb7ac9875f704fe6c00f27efc2354)) * **snacks.picker:** some extra keymaps ([ab30442](https://github.com/LazyVim/LazyVim/commit/ab304426527723e116742cd7862fc976f876107c)) * **snippets:** mini.snippets is out of beta ([#5505](https://github.com/LazyVim/LazyVim/issues/5505)) ([4a81a37](https://github.com/LazyVim/LazyVim/commit/4a81a370d7868d7db32042f69b0fc5a6218059c5)) ### Bug Fixes * **copilot:** remove load on BufReadPost instead of InsertEnter ([8f4e9b8](https://github.com/LazyVim/LazyVim/commit/8f4e9b8c1e43e354d91529484aedca54f04bdcf6)) * **go:** update go.lua to eliminate fieldalignment from analyses ([#5170](https://github.com/LazyVim/LazyVim/issues/5170)) ([5c97327](https://github.com/LazyVim/LazyVim/commit/5c9732733de62a4e15988826f53d16a4dfdf960c)) ### Performance Improvements * **snacks_picker:** lazy-load trouble open action ([1a4d948](https://github.com/LazyVim/LazyVim/commit/1a4d948e0dae360836187be8c86283d7e814b7ef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d1d210f5..8b4f0289 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.9.0" + ".": "14.10.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c9c762e..8117fbb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [14.10.0](https://github.com/LazyVim/LazyVim/compare/v14.9.0...v14.10.0) (2025-02-07) + + +### Features + +* **bufferline:** support for snacks picker sidebars ([3500d6a](https://github.com/LazyVim/LazyVim/commit/3500d6a826a32d06d921f3e22342734c61ef09fe)) +* **refactoring:** fallback to using vim ui select for refactoring.nvim ([#5540](https://github.com/LazyVim/LazyVim/issues/5540)) ([23a1bbd](https://github.com/LazyVim/LazyVim/commit/23a1bbdae90f37aab4a86bfb4c113531a28e7f71)) +* **snacks.explorer:** enabled netrw integration ([4f006f1](https://github.com/LazyVim/LazyVim/commit/4f006f1fba5fdaa0150c544ad7966b96ec9cb04a)) +* **snacks.picker:** add projects picker to dashboard if snacks picker is enabled ([fb256f2](https://github.com/LazyVim/LazyVim/commit/fb256f2b688cb7ac9875f704fe6c00f27efc2354)) +* **snacks.picker:** some extra keymaps ([ab30442](https://github.com/LazyVim/LazyVim/commit/ab304426527723e116742cd7862fc976f876107c)) +* **snippets:** mini.snippets is out of beta ([#5505](https://github.com/LazyVim/LazyVim/issues/5505)) ([4a81a37](https://github.com/LazyVim/LazyVim/commit/4a81a370d7868d7db32042f69b0fc5a6218059c5)) + + +### Bug Fixes + +* **copilot:** remove load on BufReadPost instead of InsertEnter ([8f4e9b8](https://github.com/LazyVim/LazyVim/commit/8f4e9b8c1e43e354d91529484aedca54f04bdcf6)) +* **go:** update go.lua to eliminate fieldalignment from analyses ([#5170](https://github.com/LazyVim/LazyVim/issues/5170)) ([5c97327](https://github.com/LazyVim/LazyVim/commit/5c9732733de62a4e15988826f53d16a4dfdf960c)) + + +### Performance Improvements + +* **snacks_picker:** lazy-load trouble open action ([1a4d948](https://github.com/LazyVim/LazyVim/commit/1a4d948e0dae360836187be8c86283d7e814b7ef)) + ## [14.9.0](https://github.com/LazyVim/LazyVim/compare/v14.8.0...v14.9.0) (2025-01-30) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index cbe0a571..e2bf10d9 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.9.0" -- x-release-please-version +M.version = "14.10.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 83988ea46eccbe20953cd807984d2e89d679aa6e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 12:47:41 +0100 Subject: [PATCH 297/496] feat(config): show a warning when lazy.nvim imports order is incorrect --- lua/lazyvim/config/init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e2bf10d9..b826d2db 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -206,6 +206,26 @@ function M.setup(opts) "desc", "vscode", }) + + -- Check lazy.nvim import order + local imports = require("lazy.core.config").spec.modules + local function find(pat, last) + for i = last and #imports or 1, last and 1 or #imports, last and -1 or 1 do + if imports[i]:find(pat) then + return i + end + end + end + local lazyvim_plugins = find("^lazyvim%.plugins$") + local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins + local plugins = find("^plugins$") or math.huge + if lazyvim_plugins ~= 1 or extras > plugins then + vim.notify( + "The order of your `lazy.nvim` imports is incorrect:\n- `lazyvim.plugins` should be first\n- followed by any `lazyvim.plugins.extras`\n- and finally your own `plugins`", + "warn", + { title = "LazyVim" } + ) + end end, }) From 041637673371db7866f8bf00d77fc2fb6cc673c6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 12:48:24 +0100 Subject: [PATCH 298/496] feat(util): `has_extra` now also checks for manual imports in `lazy.lua` --- lua/lazyvim/util/init.lua | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 188544c3..66e6e18b 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -55,12 +55,33 @@ function M.has(plugin) return M.get_plugin(plugin) ~= nil end +--- Checks if the extras is enabled: +--- * If the module was imported +--- * If the module was added by LazyExtras +--- * If the module is in the user's lazy imports ---@param extra string function M.has_extra(extra) local Config = require("lazyvim.config") local modname = "lazyvim.plugins.extras." .. extra - return vim.tbl_contains(require("lazy.core.config").spec.modules, modname) - or vim.tbl_contains(Config.json.data.extras, modname) + local LazyConfig = require("lazy.core.config") + -- check if it was imported already + if vim.tbl_contains(LazyConfig.spec.modules, modname) then + return true + end + -- check if it was added by LazyExtras + if vim.tbl_contains(Config.json.data.extras, modname) then + return true + end + -- check if it's in the imports + local spec = LazyConfig.options.spec + if type(spec) == "table" then + for _, s in ipairs(spec) do + if type(s) == "table" and s.import == modname then + return true + end + end + end + return false end ---@param fn fun() From 525377dee9ac3d19f53e333538e4e85586163ad8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 15:04:46 +0100 Subject: [PATCH 299/496] feat(extras): big rework of default extras --- lua/lazyvim/config/init.lua | 58 +++++++ lua/lazyvim/plugins/coding.lua | 13 -- lua/lazyvim/plugins/editor.lua | 145 ------------------ lua/lazyvim/plugins/extras/editor/fzf.lua | 3 - .../plugins/extras/editor/neo-tree.lua | 128 ++++++++++++++++ .../plugins/extras/editor/snacks_picker.lua | 3 - .../plugins/extras/editor/telescope.lua | 9 -- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- lua/lazyvim/plugins/xtras.lua | 22 ++- lua/lazyvim/util/extras.lua | 6 +- lua/lazyvim/util/init.lua | 9 -- lua/lazyvim/util/pick.lua | 15 -- lua/lazyvim/util/plugin.lua | 9 ++ 13 files changed, 222 insertions(+), 200 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/editor/neo-tree.lua diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index b826d2db..385d0b13 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -144,8 +144,10 @@ M.json = { extras = {}, ---@type string[] }, } +M.json_loaded = false function M.json.load() + M.json_loaded = true local f = io.open(M.json.path, "r") if f then local data = f:read("*a") @@ -322,6 +324,62 @@ function M.init() M.json.load() end +---@alias LazyVimDefault {name: string, extra: string, enabled?: boolean, origin?: "global" | "default" | "extra" } + +local default_extras ---@type table +function M.get_defaults() + if default_extras then + return default_extras + end + ---@type table + local checks = { + picker = { + { name = "fzf", extra = "editor.fzf" }, + { name = "snacks", extra = "editor.snacks_picker" }, + { name = "telescope", extra = "editor.telescope" }, + }, + cmp = { + { name = "blink.cmp", extra = "coding.blink", enabled = vim.fn.has("nvim-0.10") == 1 }, + { name = "nvim-cmp", extra = "coding.nvim-cmp" }, + }, + explorer = { + { name = "neo-tree", extra = "editor.neo-tree" }, + { name = "snacks", extra = "editor.snacks_explorer" }, + }, + } + default_extras = {} + for name, check in pairs(checks) do + local valid = {} ---@type string[] + for _, extra in ipairs(check) do + if extra.enabled ~= false then + valid[#valid + 1] = extra.name + end + end + local origin = "default" + local use = vim.g["lazyvim_" .. name] + use = vim.tbl_contains(valid, use or "auto") and use or nil + origin = use and "global" or origin + for _, extra in ipairs(use and {} or check) do + if extra.enabled ~= false and LazyVim.has_extra(extra.extra) then + use = extra.name + break + end + end + origin = use and "extra" or origin + use = use or valid[1] + for _, extra in ipairs(check) do + local import = "lazyvim.plugins.extras." .. extra.extra + extra = vim.deepcopy(extra) + extra.enabled = extra.name == use + if extra.enabled then + extra.origin = origin + end + default_extras[import] = extra + end + end + return default_extras +end + setmetatable(M, { __index = function(_, key) if options == nil then diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index adc76177..0e614e48 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,17 +1,4 @@ return { - { - import = "lazyvim.plugins.extras.coding.nvim-cmp", - enabled = function() - return LazyVim.cmp_engine() == "nvim-cmp" - end, - }, - { - import = "lazyvim.plugins.extras.coding.blink", - enabled = function() - return LazyVim.cmp_engine() == "blink.cmp" - end, - }, - -- auto pairs { "echasnovski/mini.pairs", diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 95a1f7b9..4aaf3d1f 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -1,131 +1,5 @@ return { - -- file explorer - { - "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, - }, - -- search/replace in multiple files { "MagicDuck/grug-far.nvim", @@ -384,23 +258,4 @@ return { { "sT", "TodoTelescope keywords=TODO,FIX,FIXME", desc = "Todo/Fix/Fixme" }, }, }, - - { - import = "lazyvim.plugins.extras.editor.fzf", - enabled = function() - return LazyVim.pick.want() == "fzf" - end, - }, - { - import = "lazyvim.plugins.extras.editor.telescope", - enabled = function() - return LazyVim.pick.want() == "telescope" - end, - }, - { - import = "lazyvim.plugins.extras.editor.snacks_picker", - enabled = function() - return LazyVim.pick.want() == "snacks" - end, - }, } diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index d4cd4093..aa26f6e1 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -286,9 +286,6 @@ return { { "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/lua/lazyvim/plugins/extras/editor/neo-tree.lua b/lua/lazyvim/plugins/extras/editor/neo-tree.lua new file mode 100644 index 00000000..4a3f99bf --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/neo-tree.lua @@ -0,0 +1,128 @@ +return { + + -- file explorer + { + "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/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index bd160f26..d77c0933 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -136,9 +136,6 @@ return { { "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/lua/lazyvim/plugins/extras/editor/telescope.lua b/lua/lazyvim/plugins/extras/editor/telescope.lua index 55ccaceb..9fdf7e13 100644 --- a/lua/lazyvim/plugins/extras/editor/telescope.lua +++ b/lua/lazyvim/plugins/extras/editor/telescope.lua @@ -61,9 +61,6 @@ return { { "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 = { { @@ -267,9 +264,6 @@ return { { "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(...) @@ -287,9 +281,6 @@ return { { "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/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 83de5ee1..8e69374c 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,7 +48,7 @@ return { 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/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index ebb0dd89..30cab43f 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -7,6 +7,7 @@ local prios = { ["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.coding.blink"] = 5, ["lazyvim.plugins.extras.formatting.prettier"] = 10, + -- default core extra priority is 20 -- default priority is 50 ["lazyvim.plugins.extras.editor.aerial"] = 100, ["lazyvim.plugins.extras.editor.outline"] = 100, @@ -16,8 +17,27 @@ if vim.g.xtras_prios then prios = vim.tbl_deep_extend("force", prios, vim.g.xtras_prios or {}) end +local extras = {} ---@type string[] +local defaults = LazyVim.config.get_defaults() + +-- Add extras from LazyExtras that are not disabled +for _, extra in ipairs(LazyVim.config.json.data.extras) do + local def = defaults[extra] + if not (def and def.enabled == false) then + extras[#extras + 1] = extra + end +end + +-- Add default extras +for name, extra in pairs(defaults) do + if extra.enabled then + prios[name] = prios[name] or 20 + extras[#extras + 1] = name + end +end + ---@type string[] -local extras = LazyVim.dedup(LazyVim.config.json.data.extras) +extras = LazyVim.dedup(extras) local version = vim.version() local v = version.major .. "_" .. version.minor diff --git a/lua/lazyvim/util/extras.lua b/lua/lazyvim/util/extras.lua index bd5ca4f3..4984bf54 100644 --- a/lua/lazyvim/util/extras.lua +++ b/lua/lazyvim/util/extras.lua @@ -248,6 +248,9 @@ end ---@param extra LazyExtra function X:extra(extra) + local defaults = LazyVim.config.get_defaults() + local def = defaults[extra.module] + local origin = def and (def.origin or "user") or nil if not extra.managed then ---@type LazyExtra[] local parents = {} @@ -263,11 +266,12 @@ function X:extra(extra) self:diagnostic({ message = "Required by " .. table.concat(pp, ", "), }) - elseif vim.tbl_contains(LazyVim.plugin.core_imports, extra.module) then + elseif vim.tbl_contains(LazyVim.plugin.core_imports, extra.module) or origin == "default" then self:diagnostic({ message = "This extra is included by default", }) else + dd(origin) self:diagnostic({ message = "Not managed by LazyExtras (config)", severity = vim.diagnostic.severity.WARN, diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 66e6e18b..4b49f539 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -286,13 +286,4 @@ function M.memoize(fn) end end ----@return "nvim-cmp" | "blink.cmp" -function M.cmp_engine() - vim.g.lazyvim_cmp = vim.g.lazyvim_cmp or "auto" - if vim.g.lazyvim_cmp == "auto" then - return LazyVim.has_extra("coding.nvim-cmp") and "nvim-cmp" or "blink.cmp" - end - return vim.g.lazyvim_cmp -end - return M diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index 2736d7a5..e07150d1 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -28,10 +28,6 @@ function M.register(picker) return true end - if M.picker and M.picker.name ~= M.want() then - M.picker = nil - end - if M.picker and M.picker.name ~= picker.name then LazyVim.warn( "`LazyVim.pick`: picker already set to `" .. M.picker.name .. "`,\nignoring new picker `" .. picker.name .. "`" @@ -42,17 +38,6 @@ function M.register(picker) return true end ----@return "telescope" | "fzf" | "snacks" -function M.want() - vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" - if vim.g.lazyvim_picker == "auto" then - return LazyVim.has_extra("editor.snacks_picker") and "snacks" - or LazyVim.has_extra("editor.telescope") and "telescope" - or "fzf" - end - return vim.g.lazyvim_picker -end - ---@param command? string ---@param opts? lazyvim.util.pick.Opts function M.open(command, opts) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index f4a933e9..5d9249fc 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -79,7 +79,16 @@ function M.lazy_file() end function M.fix_imports() + local defaults ---@type table Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec) + if LazyVim.config.json_loaded then + -- extra disabled by defaults? + defaults = defaults or LazyVim.config.get_defaults() + local def = defaults[spec.import] + if def and def.enabled == false then + return false + end + end local dep = M.deprecated_extras[spec and spec.import] if dep then dep = dep .. "\n" .. "Please remove the extra from `lazyvim.json` to hide this warning." From d6829fb82cb2df7970d8312c2ed74d235b5760b9 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 8 Feb 2025 14:05:52 +0000 Subject: [PATCH 300/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 43127781..496f9713 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 07 +*LazyVim.txt* For Neovim Last change: 2025 February 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b4c24a3fe882c21555e60a1ec44087526e856eb9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 15:06:56 +0100 Subject: [PATCH 301/496] fix(extras): remove debug --- lua/lazyvim/util/extras.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/util/extras.lua b/lua/lazyvim/util/extras.lua index 4984bf54..fa87e820 100644 --- a/lua/lazyvim/util/extras.lua +++ b/lua/lazyvim/util/extras.lua @@ -271,7 +271,6 @@ function X:extra(extra) message = "This extra is included by default", }) else - dd(origin) self:diagnostic({ message = "Not managed by LazyExtras (config)", severity = vim.diagnostic.severity.WARN, From 25d90b54a3b1863cb4428fd309ab855732289710 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 15:23:30 +0100 Subject: [PATCH 302/496] feat(defaults): new installs now default to snacks picker/explorer. Existing installs don't change. --- lua/lazyvim/config/init.lua | 22 ++++++++++++++++------ lua/lazyvim/util/json.lua | 2 ++ lua/lazyvim/util/plugin.lua | 2 +- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 385d0b13..e585dd70 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -136,18 +136,19 @@ local defaults = { } M.json = { - version = 7, + version = 8, + loaded = false, path = vim.g.lazyvim_json or vim.fn.stdpath("config") .. "/lazyvim.json", data = { - version = nil, ---@type string? + version = nil, ---@type number? + install_version = nil, ---@type number? news = {}, ---@type table extras = {}, ---@type string[] }, } -M.json_loaded = false function M.json.load() - M.json_loaded = true + M.json.loaded = true local f = io.open(M.json.path, "r") if f then local data = f:read("*a") @@ -159,6 +160,8 @@ function M.json.load() LazyVim.json.migrate() end end + else + M.json.data.install_version = M.json.version end end @@ -334,8 +337,8 @@ function M.get_defaults() ---@type table local checks = { picker = { - { name = "fzf", extra = "editor.fzf" }, { name = "snacks", extra = "editor.snacks_picker" }, + { name = "fzf", extra = "editor.fzf" }, { name = "telescope", extra = "editor.telescope" }, }, cmp = { @@ -343,10 +346,17 @@ function M.get_defaults() { name = "nvim-cmp", extra = "coding.nvim-cmp" }, }, explorer = { - { name = "neo-tree", extra = "editor.neo-tree" }, { name = "snacks", extra = "editor.snacks_explorer" }, + { name = "neo-tree", extra = "editor.neo-tree" }, }, } + + -- existing installs keep their defaults + if (LazyVim.config.json.data.install_version or 7) < 8 then + table.insert(checks.picker, 1, table.remove(checks.picker, 2)) + table.insert(checks.explorer, 1, table.remove(checks.explorer, 2)) + end + default_extras = {} for name, check in pairs(checks) do local valid = {} ---@type string[] diff --git a/lua/lazyvim/util/json.lua b/lua/lazyvim/util/json.lua index f3ca7fcf..ad843687 100644 --- a/lua/lazyvim/util/json.lua +++ b/lua/lazyvim/util/json.lua @@ -97,6 +97,8 @@ function M.migrate() return vim.tbl_contains(ai, name) and ("lazyvim.plugins.extras.ai." .. name) or extra end) end, json.data.extras or {}) + elseif json.data.version == 7 then + json.data.install_version = 7 end M.save() diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index 5d9249fc..c20a0fc8 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -81,7 +81,7 @@ end function M.fix_imports() local defaults ---@type table Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec) - if LazyVim.config.json_loaded then + if LazyVim.config.json.loaded then -- extra disabled by defaults? defaults = defaults or LazyVim.config.get_defaults() local def = defaults[spec.import] From 2d6b49281d2550222be6aada0b7eeca07bb26e10 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 15:25:10 +0100 Subject: [PATCH 303/496] fix(snacks.explorer): no longer needed to disable neo-tree --- lua/lazyvim/plugins/extras/editor/snacks_explorer.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index aa87e85c..3e91f3ea 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -1,5 +1,4 @@ return { - { "nvim-neo-tree/neo-tree.nvim", enabled = false }, { "folke/snacks.nvim", opts = { explorer = {} }, From 2b3bcf36b2392bef94afefc07e2fcf32960960d7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 15:27:20 +0100 Subject: [PATCH 304/496] fix(snacks.picker): move dashboard shortcut to picker extra. Closes #5549 --- .../plugins/extras/editor/snacks_picker.lua | 11 +++++++++++ lua/lazyvim/plugins/ui.lua | 14 -------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index d77c0933..e929ad50 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -157,6 +157,17 @@ return { { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, }, }, + { + "folke/snacks.nvim", + opts = function(_, opts) + table.insert(opts.dashboard.preset.keys, 3, { + icon = " ", + key = "p", + desc = "Projects", + action = ":lua Snacks.picker.projects()", + }) + end, + }, { "folke/flash.nvim", optional = true, diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 0669054d..7985825a 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -325,18 +325,4 @@ return { }, }, }, - { - "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 29829f7eb6e937f9fe43e9455e55704b3fac8794 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:37:13 +0100 Subject: [PATCH 305/496] chore(main): release 14.11.0 (#5550) :robot: I have created a release *beep* *boop* --- ## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08) ### Features * **config:** show a warning when lazy.nvim imports order is incorrect ([83988ea](https://github.com/LazyVim/LazyVim/commit/83988ea46eccbe20953cd807984d2e89d679aa6e)) * **defaults:** new installs now default to snacks picker/explorer. Existing installs don't change. ([25d90b5](https://github.com/LazyVim/LazyVim/commit/25d90b54a3b1863cb4428fd309ab855732289710)) * **extras:** big rework of default extras ([525377d](https://github.com/LazyVim/LazyVim/commit/525377dee9ac3d19f53e333538e4e85586163ad8)) * **util:** `has_extra` now also checks for manual imports in `lazy.lua` ([0416376](https://github.com/LazyVim/LazyVim/commit/041637673371db7866f8bf00d77fc2fb6cc673c6)) ### Bug Fixes * **extras:** remove debug ([b4c24a3](https://github.com/LazyVim/LazyVim/commit/b4c24a3fe882c21555e60a1ec44087526e856eb9)) * **snacks.explorer:** no longer needed to disable neo-tree ([2d6b492](https://github.com/LazyVim/LazyVim/commit/2d6b49281d2550222be6aada0b7eeca07bb26e10)) * **snacks.picker:** move dashboard shortcut to picker extra. Closes [#5549](https://github.com/LazyVim/LazyVim/issues/5549) ([2b3bcf3](https://github.com/LazyVim/LazyVim/commit/2b3bcf36b2392bef94afefc07e2fcf32960960d7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8b4f0289..c36e41c8 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.10.0" + ".": "14.11.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8117fbb6..06ba397f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08) + + +### Features + +* **config:** show a warning when lazy.nvim imports order is incorrect ([83988ea](https://github.com/LazyVim/LazyVim/commit/83988ea46eccbe20953cd807984d2e89d679aa6e)) +* **defaults:** new installs now default to snacks picker/explorer. Existing installs don't change. ([25d90b5](https://github.com/LazyVim/LazyVim/commit/25d90b54a3b1863cb4428fd309ab855732289710)) +* **extras:** big rework of default extras ([525377d](https://github.com/LazyVim/LazyVim/commit/525377dee9ac3d19f53e333538e4e85586163ad8)) +* **util:** `has_extra` now also checks for manual imports in `lazy.lua` ([0416376](https://github.com/LazyVim/LazyVim/commit/041637673371db7866f8bf00d77fc2fb6cc673c6)) + + +### Bug Fixes + +* **extras:** remove debug ([b4c24a3](https://github.com/LazyVim/LazyVim/commit/b4c24a3fe882c21555e60a1ec44087526e856eb9)) +* **snacks.explorer:** no longer needed to disable neo-tree ([2d6b492](https://github.com/LazyVim/LazyVim/commit/2d6b49281d2550222be6aada0b7eeca07bb26e10)) +* **snacks.picker:** move dashboard shortcut to picker extra. Closes [#5549](https://github.com/LazyVim/LazyVim/issues/5549) ([2b3bcf3](https://github.com/LazyVim/LazyVim/commit/2b3bcf36b2392bef94afefc07e2fcf32960960d7)) + ## [14.10.0](https://github.com/LazyVim/LazyVim/compare/v14.9.0...v14.10.0) (2025-02-07) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e585dd70..3ec3a62c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.10.0" -- x-release-please-version +M.version = "14.11.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 2a608f00d47bb6679a27a313fb0404e4d3a2196c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 18:32:46 +0100 Subject: [PATCH 306/496] fix(copilot-chat): added support for snacks picker. Closes #5432. Closes #5552 --- lua/lazyvim/plugins/extras/ai/copilot-chat.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index e71f4db1..d67da7b2 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -9,8 +9,17 @@ function M.pick(kind) LazyVim.warn("No " .. kind .. " found on the current line") return end - local ok = pcall(require, "fzf-lua") - require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items) + local map = { + telescope = "telescope", + fzf = "fzflua", + snacks = "snacks", + } + for _, def in pairs(LazyVim.config.get_defaults()) do + if def.enabled and map[def.name] then + return require("CopilotChat.integrations." .. map[def.name]).pick(items) + end + end + Snacks.notify.error("No picker found") end end From 0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 20:34:17 +0100 Subject: [PATCH 307/496] feat(config): allow disabling the order check with `vim.g.lazyvim_check_order = false` --- lua/lazyvim/config/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 3ec3a62c..42afd66a 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -212,6 +212,10 @@ function M.setup(opts) "vscode", }) + if vim.g.lazyvim_check_order == false then + return + end + -- Check lazy.nvim import order local imports = require("lazy.core.config").spec.modules local function find(pat, last) From da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Feb 2025 12:14:05 +0100 Subject: [PATCH 308/496] feat(config): add option to disable the order check to warning message --- lua/lazyvim/config/init.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 42afd66a..5ef66fd8 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -229,11 +229,18 @@ function M.setup(opts) local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins local plugins = find("^plugins$") or math.huge if lazyvim_plugins ~= 1 or extras > plugins then - vim.notify( - "The order of your `lazy.nvim` imports is incorrect:\n- `lazyvim.plugins` should be first\n- followed by any `lazyvim.plugins.extras`\n- and finally your own `plugins`", - "warn", - { title = "LazyVim" } - ) + local msg = { + "The order of your `lazy.nvim` imports is incorrect:", + "- `lazyvim.plugins` should be first", + "- followed by any `lazyvim.plugins.extras`", + "- and finally your own `plugins`", + "", + "If you think you know what you're doing, you can disable this check with:", + "```lua", + "vim.g.lazyvim_check_order = false", + "```", + } + vim.notify(table.concat(msg, "\n"), "warn", { title = "LazyVim" }) end end, }) From 66981fe5b2c220286a31292fce3cc82b0e17ae76 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:15:22 +0000 Subject: [PATCH 309/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 496f9713..979ab2e6 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 08 +*LazyVim.txt* For Neovim Last change: 2025 February 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 121a2e27ef0f4d8ab64bf76768b9600c45fd2364 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Feb 2025 23:27:24 +0100 Subject: [PATCH 310/496] fix(extras): disable import handling when loading `:LazyExtras` + changed some recommendations --- .../plugins/extras/coding/mini-surround.lua | 1 - lua/lazyvim/plugins/extras/editor/fzf.lua | 1 - .../plugins/extras/editor/snacks_explorer.lua | 40 +++++++++---------- lua/lazyvim/util/extras.lua | 1 + lua/lazyvim/util/plugin.lua | 3 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-surround.lua b/lua/lazyvim/plugins/extras/coding/mini-surround.lua index 56d16a60..d8ff25c5 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-surround.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-surround.lua @@ -4,7 +4,6 @@ -- and more. return { "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/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..c1dd76fd 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -40,7 +40,6 @@ end return { desc = "Awesome picker for FZF (alternative to Telescope)", - recommended = true, { "ibhagwan/fzf-lua", cmd = "FzfLua", diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index 3e91f3ea..4163c799 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -1,24 +1,24 @@ return { - { - "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 }, + desc = "Snacks File Explorer", + recommended = true, + "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 }, }, } diff --git a/lua/lazyvim/util/extras.lua b/lua/lazyvim/util/extras.lua index fa87e820..6bc8eca2 100644 --- a/lua/lazyvim/util/extras.lua +++ b/lua/lazyvim/util/extras.lua @@ -83,6 +83,7 @@ end ---@param modname string ---@param source LazyExtraSource function M.get_extra(source, modname) + LazyVim.plugin.handle_defaults = false local enabled = vim.tbl_contains(M.state, modname) local spec = Plugin.Spec.new(nil, { optional = true, pkg = false }) spec:parse({ import = modname }) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index c20a0fc8..e6cae997 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -5,6 +5,7 @@ local M = {} ---@type string[] M.core_imports = {} +M.handle_defaults = true M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" } @@ -81,7 +82,7 @@ end function M.fix_imports() local defaults ---@type table Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec) - if LazyVim.config.json.loaded then + if M.handle_defaults and LazyVim.config.json.loaded then -- extra disabled by defaults? defaults = defaults or LazyVim.config.get_defaults() local def = defaults[spec.import] From 9d426ed7fc57b285e0a89e011f7a35bd99cdc7f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:53:22 +0100 Subject: [PATCH 311/496] chore(main): release 14.12.0 (#5553) :robot: I have created a release *beep* *boop* --- ## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) ### Features * **config:** add option to disable the order check to warning message ([da3b515](https://github.com/LazyVim/LazyVim/commit/da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2)) * **config:** allow disabling the order check with `vim.g.lazyvim_check_order = false` ([0bbce17](https://github.com/LazyVim/LazyVim/commit/0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805)) ### Bug Fixes * **copilot-chat:** added support for snacks picker. Closes [#5432](https://github.com/LazyVim/LazyVim/issues/5432). Closes [#5552](https://github.com/LazyVim/LazyVim/issues/5552) ([2a608f0](https://github.com/LazyVim/LazyVim/commit/2a608f00d47bb6679a27a313fb0404e4d3a2196c)) * **extras:** disable import handling when loading `:LazyExtras` + changed some recommendations ([121a2e2](https://github.com/LazyVim/LazyVim/commit/121a2e27ef0f4d8ab64bf76768b9600c45fd2364)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c36e41c8..88facebb 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.11.0" + ".": "14.12.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 06ba397f..2b7c403b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) + + +### Features + +* **config:** add option to disable the order check to warning message ([da3b515](https://github.com/LazyVim/LazyVim/commit/da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2)) +* **config:** allow disabling the order check with `vim.g.lazyvim_check_order = false` ([0bbce17](https://github.com/LazyVim/LazyVim/commit/0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805)) + + +### Bug Fixes + +* **copilot-chat:** added support for snacks picker. Closes [#5432](https://github.com/LazyVim/LazyVim/issues/5432). Closes [#5552](https://github.com/LazyVim/LazyVim/issues/5552) ([2a608f0](https://github.com/LazyVim/LazyVim/commit/2a608f00d47bb6679a27a313fb0404e4d3a2196c)) +* **extras:** disable import handling when loading `:LazyExtras` + changed some recommendations ([121a2e2](https://github.com/LazyVim/LazyVim/commit/121a2e27ef0f4d8ab64bf76768b9600c45fd2364)) + ## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5ef66fd8..521cb808 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.11.0" -- x-release-please-version +M.version = "14.12.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 7fe0b47f177d1f47dd43dd44d9f267c4421a3684 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:54:30 +0000 Subject: [PATCH 312/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 979ab2e6..6a579c49 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 10 +*LazyVim.txt* For Neovim Last change: 2025 February 11 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 75297733710951e81b505d88b2d728a5b0a9b6ab Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 11 Feb 2025 14:00:01 +0100 Subject: [PATCH 313/496] feat(lsp): use lsp_config picker instead of `LspInfo` --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 1b62a911..318ec911 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -13,7 +13,7 @@ function M.get() end -- stylua: ignore M._keys = { - { "cl", "LspInfo", desc = "Lsp Info" }, + { "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" }, From 0a5965b787e4d513b5a2e1182b35bd11ceafeeb3 Mon Sep 17 00:00:00 2001 From: Beartama <8091245+uyha@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:21:29 +0200 Subject: [PATCH 314/496] feat(editor): update parameter for fzf-lua (#5584) ## Description `fzf-lua` renames their parameter in https://github.com/ibhagwan/fzf-lua/commit/7cede182cf7463376669e102bd10d13f8ce05e52, so this PR updates the parameter also to stop the deprecation warning. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c1dd76fd..e9177457 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -288,10 +288,10 @@ return { 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 0db68916790808fd4eb284842c4d1a3d1c214e18 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:22:29 +0000 Subject: [PATCH 315/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6a579c49..6dd2917b 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 11 +*LazyVim.txt* For Neovim Last change: 2025 February 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 45d94b3197eaf3f35754b8ecb7adebfcebe5160d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:38:40 +0100 Subject: [PATCH 316/496] chore(main): release 14.13.0 (#5574) :robot: I have created a release *beep* *boop* --- ## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12) ### Features * **editor:** update parameter for fzf-lua ([#5584](https://github.com/LazyVim/LazyVim/issues/5584)) ([0a5965b](https://github.com/LazyVim/LazyVim/commit/0a5965b787e4d513b5a2e1182b35bd11ceafeeb3)) * **lsp:** use lsp_config picker instead of `LspInfo` ([7529773](https://github.com/LazyVim/LazyVim/commit/75297733710951e81b505d88b2d728a5b0a9b6ab)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 88facebb..45cd5c1f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.12.0" + ".": "14.13.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7c403b..292053a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12) + + +### Features + +* **editor:** update parameter for fzf-lua ([#5584](https://github.com/LazyVim/LazyVim/issues/5584)) ([0a5965b](https://github.com/LazyVim/LazyVim/commit/0a5965b787e4d513b5a2e1182b35bd11ceafeeb3)) +* **lsp:** use lsp_config picker instead of `LspInfo` ([7529773](https://github.com/LazyVim/LazyVim/commit/75297733710951e81b505d88b2d728a5b0a9b6ab)) + ## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 521cb808..586d1e7d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.12.0" -- x-release-please-version +M.version = "14.13.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 5788b9d1e06dfb5f99f92354dc550c9f2c5a6710 Mon Sep 17 00:00:00 2001 From: Roland Kaminski Date: Fri, 14 Feb 2025 17:32:33 +0100 Subject: [PATCH 317/496] feat(extras): setup neogen and mini.snippets integration (#5594) ## Description Configure neogen and mini.snippets integration. See also #5593. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/neogen.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/neogen.lua b/lua/lazyvim/plugins/extras/coding/neogen.lua index 88f7dd54..c8916676 100644 --- a/lua/lazyvim/plugins/extras/coding/neogen.lua +++ b/lua/lazyvim/plugins/extras/coding/neogen.lua @@ -1,5 +1,6 @@ return { "danymat/neogen", + dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {}, cmd = "Neogen", keys = { { @@ -17,6 +18,7 @@ return { local map = { ["LuaSnip"] = "luasnip", + ["mini.snippets"] = "mini", ["nvim-snippy"] = "snippy", ["vim-vsnip"] = "vsnip", } From 98fca895e863b3e518d6154edd8cdbca35efef88 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 14 Feb 2025 16:33:36 +0000 Subject: [PATCH 318/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6dd2917b..2d3af3d8 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 12 +*LazyVim.txt* For Neovim Last change: 2025 February 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 32e575aa75792c63f710f0bdc3e2fb5aa8ea75ad Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Sat, 15 Feb 2025 16:27:01 +0900 Subject: [PATCH 319/496] feat(keymaps): enable toggling in quickfix list and location list (#5608) ## Description This PR addresses issue #5503 by modifying the behavior of `xq` and `xl` so that they toggle the quickfix and location lists rather than simply opening them. To prevent the full Lua error stack from being printed when no list exists prior to using `copen` or `lopen`, I've wrapped the commands in `pcall` and used `vim.notify` to alert the user in the same manner as before. ## Related Issue(s) #5503 ## Screenshots https://github.com/user-attachments/assets/b22b1861-e6e5-4d8a-967e-f760cca15719 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 3e3829d1..031e7054 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -94,8 +94,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" }) From e9dad45f934bca467a40d0bb68c84c0aca178b0a Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 15 Feb 2025 07:27:57 +0000 Subject: [PATCH 320/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 2d3af3d8..3c5a9ce0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 14 +*LazyVim.txt* For Neovim Last change: 2025 February 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 401ef48fcd617534b017ef471309bb1bd6465131 Mon Sep 17 00:00:00 2001 From: Jinfeng Guo Date: Sat, 15 Feb 2025 15:30:45 +0800 Subject: [PATCH 321/496] feat(snacks.picker): added support for Project shortcuts in other dashboards (#5607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …shboard-nvim, and mini-starter ## Description Though the snacks.picker extra provides a project picker, it only adds the 'Projects' shortcut to snacks' dashboard, and no to the other three dashboard extra: alpha, dashboard-nvim and mini-starter. In this PR, I added the 'Projects' shortcuts to these three dashboard extras. ## Related Issue(s) - Fixes #5465 ## Screenshots alpha ![image](https://github.com/user-attachments/assets/c050f260-8602-4660-a386-62ab8400ef87) dashboard-nvim ![image](https://github.com/user-attachments/assets/8973cd62-ba97-4330-9462-74163b58dca9) mini.starter ![image](https://github.com/user-attachments/assets/a31ec27d-7efb-4aa3-a136-2a4ffedf5ba1) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/editor/snacks_picker.lua | 44 +++++++++++++++++++ lua/lazyvim/plugins/xtras.lua | 3 ++ 2 files changed, 47 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e929ad50..aee28d1d 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -168,6 +168,50 @@ return { }) end, }, + { + "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, + }, + { + "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, + }, + { + "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, + }, { "folke/flash.nvim", optional = true, diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 30cab43f..bb061d80 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -11,6 +11,9 @@ local prios = { -- default priority is 50 ["lazyvim.plugins.extras.editor.aerial"] = 100, ["lazyvim.plugins.extras.editor.outline"] = 100, + ["lazyvim.plugins.extras.ui.alpha"] = 19, + ["lazyvim.plugins.extras.ui.dashboard-nvim"] = 19, + ["lazyvim.plugins.extras.ui.mini-starter"] = 19, } if vim.g.xtras_prios then From 4aff0063a42bbc499cfa03feb6e58d4339c0950d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 15 Feb 2025 15:46:51 +0100 Subject: [PATCH 322/496] feat(snacks.picker): move trouble keymap from `ctrl+t` -> `alt+t` --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index aee28d1d..aad6287f 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -121,7 +121,7 @@ return { win = { input = { keys = { - [""] = { + [""] = { "trouble_open", mode = { "n", "i" }, }, From 0458e46dcca49cc404062e04a9054a8bd058dcd3 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 15 Feb 2025 22:57:48 +0200 Subject: [PATCH 323/496] fix(blink): `cmdline` is now top-level on main branch (#5615) ## Description This `blink.cmp` [commit](https://github.com/Saghen/blink.cmp/commit/93215d80346e14763a67d97785dccb1e1c3a6775) introduced a breaking change on main branch. `cmdline` is now top-level and the option is `opts.cmdline.sources = {}`. I also added a note to remove this hack when the next blink stable release comes out, which should be greater than current 0.11.0 and just do it normally in `opts` instead. ## Related Issue(s) None. ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 45e393e1..7cd67fc8 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -79,7 +79,6 @@ return { -- with blink.compat compat = {}, default = { "lsp", "path", "snippets", "buffer" }, - cmdline = {}, }, keymap = { @@ -89,6 +88,15 @@ return { }, ---@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 b35015ac59f0c630b2efe18ccf10d693397d0ca4 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:51:17 +0200 Subject: [PATCH 324/496] fix(blink): `blink` released new version, remove previous hack (#5616) ## Description `blink.cmp` just made a new stable release. So, remove the hack and define the option properly in `opts`. If I knew it would make a release tonight, I'd definitely hold off my recent PR. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 7cd67fc8..f43be920 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -81,6 +81,10 @@ return { default = { "lsp", "path", "snippets", "buffer" }, }, + cmdline = { + sources = {}, + }, + keymap = { preset = "enter", [""] = { "select_and_accept" }, @@ -88,15 +92,6 @@ return { }, ---@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 e7f8e4faba0c6d397526238923f1aeff1740d09c Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 16 Feb 2025 00:47:17 +0200 Subject: [PATCH 325/496] fix(blink): enable Neovim native mapping with `` (#5617) ## Description Another blink fix unfortunately. I noticed that native Neovim `` completion didn't work after the breaking commit. I checked the commit and noticed it had a boolean `enabled` field, so I thought maybe that would disable the blink cmdline since we already have `sources = {}`, but it didn't work. Looking through the commit, I stumbled upon this piece of [code](https://github.com/Saghen/blink.cmp/commit/93215d80346e14763a67d97785dccb1e1c3a6775#diff-f313d6f0270f6fed848f1cb7e62c82d3cfaf9b6c7e0072266908eeaf202f11d5R66-R68) and it seems that it's only checked for applying the blink cmdline mappings. So, it seems both `enabled = false` (for Neovim native cmdline mapping) and `sources = {}` are needed to have default Neovim cmdline experience. PS: Apparently I don't know how to link from the commit the necessary part of the commit, so I'm just referencing here the part of the code [directly in the file](https://github.com/Saghen/blink.cmp/blob/426a605518f81ea7ba335ecca8df565637e7e259/lua/blink/cmp/keymap/init.lua#L66-L70). ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index f43be920..4488b721 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -82,6 +82,7 @@ return { }, cmdline = { + enabled = false, sources = {}, }, From 3f034d0a7f58031123300309f2efd3bb0356ee21 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 15 Feb 2025 23:51:07 +0100 Subject: [PATCH 326/496] chore(main): release 14.14.0 (#5603) :robot: I have created a release *beep* *boop* --- ## [14.14.0](https://github.com/LazyVim/LazyVim/compare/v14.13.0...v14.14.0) (2025-02-15) ### Features * **extras:** setup neogen and mini.snippets integration ([#5594](https://github.com/LazyVim/LazyVim/issues/5594)) ([5788b9d](https://github.com/LazyVim/LazyVim/commit/5788b9d1e06dfb5f99f92354dc550c9f2c5a6710)) * **keymaps:** enable toggling in quickfix list and location list ([#5608](https://github.com/LazyVim/LazyVim/issues/5608)) ([32e575a](https://github.com/LazyVim/LazyVim/commit/32e575aa75792c63f710f0bdc3e2fb5aa8ea75ad)) * **snacks.picker:** added support for Project shortcuts in other dashboards ([#5607](https://github.com/LazyVim/LazyVim/issues/5607)) ([401ef48](https://github.com/LazyVim/LazyVim/commit/401ef48fcd617534b017ef471309bb1bd6465131)) * **snacks.picker:** move trouble keymap from `ctrl+t` -> `alt+t` ([4aff006](https://github.com/LazyVim/LazyVim/commit/4aff0063a42bbc499cfa03feb6e58d4339c0950d)) ### Bug Fixes * **blink:** `blink` released new version, remove previous hack ([#5616](https://github.com/LazyVim/LazyVim/issues/5616)) ([b35015a](https://github.com/LazyVim/LazyVim/commit/b35015ac59f0c630b2efe18ccf10d693397d0ca4)) * **blink:** `cmdline` is now top-level on main branch ([#5615](https://github.com/LazyVim/LazyVim/issues/5615)) ([0458e46](https://github.com/LazyVim/LazyVim/commit/0458e46dcca49cc404062e04a9054a8bd058dcd3)) * **blink:** enable Neovim native mapping with `<Tab>` ([#5617](https://github.com/LazyVim/LazyVim/issues/5617)) ([e7f8e4f](https://github.com/LazyVim/LazyVim/commit/e7f8e4faba0c6d397526238923f1aeff1740d09c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 45cd5c1f..926af9ee 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.13.0" + ".": "14.14.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 292053a3..90fbb7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [14.14.0](https://github.com/LazyVim/LazyVim/compare/v14.13.0...v14.14.0) (2025-02-15) + + +### Features + +* **extras:** setup neogen and mini.snippets integration ([#5594](https://github.com/LazyVim/LazyVim/issues/5594)) ([5788b9d](https://github.com/LazyVim/LazyVim/commit/5788b9d1e06dfb5f99f92354dc550c9f2c5a6710)) +* **keymaps:** enable toggling in quickfix list and location list ([#5608](https://github.com/LazyVim/LazyVim/issues/5608)) ([32e575a](https://github.com/LazyVim/LazyVim/commit/32e575aa75792c63f710f0bdc3e2fb5aa8ea75ad)) +* **snacks.picker:** added support for Project shortcuts in other dashboards ([#5607](https://github.com/LazyVim/LazyVim/issues/5607)) ([401ef48](https://github.com/LazyVim/LazyVim/commit/401ef48fcd617534b017ef471309bb1bd6465131)) +* **snacks.picker:** move trouble keymap from `ctrl+t` -> `alt+t` ([4aff006](https://github.com/LazyVim/LazyVim/commit/4aff0063a42bbc499cfa03feb6e58d4339c0950d)) + + +### Bug Fixes + +* **blink:** `blink` released new version, remove previous hack ([#5616](https://github.com/LazyVim/LazyVim/issues/5616)) ([b35015a](https://github.com/LazyVim/LazyVim/commit/b35015ac59f0c630b2efe18ccf10d693397d0ca4)) +* **blink:** `cmdline` is now top-level on main branch ([#5615](https://github.com/LazyVim/LazyVim/issues/5615)) ([0458e46](https://github.com/LazyVim/LazyVim/commit/0458e46dcca49cc404062e04a9054a8bd058dcd3)) +* **blink:** enable Neovim native mapping with `<Tab>` ([#5617](https://github.com/LazyVim/LazyVim/issues/5617)) ([e7f8e4f](https://github.com/LazyVim/LazyVim/commit/e7f8e4faba0c6d397526238923f1aeff1740d09c)) + ## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 586d1e7d..56f2397e 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.13.0" -- x-release-please-version +M.version = "14.14.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 5b94baa1d2e7d8ec7e9a9cab82fabd8c3655d369 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 16 Feb 2025 09:05:52 +0200 Subject: [PATCH 327/496] fix(blink): remove unnecessary `sources` from `cmdline` (#5620) ## Description Like Saghen already mentioned in the other PR, this [commit](https://github.com/Saghen/blink.cmp/commit/19f60a675eaaf4b160bd6458bfd72fc005da5b3f) does a check based on the `enabled` field before adding sources, so it's no longer needed to define it. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 4488b721..99a2748e 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -83,7 +83,6 @@ return { cmdline = { enabled = false, - sources = {}, }, keymap = { From 0ca49bcfed059516b5e860f6d6bc028dfe149b3f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 16 Feb 2025 07:06:54 +0000 Subject: [PATCH 328/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3c5a9ce0..5a16440c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 15 +*LazyVim.txt* For Neovim Last change: 2025 February 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From f2f2aea6722b530281b476c08ec60f2d320f1c3d Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Sun, 16 Feb 2025 08:06:35 +0000 Subject: [PATCH 329/496] feat(snippets): mini.snippets standalone and blink.resubscribe (#5507) ## Description When using blink.cmp and mini.snippets, the same problem regarding outdated completion items as solved in [nvim-cmp](https://github.com/hrsh7th/nvim-cmp/pull/2126) can arise. [This](https://github.com/Saghen/blink.cmp/pull/1035) PR has been included into main. When the PR is included into the next stable release, this PR can be merged. Current blink release: 0.11.0 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: abeldekat --- lua/lazyvim/plugins/extras/coding/mini-snippets.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index 5ce82c80..d0a747a8 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -140,21 +140,25 @@ return { 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 16a772452a515790c3304b358dd66a618fda3260 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 16 Feb 2025 13:20:06 +0200 Subject: [PATCH 330/496] feat(octo): add support for snacks picker (#5625) ## Description A [PR](https://github.com/pwntester/octo.nvim/pull/858) has landed in `octo.nvim` that adds initial support for `snacks.picker`. Enable it in `octo.nvim` Extra if user uses `snacks.picker`. I also changed the checks to use `has_extra`. This was needed for `snacks.picker`, since `has("snacks.nvim")` doesn't ensure that user also has `snacks.picker` enabled. For the others I just changed it for conformity, but if you think there might be something wrong about that (that I'm unable to think of), please feel free to change them back. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/util/octo.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/octo.lua b/lua/lazyvim/plugins/extras/util/octo.lua index 9412e54c..d3316f5e 100644 --- a/lua/lazyvim/plugins/extras/util/octo.lua +++ b/lua/lazyvim/plugins/extras/util/octo.lua @@ -42,12 +42,14 @@ return { "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 606b96466eeb39b1c1bb576c9b99041b64705f43 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 18 Feb 2025 23:10:44 +0100 Subject: [PATCH 331/496] fix(snacks.picker): remove redundant leader-gc keymap. Closes #5646 --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index aad6287f..93f32fab 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -72,7 +72,6 @@ return { { "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" }, From 9c596681f684c549e69652a5c77a68bd5ecc93e3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 18 Feb 2025 23:11:12 +0100 Subject: [PATCH 332/496] feat(keymaps): show lang when opening treesitter inspect --- lua/lazyvim/config/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 031e7054..fbc7f5d1 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -179,7 +179,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" }) From f3e37a1f836448772b3e63a3add542236f9e7375 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 18 Feb 2025 22:12:23 +0000 Subject: [PATCH 333/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5a16440c..debec307 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 16 +*LazyVim.txt* For Neovim Last change: 2025 February 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 759a19e785735eb8513b4f8d4483ec5ab1b75307 Mon Sep 17 00:00:00 2001 From: Thomas Vandal Date: Fri, 21 Feb 2025 08:28:05 -0500 Subject: [PATCH 334/496] feat(chezmoi): enhance fzf-lua chezmoi picker and add snacks.dasbhoard entry (#5275) ## Description This PR enhances the fzf-lua picker for chezmoi by using the built-in `files` picker and by opening the selected file with `ChezmoiEdit` and `vimcmd_entry` to parse the entry. This simplifies the code and adds icons and file preview. The PR also replaces the config entry in snacks.dashboard with the chezmoi picker, similar to what was already implemented for dashboard-nvim ## Screenshots Current picker: ![image](https://github.com/user-attachments/assets/d0be9279-f199-4349-8055-04d8a351c6f9) New picker: ![image](https://github.com/user-attachments/assets/c68fcb6a-79fa-4f65-8c48-60ce64450350) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 42 +++++++++++++-------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index cffa6749..6c88fc45 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -3,22 +3,12 @@ local pick_chezmoi = function() require("telescope").extensions.chezmoi.find_files() elseif LazyVim.pick.picker.name == "fzf" then local fzf_lua = require("fzf-lua") - local results = require("chezmoi.commands").list() - local chezmoi = require("chezmoi.commands") - - local opts = { - fzf_opts = {}, - fzf_colors = true, - actions = { - ["default"] = function(selected) - chezmoi.edit({ - targets = { "~/" .. selected[1] }, - args = { "--watch" }, - }) - end, - }, + local actions = { + ["enter"] = function(selected) + fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") }) + end, } - fzf_lua.fzf_exec(results, opts) + fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions }) elseif LazyVim.pick.picker.name == "snacks" then local results = require("chezmoi.commands").list({ args = { @@ -65,6 +55,7 @@ return { }, { "xvzc/chezmoi.nvim", + cmd = { "ChezmoiEdit" }, keys = { { "sz", @@ -120,6 +111,27 @@ return { table.insert(opts.config.center, 5, projects) end, }, + { + "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, + }, -- Filetype icons { From 541b83276e0fe92f7d0d6c9f283cd15ccba5a2fd Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 21 Feb 2025 13:29:08 +0000 Subject: [PATCH 335/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index debec307..447b9369 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 18 +*LazyVim.txt* For Neovim Last change: 2025 February 21 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 771089f6928512ab0f431e9db04e7dc802a5e1a5 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 22 Feb 2025 08:47:27 +0200 Subject: [PATCH 336/496] fix(blink): make sure to use `LazyVim.config.icons.kinds` (#5668) ## Description This blink [commit](https://github.com/Saghen/blink.cmp/commit/010d939e7fd6cb8d8e4a9b1dec228b8405d15fb4) made a change, so that third party sources can provide their own `item.kind_icon` and `item.kind_name`. The problem is that these icons will take precedence over `config.kind_icons[kind]`, which LazyVim sets [here](https://github.com/LazyVim/LazyVim/blob/541b83276e0fe92f7d0d6c9f283cd15ccba5a2fd/lua/lazyvim/plugins/extras/coding/blink.lua#L164-L164). I noticed that `blink-cmp-copilot` also started providing its own in the items that it returns. I noticed this because I have the following in my configuration `columns = { { "label", "label_description", gap = 1 }, { "kind_icon", "kind" } }`. The icon that it uses is a smaller icon one character long, which by default it will scale up and show normally like the LazyVim icon. But when you put another component next to it (like `kind`) in the `columns` field, then it shows the normal size of the icon next to the `kind` and it looks kinda weird compared to the default LazyVim icon. ## Related Issue(s) None ## Screenshots Before (the default icon provided by `blink-cmp-copilot`) ![2025-02-22_02-17](https://github.com/user-attachments/assets/aa7da566-a577-4d32-822c-f2d891b3c047) After (the LazyVim icon) ![2025-02-22_02-18](https://github.com/user-attachments/assets/342580a9-5a36-47fa-aad7-c139f2765d74) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 99a2748e..10b2ee62 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -143,6 +143,7 @@ return { 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 cb223553ff73eb2f37ffb5dc0bb75b76a4677faf Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 22 Feb 2025 06:48:29 +0000 Subject: [PATCH 337/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 447b9369..881984e8 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 21 +*LazyVim.txt* For Neovim Last change: 2025 February 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b0334fd57cdb920e03afab3c1940114ad43e4fbe Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sat, 1 Mar 2025 15:21:12 +0100 Subject: [PATCH 338/496] fix(copilot-chat): switch from deprecated picker integrations (#5707) - Instead of using picker integrations (that are now deprecated), switch to using CopilotChat.select_prompt() that is using `vim.ui.select` which brings the selector integration responsibility to pickers instead of plugin - Use vim.ui.input instead of vim.fn.input for consistency Reason why this was deprecated in CopilotChat.nvim (by me) and will be removed in future is because these integrations never made any sense anyway when `vim.ui.select` overrides exist. ## Screenshots Using fzf-lua in my config, outside of LazyNvim but same thing applies: ![image](https://github.com/user-attachments/assets/a5171ffe-63a6-4b79-9925-fd8bef52e52f) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Signed-off-by: Tomas Slusny --- .../plugins/extras/ai/copilot-chat.lua | 46 ++++++------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index d67da7b2..58169b1e 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -1,28 +1,3 @@ -local M = {} - ----@param kind string -function M.pick(kind) - return function() - local actions = require("CopilotChat.actions") - local items = actions[kind .. "_actions"]() - if not items then - LazyVim.warn("No " .. kind .. " found on the current line") - return - end - local map = { - telescope = "telescope", - fzf = "fzflua", - snacks = "snacks", - } - for _, def in pairs(LazyVim.config.get_defaults()) do - if def.enabled and map[def.name] then - return require("CopilotChat.integrations." .. map[def.name]).pick(items) - end - end - Snacks.notify.error("No picker found") - end -end - return { { "CopilotC-Nvim/CopilotChat.nvim", @@ -62,16 +37,25 @@ return { { "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 ec5981dfb1222c3bf246d9bcaa713d5cfa486fbd Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 1 Mar 2025 14:22:16 +0000 Subject: [PATCH 339/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 881984e8..b5d95b12 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 22 +*LazyVim.txt* For Neovim Last change: 2025 March 01 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c20c4022958780617424a090eee2360d560eb939 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 12 May 2025 10:39:04 +0200 Subject: [PATCH 340/496] fix(mason): rename and pin to v1 --- lua/lazyvim/plugins/extras/formatting/biome.lua | 2 +- lua/lazyvim/plugins/extras/formatting/black.lua | 2 +- lua/lazyvim/plugins/extras/formatting/prettier.lua | 2 +- lua/lazyvim/plugins/extras/lang/ansible.lua | 2 +- lua/lazyvim/plugins/extras/lang/clangd.lua | 2 +- lua/lazyvim/plugins/extras/lang/elm.lua | 2 +- lua/lazyvim/plugins/extras/lang/go.lua | 6 +++--- lua/lazyvim/plugins/extras/lang/haskell.lua | 4 ++-- lua/lazyvim/plugins/extras/lang/java.lua | 2 +- lua/lazyvim/plugins/extras/lang/kotlin.lua | 6 +++--- lua/lazyvim/plugins/extras/lang/markdown.lua | 2 +- lua/lazyvim/plugins/extras/lang/omnisharp.lua | 2 +- lua/lazyvim/plugins/extras/lang/php.lua | 2 +- lua/lazyvim/plugins/extras/lang/ruby.lua | 2 +- lua/lazyvim/plugins/extras/lang/rust.lua | 2 +- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- lua/lazyvim/plugins/extras/lang/terraform.lua | 2 +- lua/lazyvim/plugins/extras/lang/typescript.lua | 2 +- lua/lazyvim/plugins/extras/util/dot.lua | 2 +- lua/lazyvim/plugins/extras/util/gitui.lua | 2 +- lua/lazyvim/plugins/lsp/init.lua | 8 ++++++-- lua/lazyvim/util/plugin.lua | 2 ++ tests/extras/extra_spec.lua | 4 ++-- tests/minit.lua | 4 ++-- 24 files changed, 37 insertions(+), 31 deletions(-) diff --git a/lua/lazyvim/plugins/extras/formatting/biome.lua b/lua/lazyvim/plugins/extras/formatting/biome.lua index 1a4e274c..91e488ca 100644 --- a/lua/lazyvim/plugins/extras/formatting/biome.lua +++ b/lua/lazyvim/plugins/extras/formatting/biome.lua @@ -24,7 +24,7 @@ local supported = { return { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "biome" } }, }, diff --git a/lua/lazyvim/plugins/extras/formatting/black.lua b/lua/lazyvim/plugins/extras/formatting/black.lua index 769c3009..29289393 100644 --- a/lua/lazyvim/plugins/extras/formatting/black.lua +++ b/lua/lazyvim/plugins/extras/formatting/black.lua @@ -1,6 +1,6 @@ return { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = function(_, opts) table.insert(opts.ensure_installed, "black") end, diff --git a/lua/lazyvim/plugins/extras/formatting/prettier.lua b/lua/lazyvim/plugins/extras/formatting/prettier.lua index 855dc258..6edd414c 100644 --- a/lua/lazyvim/plugins/extras/formatting/prettier.lua +++ b/lua/lazyvim/plugins/extras/formatting/prettier.lua @@ -58,7 +58,7 @@ M.has_parser = LazyVim.memoize(M.has_parser) return { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "prettier" } }, }, diff --git a/lua/lazyvim/plugins/extras/lang/ansible.lua b/lua/lazyvim/plugins/extras/lang/ansible.lua index 29d1711a..0d20b02a 100644 --- a/lua/lazyvim/plugins/extras/lang/ansible.lua +++ b/lua/lazyvim/plugins/extras/lang/ansible.lua @@ -6,7 +6,7 @@ return { }) end, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "ansible-lint" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index ae245d54..33dc4ed4 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -117,7 +117,7 @@ return { optional = true, dependencies = { -- Ensure C/C++ debugger is installed - "williamboman/mason.nvim", + "mason-org/mason.nvim", optional = true, opts = { ensure_installed = { "codelldb" } }, }, diff --git a/lua/lazyvim/plugins/extras/lang/elm.lua b/lua/lazyvim/plugins/extras/lang/elm.lua index 9e21ab0a..81cc4de6 100644 --- a/lua/lazyvim/plugins/extras/lang/elm.lua +++ b/lua/lazyvim/plugins/extras/lang/elm.lua @@ -10,7 +10,7 @@ return { }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "elm-format" } }, }, diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index bf3b22ee..ff8def2e 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -75,7 +75,7 @@ return { }, -- Ensure Go tools are installed { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "goimports", "gofumpt" } }, }, { @@ -83,7 +83,7 @@ return { optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "gomodifytags", "impl" } }, }, }, @@ -111,7 +111,7 @@ return { optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "delve" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/haskell.lua b/lua/lazyvim/plugins/extras/lang/haskell.lua index 77b0413a..a599d310 100644 --- a/lua/lazyvim/plugins/extras/lang/haskell.lua +++ b/lua/lazyvim/plugins/extras/lang/haskell.lua @@ -28,7 +28,7 @@ return { }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "haskell-language-server" } }, }, @@ -37,7 +37,7 @@ return { optional = true, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "haskell-debug-adapter" } }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 236c86c9..8098b6b3 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -56,7 +56,7 @@ return { end, dependencies = { { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "java-debug-adapter", "java-test" } }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/kotlin.lua b/lua/lazyvim/plugins/extras/lang/kotlin.lua index a15f3cc4..3c6be754 100644 --- a/lua/lazyvim/plugins/extras/lang/kotlin.lua +++ b/lua/lazyvim/plugins/extras/lang/kotlin.lua @@ -14,7 +14,7 @@ return { end, -- Add packages(linting, debug adapter) { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "ktlint" } }, }, -- Add syntax highlighting @@ -35,7 +35,7 @@ return { { "mfussenegger/nvim-lint", optional = true, - dependencies = "williamboman/mason.nvim", + dependencies = "mason-org/mason.nvim", opts = { linters_by_ft = { kotlin = { "ktlint" } }, }, @@ -64,7 +64,7 @@ return { { "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/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 8b07985b..33e9e457 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -40,7 +40,7 @@ return { }, }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "markdownlint-cli2", "markdown-toc" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/omnisharp.lua b/lua/lazyvim/plugins/extras/lang/omnisharp.lua index 3881e6a4..07ba0490 100644 --- a/lua/lazyvim/plugins/extras/lang/omnisharp.lua +++ b/lua/lazyvim/plugins/extras/lang/omnisharp.lua @@ -36,7 +36,7 @@ return { }, }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "csharpier", "netcoredbg" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 70814eae..5a2835aa 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -35,7 +35,7 @@ return { }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "phpcs", diff --git a/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index 9e21331e..4224e6d8 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -48,7 +48,7 @@ return { }, }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "erb-formatter", "erb-lint" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index e5304b56..0adddf18 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -43,7 +43,7 @@ return { -- Ensure Rust debugger is installed { - "williamboman/mason.nvim", + "mason-org/mason.nvim", optional = true, opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 8e69374c..070d26ff 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -143,7 +143,7 @@ return { -- Linters & formatters { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "sqlfluff" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/terraform.lua b/lua/lazyvim/plugins/extras/lang/terraform.lua index 8ae3f843..362dfc53 100644 --- a/lua/lazyvim/plugins/extras/lang/terraform.lua +++ b/lua/lazyvim/plugins/extras/lang/terraform.lua @@ -20,7 +20,7 @@ return { }, -- ensure terraform tools are installed { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "tflint" } }, }, { diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 6d7ae673..f7cc3231 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -194,7 +194,7 @@ return { 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/lua/lazyvim/plugins/extras/util/dot.lua b/lua/lazyvim/plugins/extras/util/dot.lua index e24b9fe0..2c2a97a5 100644 --- a/lua/lazyvim/plugins/extras/util/dot.lua +++ b/lua/lazyvim/plugins/extras/util/dot.lua @@ -18,7 +18,7 @@ return { }, }, { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "shellcheck" } }, }, -- add some stuff to treesitter diff --git a/lua/lazyvim/plugins/extras/util/gitui.lua b/lua/lazyvim/plugins/extras/util/gitui.lua index e0dd6049..524812a4 100644 --- a/lua/lazyvim/plugins/extras/util/gitui.lua +++ b/lua/lazyvim/plugins/extras/util/gitui.lua @@ -2,7 +2,7 @@ return { -- Ensure GitUI tool is installed { - "williamboman/mason.nvim", + "mason-org/mason.nvim", opts = { ensure_installed = { "gitui" } }, keys = { { diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 6ba4597f..b5cba5f1 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -5,7 +5,7 @@ return { event = "LazyFile", dependencies = { "mason.nvim", - { "williamboman/mason-lspconfig.nvim", config = function() end }, + { "mason-org/mason-lspconfig.nvim", config = function() end }, }, opts = function() ---@class PluginLspOpts @@ -257,7 +257,7 @@ return { -- cmdline tools and lsp servers { - "williamboman/mason.nvim", + "mason-org/mason.nvim", cmd = "Mason", keys = { { "cm", "Mason", desc = "Mason" } }, build = ":MasonUpdate", @@ -292,4 +292,8 @@ return { end) end, }, + + -- pin to v1 for now + { "mason-org/mason.nvim", version = "^1.0.0" }, + { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, } diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index e6cae997..9fede549 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -35,6 +35,8 @@ M.renames = { ["romgrk/nvim-treesitter-context"] = "nvim-treesitter/nvim-treesitter-context", ["glepnir/dashboard-nvim"] = "nvimdev/dashboard-nvim", ["markdown.nvim"] = "render-markdown.nvim", + ["williamboman/mason.nvim"] = "mason-org/mason.nvim", + ["williamboman/mason-lspconfig.nvim"] = "mason-org/mason-lspconfig.nvim", } function M.save_core() diff --git a/tests/extras/extra_spec.lua b/tests/extras/extra_spec.lua index fa2fc9de..2afb6b94 100644 --- a/tests/extras/extra_spec.lua +++ b/tests/extras/extra_spec.lua @@ -44,7 +44,7 @@ describe("Extra", function() local mod = require(extra.modname) assert.is_not_nil(mod) local spec = Plugin.Spec.new({ - { "williamboman/mason.nvim", opts = { ensure_installed = {} } }, + { "mason-org/mason.nvim", opts = { ensure_installed = {} } }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, mod, }, { optional = true }) @@ -60,7 +60,7 @@ describe("Extra", function() local mod = require(extra.modname) local spec = Plugin.Spec.new({ - { "williamboman/mason.nvim", opts = { ensure_installed = {} } }, + { "mason-org/mason.nvim", opts = { ensure_installed = {} } }, { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, mod, }, { optional = true }) diff --git a/tests/minit.lua b/tests/minit.lua index 88cb4185..3eb3a8b4 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -8,8 +8,8 @@ require("lazy.minit").setup({ spec = { { dir = vim.uv.cwd() }, "LazyVim/starter", - "williamboman/mason-lspconfig.nvim", - "williamboman/mason.nvim", + "mason-org/mason-lspconfig.nvim", + "mason-org/mason.nvim", "nvim-treesitter/nvim-treesitter", { "echasnovski/mini.icons", opts = {} }, }, From 70b4615cb242b2d53150b34181a5124d8088325f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 12 May 2025 10:58:20 +0200 Subject: [PATCH 341/496] test(mason): fix tests --- tests/minit.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/minit.lua b/tests/minit.lua index 3eb3a8b4..807a2ac5 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -7,10 +7,10 @@ load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/ma require("lazy.minit").setup({ spec = { { dir = vim.uv.cwd() }, - "LazyVim/starter", - "mason-org/mason-lspconfig.nvim", - "mason-org/mason.nvim", - "nvim-treesitter/nvim-treesitter", + { "LazyVim/starter" }, + { "nvim-treesitter/nvim-treesitter" }, + { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, + { "mason-org/mason.nvim", version = "^1.0.0" }, { "echasnovski/mini.icons", opts = {} }, }, }) From 1b1c7d0f456bcfdcee838992572774b62e28b851 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 12 May 2025 08:59:27 +0000 Subject: [PATCH 342/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index b5d95b12..0e41c7bf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 March 01 +*LazyVim.txt* For Neovim Last change: 2025 May 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 25abbf546d564dc484cf903804661ba12de45507 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 11:00:03 +0200 Subject: [PATCH 343/496] chore(main): release 14.15.0 (#5623) :robot: I have created a release *beep* *boop* --- ## [14.15.0](https://github.com/LazyVim/LazyVim/compare/v14.14.0...v14.15.0) (2025-05-12) ### Features * **chezmoi:** enhance fzf-lua chezmoi picker and add snacks.dasbhoard entry ([#5275](https://github.com/LazyVim/LazyVim/issues/5275)) ([759a19e](https://github.com/LazyVim/LazyVim/commit/759a19e785735eb8513b4f8d4483ec5ab1b75307)) * **keymaps:** show lang when opening treesitter inspect ([9c59668](https://github.com/LazyVim/LazyVim/commit/9c596681f684c549e69652a5c77a68bd5ecc93e3)) * **octo:** add support for snacks picker ([#5625](https://github.com/LazyVim/LazyVim/issues/5625)) ([16a7724](https://github.com/LazyVim/LazyVim/commit/16a772452a515790c3304b358dd66a618fda3260)) * **snippets:** mini.snippets standalone and blink.resubscribe ([#5507](https://github.com/LazyVim/LazyVim/issues/5507)) ([f2f2aea](https://github.com/LazyVim/LazyVim/commit/f2f2aea6722b530281b476c08ec60f2d320f1c3d)) ### Bug Fixes * **blink:** make sure to use `LazyVim.config.icons.kinds` ([#5668](https://github.com/LazyVim/LazyVim/issues/5668)) ([771089f](https://github.com/LazyVim/LazyVim/commit/771089f6928512ab0f431e9db04e7dc802a5e1a5)) * **blink:** remove unnecessary `sources` from `cmdline` ([#5620](https://github.com/LazyVim/LazyVim/issues/5620)) ([5b94baa](https://github.com/LazyVim/LazyVim/commit/5b94baa1d2e7d8ec7e9a9cab82fabd8c3655d369)) * **copilot-chat:** switch from deprecated picker integrations ([#5707](https://github.com/LazyVim/LazyVim/issues/5707)) ([b0334fd](https://github.com/LazyVim/LazyVim/commit/b0334fd57cdb920e03afab3c1940114ad43e4fbe)) * **mason:** rename and pin to v1 ([c20c402](https://github.com/LazyVim/LazyVim/commit/c20c4022958780617424a090eee2360d560eb939)) * **snacks.picker:** remove redundant leader-gc keymap. Closes [#5646](https://github.com/LazyVim/LazyVim/issues/5646) ([606b964](https://github.com/LazyVim/LazyVim/commit/606b96466eeb39b1c1bb576c9b99041b64705f43)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 926af9ee..5f6e5685 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.14.0" + ".": "14.15.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 90fbb7c5..873ac748 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [14.15.0](https://github.com/LazyVim/LazyVim/compare/v14.14.0...v14.15.0) (2025-05-12) + + +### Features + +* **chezmoi:** enhance fzf-lua chezmoi picker and add snacks.dasbhoard entry ([#5275](https://github.com/LazyVim/LazyVim/issues/5275)) ([759a19e](https://github.com/LazyVim/LazyVim/commit/759a19e785735eb8513b4f8d4483ec5ab1b75307)) +* **keymaps:** show lang when opening treesitter inspect ([9c59668](https://github.com/LazyVim/LazyVim/commit/9c596681f684c549e69652a5c77a68bd5ecc93e3)) +* **octo:** add support for snacks picker ([#5625](https://github.com/LazyVim/LazyVim/issues/5625)) ([16a7724](https://github.com/LazyVim/LazyVim/commit/16a772452a515790c3304b358dd66a618fda3260)) +* **snippets:** mini.snippets standalone and blink.resubscribe ([#5507](https://github.com/LazyVim/LazyVim/issues/5507)) ([f2f2aea](https://github.com/LazyVim/LazyVim/commit/f2f2aea6722b530281b476c08ec60f2d320f1c3d)) + + +### Bug Fixes + +* **blink:** make sure to use `LazyVim.config.icons.kinds` ([#5668](https://github.com/LazyVim/LazyVim/issues/5668)) ([771089f](https://github.com/LazyVim/LazyVim/commit/771089f6928512ab0f431e9db04e7dc802a5e1a5)) +* **blink:** remove unnecessary `sources` from `cmdline` ([#5620](https://github.com/LazyVim/LazyVim/issues/5620)) ([5b94baa](https://github.com/LazyVim/LazyVim/commit/5b94baa1d2e7d8ec7e9a9cab82fabd8c3655d369)) +* **copilot-chat:** switch from deprecated picker integrations ([#5707](https://github.com/LazyVim/LazyVim/issues/5707)) ([b0334fd](https://github.com/LazyVim/LazyVim/commit/b0334fd57cdb920e03afab3c1940114ad43e4fbe)) +* **mason:** rename and pin to v1 ([c20c402](https://github.com/LazyVim/LazyVim/commit/c20c4022958780617424a090eee2360d560eb939)) +* **snacks.picker:** remove redundant leader-gc keymap. Closes [#5646](https://github.com/LazyVim/LazyVim/issues/5646) ([606b964](https://github.com/LazyVim/LazyVim/commit/606b96466eeb39b1c1bb576c9b99041b64705f43)) + ## [14.14.0](https://github.com/LazyVim/LazyVim/compare/v14.13.0...v14.14.0) (2025-02-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 56f2397e..73c35f1f 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.14.0" -- x-release-please-version +M.version = "14.15.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 55e9944e2b1e152b5acdc9cc015978a905fc2966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baptiste=20GAZ=C3=89?= Date: Mon, 15 Sep 2025 07:15:34 +0200 Subject: [PATCH 344/496] fix(extras.ai.copilot): update status retrieval for lualine (#5900) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Following copilot.lua refactoring in https://github.com/zbirenbaum/copilot.lua/pull/431, lualine is unable to refresh. We face the following error ```  Error 15:55:22 msg_show.lua_error Error executing vim.schedule lua callback: ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:211: lualine: Failed to refresh statusline: .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: Error executing lua: ...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: attempt to index field 'status' (a nil value) stack traceback: ...m/lazy/LazyVim/lua/lazyvim/plugins/extras/ai/copilot.lua:54: in function 'status' ...cal/share/nvim/lazy/LazyVim/lua/lazyvim/util/lualine.lua:17: in function 'cond' ...l/share/nvim/lazy/lualine.nvim/lua/lualine/component.lua:275: in function 'draw' ...are/nvim/lazy/lualine.nvim/lua/lualine/utils/section.lua:26: in function 'draw_section' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:167: in function 'statusline' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:309: in function <...gaze/.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:290> [C]: in function 'nvim_win_call' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:415: in function 'refresh' .../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:491: in function <.../.local/share/nvim/lazy/lualine.nvim/lua/lualine.lua:490> [C]: in function 'pcall' ...share/nvim/lazy/lualine.nvim/lua/lualine/utils/utils.lua:214: in function '' vim/_editor.lua: in function ``` ## Related Issue(s) #5899 ## Screenshots ![Screenshot 2025-04-05 at 16 16 56](https://github.com/user-attachments/assets/3dc28dc6-1622-41ef-9e70-380a37064da4) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 4f1d54f2..deebcd7d 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -51,7 +51,7 @@ return { 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) From b68e478d2319adf32f72ddaa2a921ae5825790d4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 15 Sep 2025 05:16:35 +0000 Subject: [PATCH 345/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0e41c7bf..58aa462d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 May 12 +*LazyVim.txt* For Neovim Last change: 2025 September 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 1a729e2d4c4162501fe13224d669a654849deb36 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Mon, 15 Sep 2025 01:16:52 -0400 Subject: [PATCH 346/496] fix(blink): use .get method to access presets (#6183) ## Description Latest version of blink.cmp renamed the keymap.presets table which breaks LazyVim's access to presets. This fixes it by using the `presets.get()` method instead, which internally resolves to the correct table and looks like the right API. ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 10b2ee62..fe45b86b 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -109,7 +109,7 @@ return { 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", } From 10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690 Mon Sep 17 00:00:00 2001 From: Rabin Adhikari Date: Mon, 15 Sep 2025 07:18:00 +0200 Subject: [PATCH 347/496] fix(lang.python): enable venv-selector even when telescope is not available (#5829) ## Description Enable the `venv-selector` plugin even when the telescope plugin is not available. Now the `venv-selector` plugin supports `fzf-lua` and native selection, and by default, it chooses the previous, if available. More on this PR: https://github.com/linux-cultist/venv-selector.nvim/pull/188 Edit: Use the main branch of the repo since it is now the most updated branch ## Related Issue(s) None ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/python.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 4c098452..3298f6dd 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -114,11 +114,7 @@ return { { "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 = { @@ -126,7 +122,7 @@ return { }, }, }, - -- Call config for python files and load the cached venv automatically + -- Call config for Python files and load the cached venv automatically ft = "python", keys = { { "cv", ":VenvSelect", desc = "Select VirtualEnv", ft = "python" } }, }, From bed725a054ed3e8c8c56dce7e2100335e567cf01 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 07:44:00 +0200 Subject: [PATCH 348/496] fix(lsp): fixed deprecated warnings --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- lua/lazyvim/util/lsp.lua | 41 ++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 318ec911..748f5b29 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -54,7 +54,7 @@ function M.has(buffer, method) method = method:find("/") and method or "textDocument/" .. method local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do - if client.supports_method(method) then + if client:supports_method(method) then return true end end diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index e868dcf0..51aa471a 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -1,16 +1,51 @@ ---@class lazyvim.util.lsp local M = {} ----@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: lsp.Client):boolean} +---@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} + +--- Neovim 0.11 uses a lua class for clients, while older versions use a table. +--- Wraps older style clients to be compatible with the new style. +---@param client vim.lsp.Client +---@return vim.lsp.Client +local function wrap(client) + local meta = getmetatable(client) + if meta and meta.request then + return client + end + ---@diagnostic disable-next-line: undefined-field + if client.wrapped then + return client + end + local methods = { "request", "supports_method", "cancel_request", "notify" } + -- old style + return setmetatable({ wrapped = true }, { + __index = function(_, k) + if k == "supports_method" then + -- supports_method doesn't support the bufnr argument + return function(_, method) + return client[k](method) + end + end + if vim.tbl_contains(methods, k) then + return function(_, ...) + return client[k](...) + end + end + return client[k] + end, + }) +end ---@param opts? lsp.Client.filter function M.get_clients(opts) local ret = {} ---@type vim.lsp.Client[] if vim.lsp.get_clients then ret = vim.lsp.get_clients(opts) + ret = vim.tbl_map(wrap, ret) else ---@diagnostic disable-next-line: deprecated ret = vim.lsp.get_active_clients(opts) + ret = vim.tbl_map(wrap, ret) if opts and opts.method then ---@param client vim.lsp.Client ret = vim.tbl_filter(function(client) @@ -29,7 +64,7 @@ function M.on_attach(on_attach, name) local buffer = args.buf ---@type number local client = vim.lsp.get_client_by_id(args.data.client_id) if client and (not name or client.name == name) then - return on_attach(client, buffer) + return on_attach(wrap(client), buffer) end end, }) @@ -75,7 +110,7 @@ function M._check_methods(client, buffer) for method, clients in pairs(M._supports_method) do clients[client] = clients[client] or {} if not clients[client][buffer] then - if client.supports_method and client.supports_method(method, { bufnr = buffer }) then + if client.supports_method and client:supports_method(method, { bufnr = buffer }) then clients[client][buffer] = true vim.api.nvim_exec_autocmds("User", { pattern = "LspSupportsMethod", From 53a2de1c8b928655b50a6ecbbe28f53e42b14f82 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 10:55:48 +0200 Subject: [PATCH 349/496] chore(main): release 14.15.1 (#6420) :robot: I have created a release *beep* *boop* --- ## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) ### Bug Fixes * **blink:** use .get method to access presets ([#6183](https://github.com/LazyVim/LazyVim/issues/6183)) ([1a729e2](https://github.com/LazyVim/LazyVim/commit/1a729e2d4c4162501fe13224d669a654849deb36)) * **extras.ai.copilot:** update status retrieval for lualine ([#5900](https://github.com/LazyVim/LazyVim/issues/5900)) ([55e9944](https://github.com/LazyVim/LazyVim/commit/55e9944e2b1e152b5acdc9cc015978a905fc2966)) * **lang.python:** enable venv-selector even when telescope is not available ([#5829](https://github.com/LazyVim/LazyVim/issues/5829)) ([10e5bf5](https://github.com/LazyVim/LazyVim/commit/10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690)) * **lsp:** fixed deprecated warnings ([bed725a](https://github.com/LazyVim/LazyVim/commit/bed725a054ed3e8c8c56dce7e2100335e567cf01)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 10 ++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 5f6e5685..d4bbf7f7 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.15.0" + ".": "14.15.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 873ac748..3e2be0c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) + + +### Bug Fixes + +* **blink:** use .get method to access presets ([#6183](https://github.com/LazyVim/LazyVim/issues/6183)) ([1a729e2](https://github.com/LazyVim/LazyVim/commit/1a729e2d4c4162501fe13224d669a654849deb36)) +* **extras.ai.copilot:** update status retrieval for lualine ([#5900](https://github.com/LazyVim/LazyVim/issues/5900)) ([55e9944](https://github.com/LazyVim/LazyVim/commit/55e9944e2b1e152b5acdc9cc015978a905fc2966)) +* **lang.python:** enable venv-selector even when telescope is not available ([#5829](https://github.com/LazyVim/LazyVim/issues/5829)) ([10e5bf5](https://github.com/LazyVim/LazyVim/commit/10e5bf5c5b5fb4da0afbb2d4d2b75595502c9690)) +* **lsp:** fixed deprecated warnings ([bed725a](https://github.com/LazyVim/LazyVim/commit/bed725a054ed3e8c8c56dce7e2100335e567cf01)) + ## [14.15.0](https://github.com/LazyVim/LazyVim/compare/v14.14.0...v14.15.0) (2025-05-12) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 73c35f1f..d622dfdf 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.15.0" -- x-release-please-version +M.version = "14.15.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From e7ce65e1bb814f79ecb45bfeca934e997e0ee42c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 10:58:22 +0200 Subject: [PATCH 350/496] feat!: LazyVim now requires Neovim >= 0.11 See #6421 for more info --- lua/lazyvim/plugins/init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index c06fa9bc..a0faebcd 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,6 +1,7 @@ -if vim.fn.has("nvim-0.9.0") == 0 then +if vim.fn.has("nvim-0.11.0") == 0 then vim.api.nvim_echo({ - { "LazyVim requires Neovim >= 0.9.0\n", "ErrorMsg" }, + { "LazyVim requires Neovim >= 0.11.0\n", "ErrorMsg" }, + { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, }, true, {}) vim.fn.getchar() From 0e56786aa4772c427375a1bb86dc27baf08ded7b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 10:59:26 +0200 Subject: [PATCH 351/496] docs: update required Neovim version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4d379504..fd6a3fe0 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s ## ⚡️ 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/) **_(optional)_** - a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements) From 80573196a1e526d6906dfa7d1af2fcf71317c731 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 15 Sep 2025 09:00:43 +0000 Subject: [PATCH 352/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 58aa462d..0b861808 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -53,7 +53,7 @@ FEATURES *LazyVim-features* REQUIREMENTS *LazyVim-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 **(optional)** - a **C** compiler for `nvim-treesitter`. See here From 3516ae736a333185f6f17b70af20b088d04cbbb6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:04:50 +0200 Subject: [PATCH 353/496] fix: remove 0.9 compat --- lua/lazyvim/plugins/compat/nvim-0_9.lua | 41 ------------------------- lua/lazyvim/plugins/xtras.lua | 8 ----- 2 files changed, 49 deletions(-) delete mode 100644 lua/lazyvim/plugins/compat/nvim-0_9.lua diff --git a/lua/lazyvim/plugins/compat/nvim-0_9.lua b/lua/lazyvim/plugins/compat/nvim-0_9.lua deleted file mode 100644 index 81514ef8..00000000 --- a/lua/lazyvim/plugins/compat/nvim-0_9.lua +++ /dev/null @@ -1,41 +0,0 @@ --- Compatibility with Neovim 0.9 -return { - -- Use LuaSnip instead of native snippets - { "garymjr/nvim-snippets", enabled = false }, - { import = "lazyvim.plugins.extras.coding.luasnip" }, - - -- Use nvim-cmp instead of blink.cmp - { import = "lazyvim.plugins.extras.coding.nvim-cmp" }, - - -- Use mini.comment instead of ts-comments - { "folke/ts-comments.nvim", enabled = false }, - { import = "lazyvim.plugins.extras.coding.mini-comment" }, - - -- Use neodev-types with lazydev - { "folke/neodev.nvim", config = function() end }, - { - "folke/lazydev.nvim", - opts = function(_, opts) - opts.library = opts.library or {} - table.insert(opts.library, { "neodev.nvim/types/stable" }) - end, - config = function(_, opts) - -- force lazydev to load on Neovim 0.9 - require("lazydev.config").have_0_10 = true - require("lazydev").setup(opts) - end, - }, - { - "neovim/nvim-lspconfig", - dependencies = {}, - }, - - -- dummy import to save core imports - { - import = "foobar", - enabled = function() - LazyVim.plugin.save_core() - return false - end, - }, -} diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index bb061d80..3f71b2aa 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -42,15 +42,7 @@ end ---@type string[] extras = LazyVim.dedup(extras) -local version = vim.version() -local v = version.major .. "_" .. version.minor - -local compat = { "0_9" } - LazyVim.plugin.save_core() -if vim.tbl_contains(compat, v) then - table.insert(extras, 1, "lazyvim.plugins.compat.nvim-" .. v) -end if vim.g.vscode then table.insert(extras, 1, "lazyvim.plugins.extras.vscode") end From a7a94c50ac1ae5e791ce88fab455d5c6edee385e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:16:51 +0200 Subject: [PATCH 354/496] refactor: remove all <0.11 compat code --- lua/lazyvim/config/init.lua | 2 +- lua/lazyvim/config/keymaps.lua | 10 --- lua/lazyvim/config/options.lua | 14 ++-- lua/lazyvim/health.lua | 9 +-- lua/lazyvim/plugins/extras/editor/navic.lua | 2 +- lua/lazyvim/plugins/extras/lang/ruby.lua | 4 -- lua/lazyvim/plugins/extras/lang/rust.lua | 1 - lua/lazyvim/plugins/extras/lang/svelte.lua | 5 -- .../plugins/extras/lang/typescript.lua | 4 +- lua/lazyvim/plugins/extras/lang/yaml.lua | 10 --- lua/lazyvim/plugins/lsp/init.lua | 64 ++++++++----------- lua/lazyvim/util/lsp.lua | 54 ++-------------- lua/lazyvim/util/ui.lua | 5 -- 13 files changed, 40 insertions(+), 144 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d622dfdf..9e0903c2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -353,7 +353,7 @@ function M.get_defaults() { name = "telescope", extra = "editor.telescope" }, }, cmp = { - { name = "blink.cmp", extra = "coding.blink", enabled = vim.fn.has("nvim-0.10") == 1 }, + { name = "blink.cmp", extra = "coding.blink" }, { name = "nvim-cmp", extra = "coding.nvim-cmp" }, }, explorer = { diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index fbc7f5d1..acaf44d9 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -209,13 +209,3 @@ map("n", "", "tabnew", { desc = "New Tab" }) 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/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 0bbaacba..b5d444d0 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,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" @@ -95,6 +98,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" @@ -111,15 +115,5 @@ 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 diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 9fdc5a56..716c60a8 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -8,13 +8,10 @@ local error = vim.health.error or vim.health.report_error function M.check() start("LazyVim") - if vim.fn.has("nvim-0.9.0") == 1 then - ok("Using Neovim >= 0.9.0") - if vim.fn.has("nvim-0.10.0") == 0 then - warn("Use Neovim >= 0.10.0 for the best experience") - end + if vim.fn.has("nvim-0.11.0") == 1 then + ok("Using Neovim >= 0.11.0") else - error("Neovim >= 0.9.0 is required") + error("Neovim >= 0.11.0 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do diff --git a/lua/lazyvim/plugins/extras/editor/navic.lua b/lua/lazyvim/plugins/extras/editor/navic.lua index e25d1b51..91ec203c 100644 --- a/lua/lazyvim/plugins/extras/editor/navic.lua +++ b/lua/lazyvim/plugins/extras/editor/navic.lua @@ -8,7 +8,7 @@ return { 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/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index 4224e6d8..65620f4e 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -6,10 +6,6 @@ if lazyvim_docs then end local lsp = vim.g.lazyvim_ruby_lsp or "ruby_lsp" -if vim.fn.has("nvim-0.10") == 0 then - -- ruby_lsp does not work well with Neovim < 0.10 - lsp = vim.g.lazyvim_ruby_lsp or "solargraph" -end local formatter = vim.g.lazyvim_ruby_formatter or "rubocop" return { diff --git a/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index 0adddf18..eca1b597 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -56,7 +56,6 @@ return { { "mrcjkb/rustaceanvim", - version = vim.fn.has("nvim-0.10.0") == 0 and "^4" or false, ft = { "rust" }, opts = { server = { diff --git a/lua/lazyvim/plugins/extras/lang/svelte.lua b/lua/lazyvim/plugins/extras/lang/svelte.lua index 565e50e5..4060e2f3 100644 --- a/lua/lazyvim/plugins/extras/lang/svelte.lua +++ b/lua/lazyvim/plugins/extras/lang/svelte.lua @@ -31,11 +31,6 @@ return { desc = "Organize Imports", }, }, - capabilities = { - workspace = { - didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, - }, - }, }, }, }, diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index f7cc3231..f9132807 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -137,14 +137,14 @@ return { 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/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index 9a3aadb8..b460f3c5 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -55,16 +55,6 @@ return { }, }, }, - 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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index b5cba5f1..54f410fc 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -125,53 +125,39 @@ return { 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)) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 51aa471a..02ab8b6e 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -3,56 +3,10 @@ local M = {} ---@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} ---- Neovim 0.11 uses a lua class for clients, while older versions use a table. ---- Wraps older style clients to be compatible with the new style. ----@param client vim.lsp.Client ----@return vim.lsp.Client -local function wrap(client) - local meta = getmetatable(client) - if meta and meta.request then - return client - end - ---@diagnostic disable-next-line: undefined-field - if client.wrapped then - return client - end - local methods = { "request", "supports_method", "cancel_request", "notify" } - -- old style - return setmetatable({ wrapped = true }, { - __index = function(_, k) - if k == "supports_method" then - -- supports_method doesn't support the bufnr argument - return function(_, method) - return client[k](method) - end - end - if vim.tbl_contains(methods, k) then - return function(_, ...) - return client[k](...) - end - end - return client[k] - end, - }) -end - ---@param opts? lsp.Client.filter function M.get_clients(opts) local ret = {} ---@type vim.lsp.Client[] - if vim.lsp.get_clients then - ret = vim.lsp.get_clients(opts) - ret = vim.tbl_map(wrap, ret) - else - ---@diagnostic disable-next-line: deprecated - ret = vim.lsp.get_active_clients(opts) - ret = vim.tbl_map(wrap, ret) - if opts and opts.method then - ---@param client vim.lsp.Client - ret = vim.tbl_filter(function(client) - return client.supports_method(opts.method, { bufnr = opts.bufnr }) - end, ret) - end - end + ret = vim.lsp.get_clients(opts) return opts and opts.filter and vim.tbl_filter(opts.filter, ret) or ret end @@ -64,7 +18,7 @@ function M.on_attach(on_attach, name) local buffer = args.buf ---@type number local client = vim.lsp.get_client_by_id(args.data.client_id) if client and (not name or client.name == name) then - return on_attach(wrap(client), buffer) + return on_attach(client, buffer) end end, }) @@ -204,8 +158,8 @@ function M.formatter(opts) local clients = M.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) ---@param client vim.lsp.Client local ret = vim.tbl_filter(function(client) - return client.supports_method("textDocument/formatting") - or client.supports_method("textDocument/rangeFormatting") + return client:supports_method("textDocument/formatting") + or client:supports_method("textDocument/rangeFormatting") end, clients) ---@param client vim.lsp.Client return vim.tbl_map(function(client) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 3460b0ab..c8c899d5 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,11 +1,6 @@ ---@class lazyvim.util.ui local M = {} --- foldtext for Neovim < 0.10.0 -function M.foldtext() - return vim.api.nvim_buf_get_lines(0, vim.v.lnum - 1, vim.v.lnum, false)[1] -end - -- optimized treesitter foldexpr for Neovim >= 0.10.0 function M.foldexpr() local buf = vim.api.nvim_get_current_buf() From 02d0c9aebddb902d9c974a38bb44db9bae4eac6d Mon Sep 17 00:00:00 2001 From: flippette Date: Mon, 15 Sep 2025 12:21:32 +0300 Subject: [PATCH 355/496] fix(catppuccin): follow renamed integration (#6354) ## Description [This commit](https://github.com/catppuccin/nvim/commit/30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86) renamed a Catppuccin integration; this PR follows the rename. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index fa611bf4..4c41d492 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -58,7 +58,7 @@ return { 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, }, From e2ba6bb51107cbd076b53b49ed7be99fc2fa3991 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 11:24:41 +0200 Subject: [PATCH 356/496] fix(harpoon): keymaps for 1-9. Fixes #6319 --- lua/lazyvim/plugins/extras/editor/harpoon2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/harpoon2.lua b/lua/lazyvim/plugins/extras/editor/harpoon2.lua index 760d805a..699c2546 100644 --- a/lua/lazyvim/plugins/extras/editor/harpoon2.lua +++ b/lua/lazyvim/plugins/extras/editor/harpoon2.lua @@ -28,7 +28,7 @@ return { }, } - for i = 1, 5 do + for i = 1, 9 do table.insert(keys, { "" .. i, function() From 848dd3132af50f6d211d0c07166ea7c1a4259088 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:27:29 +0300 Subject: [PATCH 357/496] fix(neo-tree): import neo-tree Extra before edgy Extra (#5763) ## Description Seems like since the move of `neo-tree` into Extras, its plugin spec is loaded after edgy's and that causes problems. Give `neo-tree` Extra higher prio than edgy Extra. ## Related Issue(s) Fixes #5762 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/xtras.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 3f71b2aa..19a5c6da 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -3,7 +3,8 @@ local prios = { ["lazyvim.plugins.extras.test.core"] = 1, ["lazyvim.plugins.extras.dap.core"] = 1, ["lazyvim.plugins.extras.coding.nvim-cmp"] = 2, - ["lazyvim.plugins.extras.ui.edgy"] = 2, + ["lazyvim.plugins.extras.editor.neo-tree"] = 2, + ["lazyvim.plugins.extras.ui.edgy"] = 3, ["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.coding.blink"] = 5, ["lazyvim.plugins.extras.formatting.prettier"] = 10, From ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2 Mon Sep 17 00:00:00 2001 From: Sergey Kochetkov Date: Mon, 15 Sep 2025 11:45:00 +0200 Subject: [PATCH 358/496] fix(mini): update mini plugin references from echasnovski to nvim-mini (#6374) Updates all `mini.nvim` plugin references to use the new `nvim-mini` organization namespace instead of the legacy `echasnovski` namespace across all LazyVim configuration files. ## Description https://github.com/nvim-mini/mini.nvim/discussions/1970 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre --- lua/lazyvim/plugins/coding.lua | 4 ++-- .../plugins/extras/coding/mini-comment.lua | 2 +- .../plugins/extras/coding/mini-snippets.lua | 6 +++--- .../plugins/extras/coding/mini-surround.lua | 2 +- lua/lazyvim/plugins/extras/editor/leap.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-diff.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-files.lua | 2 +- lua/lazyvim/plugins/extras/editor/mini-move.lua | 2 +- .../plugins/extras/editor/snacks_picker.lua | 2 +- lua/lazyvim/plugins/extras/lang/go.lua | 2 +- lua/lazyvim/plugins/extras/lang/typescript.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-animate.lua | 2 +- .../plugins/extras/ui/mini-indentscope.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-starter.lua | 4 ++-- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 2 +- lua/lazyvim/plugins/extras/util/chezmoi.lua | 2 +- .../plugins/extras/util/mini-hipatterns.lua | 2 +- lua/lazyvim/plugins/extras/util/project.lua | 2 +- lua/lazyvim/plugins/ui.lua | 2 +- lua/lazyvim/util/plugin.lua | 15 ++++++++++++--- tests/minit.lua | 2 +- 21 files changed, 36 insertions(+), 27 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 0e614e48..8b242eb8 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,7 +1,7 @@ return { -- auto pairs { - "echasnovski/mini.pairs", + "nvim-mini/mini.pairs", event = "VeryLazy", opts = { modes = { insert = true, command = true, terminal = false }, @@ -29,7 +29,7 @@ return { -- Better text-objects { - "echasnovski/mini.ai", + "nvim-mini/mini.ai", event = "VeryLazy", opts = function() local ai = require("mini.ai") diff --git a/lua/lazyvim/plugins/extras/coding/mini-comment.lua b/lua/lazyvim/plugins/extras/coding/mini-comment.lua index 457787ef..19113d67 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-comment.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-comment.lua @@ -1,6 +1,6 @@ return { { - "echasnovski/mini.comment", + "nvim-mini/mini.comment", event = "VeryLazy", opts = { options = { diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua index d0a747a8..714d867d 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -4,14 +4,14 @@ if lazyvim_docs then 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 @@ -63,7 +63,7 @@ return { -- add mini.snippets desc = "Manage and expand snippets (alternative to Luasnip)", { - "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/lua/lazyvim/plugins/extras/coding/mini-surround.lua b/lua/lazyvim/plugins/extras/coding/mini-surround.lua index d8ff25c5..19c5de8f 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-surround.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-surround.lua @@ -3,7 +3,7 @@ -- to select the text inside, change or modify the surrounding characters, -- and more. return { - "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/lua/lazyvim/plugins/extras/editor/leap.lua b/lua/lazyvim/plugins/extras/editor/leap.lua index 19c8b331..3fe4c5e7 100644 --- a/lua/lazyvim/plugins/extras/editor/leap.lua +++ b/lua/lazyvim/plugins/extras/editor/leap.lua @@ -37,7 +37,7 @@ return { -- rename surround mappings from gs to gz to prevent conflict with leap { - "echasnovski/mini.surround", + "nvim-mini/mini.surround", optional = true, opts = { mappings = { diff --git a/lua/lazyvim/plugins/extras/editor/mini-diff.lua b/lua/lazyvim/plugins/extras/editor/mini-diff.lua index fe25c11e..ea2e216d 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-diff.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-diff.lua @@ -7,7 +7,7 @@ return { -- setup mini.diff { - "echasnovski/mini.diff", + "nvim-mini/mini.diff", event = "VeryLazy", keys = { { diff --git a/lua/lazyvim/plugins/extras/editor/mini-files.lua b/lua/lazyvim/plugins/extras/editor/mini-files.lua index 70a42940..30cc14fc 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-files.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-files.lua @@ -1,5 +1,5 @@ return { - "echasnovski/mini.files", + "nvim-mini/mini.files", opts = { windows = { preview = true, diff --git a/lua/lazyvim/plugins/extras/editor/mini-move.lua b/lua/lazyvim/plugins/extras/editor/mini-move.lua index aa8823ef..26e977fd 100644 --- a/lua/lazyvim/plugins/extras/editor/mini-move.lua +++ b/lua/lazyvim/plugins/extras/editor/mini-move.lua @@ -1,6 +1,6 @@ return { { - "echasnovski/mini.move", + "nvim-mini/mini.move", event = "VeryLazy", opts = {}, }, diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 93f32fab..591da5ea 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -178,7 +178,7 @@ return { end, }, { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/lua/lazyvim/plugins/extras/lang/go.lua b/lua/lazyvim/plugins/extras/lang/go.lua index ff8def2e..77536fea 100644 --- a/lua/lazyvim/plugins/extras/lang/go.lua +++ b/lua/lazyvim/plugins/extras/lang/go.lua @@ -139,7 +139,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".go-version"] = { glyph = "", hl = "MiniIconsBlue" }, diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index f9132807..3830f795 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -263,7 +263,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".eslintrc.js"] = { glyph = "󰱺", hl = "MiniIconsYellow" }, diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index bbd3e587..5a3fdef6 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -10,7 +10,7 @@ return { -- setup animate { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", event = "VeryLazy", cond = vim.g.neovide == nil, opts = function(_, opts) diff --git a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua index 91ec1d45..ea266b24 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-indentscope.lua @@ -3,7 +3,7 @@ return { -- code, this highlights the current level of indentation, and animates -- the highlighting. { - "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/lua/lazyvim/plugins/extras/ui/mini-starter.lua b/lua/lazyvim/plugins/extras/ui/mini-starter.lua index c1bd7bc1..51444df5 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-starter.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-starter.lua @@ -5,7 +5,7 @@ return { -- enable mini.starter { - "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() @@ -67,7 +67,7 @@ return { 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/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua index 070d2623..2ca27780 100644 --- a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -9,7 +9,7 @@ return { specs = { -- disable mini.animate cursor { - "echasnovski/mini.animate", + "nvim-mini/mini.animate", optional = true, opts = { cursor = { enable = false }, diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 6c88fc45..2c1b2f31 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -135,7 +135,7 @@ return { -- Filetype icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", opts = { file = { [".chezmoiignore"] = { glyph = "", hl = "MiniIconsGrey" }, diff --git a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua index 287c0d77..b8fa4d1a 100644 --- a/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua +++ b/lua/lazyvim/plugins/extras/util/mini-hipatterns.lua @@ -4,7 +4,7 @@ local M = {} M.hl = {} M.plugin = { - "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/lua/lazyvim/plugins/extras/util/project.lua b/lua/lazyvim/plugins/extras/util/project.lua index 01a25bc2..dafaa594 100644 --- a/lua/lazyvim/plugins/extras/util/project.lua +++ b/lua/lazyvim/plugins/extras/util/project.lua @@ -134,7 +134,7 @@ return { }, { - "echasnovski/mini.starter", + "nvim-mini/mini.starter", optional = true, opts = function(_, opts) local items = { diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 7985825a..9dd7254b 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -245,7 +245,7 @@ return { -- icons { - "echasnovski/mini.icons", + "nvim-mini/mini.icons", lazy = true, opts = { file = { diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index 9fede549..ff3f3634 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -1,3 +1,4 @@ +local Meta = require("lazy.core.meta") local Plugin = require("lazy.core.plugin") ---@class lazyvim.util.plugin @@ -102,9 +103,17 @@ function M.fix_imports() end function M.fix_renames() - Plugin.Spec.add = LazyVim.inject.args(Plugin.Spec.add, function(self, plugin) + ---@param plugin LazyPluginSpec + Meta.add = LazyVim.inject.args(Meta.add, function(self, plugin) if type(plugin) == "table" then - if M.renames[plugin[1]] then + local name = plugin[1] + if not name then + return + end + if name:find("echasnovski") then + M.renames[name] = name:gsub("echasnovski", "nvim-mini") + end + if M.renames[name] then LazyVim.warn( ("Plugin `%s` was renamed to `%s`.\nPlease update your config for `%s`"):format( plugin[1], @@ -113,7 +122,7 @@ function M.fix_renames() ), { title = "LazyVim" } ) - plugin[1] = M.renames[plugin[1]] + plugin[1] = M.renames[name] end end end) diff --git a/tests/minit.lua b/tests/minit.lua index 807a2ac5..c7240d96 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -11,6 +11,6 @@ require("lazy.minit").setup({ { "nvim-treesitter/nvim-treesitter" }, { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, { "mason-org/mason.nvim", version = "^1.0.0" }, - { "echasnovski/mini.icons", opts = {} }, + { "nvim-mini/mini.icons", opts = {} }, }, }) From 3aa2916569df2664cb68e1c7c38882868f36f8d0 Mon Sep 17 00:00:00 2001 From: S1M0N38 Date: Mon, 15 Sep 2025 11:49:11 +0200 Subject: [PATCH 359/496] fix(extras): disable blink path source in CopilotChat (#5666) (#5754) Fix #5666 with the answer given in the discussion. - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: svirschevskiy --- .../plugins/extras/ai/copilot-chat.lua | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index 58169b1e..fbf4ee39 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -85,4 +85,24 @@ return { }) end, }, + + -- Blink integration + { + "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, + }, + }, + }, + }, + }, } From 773f28b4912d5505a21da9686d56ab7cf41a9be7 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Mon, 15 Sep 2025 13:08:19 +0300 Subject: [PATCH 360/496] fix(mason): migrate to mason v2 (#6053) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description `mason-lspconfig` v2 made changes to conform with latest Neovim `vim.lsp.config`/`vim.lsp.enable` API. - Lock `mason` and `mason-lspconfig` to v1 versions for Neovim <0.11 and latest HEAD for Neovim >=0.11. - Change `:get_install_path()` method in LazyVim to use `LazyVim.get_pkg_path()` and also update name references to new ones. - Change `nvim-lspconfig` from `LazyFile` to `{ "BufReadPre", "BufNewFile", "BufWritePre" }` for Neovim >=0.11, since on `BufReadPost` the LSP would not attach on the first buffer. Previously the `setup.handlers()` function from `mason-lspconfig` would take care of that, but that has been removed on v2. I fail to think if there's a better way to handle this. Most of the changes in `/lsp/init.lua` are thanks to @williamboman comment [here](https://github.com/LazyVim/LazyVim/pull/6041#issuecomment-2857266471). I've also seen that both `mason-lspconfig` and `rustaceanvim` now have as minimum requirements Neovim >=0.11. As such I would suggest, instead of all the conditional checks for Neovim versions to create a stable release where we pin `mason` and `mason-lspconfig` to v1 versions and then only incorporate William's suggestions in a new release and mention in the README that users who are on Neovim <0.11 should use the stable release where the plugin versions are pinned to v1. Not sure how you want to tackle this, so this is merely just a suggestion from my part. Both #6041 and #6045 tackle only with the new name references and the offending line that was causing the error, but don't take into consideration the LSP servers configurations. `opts.setup` would not execute on both, since that was handled by `setup_handlers()` function in the past. I checked with Typescript lang and with those PRs there are no Javascript settings in `vtsls` (by checking with `:=LazyVim.opts("nvim-lspconfig").servers.vtsls`). #6045 also tried to change the method `:get_install_pkg()` by using `vim.fn.exepath`, but to my understanding that only returns the binary path not the package installation path and that is later concatenated to find other paths, which I believe is not correct. PS: There are 2 commits, because my LazyVim fork was not up to date and updated it and then merged the branch I had into a new branch. Sorry if that causes any inconvenience. ## Related Issue(s) Fixes #6039 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: Folke Lemaitre Co-authored-by: William Boman Co-authored-by: Luis Durão --- lua/lazyvim/plugins/extras/lang/java.lua | 11 +--- lua/lazyvim/plugins/extras/lang/php.lua | 5 +- lua/lazyvim/plugins/extras/lang/rust.lua | 10 +--- lua/lazyvim/plugins/lsp/init.lua | 71 +++++++++++++----------- lua/lazyvim/util/init.lua | 17 ++++-- tests/extras/extra_spec.lua | 3 +- tests/minit.lua | 4 +- 7 files changed, 63 insertions(+), 58 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 8098b6b3..9e5047cf 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -87,8 +87,7 @@ return { 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 { @@ -151,17 +150,13 @@ return { 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/lua/lazyvim/plugins/extras/lang/php.lua b/lua/lazyvim/plugins/extras/lang/php.lua index 5a2835aa..04469223 100644 --- a/lua/lazyvim/plugins/extras/lang/php.lua +++ b/lua/lazyvim/plugins/extras/lang/php.lua @@ -48,11 +48,10 @@ return { 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/lua/lazyvim/plugins/extras/lang/rust.lua b/lua/lazyvim/plugins/extras/lang/rust.lua index eca1b597..b66dde9b 100644 --- a/lua/lazyvim/plugins/extras/lang/rust.lua +++ b/lua/lazyvim/plugins/extras/lang/rust.lua @@ -110,13 +110,9 @@ return { }, 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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 54f410fc..b1d6a23d 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -2,7 +2,7 @@ return { -- lspconfig { "neovim/nvim-lspconfig", - event = "LazyFile", + event = { "BufReadPre", "BufNewFile", "BufWritePre" }, dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -174,31 +174,35 @@ return { opts.capabilities or {} ) - local function setup(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 - end - elseif opts.setup["*"] then - if opts.setup["*"](server, server_opts) then - return - end - end - require("lspconfig")[server].setup(server_opts) - end - -- 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) + 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 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 + 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 + vim.lsp.enable(server) + return true + end + return false end local ensure_installed = {} ---@type string[] @@ -207,24 +211,31 @@ return { 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 @@ -278,8 +289,4 @@ return { end) end, }, - - -- pin to v1 for now - { "mason-org/mason.nvim", version = "^1.0.0" }, - { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, } diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 4b49f539..339fdadb 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -253,11 +253,18 @@ function M.get_pkg_path(pkg, path, opts) opts = opts or {} opts.warn = opts.warn == nil and true or opts.warn path = path or "" - local ret = root .. "/packages/" .. pkg .. "/" .. path - if opts.warn and not vim.loop.fs_stat(ret) and not require("lazy.core.config").headless() then - M.warn( - ("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format(pkg, path) - ) + local ret = vim.fs.normalize(root .. "/packages/" .. pkg .. "/" .. path) + if opts.warn then + vim.schedule(function() + if not require("lazy.core.config").headless() and not vim.loop.fs_stat(ret) then + M.warn( + ("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format( + pkg, + path + ) + ) + end + end) end return ret end diff --git a/tests/extras/extra_spec.lua b/tests/extras/extra_spec.lua index 2afb6b94..2a4a9bc8 100644 --- a/tests/extras/extra_spec.lua +++ b/tests/extras/extra_spec.lua @@ -26,7 +26,8 @@ describe("Extra", function() return not vim.tbl_contains(ignore, extra.modname) end, extras) - local lsp_to_pkg = require("mason-lspconfig.mappings.server").lspconfig_to_package + local lsp_to_pkg = {} + lsp_to_pkg = require("mason-lspconfig.mappings").get_mason_map().lspconfig_to_package local tsspec = Plugin.Spec.new({ import = "lazyvim.plugins.treesitter", diff --git a/tests/minit.lua b/tests/minit.lua index c7240d96..41907e75 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -9,8 +9,8 @@ require("lazy.minit").setup({ { dir = vim.uv.cwd() }, { "LazyVim/starter" }, { "nvim-treesitter/nvim-treesitter" }, - { "mason-org/mason-lspconfig.nvim", version = "^1.0.0" }, - { "mason-org/mason.nvim", version = "^1.0.0" }, + { "mason-org/mason-lspconfig.nvim" }, + { "mason-org/mason.nvim" }, { "nvim-mini/mini.icons", opts = {} }, }, }) From 5e7da4384d2ebd1a5f48119d0793f54a447f2db9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 12:12:43 +0200 Subject: [PATCH 361/496] docs: updated news --- NEWS.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NEWS.md b/NEWS.md index 9d00ddd6..9fc3f95a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,17 @@ # 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! From 0d27e89a362d541fadc9713dbdcea86c124b93de Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 16:28:46 +0200 Subject: [PATCH 362/496] refactor(lsp): cleanup lsp config --- lua/lazyvim/plugins/extras/lang/ruby.lua | 3 +- lua/lazyvim/plugins/lsp/init.lua | 70 ++++++++++-------------- 2 files changed, 31 insertions(+), 42 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/ruby.lua b/lua/lazyvim/plugins/extras/lang/ruby.lua index 65620f4e..e9c68d11 100644 --- a/lua/lazyvim/plugins/extras/lang/ruby.lua +++ b/lua/lazyvim/plugins/extras/lang/ruby.lua @@ -21,9 +21,8 @@ return { }, { "neovim/nvim-lspconfig", - ---@class PluginLspOpts + ---@type PluginLspOpts opts = { - ---@type lspconfig.options servers = { ruby_lsp = { enabled = lsp == "ruby_lsp", diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index b1d6a23d..f4bdce22 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -63,7 +63,7 @@ return { 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 @@ -99,7 +99,7 @@ return { }, -- 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) @@ -149,6 +149,7 @@ return { 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 @@ -157,48 +158,42 @@ return { 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 @@ -206,36 +201,31 @@ return { 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 5668ad72ca806b3a7915bb7b35dcc5cccfe774f7 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:13:40 +0200 Subject: [PATCH 363/496] feat(extras): added an experimental extra for the treesitter `main` branch --- NEWS.md | 11 +-- .../plugins/extras/ui/treesitter-main.lua | 87 +++++++++++++++++++ 2 files changed, 89 insertions(+), 9 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/ui/treesitter-main.lua diff --git a/NEWS.md b/NEWS.md index 9fc3f95a..37221e79 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,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 @@ -122,7 +124,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 @@ -135,7 +136,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 @@ -173,7 +173,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` @@ -191,7 +190,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 @@ -232,9 +230,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, ...)_ @@ -253,18 +249,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/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua new file mode 100644 index 00000000..934d311a --- /dev/null +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -0,0 +1,87 @@ +return { + { + "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" }, + enabled = function() + if vim.fn.executable("tree-sitter") == 0 then + LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + return false + end + return true + end, + init = function() end, + ---@param opts TSConfig + config = function(_, opts) + 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/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, + }, +} From 44ade7fdea98a0356c64ff9edaf2534547b958bc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:15:51 +0200 Subject: [PATCH 364/496] fix(lsp): buffer should be second arg for supports_method --- lua/lazyvim/util/lsp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 02ab8b6e..074346d3 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -64,7 +64,7 @@ function M._check_methods(client, buffer) for method, clients in pairs(M._supports_method) do clients[client] = clients[client] or {} if not clients[client][buffer] then - if client.supports_method and client:supports_method(method, { bufnr = buffer }) then + if client.supports_method and client:supports_method(method, buffer) then clients[client][buffer] = true vim.api.nvim_exec_autocmds("User", { pattern = "LspSupportsMethod", @@ -107,7 +107,7 @@ function M.on_supports_method(method, fn) }) end ----@return _.lspconfig.options +---@return vim.lsp.Config function M.get_config(server) local configs = require("lspconfig.configs") return rawget(configs, server) From 96316e5a69b4cc45311f5b7225e7d7bea1f977ee Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 17:17:21 +0200 Subject: [PATCH 365/496] fix(treesitter-main): move exe check to config --- lua/lazyvim/plugins/extras/ui/treesitter-main.lua | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 934d311a..8987b732 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -6,16 +6,13 @@ return { build = ":TSUpdate", lazy = true, cmd = { "TSUpdate", "TSInstall", "TSLog", "TSUninstall" }, - enabled = function() - if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") - return false - end - return true - end, 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 From 167d39b2bef24024be1a48267e14cc6c82146462 Mon Sep 17 00:00:00 2001 From: Jinfeng Guo Date: Mon, 15 Sep 2025 23:19:23 +0800 Subject: [PATCH 366/496] fix(clangd): rewrite the root_dir function (#6060) ## Description Nvim 0.11 had some breaking changes in lsp related parts. And one of them is that if the root_dir field of lsp config is a function, the bufnr and a function would be passed instead of the file name in nvim 0.10. As a result, the configurations of extra.lang.clangd broke. However, before the breaking changes of mason and mason-lspconfig, the configurations of clangd still worked. So maybe what really broke the configurations is mason-lspconfig, which uses a new way to enable lsp in v2. I rewrite the root_dir function and make it work both on 0.11 and 0.10. It would check whether the first argument is a string to decide whether to adapt the new interface. To test whether it works, you can just add a plugin/clangd.lua to you personal config with the content below: ```lua return { "neovim/nvim-lspconfig", opts = { servers = { clangd = { 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, }, }, }, } ``` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clangd.lua | 33 ++++++++++++++-------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 33dc4ed4..19f3d1c2 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -60,18 +60,27 @@ return { 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" }, From 23b9cdeb3471b655532e9884fa2dd36ee83062d5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 20:42:10 +0200 Subject: [PATCH 367/496] fix(lspconfig): remove all references to lspconfig. Closes #6426 --- lua/lazyvim/plugins/extras/lang/clangd.lua | 38 +++++++++----------- lua/lazyvim/plugins/extras/lang/java.lua | 4 +-- lua/lazyvim/plugins/extras/lang/ocaml.lua | 20 +++++------ lua/lazyvim/plugins/extras/lang/r.lua | 6 +--- lua/lazyvim/plugins/extras/lang/tailwind.lua | 3 +- lua/lazyvim/plugins/lsp/init.lua | 25 ++++++++----- lua/lazyvim/util/lsp.lua | 33 ----------------- 7 files changed, 44 insertions(+), 85 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 19f3d1c2..9417b257 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -60,28 +60,22 @@ return { 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/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 9e5047cf..43c9442f 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,9 +91,7 @@ return { 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, + root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index 83f72a72..a8de495c 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,17 +26,15 @@ return { "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/lua/lazyvim/plugins/extras/lang/r.lua b/lua/lazyvim/plugins/extras/lang/r.lua index 6320f624..f8feb0ea 100644 --- a/lua/lazyvim/plugins/extras/lang/r.lua +++ b/lua/lazyvim/plugins/extras/lang/r.lua @@ -65,11 +65,7 @@ return { 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/lua/lazyvim/plugins/extras/lang/tailwind.lua b/lua/lazyvim/plugins/extras/lang/tailwind.lua index cbdd612e..3c7b3fac 100644 --- a/lua/lazyvim/plugins/extras/lang/tailwind.lua +++ b/lua/lazyvim/plugins/extras/lang/tailwind.lua @@ -28,11 +28,10 @@ return { }, 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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index f4bdce22..335da15e 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -228,15 +228,22 @@ return { }) 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 + ---@param markers string[] + local resolve = function(server, markers) + 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 + local root = vim.fs.root(bufnr, markers) + return root and on_dir(root) + end + end, + }) + end + resolve("denols", vim.lsp.config.denols.root_markers) + resolve("vtsls", vim.lsp.config.vtsls.root_markers) end end, }, diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 074346d3..632a7b9f 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -107,39 +107,6 @@ function M.on_supports_method(method, fn) }) end ----@return vim.lsp.Config -function M.get_config(server) - local configs = require("lspconfig.configs") - return rawget(configs, server) -end - ----@return {default_config:lspconfig.Config} -function M.get_raw_config(server) - local ok, ret = pcall(require, "lspconfig.configs." .. server) - if ok then - return ret - end - return require("lspconfig.server_configurations." .. server) -end - -function M.is_enabled(server) - local c = M.get_config(server) - return c and c.enabled ~= false -end - ----@param server string ----@param cond fun( root_dir, config): boolean -function M.disable(server, cond) - local util = require("lspconfig.util") - local def = M.get_config(server) - ---@diagnostic disable-next-line: undefined-field - def.document_config.on_new_config = util.add_hook_before(def.document_config.on_new_config, function(config, root_dir) - if cond(root_dir, config) then - config.enabled = false - end - end) -end - ---@param opts? LazyFormatter| {filter?: (string|lsp.Client.filter)} function M.formatter(opts) opts = opts or {} From 271fecb067ec223a8eab90c1abd1162e9ebae5df Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 20:44:14 +0200 Subject: [PATCH 368/496] fix(jdtls): root_dir --- lua/lazyvim/plugins/extras/lang/java.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 43c9442f..75971afb 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,7 +91,6 @@ return { table.insert(cmd, string.format("--jvm-arg=-javaagent:%s", lombok_jar)) end return { - root_dir = vim.fs.root(0, vim.lsp.config.jdtls.root_markers), -- How to find the project name for a given root dir. project_name = function(root_dir) @@ -165,12 +164,10 @@ return { 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, }, From 2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 21:00:19 +0200 Subject: [PATCH 369/496] fix(lsp): properly ambiguate denols vs vtsls --- lua/lazyvim/plugins/lsp/init.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 335da15e..48c96059 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -230,20 +230,24 @@ return { if vim.lsp.is_enabled("denols") and vim.lsp.is_enabled("vtsls") then ---@param server string - ---@param markers string[] - local resolve = function(server, markers) + 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 - local root = vim.fs.root(bufnr, markers) - return root and on_dir(root) + 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", vim.lsp.config.denols.root_markers) - resolve("vtsls", vim.lsp.config.vtsls.root_markers) + resolve("denols") + resolve("vtsls") end end, }, From 2f309fc8b5bf93af25293c1e4688d409de718a36 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 15 Sep 2025 21:14:42 +0200 Subject: [PATCH 370/496] perf(treesitter-main): only enable highlighting for installed treesitter langs --- lua/lazyvim/plugins/extras/ui/treesitter-main.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 8987b732..1571cc03 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -28,6 +28,7 @@ return { if #install > 0 then TS.install(install, { summary = true }) + vim.list_extend(installed, install) end -- backwards compatibility with the old treesitter config for indent @@ -38,8 +39,11 @@ return { -- 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 From 14d2a9baa1306bd0969112fcf8f69a11840cc5e6 Mon Sep 17 00:00:00 2001 From: "Md. Iftakhar Awal Chowdhury" <42291930+AtifChy@users.noreply.github.com> Date: Tue, 16 Sep 2025 01:17:45 +0600 Subject: [PATCH 371/496] fix(schemastore): use `before_init` instead of `on_new_config` to load schema store (#6427) ## Description `vim.lsp.config` doesn't provide `on_new_config`, which is causing `b0o/SchemaStore.nvim` fail to load. This PR replaces `on_new_config` with `before_init` fixing the issue. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/json.lua | 2 +- lua/lazyvim/plugins/extras/lang/yaml.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/json.lua b/lua/lazyvim/plugins/extras/lang/json.lua index d51a6b19..453a6a77 100644 --- a/lua/lazyvim/plugins/extras/lang/json.lua +++ b/lua/lazyvim/plugins/extras/lang/json.lua @@ -27,7 +27,7 @@ return { 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/lua/lazyvim/plugins/extras/lang/yaml.lua b/lua/lazyvim/plugins/extras/lang/yaml.lua index b460f3c5..9d8135e7 100644 --- a/lua/lazyvim/plugins/extras/lang/yaml.lua +++ b/lua/lazyvim/plugins/extras/lang/yaml.lua @@ -29,7 +29,7 @@ return { }, }, -- 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 011a35ccb810cbe5d25def9cc92271e8423feb74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:05 +0200 Subject: [PATCH 372/496] feat(blink): enable blink cmdline completions --- lua/lazyvim/plugins/extras/coding/blink.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index fe45b86b..9f5b2588 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -31,7 +31,7 @@ return { version = not vim.g.lazyvim_blink_main and "*", }, }, - event = "InsertEnter", + event = { "InsertEnter", "CmdlineEnter" }, ---@module 'blink.cmp' ---@type blink.cmp.Config @@ -41,6 +41,7 @@ return { 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 @@ -83,6 +84,19 @@ return { cmdline = { enabled = false, + 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 = { From 4961b3d4d4b2999816e978c3ea4ef7c320e4206d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:20 +0200 Subject: [PATCH 373/496] perf(blink): only enable lazydev in lua files --- lua/lazyvim/plugins/extras/coding/blink.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 9f5b2588..23ad6a80 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -51,6 +51,7 @@ return { -- adjusts spacing to ensure icons are aligned nerd_font_variant = "mono", }, + completion = { accept = { -- experimental auto-brackets support @@ -185,8 +186,9 @@ return { "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 ff7c12c48e23941ffd9a7bbe61857624929ae9da Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 08:34:57 +0200 Subject: [PATCH 374/496] feat(blink): enable cmdline completions --- lua/lazyvim/plugins/extras/coding/blink.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 23ad6a80..e8a4d9c5 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -84,7 +84,7 @@ return { }, cmdline = { - enabled = false, + enabled = true, keymap = { preset = "cmdline", -- [""] = { "show", "accept" }, From 45181a76ddcd89da209d2260f29e6d87f7cea511 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 16 Sep 2025 06:35:28 +0000 Subject: [PATCH 375/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0b861808..a2b1b64c 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 15 +*LazyVim.txt* For Neovim Last change: 2025 September 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 44cc0635bc3d2ccc55eb76bc7668092befcf0536 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 16 Sep 2025 12:45:46 +0300 Subject: [PATCH 376/496] fix(ocaml): use `root_dir` instead of `root_markers` for globs support (#6428) ## Description As per [comment](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5#r165830889), use `root_dir` with `util.root_pattern` instead of `root_markers` for globs support. I don't actually do Ocaml to thoroughly test it, but it should work in theory :stuck_out_tongue: ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/ocaml.lua | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index a8de495c..0e733a4a 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,15 +26,12 @@ return { "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, }, }, }, From c05392186e9e540d4af169922c333b5baa583cbe Mon Sep 17 00:00:00 2001 From: qw457812 <37494864+qw457812@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:46:26 +0800 Subject: [PATCH 377/496] fix(jdtls): root_dir (#6429) Fix: ``` Failed to run `config` for nvim-jdtls ...im/lazy/LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113: attempt to call field 'root_dir' (a nil value) - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:113 _in_ **full_cmd** - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:169 _in_ **attach_jdtls** - /LazyVim/lua/lazyvim/plugins/extras/lang/java.lua:286 _in_ **config** - ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:36 - vim/shared.lua:0 - ~/.local/share/bob/nightly/share/nvim/runtime/filetype.lua:35 - vim/_editor.lua:0 _in_ **cmd** - /persistence.nvim/lua/persistence/init.lua:88 _in_ **load** - lua:1 - vim/_editor.lua:0 _in_ **action** - /snacks.nvim/lua/snacks/dashboard.lua:693 ``` ## Description ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 75971afb..e4926521 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,6 +91,7 @@ return { 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) @@ -164,10 +165,12 @@ return { 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, }, From cc4a3e556424dba784b41ec3bd92eeb7b62746bc Mon Sep 17 00:00:00 2001 From: Christoph Schmidpeter <3390179+ChristophSchmidpeter@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:47:05 +0200 Subject: [PATCH 378/496] fix(lang.haskell): prevent Haskell extras from installing telescope.nvim (#6419) ## Description Installing the Haskell extras currently installs telescope.nvim as well, since the dependency is not marked optional. This marks it optional so telescope.nvim is no longer pulled in automatically. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: Christoph Schmidpeter --- lua/lazyvim/plugins/extras/lang/haskell.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/haskell.lua b/lua/lazyvim/plugins/extras/lang/haskell.lua index a599d310..48634f2d 100644 --- a/lua/lazyvim/plugins/extras/lang/haskell.lua +++ b/lua/lazyvim/plugins/extras/lang/haskell.lua @@ -70,7 +70,7 @@ return { "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") From b926e7db417bc7b0e80feb778bed7924ffe8e85d Mon Sep 17 00:00:00 2001 From: qw457812 <37494864+qw457812@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:58:24 +0800 Subject: [PATCH 379/496] fix(treesitter-main): set vim.bo.indentexpr in FileType autocmd (#6430) ## Description Ref: https://github.com/nvim-treesitter/nvim-treesitter/blob/7aa24acae3a288e442e06928171f360bbdf75ba4/scripts/minimal_init.lua#L19-L24 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/ui/treesitter-main.lua | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua index 1571cc03..bb22aabb 100644 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua @@ -31,19 +31,21 @@ return { 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 6e1de74597fa07ea805920da370f9d998740bc5e Mon Sep 17 00:00:00 2001 From: EJ <8498296+maddawik@users.noreply.github.com> Date: Tue, 16 Sep 2025 06:47:51 -0400 Subject: [PATCH 380/496] fix(refactoring): update funcs to return, add `expr=true`, operator mode (#5882) ## Description This fixes the keymaps for `refactoring.nvim` to work with the latest version (see issue linked below) ## Related Issue(s) - #5881 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- .../plugins/extras/editor/refactoring.lua | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/refactoring.lua b/lua/lazyvim/plugins/extras/editor/refactoring.lua index 832940e9..11ab3786 100644 --- a/lua/lazyvim/plugins/extras/editor/refactoring.lua +++ b/lua/lazyvim/plugins/extras/editor/refactoring.lua @@ -30,34 +30,39 @@ return { "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", @@ -71,6 +76,7 @@ return { function() require("refactoring").debug.print_var({ normal = true }) end, + mode = { "n", "x" }, desc = "Debug Print Variable", }, { @@ -83,33 +89,36 @@ return { { "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", }, }, From 9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 15:41:20 +0200 Subject: [PATCH 381/496] fix(lsp): properly register capabilities with new vim.lsp.config. Not needed for blink --- lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 3 +++ lua/lazyvim/plugins/lsp/init.lua | 17 +++++------------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index cdada25a..54bfbf7c 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -25,6 +25,9 @@ return { -- } -- ``` 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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 48c96059..d0c9ced9 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -63,7 +63,7 @@ return { 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 @@ -163,14 +163,9 @@ return { 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") @@ -181,9 +176,7 @@ return { 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 f4e64eea45d9aa171e057ca328f2b9459c40404a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 17:34:17 +0200 Subject: [PATCH 382/496] refactor(lsp): remove `LazyVim.lsp.get_clients` --- lua/lazyvim/plugins/extras/ai/copilot.lua | 2 +- lua/lazyvim/plugins/extras/editor/fzf.lua | 2 +- lua/lazyvim/plugins/extras/linting/eslint.lua | 2 +- lua/lazyvim/plugins/lsp/keymaps.lua | 4 ++-- lua/lazyvim/util/lsp.lua | 17 ++++------------- lua/lazyvim/util/root.lua | 4 ++-- 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index deebcd7d..48870743 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -49,7 +49,7 @@ return { 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/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index e9177457..31297b94 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -122,7 +122,7 @@ return { -- 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/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 01f134e2..92c670d4 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -27,7 +27,7 @@ return { 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({ diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 748f5b29..9cde08c1 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -52,7 +52,7 @@ function M.has(buffer, method) return false end method = method:find("/") and method or "textDocument/" .. method - local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) + local clients = vim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do if client:supports_method(method) then return true @@ -69,7 +69,7 @@ function M.resolve(buffer) end local spec = vim.tbl_extend("force", {}, M.get()) local opts = LazyVim.opts("nvim-lspconfig") - local clients = LazyVim.lsp.get_clients({ bufnr = buffer }) + local clients = vim.lsp.get_clients({ bufnr = buffer }) for _, client in ipairs(clients) do local maps = opts.servers[client.name] and opts.servers[client.name].keys or {} vim.list_extend(spec, maps) diff --git a/lua/lazyvim/util/lsp.lua b/lua/lazyvim/util/lsp.lua index 632a7b9f..a857422f 100644 --- a/lua/lazyvim/util/lsp.lua +++ b/lua/lazyvim/util/lsp.lua @@ -1,15 +1,6 @@ ---@class lazyvim.util.lsp local M = {} ----@alias lsp.Client.filter {id?: number, bufnr?: number, name?: string, method?: string, filter?:fun(client: vim.lsp.Client):boolean} - ----@param opts? lsp.Client.filter -function M.get_clients(opts) - local ret = {} ---@type vim.lsp.Client[] - ret = vim.lsp.get_clients(opts) - return opts and opts.filter and vim.tbl_filter(opts.filter, ret) or ret -end - ---@param on_attach fun(client:vim.lsp.Client, buffer) ---@param name? string function M.on_attach(on_attach, name) @@ -107,12 +98,12 @@ function M.on_supports_method(method, fn) }) end ----@param opts? LazyFormatter| {filter?: (string|lsp.Client.filter)} +---@param opts? LazyFormatter| {filter?: (string|vim.lsp.get_clients.Filter)} function M.formatter(opts) opts = opts or {} local filter = opts.filter or {} filter = type(filter) == "string" and { name = filter } or filter - ---@cast filter lsp.Client.filter + ---@cast filter vim.lsp.get_clients.Filter ---@type LazyFormatter local ret = { name = "LSP", @@ -122,7 +113,7 @@ function M.formatter(opts) M.format(LazyVim.merge({}, filter, { bufnr = buf })) end, sources = function(buf) - local clients = M.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) + local clients = vim.lsp.get_clients(LazyVim.merge({}, filter, { bufnr = buf })) ---@param client vim.lsp.Client local ret = vim.tbl_filter(function(client) return client:supports_method("textDocument/formatting") @@ -137,7 +128,7 @@ function M.formatter(opts) return LazyVim.merge(ret, opts) --[[@as LazyFormatter]] end ----@alias lsp.Client.format {timeout_ms?: number, format_options?: table} | lsp.Client.filter +---@alias lsp.Client.format {timeout_ms?: number, format_options?: table} | vim.lsp.get_clients.Filter ---@param opts? lsp.Client.format function M.format(opts) diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index fc6d6d7d..b3d68721 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -29,10 +29,10 @@ function M.detectors.lsp(buf) return {} end local roots = {} ---@type string[] - local clients = LazyVim.lsp.get_clients({ bufnr = buf }) + local clients = vim.lsp.get_clients({ bufnr = buf }) clients = vim.tbl_filter(function(client) return not vim.tbl_contains(vim.g.root_lsp_ignore or {}, client.name) - end, clients) + end, clients) --[[@as vim.lsp.Client[] ]] for _, client in pairs(clients) do local workspace = client.config.workspace_folders for _, ws in pairs(workspace or {}) do From f54fd7f751e902e824c3a4c9d212a0d18387d0b6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Sep 2025 17:43:35 +0200 Subject: [PATCH 383/496] fix(blink): make blink completions in cmdline behave more like regular cmdline --- lua/lazyvim/plugins/extras/coding/blink.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index e8a4d9c5..207b1940 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -85,12 +85,9 @@ return { 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() == ":" From cccfe70ea4390c1915f67ab7d2893971fba3f3fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:01:08 +0200 Subject: [PATCH 384/496] feat!: bump Neovim requirement to 0.11.2 --- NEWS.md | 6 +++--- README.md | 2 +- lua/lazyvim/health.lua | 6 +++--- lua/lazyvim/plugins/init.lua | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NEWS.md b/NEWS.md index 37221e79..1e5d991b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,13 +2,13 @@ ## 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` diff --git a/README.md b/README.md index fd6a3fe0..1e7bb70d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ to tweak your config as needed, along with the convenience of a pre-configured s ## ⚡️ 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/) **_(optional)_** - a **C** compiler for `nvim-treesitter`. See [here](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/lua/lazyvim/health.lua b/lua/lazyvim/health.lua index 716c60a8..d1632e75 100644 --- a/lua/lazyvim/health.lua +++ b/lua/lazyvim/health.lua @@ -8,10 +8,10 @@ local error = vim.health.error or vim.health.report_error function M.check() start("LazyVim") - if vim.fn.has("nvim-0.11.0") == 1 then - ok("Using Neovim >= 0.11.0") + if vim.fn.has("nvim-0.11.2") == 1 then + ok("Using Neovim >= 0.11.2") else - error("Neovim >= 0.11.0 is required") + error("Neovim >= 0.11.2 is required") end for _, cmd in ipairs({ "git", "rg", { "fd", "fdfind" }, "lazygit", "fzf", "curl" }) do diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index a0faebcd..7797b047 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,6 +1,6 @@ -if vim.fn.has("nvim-0.11.0") == 0 then +if vim.fn.has("nvim-0.11.2") == 0 then vim.api.nvim_echo({ - { "LazyVim requires Neovim >= 0.11.0\n", "ErrorMsg" }, + { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, }, true, {}) From f88f33c4c62272486c481589850019e8e4f4bd31 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 17 Sep 2025 05:01:57 +0000 Subject: [PATCH 385/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index a2b1b64c..9f4b59fd 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 16 +*LazyVim.txt* For Neovim Last change: 2025 September 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* @@ -53,7 +53,7 @@ FEATURES *LazyVim-features* REQUIREMENTS *LazyVim-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 **(optional)** - a **C** compiler for `nvim-treesitter`. See here From 732b063c30ff1167c470063a64a538e109914cad Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:06:27 +0200 Subject: [PATCH 386/496] docs: more news --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 1e5d991b..8f59998f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,10 +9,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 From 919c9e5d091f11b2892c56825249fc4a495d3e8f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:14:22 +0200 Subject: [PATCH 387/496] fix(eslint): remove old 0.10 code --- lua/lazyvim/plugins/extras/linting/eslint.lua | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/lua/lazyvim/plugins/extras/linting/eslint.lua b/lua/lazyvim/plugins/extras/linting/eslint.lua index 92c670d4..fd860f9b 100644 --- a/lua/lazyvim/plugins/extras/linting/eslint.lua +++ b/lua/lazyvim/plugins/extras/linting/eslint.lua @@ -10,7 +10,7 @@ return { "neovim/nvim-lspconfig", -- other settings removed for brevity opts = { - ---@type lspconfig.options + ---@type table servers = { eslint = { settings = { @@ -26,10 +26,6 @@ return { 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, @@ -37,24 +33,6 @@ return { 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, From 64ee23f38f9a29400673821a4adbbf058c428a5e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:14:37 +0200 Subject: [PATCH 388/496] style: remove references to Neovim 0.10 --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/plugins/lsp/init.lua | 5 ++--- lua/lazyvim/util/ui.lua | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index b5d444d0..fbbb208c 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -53,7 +53,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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index d0c9ced9..c50694d9 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -20,7 +20,6 @@ return { 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, @@ -33,14 +32,14 @@ return { }, }, }, - -- 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 = { diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index c8c899d5..f36897aa 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,7 +1,7 @@ ---@class lazyvim.util.ui local M = {} --- optimized treesitter foldexpr for Neovim >= 0.10.0 +-- optimized treesitter foldexpr function M.foldexpr() local buf = vim.api.nvim_get_current_buf() if vim.b[buf].ts_folds == nil then From 4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 07:30:27 +0200 Subject: [PATCH 389/496] fix(vue): `volar` -> `vua_ls`. Fixes #6236. Closes #6238. Closes #6174 --- lua/lazyvim/plugins/extras/lang/vue.lua | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/vue.lua b/lua/lazyvim/plugins/extras/lang/vue.lua index 85f47772..a45caee7 100644 --- a/lua/lazyvim/plugins/extras/lang/vue.lua +++ b/lua/lazyvim/plugins/extras/lang/vue.lua @@ -19,13 +19,7 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - volar = { - init_options = { - vue = { - hybridMode = true, - }, - }, - }, + vue_ls = {}, vtsls = {}, }, }, From 5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 08:11:33 +0200 Subject: [PATCH 390/496] feat(lsp): enable LSP folds when available --- lua/lazyvim/plugins/lsp/init.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index c50694d9..00a698fc 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -45,6 +45,12 @@ return { 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 = { @@ -137,6 +143,14 @@ return { 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) From 32ef7a9d39b6fe13c81f9e3e56439bf69fa80805 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 09:22:58 +0200 Subject: [PATCH 391/496] docs: typo --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 8f59998f..567b75ed 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,11 +9,12 @@ 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 - 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 From 5eac460c092103e5516bec345236853b9f35ec7c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 09:52:44 +0200 Subject: [PATCH 392/496] feat(treesitter)!: migrate to `nvim-treesitter` **main** branch --- NEWS.md | 4 +- lua/lazyvim/config/options.lua | 3 +- lua/lazyvim/plugins/editor.lua | 10 ++ .../plugins/extras/ui/treesitter-main.lua | 90 ---------- lua/lazyvim/plugins/treesitter.lua | 160 +++++++++--------- lua/lazyvim/util/plugin.lua | 1 + lua/lazyvim/util/ui.lua | 28 +-- 7 files changed, 113 insertions(+), 183 deletions(-) delete mode 100644 lua/lazyvim/plugins/extras/ui/treesitter-main.lua diff --git a/NEWS.md b/NEWS.md index 567b75ed..4f3a0d34 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,8 +11,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - removed compatibility code for Neovim `< 0.11.2` - 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 +- 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`) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index fbbb208c..62c8242e 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,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 = "" @@ -78,6 +78,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/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 4aaf3d1f..9fdeffd9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -40,6 +40,16 @@ return { { "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" }, }, }, diff --git a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua b/lua/lazyvim/plugins/extras/ui/treesitter-main.lua deleted file mode 100644 index bb22aabb..00000000 --- a/lua/lazyvim/plugins/extras/ui/treesitter-main.lua +++ /dev/null @@ -1,90 +0,0 @@ -return { - { - "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/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/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 0f0c8fe8..4b15ab87 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -1,43 +1,25 @@ return { - { - "folke/which-key.nvim", - opts = { - spec = { - { "", desc = "Decrement Selection", mode = "x" }, - { "", desc = "Increment Selection", mode = { "x", "n" } }, - }, - }, - }, -- Treesitter is a new parser generator tool that we can -- use in Neovim to power faster and more accurate -- syntax highlighting. { "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", @@ -64,65 +46,91 @@ return { "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` executable to be installed") + return end - require("nvim-treesitter.configs").setup(opts) + 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 + + vim.api.nvim_create_autocmd("FileType", { + callback = function(ev) + if LazyVim.ui.have(ev.match) then + pcall(vim.treesitter.start) + end + end, + }) end, }, { "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, }, diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index ff3f3634..58063385 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -17,6 +17,7 @@ M.deprecated_extras = { ["lazyvim.plugins.extras.ui.dashboard"] = "`dashboard.nvim` is now the default **LazyVim** starter.", ["lazyvim.plugins.extras.coding.native_snippets"] = "Native snippets are now the default for **Neovim >= 0.10**", ["lazyvim.plugins.extras.ui.treesitter-rewrite"] = "Disabled `treesitter-rewrite` extra for now. Not ready yet.", + ["lazyvim.plugins.extras.ui.treesitter-main"] = "the `nvim-treesitter` main branch is now used by default", ["lazyvim.plugins.extras.coding.mini-ai"] = "`mini.ai` is now a core LazyVim plugin (again)", ["lazyvim.plugins.extras.lazyrc"] = "local spec files are now a lazy.nvim feature", ["lazyvim.plugins.extras.editor.trouble-v3"] = "Trouble v3 has been merged in main", diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index f36897aa..19d5642e 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -1,22 +1,22 @@ ---@class lazyvim.util.ui local M = {} --- optimized treesitter foldexpr +M.installed = {} ---@type string[] + +---@param ft string +function M.have(ft) + local lang = vim.treesitter.language.get_lang(ft) + return vim.tbl_contains(M.installed, lang) +end + function M.foldexpr() local buf = vim.api.nvim_get_current_buf() - if vim.b[buf].ts_folds == nil then - -- as long as we don't have a filetype, don't bother - -- checking if treesitter is available (it won't) - if vim.bo[buf].filetype == "" then - return "0" - end - if vim.bo[buf].filetype:find("dashboard") then - vim.b[buf].ts_folds = false - else - vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf) - end - end - return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0" + return M.have(vim.b[buf].filetype) and vim.treesitter.foldexpr() or "0" +end + +function M.indentexpr() + local buf = vim.api.nvim_get_current_buf() + return M.have(vim.b[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 end return M From e9344e5319b712e90cfe36521d4682f36aaaf297 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 10:10:34 +0200 Subject: [PATCH 393/496] docs: better error and ref to checkhealth for nvim-treesitter main --- NEWS.md | 2 ++ lua/lazyvim/plugins/treesitter.lua | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4f3a0d34..050440b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,8 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - configure **LSP** with the native `vim.lsp.config` - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - 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`) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 4b15ab87..d65ce551 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -51,7 +51,10 @@ return { ---@param opts TSConfig config = function(plugin, opts) if vim.fn.executable("tree-sitter") == 0 then - LazyVim.error("**treesitter-main** requires the `tree-sitter` executable to be installed") + 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 From 6eed1781c185ea6d1f313aee60a7097448f473cb Mon Sep 17 00:00:00 2001 From: EasonMo Date: Wed, 17 Sep 2025 16:13:36 +0800 Subject: [PATCH 394/496] fix(gitsigns): use silent for gitsigns keymaps (#5841) ## Description When executing `ghs`, the command line window will flicker. Therefore, it should be run silently. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 9fdeffd9..5abed1a3 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -153,7 +153,7 @@ return { 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 From fd1b02ae5740dc651cc43291391084dbe7b1b3c4 Mon Sep 17 00:00:00 2001 From: Nick Janetakis Date: Wed, 17 Sep 2025 04:14:48 -0400 Subject: [PATCH 395/496] fix(grug-far): add support for GrugFarWithin so it gets loaded by default (#5772) ## Description https://github.com/MagicDuck/grug-far.nvim is the default find and replace plugin for LazyVim. It recently added support for being able to do a find / replace within a visual selection to limit the scope of a search. It did that by introducing a new command called `:GrugFarWithin`. This PR adds that as a `cmd` so it gets loaded by default. Without this PR, you cannot call this command unless you first call `:GrugFar`. This was identified by the author of Grug Far. ## Related Issue(s) There is no issue in this repo, but this feature is related to: https://github.com/MagicDuck/grug-far.nvim/issues/357 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. I also want to give a shout-out to @MagicDuck who is the author of the plugin. He implemented this feature so fast and has been super helpful in his repo's issue tracker. --- lua/lazyvim/plugins/editor.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 5abed1a3..8fef8e9e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -4,7 +4,7 @@ return { { "MagicDuck/grug-far.nvim", opts = { headerMaxWidth = 80 }, - cmd = "GrugFar", + cmd = { "GrugFar", "GrugFarWithin" }, keys = { { "sr", From 112b8848b55ba5161c6713219a200a51be67d859 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Wed, 17 Sep 2025 04:15:21 -0400 Subject: [PATCH 396/496] chore(which-key): remove unnecessary icons (#5461) ## Description These are already handled by which-key exactly the same way, no need to re-declare them here. Removing them from here has no effect. ## Related Issue(s) N/A ## Screenshots ![Screenshot 2025-01-23 at 21 21 14](https://github.com/user-attachments/assets/d9f777e8-d514-4836-9314-03a66cc5a34b) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/editor.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index 8fef8e9e..6e2c894e 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -74,8 +74,8 @@ return { { "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" }, From 014b5bf6ac9ec24c955d481882b5e8cb39846d97 Mon Sep 17 00:00:00 2001 From: Alexey Svirshchevskiy Date: Wed, 17 Sep 2025 10:40:37 +0200 Subject: [PATCH 397/496] docs(treesitter): fix checkhealth command (#6433) --- NEWS.md | 2 +- lua/lazyvim/plugins/treesitter.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index 050440b2..9342acb2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -13,7 +13,7 @@ Going forward, **LazyVim** requires **Neovim** `>= 0.11.2`, and drops support fo - migrated **mason.nvim** and **mason-lspconfig.nvim** to `v2.x` - 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 + - 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`) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index d65ce551..1d5abb2f 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -53,7 +53,7 @@ return { 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.", + "Run `:checkhealth nvim-treesitter` for more information.", }) return end From ab657e95898648bae210815bd641aa1a1fae5472 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Wed, 17 Sep 2025 05:17:32 -0400 Subject: [PATCH 398/496] docs: improved plugin doc strings (#5657) ## Description This improves the comment strings that produce documentation for different plugins. I often look at the docs to learn what stuff is already installed, and this would help people like me to quickly understand what some of the plugins do. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/coding.lua | 14 +++++++++++--- lua/lazyvim/plugins/extras/ui/edgy.lua | 2 +- lua/lazyvim/plugins/extras/ui/mini-animate.lua | 3 ++- lua/lazyvim/plugins/extras/ui/smear-cursor.lua | 1 + lua/lazyvim/plugins/linting.lua | 2 ++ lua/lazyvim/plugins/ui.lua | 3 ++- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 8b242eb8..7f6bb550 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -1,5 +1,7 @@ return { - -- auto pairs + -- Auto pairs + -- Automatically inserts a matching closing character + -- when you type an opening character like `"`, `[`, or `(`. { "nvim-mini/mini.pairs", event = "VeryLazy", @@ -20,14 +22,18 @@ return { end, }, - -- comments + -- Improves comment syntax, lets Neovim handle multiple + -- types of comments for a single language, and relaxes rules + -- for uncommenting. { "folke/ts-comments.nvim", event = "VeryLazy", opts = {}, }, - -- 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. { "nvim-mini/mini.ai", event = "VeryLazy", @@ -64,6 +70,8 @@ return { end, }, + -- Configures LuaLS to support auto-completion and type checking + -- while editing your Neovim configuration. { "folke/lazydev.nvim", ft = "lua", diff --git a/lua/lazyvim/plugins/extras/ui/edgy.lua b/lua/lazyvim/plugins/extras/ui/edgy.lua index dbe76d1b..bf522270 100644 --- a/lua/lazyvim/plugins/extras/ui/edgy.lua +++ b/lua/lazyvim/plugins/extras/ui/edgy.lua @@ -1,5 +1,5 @@ return { - -- edgy + -- Create and display predefined window layouts. { "folke/edgy.nvim", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/extras/ui/mini-animate.lua b/lua/lazyvim/plugins/extras/ui/mini-animate.lua index 5a3fdef6..b71c19a9 100644 --- a/lua/lazyvim/plugins/extras/ui/mini-animate.lua +++ b/lua/lazyvim/plugins/extras/ui/mini-animate.lua @@ -8,7 +8,8 @@ return { }, }, - -- setup animate + -- Animates many common Neovim actions, like scrolling, + -- moving the cursor, and resizing windows. { "nvim-mini/mini.animate", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua index 2ca27780..4ab6f03e 100644 --- a/lua/lazyvim/plugins/extras/ui/smear-cursor.lua +++ b/lua/lazyvim/plugins/extras/ui/smear-cursor.lua @@ -1,3 +1,4 @@ +-- Animates cursor movement with a smear effect. return { "sphamba/smear-cursor.nvim", event = "VeryLazy", diff --git a/lua/lazyvim/plugins/linting.lua b/lua/lazyvim/plugins/linting.lua index 46cf2898..9b1bed29 100644 --- a/lua/lazyvim/plugins/linting.lua +++ b/lua/lazyvim/plugins/linting.lua @@ -1,4 +1,6 @@ return { + -- Asynchronously calls language-specific linter tools and reports + -- their results via the `vim.diagnostic` module. { "mfussenegger/nvim-lint", event = "LazyFile", diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 9dd7254b..23afdc39 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -60,7 +60,8 @@ return { end, }, - -- statusline + -- Displays a fancy status line with git status, + -- LSP diagnostics, filetype information, and more. { "nvim-lualine/lualine.nvim", event = "VeryLazy", From aab503fda63f34cff6bce229f73ea5209e8afaf0 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Wed, 17 Sep 2025 05:19:29 -0400 Subject: [PATCH 399/496] fix(clangd): file detection improvements (#6436) ## Description As discussed in https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5#r165937336, it'd be better to remove clang configuration files from influencing root dir detection. I've also added meson and ninja files to the extra's recommendation detection ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clangd.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/clangd.lua b/lua/lazyvim/plugins/extras/lang/clangd.lua index 9417b257..0ba58aca 100644 --- a/lua/lazyvim/plugins/extras/lang/clangd.lua +++ b/lua/lazyvim/plugins/extras/lang/clangd.lua @@ -9,6 +9,8 @@ return { "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools + "meson.build", + "build.ninja", }, }) end, @@ -61,9 +63,6 @@ return { { "ch", "ClangdSwitchSourceHeader", desc = "Switch Source/Header (C/C++)" }, }, root_markers = { - ".clangd", - ".clang-tidy", - ".clang-format", "compile_commands.json", "compile_flags.txt", "configure.ac", -- AutoTools From 72e1ee5b0db02c5678e1ee1b82f720e4c32b0c74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 15:33:37 +0200 Subject: [PATCH 400/496] refactor(treesitter): cleanup --- lua/lazyvim/config/options.lua | 4 +- lua/lazyvim/plugins/treesitter.lua | 42 ++++++++++----------- lua/lazyvim/util/deprecated.lua | 12 +++++- lua/lazyvim/util/init.lua | 24 +++++++----- lua/lazyvim/util/{ui.lua => treesitter.lua} | 17 +++++++-- 5 files changed, 61 insertions(+), 38 deletions(-) rename lua/lazyvim/util/{ui.lua => treesitter.lua} (51%) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 62c8242e..f71f96df 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,7 +68,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 = "" @@ -78,7 +78,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/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 1d5abb2f..5462149a 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -19,7 +19,9 @@ return { 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", @@ -47,43 +49,39 @@ return { "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, diff --git a/lua/lazyvim/util/deprecated.lua b/lua/lazyvim/util/deprecated.lua index 375bc9ca..3aad7318 100644 --- a/lua/lazyvim/util/deprecated.lua +++ b/lua/lazyvim/util/deprecated.lua @@ -1,3 +1,4 @@ +---@class lazyvim.util.deprecated local M = {} M.moved = { @@ -13,6 +14,7 @@ M.moved = { ui = { statuscolumn = { "Snacks.statuscolumn" }, bufremove = { "Snacks.bufdelete" }, + foldexpr = { "LazyVim.treesitter.foldexpr", stacktrace = false }, fg = { "{ fg = Snacks.util.color(...) }", fn = function(...) @@ -28,7 +30,7 @@ function M.decorate(name, mod) if not M.moved[name] then return mod end - setmetatable(mod, { + return setmetatable(mod, { __call = function(_, ...) local to = M.moved[name].__call[1] LazyVim.deprecate("LazyVim." .. name, to) @@ -38,7 +40,9 @@ function M.decorate(name, mod) __index = function(_, k) if M.moved[name][k] then local to = M.moved[name][k][1] - LazyVim.deprecate("LazyVim." .. name .. "." .. k, to) + LazyVim.deprecate("LazyVim." .. name .. "." .. k, to, { + stacktrace = M.moved[name][k].stacktrace, + }) if M.moved[name][k].fn then return M.moved[name][k].fn end @@ -55,6 +59,10 @@ function M.lazygit() return Snacks.lazygit end +function M.ui() + return M.decorate("ui", {}) +end + function M.toggle() LazyVim.deprecate("LazyVim.toggle", "Snacks.toggle") return { diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 339fdadb..7561b385 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -2,7 +2,7 @@ local LazyUtil = require("lazy.core.util") ---@class lazyvim.util: LazyUtilCore ---@field config LazyVimConfig ----@field ui lazyvim.util.ui +---@field treesitter lazyvim.util.treesitter ---@field lsp lazyvim.util.lsp ---@field root lazyvim.util.root ---@field terminal lazyvim.util.terminal @@ -16,14 +16,16 @@ local LazyUtil = require("lazy.core.util") ---@field mini lazyvim.util.mini ---@field pick lazyvim.util.pick ---@field cmp lazyvim.util.cmp +---@field deprecated lazyvim.util.deprecated local M = {} +M.deprecated = require("lazyvim.util.deprecated") setmetatable(M, { __index = function(t, k) if LazyUtil[k] then return LazyUtil[k] end - if k == "lazygit" or k == "toggle" then -- HACK: special case for lazygit + if M.deprecated[k] then return M.deprecated[k]() end ---@diagnostic disable-next-line: no-unknown @@ -125,13 +127,17 @@ function M.opts(name) return Plugin.values(plugin, "opts", false) end -function M.deprecate(old, new) - M.warn(("`%s` is deprecated. Please use `%s` instead"):format(old, new), { - title = "LazyVim", - once = true, - stacktrace = true, - stacklevel = 6, - }) +---@param opts? LazyNotifyOpts +function M.deprecate(old, new, opts) + M.warn( + ("`%s` is deprecated. Please use `%s` instead"):format(old, new), + vim.tbl_extend("force", { + title = "LazyVim", + once = true, + stacktrace = true, + stacklevel = 6, + }, opts or {}) + ) end -- delay notifications till vim.notify was replaced or after 500ms diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/treesitter.lua similarity index 51% rename from lua/lazyvim/util/ui.lua rename to lua/lazyvim/util/treesitter.lua index 19d5642e..84e279ce 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -1,12 +1,23 @@ ----@class lazyvim.util.ui +---@class lazyvim.util.treesitter local M = {} -M.installed = {} ---@type string[] +M._installed = nil ---@type table? + +---@param force boolean? +function M.get_installed(force) + if not M._installed or force then + M._installed = {} + for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do + M._installed[lang] = lang + end + end + return M._installed +end ---@param ft string function M.have(ft) local lang = vim.treesitter.language.get_lang(ft) - return vim.tbl_contains(M.installed, lang) + return lang and M.get_installed()[lang] end function M.foldexpr() From 2c44d3306398fc7ca1cc02c2e9466944a2725030 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 15:40:17 +0200 Subject: [PATCH 401/496] chore(main): release 15.0.0 (#6422) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) ### ⚠ BREAKING CHANGES * **treesitter:** migrate to `nvim-treesitter` **main** branch * bump Neovim requirement to 0.11.2 * LazyVim now requires Neovim >= 0.11 See #6421 for more info ### Features * **blink:** enable blink cmdline completions ([011a35c](https://github.com/LazyVim/LazyVim/commit/011a35ccb810cbe5d25def9cc92271e8423feb74)) * **blink:** enable cmdline completions ([ff7c12c](https://github.com/LazyVim/LazyVim/commit/ff7c12c48e23941ffd9a7bbe61857624929ae9da)) * bump Neovim requirement to 0.11.2 ([cccfe70](https://github.com/LazyVim/LazyVim/commit/cccfe70ea4390c1915f67ab7d2893971fba3f3fa)) * **extras:** added an experimental extra for the treesitter `main` branch ([5668ad7](https://github.com/LazyVim/LazyVim/commit/5668ad72ca806b3a7915bb7b35dcc5cccfe774f7)) * LazyVim now requires Neovim >= 0.11 See [#6421](https://github.com/LazyVim/LazyVim/issues/6421) for more info ([e7ce65e](https://github.com/LazyVim/LazyVim/commit/e7ce65e1bb814f79ecb45bfeca934e997e0ee42c)) * **lsp:** enable LSP folds when available ([5e2c4e6](https://github.com/LazyVim/LazyVim/commit/5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef)) * **treesitter:** migrate to `nvim-treesitter` **main** branch ([5eac460](https://github.com/LazyVim/LazyVim/commit/5eac460c092103e5516bec345236853b9f35ec7c)) ### Bug Fixes * **blink:** make blink completions in cmdline behave more like regular cmdline ([f54fd7f](https://github.com/LazyVim/LazyVim/commit/f54fd7f751e902e824c3a4c9d212a0d18387d0b6)) * **catppuccin:** follow renamed integration ([#6354](https://github.com/LazyVim/LazyVim/issues/6354)) ([02d0c9a](https://github.com/LazyVim/LazyVim/commit/02d0c9aebddb902d9c974a38bb44db9bae4eac6d)) * **clangd:** file detection improvements ([#6436](https://github.com/LazyVim/LazyVim/issues/6436)) ([aab503f](https://github.com/LazyVim/LazyVim/commit/aab503fda63f34cff6bce229f73ea5209e8afaf0)) * **clangd:** rewrite the root_dir function ([#6060](https://github.com/LazyVim/LazyVim/issues/6060)) ([167d39b](https://github.com/LazyVim/LazyVim/commit/167d39b2bef24024be1a48267e14cc6c82146462)) * **eslint:** remove old 0.10 code ([919c9e5](https://github.com/LazyVim/LazyVim/commit/919c9e5d091f11b2892c56825249fc4a495d3e8f)) * **extras:** disable blink path source in CopilotChat ([#5666](https://github.com/LazyVim/LazyVim/issues/5666)) ([#5754](https://github.com/LazyVim/LazyVim/issues/5754)) ([3aa2916](https://github.com/LazyVim/LazyVim/commit/3aa2916569df2664cb68e1c7c38882868f36f8d0)) * **gitsigns:** use silent for gitsigns keymaps ([#5841](https://github.com/LazyVim/LazyVim/issues/5841)) ([6eed178](https://github.com/LazyVim/LazyVim/commit/6eed1781c185ea6d1f313aee60a7097448f473cb)) * **grug-far:** add support for GrugFarWithin so it gets loaded by default ([#5772](https://github.com/LazyVim/LazyVim/issues/5772)) ([fd1b02a](https://github.com/LazyVim/LazyVim/commit/fd1b02ae5740dc651cc43291391084dbe7b1b3c4)) * **harpoon:** keymaps for 1-9. Fixes [#6319](https://github.com/LazyVim/LazyVim/issues/6319) ([e2ba6bb](https://github.com/LazyVim/LazyVim/commit/e2ba6bb51107cbd076b53b49ed7be99fc2fa3991)) * **jdtls:** root_dir ([271fecb](https://github.com/LazyVim/LazyVim/commit/271fecb067ec223a8eab90c1abd1162e9ebae5df)) * **jdtls:** root_dir ([#6429](https://github.com/LazyVim/LazyVim/issues/6429)) ([c053921](https://github.com/LazyVim/LazyVim/commit/c05392186e9e540d4af169922c333b5baa583cbe)) * **lang.haskell:** prevent Haskell extras from installing telescope.nvim ([#6419](https://github.com/LazyVim/LazyVim/issues/6419)) ([cc4a3e5](https://github.com/LazyVim/LazyVim/commit/cc4a3e556424dba784b41ec3bd92eeb7b62746bc)) * **lsp:** buffer should be second arg for supports_method ([44ade7f](https://github.com/LazyVim/LazyVim/commit/44ade7fdea98a0356c64ff9edaf2534547b958bc)) * **lspconfig:** remove all references to lspconfig. Closes [#6426](https://github.com/LazyVim/LazyVim/issues/6426) ([23b9cde](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5)) * **lsp:** properly ambiguate denols vs vtsls ([2f75d9a](https://github.com/LazyVim/LazyVim/commit/2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e)) * **lsp:** properly register capabilities with new vim.lsp.config. Not needed for blink ([9fa832d](https://github.com/LazyVim/LazyVim/commit/9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a)) * **mason:** migrate to mason v2 ([#6053](https://github.com/LazyVim/LazyVim/issues/6053)) ([773f28b](https://github.com/LazyVim/LazyVim/commit/773f28b4912d5505a21da9686d56ab7cf41a9be7)) * **mini:** update mini plugin references from echasnovski to nvim-mini ([#6374](https://github.com/LazyVim/LazyVim/issues/6374)) ([ae3aaf2](https://github.com/LazyVim/LazyVim/commit/ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2)) * **neo-tree:** import neo-tree Extra before edgy Extra ([#5763](https://github.com/LazyVim/LazyVim/issues/5763)) ([848dd31](https://github.com/LazyVim/LazyVim/commit/848dd3132af50f6d211d0c07166ea7c1a4259088)) * **ocaml:** use `root_dir` instead of `root_markers` for globs support ([#6428](https://github.com/LazyVim/LazyVim/issues/6428)) ([44cc063](https://github.com/LazyVim/LazyVim/commit/44cc0635bc3d2ccc55eb76bc7668092befcf0536)) * **refactoring:** update funcs to return, add `expr=true`, operator mode ([#5882](https://github.com/LazyVim/LazyVim/issues/5882)) ([6e1de74](https://github.com/LazyVim/LazyVim/commit/6e1de74597fa07ea805920da370f9d998740bc5e)) * remove 0.9 compat ([3516ae7](https://github.com/LazyVim/LazyVim/commit/3516ae736a333185f6f17b70af20b088d04cbbb6)) * **schemastore:** use `before_init` instead of `on_new_config` to load schema store ([#6427](https://github.com/LazyVim/LazyVim/issues/6427)) ([14d2a9b](https://github.com/LazyVim/LazyVim/commit/14d2a9baa1306bd0969112fcf8f69a11840cc5e6)) * **treesitter-main:** move exe check to config ([96316e5](https://github.com/LazyVim/LazyVim/commit/96316e5a69b4cc45311f5b7225e7d7bea1f977ee)) * **treesitter-main:** set vim.bo.indentexpr in FileType autocmd ([#6430](https://github.com/LazyVim/LazyVim/issues/6430)) ([b926e7d](https://github.com/LazyVim/LazyVim/commit/b926e7db417bc7b0e80feb778bed7924ffe8e85d)) * **vue:** `volar` -> `vua_ls`. Fixes [#6236](https://github.com/LazyVim/LazyVim/issues/6236). Closes [#6238](https://github.com/LazyVim/LazyVim/issues/6238). Closes [#6174](https://github.com/LazyVim/LazyVim/issues/6174) ([4a3b4a8](https://github.com/LazyVim/LazyVim/commit/4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b)) ### Performance Improvements * **blink:** only enable lazydev in lua files ([4961b3d](https://github.com/LazyVim/LazyVim/commit/4961b3d4d4b2999816e978c3ea4ef7c320e4206d)) * **treesitter-main:** only enable highlighting for installed treesitter langs ([2f309fc](https://github.com/LazyVim/LazyVim/commit/2f309fc8b5bf93af25293c1e4688d409de718a36)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 55 +++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 57 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d4bbf7f7..b87683f4 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.15.1" + ".": "15.0.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e2be0c4..0b1cf309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,60 @@ # Changelog +## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) + + +### ⚠ BREAKING CHANGES + +* **treesitter:** migrate to `nvim-treesitter` **main** branch +* bump Neovim requirement to 0.11.2 +* LazyVim now requires Neovim >= 0.11 See #6421 for more info + +### Features + +* **blink:** enable blink cmdline completions ([011a35c](https://github.com/LazyVim/LazyVim/commit/011a35ccb810cbe5d25def9cc92271e8423feb74)) +* **blink:** enable cmdline completions ([ff7c12c](https://github.com/LazyVim/LazyVim/commit/ff7c12c48e23941ffd9a7bbe61857624929ae9da)) +* bump Neovim requirement to 0.11.2 ([cccfe70](https://github.com/LazyVim/LazyVim/commit/cccfe70ea4390c1915f67ab7d2893971fba3f3fa)) +* **extras:** added an experimental extra for the treesitter `main` branch ([5668ad7](https://github.com/LazyVim/LazyVim/commit/5668ad72ca806b3a7915bb7b35dcc5cccfe774f7)) +* LazyVim now requires Neovim >= 0.11 See [#6421](https://github.com/LazyVim/LazyVim/issues/6421) for more info ([e7ce65e](https://github.com/LazyVim/LazyVim/commit/e7ce65e1bb814f79ecb45bfeca934e997e0ee42c)) +* **lsp:** enable LSP folds when available ([5e2c4e6](https://github.com/LazyVim/LazyVim/commit/5e2c4e62f28a85e0b27d5c97ea92af8c1ab74cef)) +* **treesitter:** migrate to `nvim-treesitter` **main** branch ([5eac460](https://github.com/LazyVim/LazyVim/commit/5eac460c092103e5516bec345236853b9f35ec7c)) + + +### Bug Fixes + +* **blink:** make blink completions in cmdline behave more like regular cmdline ([f54fd7f](https://github.com/LazyVim/LazyVim/commit/f54fd7f751e902e824c3a4c9d212a0d18387d0b6)) +* **catppuccin:** follow renamed integration ([#6354](https://github.com/LazyVim/LazyVim/issues/6354)) ([02d0c9a](https://github.com/LazyVim/LazyVim/commit/02d0c9aebddb902d9c974a38bb44db9bae4eac6d)) +* **clangd:** file detection improvements ([#6436](https://github.com/LazyVim/LazyVim/issues/6436)) ([aab503f](https://github.com/LazyVim/LazyVim/commit/aab503fda63f34cff6bce229f73ea5209e8afaf0)) +* **clangd:** rewrite the root_dir function ([#6060](https://github.com/LazyVim/LazyVim/issues/6060)) ([167d39b](https://github.com/LazyVim/LazyVim/commit/167d39b2bef24024be1a48267e14cc6c82146462)) +* **eslint:** remove old 0.10 code ([919c9e5](https://github.com/LazyVim/LazyVim/commit/919c9e5d091f11b2892c56825249fc4a495d3e8f)) +* **extras:** disable blink path source in CopilotChat ([#5666](https://github.com/LazyVim/LazyVim/issues/5666)) ([#5754](https://github.com/LazyVim/LazyVim/issues/5754)) ([3aa2916](https://github.com/LazyVim/LazyVim/commit/3aa2916569df2664cb68e1c7c38882868f36f8d0)) +* **gitsigns:** use silent for gitsigns keymaps ([#5841](https://github.com/LazyVim/LazyVim/issues/5841)) ([6eed178](https://github.com/LazyVim/LazyVim/commit/6eed1781c185ea6d1f313aee60a7097448f473cb)) +* **grug-far:** add support for GrugFarWithin so it gets loaded by default ([#5772](https://github.com/LazyVim/LazyVim/issues/5772)) ([fd1b02a](https://github.com/LazyVim/LazyVim/commit/fd1b02ae5740dc651cc43291391084dbe7b1b3c4)) +* **harpoon:** keymaps for 1-9. Fixes [#6319](https://github.com/LazyVim/LazyVim/issues/6319) ([e2ba6bb](https://github.com/LazyVim/LazyVim/commit/e2ba6bb51107cbd076b53b49ed7be99fc2fa3991)) +* **jdtls:** root_dir ([271fecb](https://github.com/LazyVim/LazyVim/commit/271fecb067ec223a8eab90c1abd1162e9ebae5df)) +* **jdtls:** root_dir ([#6429](https://github.com/LazyVim/LazyVim/issues/6429)) ([c053921](https://github.com/LazyVim/LazyVim/commit/c05392186e9e540d4af169922c333b5baa583cbe)) +* **lang.haskell:** prevent Haskell extras from installing telescope.nvim ([#6419](https://github.com/LazyVim/LazyVim/issues/6419)) ([cc4a3e5](https://github.com/LazyVim/LazyVim/commit/cc4a3e556424dba784b41ec3bd92eeb7b62746bc)) +* **lsp:** buffer should be second arg for supports_method ([44ade7f](https://github.com/LazyVim/LazyVim/commit/44ade7fdea98a0356c64ff9edaf2534547b958bc)) +* **lspconfig:** remove all references to lspconfig. Closes [#6426](https://github.com/LazyVim/LazyVim/issues/6426) ([23b9cde](https://github.com/LazyVim/LazyVim/commit/23b9cdeb3471b655532e9884fa2dd36ee83062d5)) +* **lsp:** properly ambiguate denols vs vtsls ([2f75d9a](https://github.com/LazyVim/LazyVim/commit/2f75d9a90fc9cf43f7ba2365dbb745e5595fc02e)) +* **lsp:** properly register capabilities with new vim.lsp.config. Not needed for blink ([9fa832d](https://github.com/LazyVim/LazyVim/commit/9fa832dc95cb77a5551bbeff12b4520d8b7bdc2a)) +* **mason:** migrate to mason v2 ([#6053](https://github.com/LazyVim/LazyVim/issues/6053)) ([773f28b](https://github.com/LazyVim/LazyVim/commit/773f28b4912d5505a21da9686d56ab7cf41a9be7)) +* **mini:** update mini plugin references from echasnovski to nvim-mini ([#6374](https://github.com/LazyVim/LazyVim/issues/6374)) ([ae3aaf2](https://github.com/LazyVim/LazyVim/commit/ae3aaf2dd3a04eb5dbc5b1e34843558c85e45ac2)) +* **neo-tree:** import neo-tree Extra before edgy Extra ([#5763](https://github.com/LazyVim/LazyVim/issues/5763)) ([848dd31](https://github.com/LazyVim/LazyVim/commit/848dd3132af50f6d211d0c07166ea7c1a4259088)) +* **ocaml:** use `root_dir` instead of `root_markers` for globs support ([#6428](https://github.com/LazyVim/LazyVim/issues/6428)) ([44cc063](https://github.com/LazyVim/LazyVim/commit/44cc0635bc3d2ccc55eb76bc7668092befcf0536)) +* **refactoring:** update funcs to return, add `expr=true`, operator mode ([#5882](https://github.com/LazyVim/LazyVim/issues/5882)) ([6e1de74](https://github.com/LazyVim/LazyVim/commit/6e1de74597fa07ea805920da370f9d998740bc5e)) +* remove 0.9 compat ([3516ae7](https://github.com/LazyVim/LazyVim/commit/3516ae736a333185f6f17b70af20b088d04cbbb6)) +* **schemastore:** use `before_init` instead of `on_new_config` to load schema store ([#6427](https://github.com/LazyVim/LazyVim/issues/6427)) ([14d2a9b](https://github.com/LazyVim/LazyVim/commit/14d2a9baa1306bd0969112fcf8f69a11840cc5e6)) +* **treesitter-main:** move exe check to config ([96316e5](https://github.com/LazyVim/LazyVim/commit/96316e5a69b4cc45311f5b7225e7d7bea1f977ee)) +* **treesitter-main:** set vim.bo.indentexpr in FileType autocmd ([#6430](https://github.com/LazyVim/LazyVim/issues/6430)) ([b926e7d](https://github.com/LazyVim/LazyVim/commit/b926e7db417bc7b0e80feb778bed7924ffe8e85d)) +* **vue:** `volar` -> `vua_ls`. Fixes [#6236](https://github.com/LazyVim/LazyVim/issues/6236). Closes [#6238](https://github.com/LazyVim/LazyVim/issues/6238). Closes [#6174](https://github.com/LazyVim/LazyVim/issues/6174) ([4a3b4a8](https://github.com/LazyVim/LazyVim/commit/4a3b4a80a89fe5a52d30fbe4afe85c152878ab1b)) + + +### Performance Improvements + +* **blink:** only enable lazydev in lua files ([4961b3d](https://github.com/LazyVim/LazyVim/commit/4961b3d4d4b2999816e978c3ea4ef7c320e4206d)) +* **treesitter-main:** only enable highlighting for installed treesitter langs ([2f309fc](https://github.com/LazyVim/LazyVim/commit/2f309fc8b5bf93af25293c1e4688d409de718a36)) + ## [14.15.1](https://github.com/LazyVim/LazyVim/compare/v14.15.0...v14.15.1) (2025-09-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 9e0903c2..931ef9ff 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.15.1" -- x-release-please-version +M.version = "15.0.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 2d56d3b37c275890a403845c00b5c8d38cb387e6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 16:54:34 +0200 Subject: [PATCH 402/496] fix(treesitter): TS update during inital build --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 5462149a..c9a6e094 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -13,7 +13,7 @@ return { 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 9e58f05aae1bf521ce1ff5b6b3bd8c5bf88a6488 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 16:59:13 +0200 Subject: [PATCH 403/496] chore(main): release 15.0.1 (#6438) :robot: I have created a release *beep* *boop* --- ## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) ### Bug Fixes * **treesitter:** TS update during inital build ([2d56d3b](https://github.com/LazyVim/LazyVim/commit/2d56d3b37c275890a403845c00b5c8d38cb387e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b87683f4..d09e9fe9 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.0" + ".": "15.0.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b1cf309..2aa0a8ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) + + +### Bug Fixes + +* **treesitter:** TS update during inital build ([2d56d3b](https://github.com/LazyVim/LazyVim/commit/2d56d3b37c275890a403845c00b5c8d38cb387e6)) + ## [15.0.0](https://github.com/LazyVim/LazyVim/compare/v14.15.1...v15.0.0) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 931ef9ff..4524969d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.0" -- x-release-please-version +M.version = "15.0.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ed3aa74c107de7dc3e06367ce4afb20056710441 Mon Sep 17 00:00:00 2001 From: Zhizhen He Date: Wed, 17 Sep 2025 23:16:31 +0800 Subject: [PATCH 404/496] fix(python): remove the wrapping `settings` key from `setup()` options (#6069) ## Description Remove the wrapping `settings` key from `setup()` options. ## Related Issue(s) ## Screenshots image ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/python.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/python.lua b/lua/lazyvim/plugins/extras/lang/python.lua index 3298f6dd..a02ded1f 100644 --- a/lua/lazyvim/plugins/extras/lang/python.lua +++ b/lua/lazyvim/plugins/extras/lang/python.lua @@ -116,10 +116,8 @@ return { "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 From a6b38de763addf2d22e8a43a1e679cc855dc376d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 22:46:14 +0200 Subject: [PATCH 405/496] fix(treesitter): indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes #6447 --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/plugins/treesitter.lua | 9 +++++++++ lua/lazyvim/util/treesitter.lua | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index f71f96df..2872d2a4 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -72,7 +72,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/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index c9a6e094..327c13be 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -80,9 +80,18 @@ return { -- 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, }) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 84e279ce..07e0e5eb 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -22,12 +22,12 @@ end function M.foldexpr() local buf = vim.api.nvim_get_current_buf() - return M.have(vim.b[buf].filetype) and vim.treesitter.foldexpr() or "0" + return M.have(vim.bo[buf].filetype) and vim.treesitter.foldexpr() or "0" end function M.indentexpr() local buf = vim.api.nvim_get_current_buf() - return M.have(vim.b[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 + return M.have(vim.bo[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 end return M From 1c14d858e54e9bfed30007641135e555716519e8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:50:09 +0200 Subject: [PATCH 406/496] chore(main): release 15.0.2 (#6439) :robot: I have created a release *beep* *boop* --- ## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) ### Bug Fixes * **python:** remove the wrapping `settings` key from `setup()` options ([#6069](https://github.com/LazyVim/LazyVim/issues/6069)) ([ed3aa74](https://github.com/LazyVim/LazyVim/commit/ed3aa74c107de7dc3e06367ce4afb20056710441)) * **treesitter:** indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes [#6447](https://github.com/LazyVim/LazyVim/issues/6447) ([a6b38de](https://github.com/LazyVim/LazyVim/commit/a6b38de763addf2d22e8a43a1e679cc855dc376d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index d09e9fe9..3cc5db92 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.1" + ".": "15.0.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa0a8ad..541bf093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) + + +### Bug Fixes + +* **python:** remove the wrapping `settings` key from `setup()` options ([#6069](https://github.com/LazyVim/LazyVim/issues/6069)) ([ed3aa74](https://github.com/LazyVim/LazyVim/commit/ed3aa74c107de7dc3e06367ce4afb20056710441)) +* **treesitter:** indentexpr/foldexpr now work as intended and override ftplugin settings. Fixes [#6447](https://github.com/LazyVim/LazyVim/issues/6447) ([a6b38de](https://github.com/LazyVim/LazyVim/commit/a6b38de763addf2d22e8a43a1e679cc855dc376d)) + ## [15.0.1](https://github.com/LazyVim/LazyVim/compare/v15.0.0...v15.0.1) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4524969d..ae0b9bda 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.1" -- x-release-please-version +M.version = "15.0.2" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From c28f599d4f5d175f3d259a621c4e7b5d0b2a0759 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 17 Sep 2025 23:39:19 +0200 Subject: [PATCH 407/496] fix(treesitter): properly update installedd languages after setup --- lua/lazyvim/plugins/treesitter.lua | 2 ++ lua/lazyvim/util/treesitter.lua | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 327c13be..b36c24d3 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -68,6 +68,8 @@ return { -- 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) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 07e0e5eb..bf7c12f8 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -3,15 +3,15 @@ local M = {} M._installed = nil ---@type table? ----@param force boolean? -function M.get_installed(force) - if not M._installed or force then +---@param update boolean? +function M.get_installed(update) + if update then M._installed = {} for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do M._installed[lang] = lang end end - return M._installed + return M._installed or {} end ---@param ft string From bd1f523df58edd61eef10643ef9c42f9191ce617 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 23:41:10 +0200 Subject: [PATCH 408/496] chore(main): release 15.0.3 (#6448) :robot: I have created a release *beep* *boop* --- ## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) ### Bug Fixes * **treesitter:** properly update installedd languages after setup ([c28f599](https://github.com/LazyVim/LazyVim/commit/c28f599d4f5d175f3d259a621c4e7b5d0b2a0759)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 3cc5db92..fbbae712 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.2" + ".": "15.0.3" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 541bf093..b6be3e05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) + + +### Bug Fixes + +* **treesitter:** properly update installedd languages after setup ([c28f599](https://github.com/LazyVim/LazyVim/commit/c28f599d4f5d175f3d259a621c4e7b5d0b2a0759)) + ## [15.0.2](https://github.com/LazyVim/LazyVim/compare/v15.0.1...v15.0.2) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index ae0b9bda..baad77a5 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.2" -- x-release-please-version +M.version = "15.0.3" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 5bf237820d7938b1b6490164fbd75e4117d341c1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:46:49 +0200 Subject: [PATCH 409/496] fix(snacks): safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing --- lua/lazyvim/config/options.lua | 2 +- lua/lazyvim/util/init.lua | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 2872d2a4..618d4e7e 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -104,7 +104,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/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 7561b385..44a135ad 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -299,4 +299,9 @@ function M.memoize(fn) end end +-- Safe wrapper around snacks to prevent errors when LazyVim is still installing +function M.statuscolumn() + return package.loaded.snacks and require("snacks.statuscolumn").get() or "" +end + return M From b93303d2339b1117171780cebed1d710fd3805d5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:48:43 +0200 Subject: [PATCH 410/496] feat(treesitter): refactored setting up treesitter indent/highlight/folds --- lua/lazyvim/config/options.lua | 4 +--- lua/lazyvim/plugins/lsp/init.lua | 1 + lua/lazyvim/plugins/treesitter.lua | 30 ++++++++++++++++++++---------- lua/lazyvim/util/treesitter.lua | 19 +++++++++++-------- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/lua/lazyvim/config/options.lua b/lua/lazyvim/config/options.lua index 618d4e7e..2ae1b38d 100644 --- a/lua/lazyvim/config/options.lua +++ b/lua/lazyvim/config/options.lua @@ -68,9 +68,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 @@ -78,7 +77,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 diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 00a698fc..1984c31b 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -148,6 +148,7 @@ return { 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/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index b36c24d3..bb842763 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -22,6 +22,9 @@ return { ---@class lazyvim.TSConfig: TSConfig opts = { -- LazyVim config for treesitter + indent = { enable = true }, + highlight = { enable = true }, + folds = { enable = true }, ensure_installed = { "bash", "c", @@ -80,20 +83,27 @@ return { 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 - pcall(vim.treesitter.start) + if not LazyVim.treesitter.have(ev.match) then + return + 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 + -- highlighting + if vim.tbl_get(opts, "highlight", "enable") ~= false then + pcall(vim.treesitter.start) + 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, }) diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index bf7c12f8..73e925fc 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -14,20 +14,23 @@ function M.get_installed(update) return M._installed or {} end ----@param ft string -function M.have(ft) - local lang = vim.treesitter.language.get_lang(ft) - return lang and M.get_installed()[lang] +---@param what string|number|nil +---@overload fun(buf?:number):boolean +---@overload fun(ft:string):boolean +---@return boolean +function M.have(what) + what = what or vim.api.nvim_get_current_buf() + what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]] + local lang = vim.treesitter.language.get_lang(what) + return lang ~= nil and M.get_installed()[lang] ~= nil end function M.foldexpr() - local buf = vim.api.nvim_get_current_buf() - return M.have(vim.bo[buf].filetype) and vim.treesitter.foldexpr() or "0" + return M.have() and vim.treesitter.foldexpr() or "0" end function M.indentexpr() - local buf = vim.api.nvim_get_current_buf() - return M.have(vim.bo[buf].filetype) and require("nvim-treesitter").indentexpr() or -1 + return M.have() and require("nvim-treesitter").indentexpr() or -1 end return M From 725d048e009b866425b2a0cc620ba2c413e8b65f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 09:49:20 +0200 Subject: [PATCH 411/496] feat(treesitter): automatically install and use mason's tree-sitter-cli if not installed on system --- lua/lazyvim/plugins/treesitter.lua | 16 +++++----- lua/lazyvim/util/treesitter.lua | 47 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index bb842763..a7ef7ed8 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -13,7 +13,9 @@ return { 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" }, @@ -59,18 +61,12 @@ return { -- 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 @@ -78,8 +74,10 @@ return { 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 diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 73e925fc..5df6aa53 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -33,4 +33,51 @@ function M.indentexpr() return M.have() and require("nvim-treesitter").indentexpr() or -1 end +---@param cb fun() +function M.ensure_treesitter_cli(cb) + if vim.fn.executable("tree-sitter") == 1 then + return cb() + end + + ---@param msg? string + local function fail(msg) + return LazyVim.error({ + "**treesitter-nvim** `main` requires the `tree-sitter` CLI executable to be installed.", + "Please install it manually from https://github.com/tree-sitter/tree-sitter/tree/master/crates/cli or", + "use your system package manager.", + "Run `:checkhealth nvim-treesitter` for more information.", + msg, + }) + end + + -- try installing with mason + if not pcall(require, "mason") then + return fail("`mason.nvim` is disabled in your config, so we cannot install it automatically.") + end + + -- check again since we might have installed it already + if vim.fn.executable("tree-sitter") == 1 then + return cb() + end + + local mr = require("mason-registry") + mr.refresh(function() + local p = mr.get_package("tree-sitter-cli") + if not p:is_installed() then + LazyVim.info("Installing `tree-sitter-cli` with `mason.nvim`...") + p:install( + nil, + vim.schedule_wrap(function(success) + if success then + LazyVim.info("Installed `tree-sitter-cli` with `mason.nvim`.") + cb() + else + fail("Failed to install `tree-sitter-cli` with `mason.nvim`.") + end + end) + ) + end + end) +end + return M From 1dece3be15bdd2e95e6997017b050fb08f01d143 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 18 Sep 2025 07:51:02 +0000 Subject: [PATCH 412/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 9f4b59fd..5c3e670d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 17 +*LazyVim.txt* For Neovim Last change: 2025 September 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a467ce074f00edd1d2667e55afe72904c5aeaf24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:03:59 +0200 Subject: [PATCH 413/496] chore(main): release 15.1.0 (#6452) :robot: I have created a release *beep* *boop* --- ## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) ### Features * **treesitter:** automatically install and use mason's tree-sitter-cli if not installed on system ([725d048](https://github.com/LazyVim/LazyVim/commit/725d048e009b866425b2a0cc620ba2c413e8b65f)) * **treesitter:** refactored setting up treesitter indent/highlight/folds ([b93303d](https://github.com/LazyVim/LazyVim/commit/b93303d2339b1117171780cebed1d710fd3805d5)) ### Bug Fixes * **snacks:** safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing ([5bf2378](https://github.com/LazyVim/LazyVim/commit/5bf237820d7938b1b6490164fbd75e4117d341c1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index fbbae712..9da34491 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.0.3" + ".": "15.1.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index b6be3e05..7b8723e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) + + +### Features + +* **treesitter:** automatically install and use mason's tree-sitter-cli if not installed on system ([725d048](https://github.com/LazyVim/LazyVim/commit/725d048e009b866425b2a0cc620ba2c413e8b65f)) +* **treesitter:** refactored setting up treesitter indent/highlight/folds ([b93303d](https://github.com/LazyVim/LazyVim/commit/b93303d2339b1117171780cebed1d710fd3805d5)) + + +### Bug Fixes + +* **snacks:** safe wrapper around snacks statuscolumn to prevent errors when LazyVim is still installing ([5bf2378](https://github.com/LazyVim/LazyVim/commit/5bf237820d7938b1b6490164fbd75e4117d341c1)) + ## [15.0.3](https://github.com/LazyVim/LazyVim/compare/v15.0.2...v15.0.3) (2025-09-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index baad77a5..d12f2ac0 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.0.3" -- x-release-please-version +M.version = "15.1.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 36b41911ab90fe19505af306a31a5a699342d3c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 13:06:46 +0200 Subject: [PATCH 414/496] fix(lspconfig): remove all usage of `lspconfig` --- lua/lazyvim/plugins/extras/lang/java.lua | 4 +++- lua/lazyvim/plugins/extras/lang/ocaml.lua | 19 +++++++++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index e4926521..d4eb5f6e 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -91,7 +91,9 @@ return { 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/lua/lazyvim/plugins/extras/lang/ocaml.lua b/lua/lazyvim/plugins/extras/lang/ocaml.lua index 0e733a4a..631223d4 100644 --- a/lua/lazyvim/plugins/extras/lang/ocaml.lua +++ b/lua/lazyvim/plugins/extras/lang/ocaml.lua @@ -26,12 +26,19 @@ return { "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 75a3809e15a0ecff9adc46c6cd3aaac51d99b561 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 13:52:07 +0200 Subject: [PATCH 415/496] fix(lsp): schedule_wrap setting up LSPs to work around root cause of #6456. Fixes #6456 --- lua/lazyvim/plugins/lsp/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 1984c31b..95b7385c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -2,7 +2,7 @@ return { -- lspconfig { "neovim/nvim-lspconfig", - event = { "BufReadPre", "BufNewFile", "BufWritePre" }, + event = "LazyFile", dependencies = { "mason.nvim", { "mason-org/mason-lspconfig.nvim", config = function() end }, @@ -118,7 +118,7 @@ return { return ret end, ---@param opts PluginLspOpts - config = function(_, opts) + config = vim.schedule_wrap(function(_, opts) -- setup autoformat LazyVim.format.register(LazyVim.lsp.formatter()) @@ -256,7 +256,7 @@ return { resolve("denols") resolve("vtsls") end - end, + end), }, -- cmdline tools and lsp servers From cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 14:07:49 +0200 Subject: [PATCH 416/496] fix(core): check for outdated nightly. See #6458 --- lua/lazyvim/plugins/init.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 7797b047..4ba9b36d 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,9 +1,20 @@ +local fail = nil if vim.fn.has("nvim-0.11.2") == 0 then - vim.api.nvim_echo({ + fail = { { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, - }, true, {}) + } +elseif vim.fn.has("nvim-0.12") == 1 and not vim.lsp.is_enabled then + fail = { + { "LazyVim requires Neovim >= 0.11.2 or a recent Nightly\n", "ErrorMsg" }, + { "Your nightly is too old, please update to a more recent version.\n", "Comment" }, + { "Press any key to exit", "MoreMsg" }, + } +end + +if fail then + vim.api.nvim_echo(fail, true, {}) vim.fn.getchar() vim.cmd([[quit]]) return {} From 3a743f7f853bd90894259cd93432d77c688774b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 14:09:58 +0200 Subject: [PATCH 417/496] chore(main): release 15.1.1 (#6457) :robot: I have created a release *beep* *boop* --- ## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) ### Bug Fixes * **core:** check for outdated nightly. See [#6458](https://github.com/LazyVim/LazyVim/issues/6458) ([cfac3c9](https://github.com/LazyVim/LazyVim/commit/cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3)) * **lspconfig:** remove all usage of `lspconfig` ([36b4191](https://github.com/LazyVim/LazyVim/commit/36b41911ab90fe19505af306a31a5a699342d3c3)) * **lsp:** schedule_wrap setting up LSPs to work around root cause of [#6456](https://github.com/LazyVim/LazyVim/issues/6456). Fixes [#6456](https://github.com/LazyVim/LazyVim/issues/6456) ([75a3809](https://github.com/LazyVim/LazyVim/commit/75a3809e15a0ecff9adc46c6cd3aaac51d99b561)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 9da34491..8e00e87c 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.1.0" + ".": "15.1.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8723e8..c1b5e9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) + + +### Bug Fixes + +* **core:** check for outdated nightly. See [#6458](https://github.com/LazyVim/LazyVim/issues/6458) ([cfac3c9](https://github.com/LazyVim/LazyVim/commit/cfac3c9a85526ad7406f9b246097a1ec4fa1a2c3)) +* **lspconfig:** remove all usage of `lspconfig` ([36b4191](https://github.com/LazyVim/LazyVim/commit/36b41911ab90fe19505af306a31a5a699342d3c3)) +* **lsp:** schedule_wrap setting up LSPs to work around root cause of [#6456](https://github.com/LazyVim/LazyVim/issues/6456). Fixes [#6456](https://github.com/LazyVim/LazyVim/issues/6456) ([75a3809](https://github.com/LazyVim/LazyVim/commit/75a3809e15a0ecff9adc46c6cd3aaac51d99b561)) + ## [15.1.0](https://github.com/LazyVim/LazyVim/compare/v15.0.3...v15.1.0) (2025-09-18) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index d12f2ac0..0df3885b 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.1.0" -- x-release-please-version +M.version = "15.1.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 22:19:03 +0200 Subject: [PATCH 418/496] feat(options): don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes #6464 --- lua/lazyvim/plugins/lsp/init.lua | 6 ++-- lua/lazyvim/plugins/treesitter.lua | 7 +++-- lua/lazyvim/util/init.lua | 47 ++++++++++++++++++++++++++++++ 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 95b7385c..bc6a7f46 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -146,9 +146,9 @@ return { -- 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/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index a7ef7ed8..751a72f3 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -95,13 +95,14 @@ return { -- 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, }) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index 44a135ad..a3349c8a 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -304,4 +304,51 @@ function M.statuscolumn() return package.loaded.snacks and require("snacks.statuscolumn").get() or "" end +local _defaults = {} ---@type table + +-- Determines whether it's safe to set an option to a default value. +-- +-- It will only set the option if: +-- * it is the same as the global value +-- * it is the same as a previously set default value +-- * it was last set by a script in $VIMRUNTIME +---@param option string +---@param value string|number|boolean +---@return boolean was_set +function M.set_default(option, value) + local key = ("%s=%s"):format(option, value) + _defaults[key] = true + + if not _defaults[key] then + local l = vim.api.nvim_get_option_value(option, { scope = "local" }) + local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + + if l ~= g then + -- Option changed, so check if it was set by an ft plugin + local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) + ---@param e vim.fn.getscriptinfo.ret + local scriptinfo = vim.tbl_filter(function(e) + return e.sid == info.last_set_sid + end, vim.fn.getscriptinfo()) + local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) + if not by_rtp then + if vim.g.lazyvim_debug_set_default then + LazyVim.warn( + ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + { title = "LazyVim", once = true } + ) + end + return false + end + end + end + + if vim.g.lazyvim_debug_set_default then + LazyVim.info(("Setting option `%s` to `%s`"):format(option, value), { title = "LazyVim", once = true }) + end + + vim.api.nvim_set_option_value(option, value, { scope = "local" }) + return true +end + return M From 2401d5fca6f2a2fcaca4f9c4c84c4b713c602352 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 18 Sep 2025 23:51:32 +0200 Subject: [PATCH 419/496] fix(options): set_default option --- lua/lazyvim/util/init.lua | 43 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index a3349c8a..ac3ffcec 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -310,36 +310,35 @@ local _defaults = {} ---@type table -- -- It will only set the option if: -- * it is the same as the global value --- * it is the same as a previously set default value +-- * it's current value is a default value -- * it was last set by a script in $VIMRUNTIME ---@param option string ---@param value string|number|boolean ---@return boolean was_set function M.set_default(option, value) - local key = ("%s=%s"):format(option, value) - _defaults[key] = true + local l = vim.api.nvim_get_option_value(option, { scope = "local" }) + local g = vim.api.nvim_get_option_value(option, { scope = "global" }) - if not _defaults[key] then - local l = vim.api.nvim_get_option_value(option, { scope = "local" }) - local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + _defaults[("%s=%s"):format(option, value)] = true + local key = ("%s=%s"):format(option, l) - if l ~= g then - -- Option changed, so check if it was set by an ft plugin - local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) - ---@param e vim.fn.getscriptinfo.ret - local scriptinfo = vim.tbl_filter(function(e) - return e.sid == info.last_set_sid - end, vim.fn.getscriptinfo()) - local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) - if not by_rtp then - if vim.g.lazyvim_debug_set_default then - LazyVim.warn( - ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), - { title = "LazyVim", once = true } - ) - end - return false + if l ~= g and not _defaults[key] then + -- Option does not match global and is not a default value + -- Check if it was set by a script in $VIMRUNTIME + local info = vim.api.nvim_get_option_info2(option, { scope = "local" }) + ---@param e vim.fn.getscriptinfo.ret + local scriptinfo = vim.tbl_filter(function(e) + return e.sid == info.last_set_sid + end, vim.fn.getscriptinfo()) + local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) + if not by_rtp then + if vim.g.lazyvim_debug_set_default then + LazyVim.warn( + ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + { title = "LazyVim", once = true } + ) end + return false end end From 3ca7b47365c85a07047e48cad450feff66c8bdd6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 08:11:38 +0200 Subject: [PATCH 420/496] feat(core): relax hard requirement for `vim.lsp.is_enabled`. Show warning instead --- lua/lazyvim/plugins/init.lua | 23 ++++++++++------------- lua/lazyvim/plugins/lsp/init.lua | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/lua/lazyvim/plugins/init.lua b/lua/lazyvim/plugins/init.lua index 4ba9b36d..80394371 100644 --- a/lua/lazyvim/plugins/init.lua +++ b/lua/lazyvim/plugins/init.lua @@ -1,23 +1,20 @@ -local fail = nil if vim.fn.has("nvim-0.11.2") == 0 then - fail = { + vim.api.nvim_echo({ { "LazyVim requires Neovim >= 0.11.2\n", "ErrorMsg" }, { "For more info, see: https://github.com/LazyVim/LazyVim/issues/6421\n", "Comment" }, { "Press any key to exit", "MoreMsg" }, - } -elseif vim.fn.has("nvim-0.12") == 1 and not vim.lsp.is_enabled then - fail = { - { "LazyVim requires Neovim >= 0.11.2 or a recent Nightly\n", "ErrorMsg" }, - { "Your nightly is too old, please update to a more recent version.\n", "Comment" }, - { "Press any key to exit", "MoreMsg" }, - } -end - -if fail then - vim.api.nvim_echo(fail, true, {}) + }, true, {}) vim.fn.getchar() vim.cmd([[quit]]) return {} +elseif not vim.lsp.is_enabled then + vim.schedule(function() + LazyVim.warn({ + "You're using an **old** `nightly` version of **Neovim**", + "Please update to a recent `nightly`,", + "or a stable version (`>= 0.11.2`).", + }) + end) end require("lazyvim.config").init() diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index bc6a7f46..51b6f022 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -235,7 +235,7 @@ return { }) 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 cd7ae5bc74d7459170e39d8bf9c26ad3777d393f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 19 Sep 2025 06:12:49 +0000 Subject: [PATCH 421/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 5c3e670d..906717b6 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 18 +*LazyVim.txt* For Neovim Last change: 2025 September 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 26590285ead7a89bb45f309714f7f40136c89267 Mon Sep 17 00:00:00 2001 From: Wendel Macedo Date: Fri, 19 Sep 2025 03:38:33 -0300 Subject: [PATCH 422/496] feat(clojure): use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin (#5876) ## Description On [this bug](https://github.com/LazyVim/LazyVim/issues/5866) I told about a plugin that was falty on clojure lang extra, with the goal to have him removed but @mitchelkuijpers suggested a new one that I implemented on this PR. [The plugin](https://github.com/julienvincent/nvim-paredit) is 1:1 with the keymaps of the older one. ## Related Issue(s) https://github.com/LazyVim/LazyVim/issues/5866 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clojure.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 7197aabd..06a7d141 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -27,7 +27,7 @@ return { }, -- Add s-exp mappings - { "PaterJason/nvim-treesitter-sexp", opts = {}, event = "LazyFile" }, + { "julienvincent/nvim-paredit", opts = {}, event = "LazyFile" }, -- Colorize the output of the log buffer { From 55e762a8888cd5f336e4e2d4b2cc6b8b1b950663 Mon Sep 17 00:00:00 2001 From: gbprod Date: Fri, 19 Sep 2025 11:29:07 +0200 Subject: [PATCH 423/496] feat(yanky): use snacks picker for improved yank history navigation (#5802) ## Description I've introduce snacks picker support for [Yanky history ring](https://github.com/gbprod/yanky.nvim/pull/215), I propose to use it in LazyVim. ## Screenshots ![image](https://github.com/user-attachments/assets/0e11bab4-3060-418b-8fa1-33df6a4ee8c5) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/yanky.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/coding/yanky.lua b/lua/lazyvim/plugins/extras/coding/yanky.lua index c880aceb..6285796d 100644 --- a/lua/lazyvim/plugins/extras/coding/yanky.lua +++ b/lua/lazyvim/plugins/extras/coding/yanky.lua @@ -13,6 +13,8 @@ return { 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 5ce7cd650a5fffc257e0312b82fffd26abe2a1fa Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 19:58:28 +0200 Subject: [PATCH 424/496] fix(treesitter): check if queries for indent/fold exists before enabling it. Fixes #6474 --- lua/lazyvim/plugins/treesitter.lua | 4 ++-- lua/lazyvim/util/treesitter.lua | 32 +++++++++++++++++++++++------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 751a72f3..5721979d 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -94,12 +94,12 @@ return { 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 diff --git a/lua/lazyvim/util/treesitter.lua b/lua/lazyvim/util/treesitter.lua index 5df6aa53..b1d647e8 100644 --- a/lua/lazyvim/util/treesitter.lua +++ b/lua/lazyvim/util/treesitter.lua @@ -1,36 +1,54 @@ ---@class lazyvim.util.treesitter local M = {} -M._installed = nil ---@type table? +M._installed = nil ---@type table? +M._queries = {} ---@type table ---@param update boolean? function M.get_installed(update) if update then - M._installed = {} + M._installed, M._queries = {}, {} for _, lang in ipairs(require("nvim-treesitter").get_installed("parsers")) do - M._installed[lang] = lang + M._installed[lang] = true end end return M._installed or {} end +---@param lang string +---@param query string +function M.have_query(lang, query) + local key = lang .. ":" .. query + if M._queries[key] == nil then + M._queries[key] = vim.treesitter.query.get(lang, query) ~= nil + end + return M._queries[key] +end + ---@param what string|number|nil +---@param query? string ---@overload fun(buf?:number):boolean ---@overload fun(ft:string):boolean ---@return boolean -function M.have(what) +function M.have(what, query) what = what or vim.api.nvim_get_current_buf() what = type(what) == "number" and vim.bo[what].filetype or what --[[@as string]] local lang = vim.treesitter.language.get_lang(what) - return lang ~= nil and M.get_installed()[lang] ~= nil + if lang == nil or M.get_installed()[lang] == nil then + return false + end + if query and not M.have_query(lang, query) then + return false + end + return true end function M.foldexpr() - return M.have() and vim.treesitter.foldexpr() or "0" + return M.have(nil, "folds") and vim.treesitter.foldexpr() or "0" end function M.indentexpr() - return M.have() and require("nvim-treesitter").indentexpr() or -1 + return M.have(nil, "indents") and require("nvim-treesitter").indentexpr() or -1 end ---@param cb fun() From 9c611b0c5758d0d659e7fdb29119b7083a56f989 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 19 Sep 2025 20:26:36 +0200 Subject: [PATCH 425/496] fix(options): track some initial options right after loading `options.lua`. See #6463 --- lua/lazyvim/config/init.lua | 8 ++++++++ lua/lazyvim/util/init.lua | 14 +++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 0df3885b..344bcb56 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -304,6 +304,8 @@ function M.load(name) end M.did_init = false +M._options = {} ---@type vim.wo|vim.bo + function M.init() if M.did_init then return @@ -326,6 +328,12 @@ function M.init() -- this is needed to make sure options will be correctly applied -- after installing missing plugins M.load("options") + + -- save some options to track defaults + M._options.indentexpr = vim.o.indentexpr + M._options.foldmethod = vim.o.foldmethod + M._options.foldexpr = vim.o.foldexpr + -- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow lazy_clipboard = vim.opt.clipboard vim.opt.clipboard = "" diff --git a/lua/lazyvim/util/init.lua b/lua/lazyvim/util/init.lua index ac3ffcec..812e6f22 100644 --- a/lua/lazyvim/util/init.lua +++ b/lua/lazyvim/util/init.lua @@ -317,11 +317,12 @@ local _defaults = {} ---@type table ---@return boolean was_set function M.set_default(option, value) local l = vim.api.nvim_get_option_value(option, { scope = "local" }) - local g = vim.api.nvim_get_option_value(option, { scope = "global" }) + local g = LazyVim.config._options[option] or vim.api.nvim_get_option_value(option, { scope = "global" }) _defaults[("%s=%s"):format(option, value)] = true local key = ("%s=%s"):format(option, l) + local source = "" if l ~= g and not _defaults[key] then -- Option does not match global and is not a default value -- Check if it was set by a script in $VIMRUNTIME @@ -330,11 +331,12 @@ function M.set_default(option, value) local scriptinfo = vim.tbl_filter(function(e) return e.sid == info.last_set_sid end, vim.fn.getscriptinfo()) + source = scriptinfo[1] and scriptinfo[1].name or "" local by_rtp = #scriptinfo == 1 and vim.startswith(scriptinfo[1].name, vim.fn.expand("$VIMRUNTIME")) if not by_rtp then if vim.g.lazyvim_debug_set_default then LazyVim.warn( - ("Not setting option `%s` to `%s` because it was changed by a filetype plugin."):format(option, value), + ("Not setting option `%s` to `%q` because it was changed by a plugin."):format(option, value), { title = "LazyVim", once = true } ) end @@ -343,7 +345,13 @@ function M.set_default(option, value) end if vim.g.lazyvim_debug_set_default then - LazyVim.info(("Setting option `%s` to `%s`"):format(option, value), { title = "LazyVim", once = true }) + LazyVim.info({ + ("Setting option `%s` to `%q`"):format(option, value), + ("Was: %q"):format(l), + ("Global: %q"):format(g), + source ~= "" and ("Last set by: %s"):format(source) or "", + "buf: " .. vim.api.nvim_buf_get_name(0), + }, { title = "LazyVim", once = true }) end vim.api.nvim_set_option_value(option, value, { scope = "local" }) From 55b5c1fecb0b7e71c5eb40555b17d1e4820690f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frestein=20=E2=98=81=EF=B8=8F?= Date: Sat, 20 Sep 2025 17:08:56 +0500 Subject: [PATCH 426/496] fix(lang.clojure): correct cmp-conjure source name (#6208) ## Description https://github.com/PaterJason/cmp-conjure/blob/8c9a88efedc0e5bf3165baa6af8a407afe29daf6/README.md?plain=1#L10 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/clojure.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/clojure.lua b/lua/lazyvim/plugins/extras/lang/clojure.lua index 06a7d141..c7af0b55 100644 --- a/lua/lazyvim/plugins/extras/lang/clojure.lua +++ b/lua/lazyvim/plugins/extras/lang/clojure.lua @@ -21,7 +21,7 @@ return { }, 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 c9efea84311f520cd58263dc7702870abfb5f20b Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 20 Sep 2025 12:10:18 +0000 Subject: [PATCH 427/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 906717b6..f7f29509 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 19 +*LazyVim.txt* For Neovim Last change: 2025 September 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 65e38d3b34cab653a05318c1a9014df3c89fdb53 Mon Sep 17 00:00:00 2001 From: vector Date: Sat, 20 Sep 2025 21:48:35 +0800 Subject: [PATCH 428/496] fix(editor): calculate the height passed to the prompt of fzf-lua properly (#6481) ## Description add two lines more to the height of prompt window. ## Related Issue(s) - Fixes #6480 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 31297b94..9e7ef671 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -120,7 +120,7 @@ return { 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", @@ -135,7 +135,7 @@ return { 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 b4606f9df3395a261bb6a09acc837993da5d8bfc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 20 Sep 2025 16:50:44 +0200 Subject: [PATCH 429/496] chore(main): release 15.2.0 (#6468) :robot: I have created a release *beep* *boop* --- ## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) ### Features * **clojure:** use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin ([#5876](https://github.com/LazyVim/LazyVim/issues/5876)) ([2659028](https://github.com/LazyVim/LazyVim/commit/26590285ead7a89bb45f309714f7f40136c89267)) * **core:** relax hard requirement for `vim.lsp.is_enabled`. Show warning instead ([3ca7b47](https://github.com/LazyVim/LazyVim/commit/3ca7b47365c85a07047e48cad450feff66c8bdd6)) * **options:** don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes [#6464](https://github.com/LazyVim/LazyVim/issues/6464) ([ccbaf55](https://github.com/LazyVim/LazyVim/commit/ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac)) * **yanky:** use snacks picker for improved yank history navigation ([#5802](https://github.com/LazyVim/LazyVim/issues/5802)) ([55e762a](https://github.com/LazyVim/LazyVim/commit/55e762a8888cd5f336e4e2d4b2cc6b8b1b950663)) ### Bug Fixes * **editor:** calculate the height passed to the prompt of fzf-lua properly ([#6481](https://github.com/LazyVim/LazyVim/issues/6481)) ([65e38d3](https://github.com/LazyVim/LazyVim/commit/65e38d3b34cab653a05318c1a9014df3c89fdb53)) * **lang.clojure:** correct cmp-conjure source name ([#6208](https://github.com/LazyVim/LazyVim/issues/6208)) ([55b5c1f](https://github.com/LazyVim/LazyVim/commit/55b5c1fecb0b7e71c5eb40555b17d1e4820690f0)) * **options:** set_default option ([2401d5f](https://github.com/LazyVim/LazyVim/commit/2401d5fca6f2a2fcaca4f9c4c84c4b713c602352)) * **options:** track some initial options right after loading `options.lua`. See [#6463](https://github.com/LazyVim/LazyVim/issues/6463) ([9c611b0](https://github.com/LazyVim/LazyVim/commit/9c611b0c5758d0d659e7fdb29119b7083a56f989)) * **treesitter:** check if queries for indent/fold exists before enabling it. Fixes [#6474](https://github.com/LazyVim/LazyVim/issues/6474) ([5ce7cd6](https://github.com/LazyVim/LazyVim/commit/5ce7cd650a5fffc257e0312b82fffd26abe2a1fa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8e00e87c..b25a6511 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.1.1" + ".": "15.2.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index c1b5e9ac..21249147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) + + +### Features + +* **clojure:** use 'nvim-paredit' instead 'nvim-treesitter-sexp' as clojure S-exp Plugin ([#5876](https://github.com/LazyVim/LazyVim/issues/5876)) ([2659028](https://github.com/LazyVim/LazyVim/commit/26590285ead7a89bb45f309714f7f40136c89267)) +* **core:** relax hard requirement for `vim.lsp.is_enabled`. Show warning instead ([3ca7b47](https://github.com/LazyVim/LazyVim/commit/3ca7b47365c85a07047e48cad450feff66c8bdd6)) +* **options:** don't overwrite indentexpr/foldexpr/foldmethod when set by plugins. Fixes [#6464](https://github.com/LazyVim/LazyVim/issues/6464) ([ccbaf55](https://github.com/LazyVim/LazyVim/commit/ccbaf55c2f8bc691f8f64fe40ce00a1abda4fbac)) +* **yanky:** use snacks picker for improved yank history navigation ([#5802](https://github.com/LazyVim/LazyVim/issues/5802)) ([55e762a](https://github.com/LazyVim/LazyVim/commit/55e762a8888cd5f336e4e2d4b2cc6b8b1b950663)) + + +### Bug Fixes + +* **editor:** calculate the height passed to the prompt of fzf-lua properly ([#6481](https://github.com/LazyVim/LazyVim/issues/6481)) ([65e38d3](https://github.com/LazyVim/LazyVim/commit/65e38d3b34cab653a05318c1a9014df3c89fdb53)) +* **lang.clojure:** correct cmp-conjure source name ([#6208](https://github.com/LazyVim/LazyVim/issues/6208)) ([55b5c1f](https://github.com/LazyVim/LazyVim/commit/55b5c1fecb0b7e71c5eb40555b17d1e4820690f0)) +* **options:** set_default option ([2401d5f](https://github.com/LazyVim/LazyVim/commit/2401d5fca6f2a2fcaca4f9c4c84c4b713c602352)) +* **options:** track some initial options right after loading `options.lua`. See [#6463](https://github.com/LazyVim/LazyVim/issues/6463) ([9c611b0](https://github.com/LazyVim/LazyVim/commit/9c611b0c5758d0d659e7fdb29119b7083a56f989)) +* **treesitter:** check if queries for indent/fold exists before enabling it. Fixes [#6474](https://github.com/LazyVim/LazyVim/issues/6474) ([5ce7cd6](https://github.com/LazyVim/LazyVim/commit/5ce7cd650a5fffc257e0312b82fffd26abe2a1fa)) + ## [15.1.1](https://github.com/LazyVim/LazyVim/compare/v15.1.0...v15.1.1) (2025-09-18) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 344bcb56..e85dbd63 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.1.1" -- x-release-please-version +M.version = "15.2.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 11:04:23 +0200 Subject: [PATCH 430/496] feat(treesitter): show an error if the user tries to set a custom treesitter compiler --- lua/lazyvim/plugins/treesitter.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 5721979d..8ad15924 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -58,6 +58,21 @@ return { 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 89ce0438d6e78fd589ac9f41ec7b366c6581eb3c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 21 Sep 2025 09:05:18 +0000 Subject: [PATCH 431/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f7f29509..054756aa 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 20 +*LazyVim.txt* For Neovim Last change: 2025 September 21 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 775621ac0af42486ef1cd4254d1a6625a190040b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 11:58:57 +0200 Subject: [PATCH 432/496] fix(vtsls): fix and move denols/vtsls disambigutaion to typescript extra. Fixes #6476 --- .../plugins/extras/lang/typescript.lua | 22 +++++++++++++++++++ lua/lazyvim/plugins/lsp/init.lua | 22 ------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/typescript.lua b/lua/lazyvim/plugins/extras/lang/typescript.lua index 3830f795..64dcd394 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript.lua @@ -131,6 +131,28 @@ return { 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/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 51b6f022..3810cb8c 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -234,28 +234,6 @@ return { }, }) 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 16637dd655e3ed6b88d3fcd2ed8ed75420a89415 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 12:34:27 +0200 Subject: [PATCH 433/496] refactor(lsp): cleanup lsp/mason-lspconfig code --- lua/lazyvim/plugins/lsp/init.lua | 60 ++++++++++++-------------------- 1 file changed, 23 insertions(+), 37 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 3810cb8c..324777d8 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -68,7 +68,8 @@ return { 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 @@ -187,51 +188,36 @@ return { 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 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(mason_all, server) then - vim.lsp.enable(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 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 + 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 end end if have_mason then + local servers = vim.tbl_keys(opts.servers) + local exclude = vim.tbl_filter(configure, servers) 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 a90b56518f4f2291985952d79472d4f935c0bad0 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 21 Sep 2025 12:35:17 +0200 Subject: [PATCH 434/496] fix(lsp): fixup for when not using mason --- lua/lazyvim/plugins/lsp/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 324777d8..4be74c82 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -210,9 +210,9 @@ return { end end + local servers = vim.tbl_keys(opts.servers) + local exclude = vim.tbl_filter(configure, servers) if have_mason then - local servers = vim.tbl_keys(opts.servers) - local exclude = vim.tbl_filter(configure, servers) require("mason-lspconfig").setup({ ensure_installed = vim.tbl_filter(function(server) return not vim.tbl_contains(exclude, server) From 13069f20183655d8a02f3acbd21d0ac4c9ce811c Mon Sep 17 00:00:00 2001 From: Zhou Fang Date: Sun, 21 Sep 2025 21:40:15 +0900 Subject: [PATCH 435/496] feat(copilot): use `blink-copilot` as blink.cmp copilot source (#5551) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description After reviewing and fixing bugs in blink-cmp-copilot, I realized that there is significant room for improvement in its codebase. So I created a new copilot source `blink-copilot` for `blink.cmp` that introduces many new features, enhanced performance, and official `copilot.vim` backend support. (`copilot.lua` is supported by default) The plugin has been starred by over 30 users, and it is growing faster than blink-cmp-copilot. After more than two weeks of gathering feedback and addressing bugs, the plugin has become very stable, and I believe it’s time to share it with a broader audience. `blink-copilot` register the kind `Copilot` by default, so there is no need to do extra transforming on the completion items. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 48870743..7c326499 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -98,15 +98,14 @@ return { { "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 7d5365ad1463c61936f06ed4eeeefc819e36b3c3 Mon Sep 17 00:00:00 2001 From: Vladimir Shvets Date: Sun, 21 Sep 2025 20:29:53 +0700 Subject: [PATCH 436/496] fix(lualine): pretty path fix for mixed case paths on Windows (#4911) ## Description Here's an example of the issue: ```lua local pretty_path = require('lazyvim.util').lualine.pretty_path({ relative = 'cwd' }) -- just a stub local component = { create_hl = function() end, format_hl = function() return '' end, get_default_hl = function() return '' end } local cwd = vim.fn.getcwd() vim.print('cwd: ' .. cwd) vim.print('pretty path: ' .. pretty_path(component)) -- results if `cd d:\tmp` was called previously -- cwd: d:\tmp -- pretty path: d:\tmp\pretty_path_issue.lua -- -- results if `cd D:\tmp` was called previously -- cwd: D:\tmp -- pretty path: pretty_path_issue.lua ``` Depending on the initial path of the `cd` we either get a pretty path or we don't =) I'm not sure if this should be fixed in the neovim itself (considering windows paths as case-insensitive), but I would assume that would take a lot longer to land there, if it's even considered a needed change ## Related Issue(s) Somewhat related to #4763, where I've left a comment, but decided to look a bit deeper ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/lualine.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index 5f4f1885..a6aa24f3 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -101,9 +101,20 @@ function M.pretty_path(opts) local root = LazyVim.root.get({ normalize = true }) local cwd = LazyVim.root.cwd() - if opts.relative == "cwd" and path:find(cwd, 1, true) == 1 then + -- original path is preserved to provide user with expected result of pretty_path, not a normalized one, + -- which might be confusing + local norm_path = path + + if LazyVim.is_win() then + -- in case any of the provided paths involved mixed case, an additional normalization step for windows + norm_path = norm_path:lower() + root = root:lower() + cwd = cwd:lower() + end + + if opts.relative == "cwd" and norm_path:find(cwd, 1, true) == 1 then path = path:sub(#cwd + 2) - elseif path:find(root, 1, true) == 1 then + elseif norm_path:find(root, 1, true) == 1 then path = path:sub(#root + 2) end From 720e06a908cbf6e3afb4eccc049d58df9ace770a Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 21 Sep 2025 15:42:38 +0200 Subject: [PATCH 437/496] fix(keymaps): enable snacks git keybindings (#6323) ## Description Enable snacks git keybindings even if `lazygit` is not installed Related discussion: https://github.com/LazyVim/LazyVim/discussions/6322 ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index acaf44d9..938a2333 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -163,12 +163,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 }) From 37a1c1af5dbbcf069bb94a71b4dda3626fbda77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frestein=20=E2=98=81=EF=B8=8F?= Date: Sun, 21 Sep 2025 18:51:56 +0500 Subject: [PATCH 438/496] fix(luasnip): add missing optional tag to garymjr/nvim-snippets (#5733) ## Description This pull request fixes an issue where the `nvim-snippets` plugin was incorrectly marked as disabled due to the missing optional tag in the configuration. By adding the `optional = true` tag, the plugin will no longer appear as disabled when it is not installed. ## Related Issue(s) ## Screenshots Before: ![image](https://github.com/user-attachments/assets/8391b047-22e6-416b-acb8-3b8af3932469) After: ![image](https://github.com/user-attachments/assets/8c1775ce-8aa9-434e-986d-a1db3ac7bd56) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 85ed2fd5..5b62113e 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -1,6 +1,6 @@ return { -- disable builtin snippet support - { "garymjr/nvim-snippets", enabled = false }, + { "garymjr/nvim-snippets", optional = true, enabled = false }, -- add luasnip { From 80990ec62fd36fc4b6b921a9041f55858e33e030 Mon Sep 17 00:00:00 2001 From: dareni Date: Mon, 22 Sep 2025 21:55:56 +1000 Subject: [PATCH 439/496] fix(jdtls): allow mason jdtls installation (#6498) Bug fix jdtls config for compatibility with last lsp refactor. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index d4eb5f6e..24a754df 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -71,11 +71,6 @@ return { servers = { jdtls = {}, }, - setup = { - jdtls = function() - return true -- avoid duplicate servers - end, - }, }, }, From c4237659621e406089f4d13d32192954d52c4924 Mon Sep 17 00:00:00 2001 From: dareni Date: Mon, 22 Sep 2025 21:56:18 +1000 Subject: [PATCH 440/496] fix(jdtls): bundle configuration bug fix (#6499) The jar for the debug adapter was included but the operation to append the java-test jar files failed. --- lua/lazyvim/plugins/extras/lang/java.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 24a754df..28441c5c 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -145,19 +145,10 @@ return { 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 21518ae8a32cc56cfd8eefbbe33b8fe801d5bb3a Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 22 Sep 2025 11:57:00 +0000 Subject: [PATCH 441/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 054756aa..e454f9cf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 21 +*LazyVim.txt* For Neovim Last change: 2025 September 22 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 37b1ec41ae57e8396d5c923a4bfdf7050215b4d6 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 12:58:45 +0200 Subject: [PATCH 442/496] fix(lsp): fix mason install/exclude. Closes #6504 --- lua/lazyvim/plugins/lsp/init.lua | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 4be74c82..35ff4505 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -187,37 +187,36 @@ return { 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 6229f5a2dda91da50b72d1bef973df4db8daac8d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 23 Sep 2025 10:59:38 +0000 Subject: [PATCH 443/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e454f9cf..dbeb4819 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 22 +*LazyVim.txt* For Neovim Last change: 2025 September 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 67781bda04195e99d187dece5a27bf067bfb34cd Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 13:00:13 +0200 Subject: [PATCH 444/496] Revert "fix(jdtls): allow mason jdtls installation (#6498)" This reverts commit 80990ec62fd36fc4b6b921a9041f55858e33e030. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 28441c5c..4dd1d77f 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -71,6 +71,11 @@ return { servers = { jdtls = {}, }, + setup = { + jdtls = function() + return true -- avoid duplicate servers + end, + }, }, }, From 6e3a06306d72a7f7a401c007f56706023a6c00ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 13:02:58 +0200 Subject: [PATCH 445/496] chore(main): release 15.3.0 (#6486) :robot: I have created a release *beep* *boop* --- ## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23) ### Features * **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c)) * **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160)) ### Bug Fixes * **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030)) * **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924)) * **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a)) * **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6)) * **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0)) * **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a)) * **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b25a6511..b0e2e610 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.2.0" + ".": "15.3.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 21249147..5b8c6724 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23) + + +### Features + +* **copilot:** use `blink-copilot` as blink.cmp copilot source ([#5551](https://github.com/LazyVim/LazyVim/issues/5551)) ([13069f2](https://github.com/LazyVim/LazyVim/commit/13069f20183655d8a02f3acbd21d0ac4c9ce811c)) +* **treesitter:** show an error if the user tries to set a custom treesitter compiler ([89ff1fd](https://github.com/LazyVim/LazyVim/commit/89ff1fd600bb6ff4cf2c9edbc2217a40ecb8d160)) + + +### Bug Fixes + +* **jdtls:** allow mason jdtls installation ([#6498](https://github.com/LazyVim/LazyVim/issues/6498)) ([80990ec](https://github.com/LazyVim/LazyVim/commit/80990ec62fd36fc4b6b921a9041f55858e33e030)) +* **jdtls:** bundle configuration bug fix ([#6499](https://github.com/LazyVim/LazyVim/issues/6499)) ([c423765](https://github.com/LazyVim/LazyVim/commit/c4237659621e406089f4d13d32192954d52c4924)) +* **keymaps:** enable snacks git keybindings ([#6323](https://github.com/LazyVim/LazyVim/issues/6323)) ([720e06a](https://github.com/LazyVim/LazyVim/commit/720e06a908cbf6e3afb4eccc049d58df9ace770a)) +* **lsp:** fix mason install/exclude. Closes [#6504](https://github.com/LazyVim/LazyVim/issues/6504) ([37b1ec4](https://github.com/LazyVim/LazyVim/commit/37b1ec41ae57e8396d5c923a4bfdf7050215b4d6)) +* **lsp:** fixup for when not using mason ([a90b565](https://github.com/LazyVim/LazyVim/commit/a90b56518f4f2291985952d79472d4f935c0bad0)) +* **luasnip:** add missing optional tag to garymjr/nvim-snippets ([#5733](https://github.com/LazyVim/LazyVim/issues/5733)) ([37a1c1a](https://github.com/LazyVim/LazyVim/commit/37a1c1af5dbbcf069bb94a71b4dda3626fbda77a)) +* **vtsls:** fix and move denols/vtsls disambigutaion to typescript extra. Fixes [#6476](https://github.com/LazyVim/LazyVim/issues/6476) ([775621a](https://github.com/LazyVim/LazyVim/commit/775621ac0af42486ef1cd4254d1a6625a190040b)) + ## [15.2.0](https://github.com/LazyVim/LazyVim/compare/v15.1.1...v15.2.0) (2025-09-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index e85dbd63..1d288cd2 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.2.0" -- x-release-please-version +M.version = "15.3.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 8a760984611cd9df0971a9f36a94838b9e32453f Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 23 Sep 2025 13:06:33 +0200 Subject: [PATCH 446/496] style(lsp): typo --- lua/lazyvim/plugins/lsp/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 35ff4505..2fe3ae97 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -187,7 +187,7 @@ return { 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[] + local mason_exclude = {} ---@type string[] ---@return boolean? exclude automatic setup local function configure(server) From 5985ca0cf1a0c1ddee8b2b718c730f988cec7001 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 Sep 2025 07:35:59 +0200 Subject: [PATCH 447/496] fix(treesitter): create buffer-local textobjects keymaps only when available. Closes #6508 --- lua/lazyvim/plugins/treesitter.lua | 74 +++++++++++++++++------------- 1 file changed, 42 insertions(+), 32 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 8ad15924..78f1b3b2 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -128,38 +128,19 @@ return { "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 @@ -167,6 +148,35 @@ return { 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 1d404815f0600b841dcc0d19e0a2e46bb8156f6b Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 25 Sep 2025 05:37:13 +0000 Subject: [PATCH 448/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index dbeb4819..8e59c6cb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 23 +*LazyVim.txt* For Neovim Last change: 2025 September 25 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3b0296358508da1eb258c8716df163dd04fa6449 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 Sep 2025 10:31:16 +0200 Subject: [PATCH 449/496] feat(copilot): added `copilot-native` extra to setup native inline completions in Neovim --- .../plugins/extras/ai/copilot-native.lua | 49 +++++++++++++++++++ lua/lazyvim/util/lualine.lua | 36 ++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/ai/copilot-native.lua diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua new file mode 100644 index 00000000..8bcb9bfe --- /dev/null +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -0,0 +1,49 @@ +---@diagnostic disable: missing-fields +if lazyvim_docs then + -- Native inline completions don't support being shown as regular completions + vim.g.ai_cmp = false +end + +if LazyVim.has_extra("ai.copilot-native") then + if not vim.lsp.inline_completion then + LazyVim.error("You need Neovim >= 0.12 to use the `ai.copilot-native` extra.") + return {} + end + if LazyVim.has_extra("ai.copilot") then + LazyVim.error("Please disable the `ai.copilot` extra if you want to use `ai.copilot-native`") + return {} + end +end + +vim.g.ai_cmp = false + +return { + desc = "Native Copilot LSP integration. Requires Neovim >= 0.12", + -- copilot-language-server + { + "neovim/nvim-lspconfig", + opts = { + servers = { + copilot = {}, + }, + setup = { + copilot = function(_, opts) + vim.lsp.inline_completion.enable() + LazyVim.cmp.actions.ai_accept = function() + return vim.lsp.inline_completion.get() + end + end, + }, + }, + }, + + -- lualine + { + "nvim-lualine/lualine.nvim", + optional = true, + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.lsp("copilot")) + end, + }, +} diff --git a/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index a6aa24f3..af4b55f7 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -22,6 +22,42 @@ function M.status(icon, status) } end +--- Status indicator for LSP server activity +---@param server string +---@param opts? { methods?: string[], icon?: string } +function M.lsp(server, opts) + opts = opts or {} + local methods = opts.methods or { "textDocument/completion", "textDocument/inlineCompletion" } + local pending = {} ---@type table + vim.api.nvim_create_autocmd("LspRequest", { + group = vim.api.nvim_create_augroup("lazyvim.lualine.lsp." .. server, { clear = true }), + callback = function(args) + ---@class LspRequestData + ---@field client_id number + ---@field request { bufnr: number, method: string, type: "pending" | "cancel" | "complete" | string } + ---@field request_id number + local data = args.data + local client = vim.lsp.get_client_by_id(data.client_id) + if client and client.name == server and vim.tbl_contains(methods, data.request.method) then + pending[data.request_id] = data.request.type == "pending" or nil + end + end, + }) + return { + function() + return opts.icon + or LazyVim.config.icons.kinds[server:sub(1, 1):upper() .. server:sub(2)] + or LazyVim.config.icons.diagnostics.Hint + end, + cond = function() + return #vim.lsp.get_clients({ name = server, bufnr = 0 }) > 0 + end, + color = function() + return { fg = Snacks.util.color(vim.tbl_isempty(pending) and "Special" or "DiagnosticWarn") } + end, + } +end + ---@param name string ---@param icon? string function M.cmp_source(name, icon) From 9913e1665d783d9c4407633bc33475d403aff433 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 Sep 2025 11:11:40 +0200 Subject: [PATCH 450/496] feat(copilot-native): better lualine status --- .../plugins/extras/ai/copilot-native.lua | 26 ++++++++++++-- lua/lazyvim/util/lualine.lua | 36 ------------------- 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index 8bcb9bfe..85cd0d30 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -16,6 +16,7 @@ if LazyVim.has_extra("ai.copilot-native") then end vim.g.ai_cmp = false +local status = {} ---@type table return { desc = "Native Copilot LSP integration. Requires Neovim >= 0.12", @@ -24,10 +25,22 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - copilot = {}, + 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(_, opts) + copilot = function() vim.lsp.inline_completion.enable() LazyVim.cmp.actions.ai_accept = function() return vim.lsp.inline_completion.get() @@ -43,7 +56,14 @@ return { optional = true, event = "VeryLazy", opts = function(_, opts) - table.insert(opts.sections.lualine_x, 2, LazyVim.lualine.lsp("copilot")) + 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/lua/lazyvim/util/lualine.lua b/lua/lazyvim/util/lualine.lua index af4b55f7..a6aa24f3 100644 --- a/lua/lazyvim/util/lualine.lua +++ b/lua/lazyvim/util/lualine.lua @@ -22,42 +22,6 @@ function M.status(icon, status) } end ---- Status indicator for LSP server activity ----@param server string ----@param opts? { methods?: string[], icon?: string } -function M.lsp(server, opts) - opts = opts or {} - local methods = opts.methods or { "textDocument/completion", "textDocument/inlineCompletion" } - local pending = {} ---@type table - vim.api.nvim_create_autocmd("LspRequest", { - group = vim.api.nvim_create_augroup("lazyvim.lualine.lsp." .. server, { clear = true }), - callback = function(args) - ---@class LspRequestData - ---@field client_id number - ---@field request { bufnr: number, method: string, type: "pending" | "cancel" | "complete" | string } - ---@field request_id number - local data = args.data - local client = vim.lsp.get_client_by_id(data.client_id) - if client and client.name == server and vim.tbl_contains(methods, data.request.method) then - pending[data.request_id] = data.request.type == "pending" or nil - end - end, - }) - return { - function() - return opts.icon - or LazyVim.config.icons.kinds[server:sub(1, 1):upper() .. server:sub(2)] - or LazyVim.config.icons.diagnostics.Hint - end, - cond = function() - return #vim.lsp.get_clients({ name = server, bufnr = 0 }) > 0 - end, - color = function() - return { fg = Snacks.util.color(vim.tbl_isempty(pending) and "Special" or "DiagnosticWarn") } - end, - } -end - ---@param name string ---@param icon? string function M.cmp_source(name, icon) From 6bd630cec6f905665691d593dc5d0fb3d54f560c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 Sep 2025 12:30:50 +0200 Subject: [PATCH 451/496] feat(copilot-native): added keymaps to cycle suggestions --- lua/lazyvim/plugins/extras/ai/copilot-native.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index 85cd0d30..a4c8005b 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -37,6 +37,21 @@ return { 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 c83df9e68dd41f5a3f7df5a7048169ee286a7da8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 25 Sep 2025 15:30:28 +0200 Subject: [PATCH 452/496] feat(copilot-native): added experimental support for next edit suggestions. check the docs to enable --- lua/lazyvim/config/keymaps.lua | 1 + .../plugins/extras/ai/copilot-native.lua | 68 ++++++++++++++++++- lua/lazyvim/util/cmp.lua | 1 + 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 938a2333..752aa602 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -49,6 +49,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/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index a4c8005b..b4a61b20 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -2,6 +2,9 @@ if lazyvim_docs then -- 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 end if LazyVim.has_extra("ai.copilot-native") then @@ -57,8 +60,41 @@ return { 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, }, @@ -81,4 +117,34 @@ return { ) end, }, + + vim.g.copilot_nes + and { + "copilotlsp-nvim/copilot-lsp", + init = function() + vim.api.nvim_create_autocmd("BufEnter", { + callback = function(ev) + local buf = ev.buf + local client = vim.lsp.get_clients({ name = "copilot", bufnr = buf })[1] + if not client then + return + end + client:notify("textDocument/didFocus", { + textDocument = { + uri = vim.uri_from_bufnr(buf), + }, + }) + end, + }) + + LazyVim.cmp.actions.ai_stop = function() + require("copilot-lsp.nes").clear() + end + end, + keys = { + -- nes is also useful in normal mode + { "", LazyVim.cmp.map({ "ai_accept" }, ""), mode = { "n" }, expr = true }, + }, + } + or nil, } diff --git a/lua/lazyvim/util/cmp.lua b/lua/lazyvim/util/cmp.lua index 0641c892..2637b0d3 100644 --- a/lua/lazyvim/util/cmp.lua +++ b/lua/lazyvim/util/cmp.lua @@ -18,6 +18,7 @@ M.actions = { vim.snippet.stop() end end, + ai_stop = function() end, } ---@param actions string[] From af6e2505b54270c30145e8f4191b865870537287 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 26 Sep 2025 06:36:14 +0200 Subject: [PATCH 453/496] fix(catppuccin): follow-up on api change (#6505) ## Description https://github.com/catppuccin/nvim/pull/931 will change the api for accessing the bufferline integration. im making this follow up pr so it wont have to be done through a user :) (sorry about https://github.com/LazyVim/LazyVim/pull/6354) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 4c41d492..0e19c87f 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -13,6 +13,14 @@ return { lazy = true, name = "catppuccin", opts = { + lsp_styles = { + underlines = { + errors = { "undercurl" }, + hints = { "undercurl" }, + warnings = { "undercurl" }, + information = { "undercurl" }, + }, + }, integrations = { aerial = true, alpha = true, @@ -28,26 +36,14 @@ return { 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, }, @@ -58,7 +54,7 @@ return { 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 c467282a8352d9ec067b07a00463d850bb4146b3 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 26 Sep 2025 04:37:07 +0000 Subject: [PATCH 454/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 8e59c6cb..8d0a76e9 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 25 +*LazyVim.txt* For Neovim Last change: 2025 September 26 ============================================================================== Table of Contents *LazyVim-table-of-contents* From ed637bb0f7f418de069a4d5a7ed8a7b3b93eb425 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 26 Sep 2025 12:14:33 +0200 Subject: [PATCH 455/496] feat(copilot-native): removed experimental **nes** support with `copilot_lsp` for now, since it's not the best experience right now --- .../plugins/extras/ai/copilot-native.lua | 61 ------------------- 1 file changed, 61 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index b4a61b20..71a6a3ae 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -2,9 +2,6 @@ if lazyvim_docs then -- 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 end if LazyVim.has_extra("ai.copilot-native") then @@ -61,36 +58,8 @@ return { 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 @@ -117,34 +86,4 @@ return { ) end, }, - - vim.g.copilot_nes - and { - "copilotlsp-nvim/copilot-lsp", - init = function() - vim.api.nvim_create_autocmd("BufEnter", { - callback = function(ev) - local buf = ev.buf - local client = vim.lsp.get_clients({ name = "copilot", bufnr = buf })[1] - if not client then - return - end - client:notify("textDocument/didFocus", { - textDocument = { - uri = vim.uri_from_bufnr(buf), - }, - }) - end, - }) - - LazyVim.cmp.actions.ai_stop = function() - require("copilot-lsp.nes").clear() - end - end, - keys = { - -- nes is also useful in normal mode - { "", LazyVim.cmp.map({ "ai_accept" }, ""), mode = { "n" }, expr = true }, - }, - } - or nil, } From 92b7fcf7b156600b86952bf6f2c777adc68fd0b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 12:16:12 +0200 Subject: [PATCH 456/496] chore(main): release 15.4.0 (#6515) :robot: I have created a release *beep* *boop* --- ## [15.4.0](https://github.com/LazyVim/LazyVim/compare/v15.3.0...v15.4.0) (2025-09-26) ### Features * **copilot-native:** added experimental support for next edit suggestions. check the docs to enable ([c83df9e](https://github.com/LazyVim/LazyVim/commit/c83df9e68dd41f5a3f7df5a7048169ee286a7da8)) * **copilot-native:** added keymaps to cycle suggestions ([6bd630c](https://github.com/LazyVim/LazyVim/commit/6bd630cec6f905665691d593dc5d0fb3d54f560c)) * **copilot-native:** better lualine status ([9913e16](https://github.com/LazyVim/LazyVim/commit/9913e1665d783d9c4407633bc33475d403aff433)) * **copilot-native:** removed experimental **nes** support with `copilot_lsp` for now, since it's not the best experience right now ([ed637bb](https://github.com/LazyVim/LazyVim/commit/ed637bb0f7f418de069a4d5a7ed8a7b3b93eb425)) * **copilot:** added `copilot-native` extra to setup native inline completions in Neovim ([3b02963](https://github.com/LazyVim/LazyVim/commit/3b0296358508da1eb258c8716df163dd04fa6449)) ### Bug Fixes * **catppuccin:** follow-up on api change ([#6505](https://github.com/LazyVim/LazyVim/issues/6505)) ([af6e250](https://github.com/LazyVim/LazyVim/commit/af6e2505b54270c30145e8f4191b865870537287)) * **treesitter:** create buffer-local textobjects keymaps only when available. Closes [#6508](https://github.com/LazyVim/LazyVim/issues/6508) ([5985ca0](https://github.com/LazyVim/LazyVim/commit/5985ca0cf1a0c1ddee8b2b718c730f988cec7001)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index b0e2e610..8a820181 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.3.0" + ".": "15.4.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b8c6724..abe4b7c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [15.4.0](https://github.com/LazyVim/LazyVim/compare/v15.3.0...v15.4.0) (2025-09-26) + + +### Features + +* **copilot-native:** added experimental support for next edit suggestions. check the docs to enable ([c83df9e](https://github.com/LazyVim/LazyVim/commit/c83df9e68dd41f5a3f7df5a7048169ee286a7da8)) +* **copilot-native:** added keymaps to cycle suggestions ([6bd630c](https://github.com/LazyVim/LazyVim/commit/6bd630cec6f905665691d593dc5d0fb3d54f560c)) +* **copilot-native:** better lualine status ([9913e16](https://github.com/LazyVim/LazyVim/commit/9913e1665d783d9c4407633bc33475d403aff433)) +* **copilot-native:** removed experimental **nes** support with `copilot_lsp` for now, since it's not the best experience right now ([ed637bb](https://github.com/LazyVim/LazyVim/commit/ed637bb0f7f418de069a4d5a7ed8a7b3b93eb425)) +* **copilot:** added `copilot-native` extra to setup native inline completions in Neovim ([3b02963](https://github.com/LazyVim/LazyVim/commit/3b0296358508da1eb258c8716df163dd04fa6449)) + + +### Bug Fixes + +* **catppuccin:** follow-up on api change ([#6505](https://github.com/LazyVim/LazyVim/issues/6505)) ([af6e250](https://github.com/LazyVim/LazyVim/commit/af6e2505b54270c30145e8f4191b865870537287)) +* **treesitter:** create buffer-local textobjects keymaps only when available. Closes [#6508](https://github.com/LazyVim/LazyVim/issues/6508) ([5985ca0](https://github.com/LazyVim/LazyVim/commit/5985ca0cf1a0c1ddee8b2b718c730f988cec7001)) + ## [15.3.0](https://github.com/LazyVim/LazyVim/compare/v15.2.0...v15.3.0) (2025-09-23) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 1d288cd2..39c719cf 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.3.0" -- x-release-please-version +M.version = "15.4.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From e9bc6074d1ea69e921a6195d1dc34333eaa310f8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 26 Sep 2025 15:55:32 +0200 Subject: [PATCH 457/496] fix(ai.copilot): disable copilot lsp if installed. copilot.lua needs its own version of the LSP --- lua/lazyvim/plugins/extras/ai/copilot.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/copilot.lua b/lua/lazyvim/plugins/extras/ai/copilot.lua index 7c326499..3b5d2275 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot.lua @@ -25,6 +25,17 @@ return { }, }, + -- copilot-language-server + { + "neovim/nvim-lspconfig", + opts = { + servers = { + -- copilot.lua only works with its own copilot lsp server + copilot = { enabled = false }, + }, + }, + }, + -- add ai_accept action { "zbirenbaum/copilot.lua", From b25ea9c153e76d11579731e1d5529f275a36f91d Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 26 Sep 2025 15:56:03 +0200 Subject: [PATCH 458/496] feat(ai.copilot-native): let sidekick.nvim handle some things if available --- .../plugins/extras/ai/copilot-native.lua | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index 71a6a3ae..310fbd81 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -26,17 +26,6 @@ return { 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 = { { @@ -57,13 +46,25 @@ return { 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, }, @@ -76,6 +77,9 @@ return { optional = true, event = "VeryLazy", opts = function(_, opts) + if LazyVim.has_extra("ai.sidekick") then + return + end table.insert( opts.sections.lualine_x, 2, From 30a325d67184a80006dc55352d9663cdf01082d5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 26 Sep 2025 15:57:00 +0200 Subject: [PATCH 459/496] feat(ai): added completion hooks for next edit suggestions --- lua/lazyvim/config/keymaps.lua | 1 - lua/lazyvim/plugins/extras/coding/blink.lua | 4 ++-- lua/lazyvim/plugins/extras/coding/nvim-cmp.lua | 2 +- lua/lazyvim/util/cmp.lua | 1 - 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 752aa602..938a2333 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -49,7 +49,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/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 207b1940..790808b1 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -122,12 +122,12 @@ return { 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/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua index 54bfbf7c..fab56250 100644 --- a/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua +++ b/lua/lazyvim/plugins/extras/coding/nvim-cmp.lua @@ -52,7 +52,7 @@ return { 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({ diff --git a/lua/lazyvim/util/cmp.lua b/lua/lazyvim/util/cmp.lua index 2637b0d3..0641c892 100644 --- a/lua/lazyvim/util/cmp.lua +++ b/lua/lazyvim/util/cmp.lua @@ -18,7 +18,6 @@ M.actions = { vim.snippet.stop() end end, - ai_stop = function() end, } ---@param actions string[] From dbfe20996ce62d6b0048245ab4e304610548da04 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 27 Sep 2025 18:41:34 +0200 Subject: [PATCH 460/496] feat(extras): added extra for `sidekick.nvim` (Copilot LSP integration) --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/ai/sidekick.lua diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua new file mode 100644 index 00000000..54974b6e --- /dev/null +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -0,0 +1,49 @@ +return { + desc = "Next edit suggestions with the Copilot LSP server", + + -- copilot-language-server + { + "neovim/nvim-lspconfig", + opts = { + servers = { + copilot = {}, + }, + }, + }, + + -- lualine + { + "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, + }, + + { + "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 }, + }, + }, +} From eee364552e8afb893f4b3f47b9c0582ca390878b Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 27 Sep 2025 16:42:47 +0000 Subject: [PATCH 461/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 8d0a76e9..a071f54a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 26 +*LazyVim.txt* For Neovim Last change: 2025 September 27 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 060e6dfaf7d4157b1a144df7d83179640dc52400 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 27 Sep 2025 18:54:19 +0200 Subject: [PATCH 462/496] chore(main): release 15.5.0 (#6533) :robot: I have created a release *beep* *boop* --- ## [15.5.0](https://github.com/LazyVim/LazyVim/compare/v15.4.0...v15.5.0) (2025-09-27) ### Features * **ai.copilot-native:** let sidekick.nvim handle some things if available ([b25ea9c](https://github.com/LazyVim/LazyVim/commit/b25ea9c153e76d11579731e1d5529f275a36f91d)) * **ai:** added completion hooks for next edit suggestions ([30a325d](https://github.com/LazyVim/LazyVim/commit/30a325d67184a80006dc55352d9663cdf01082d5)) * **extras:** added extra for `sidekick.nvim` (Copilot LSP integration) ([dbfe209](https://github.com/LazyVim/LazyVim/commit/dbfe20996ce62d6b0048245ab4e304610548da04)) ### Bug Fixes * **ai.copilot:** disable copilot lsp if installed. copilot.lua needs its own version of the LSP ([e9bc607](https://github.com/LazyVim/LazyVim/commit/e9bc6074d1ea69e921a6195d1dc34333eaa310f8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 8a820181..46b8d23f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.4.0" + ".": "15.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index abe4b7c0..1be2a770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [15.5.0](https://github.com/LazyVim/LazyVim/compare/v15.4.0...v15.5.0) (2025-09-27) + + +### Features + +* **ai.copilot-native:** let sidekick.nvim handle some things if available ([b25ea9c](https://github.com/LazyVim/LazyVim/commit/b25ea9c153e76d11579731e1d5529f275a36f91d)) +* **ai:** added completion hooks for next edit suggestions ([30a325d](https://github.com/LazyVim/LazyVim/commit/30a325d67184a80006dc55352d9663cdf01082d5)) +* **extras:** added extra for `sidekick.nvim` (Copilot LSP integration) ([dbfe209](https://github.com/LazyVim/LazyVim/commit/dbfe20996ce62d6b0048245ab4e304610548da04)) + + +### Bug Fixes + +* **ai.copilot:** disable copilot lsp if installed. copilot.lua needs its own version of the LSP ([e9bc607](https://github.com/LazyVim/LazyVim/commit/e9bc6074d1ea69e921a6195d1dc34333eaa310f8)) + ## [15.4.0](https://github.com/LazyVim/LazyVim/compare/v15.3.0...v15.4.0) (2025-09-26) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 39c719cf..fde5e4a6 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.4.0" -- x-release-please-version +M.version = "15.5.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From b8899781516da71ba0f63afa93fb4a6b25dff144 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 27 Sep 2025 19:53:14 +0200 Subject: [PATCH 463/496] feat(sidekick): fancier lualine component --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 54974b6e..574938f7 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -17,16 +17,26 @@ return { 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() - 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, }, From 5d18a46b6a7bb5b946a6c87b9a45a2738c9ec9c3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 29 Sep 2025 23:12:20 +0200 Subject: [PATCH 464/496] feat(sidekick): added keymaps to work with AI cli tools --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 574938f7..fbb9e446 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -54,6 +54,39 @@ return { 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" }, + }, }, }, } From 44e37974164f52f718531ece7901f32f69a626e7 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 29 Sep 2025 21:13:28 +0000 Subject: [PATCH 465/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index a071f54a..cb52ac56 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 27 +*LazyVim.txt* For Neovim Last change: 2025 September 29 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3d3739b4b8943b5e7143d37f60bb0adbb6cf82f3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 30 Sep 2025 00:03:40 +0200 Subject: [PATCH 466/496] fix(sidekick): changed keymap to open new tool --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index fbb9e446..5af64c63 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -64,12 +64,12 @@ return { desc = "Sidekick Toggle", }, { - "as", + "an", function() require("sidekick.cli").select_tool() end, mode = { "n" }, - desc = "Sidekick Select Tool", + desc = "Sidekick New Tool", }, { "", From 089d0a5ac1ab85238804e017ac1ef0dc0a8341f0 Mon Sep 17 00:00:00 2001 From: Jonathan Pollak Date: Tue, 30 Sep 2025 07:48:46 +0300 Subject: [PATCH 467/496] fix(copilot-native): change Copilot-native's `` description to "Prev Suggestion" (#6553) ## Description The description for both `` and `` in the `copilot-native` extra are described as `Next Copilot Suggestion`. The PR changes the description of `` to be `Prev Copilot Suggestion` ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/copilot-native.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index 310fbd81..5b936885 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -37,7 +37,7 @@ return { { "", function() vim.lsp.inline_completion.select({ count = -1 }) end, - desc = "Next Copilot Suggestion", + desc = "Prev Copilot Suggestion", mode = { "i", "n" }, }, }, From aa8115848dd6a823162150f6170401a77a0f9262 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 30 Sep 2025 04:49:39 +0000 Subject: [PATCH 468/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index cb52ac56..f4206577 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 29 +*LazyVim.txt* For Neovim Last change: 2025 September 30 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 22851dce979c4cac379c6795ca7885c83c1c7eaf Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 30 Sep 2025 15:42:15 +0200 Subject: [PATCH 469/496] fix(config): clipboard:get() --- lua/lazyvim/config/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index fde5e4a6..96aa3246 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -335,7 +335,7 @@ function M.init() M._options.foldexpr = vim.o.foldexpr -- defer built-in clipboard handling: "xsel" and "pbcopy" can be slow - lazy_clipboard = vim.opt.clipboard + lazy_clipboard = vim.opt.clipboard:get() vim.opt.clipboard = "" if vim.g.deprecation_warnings == false then From 4ebcd611b2c81de9badba26146ee86ed4020cee5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:43:00 +0200 Subject: [PATCH 470/496] chore(main): release 15.6.0 (#6536) :robot: I have created a release *beep* *boop* --- ## [15.6.0](https://github.com/LazyVim/LazyVim/compare/v15.5.0...v15.6.0) (2025-09-30) ### Features * **sidekick:** added keymaps to work with AI cli tools ([5d18a46](https://github.com/LazyVim/LazyVim/commit/5d18a46b6a7bb5b946a6c87b9a45a2738c9ec9c3)) * **sidekick:** fancier lualine component ([b889978](https://github.com/LazyVim/LazyVim/commit/b8899781516da71ba0f63afa93fb4a6b25dff144)) ### Bug Fixes * **config:** clipboard:get() ([22851dc](https://github.com/LazyVim/LazyVim/commit/22851dce979c4cac379c6795ca7885c83c1c7eaf)) * **copilot-native:** change Copilot-native's `` description to "Prev Suggestion" ([#6553](https://github.com/LazyVim/LazyVim/issues/6553)) ([089d0a5](https://github.com/LazyVim/LazyVim/commit/089d0a5ac1ab85238804e017ac1ef0dc0a8341f0)) * **sidekick:** changed keymap to open new tool ([3d3739b](https://github.com/LazyVim/LazyVim/commit/3d3739b4b8943b5e7143d37f60bb0adbb6cf82f3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 46b8d23f..e40520b5 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.5.0" + ".": "15.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1be2a770..48d578c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [15.6.0](https://github.com/LazyVim/LazyVim/compare/v15.5.0...v15.6.0) (2025-09-30) + + +### Features + +* **sidekick:** added keymaps to work with AI cli tools ([5d18a46](https://github.com/LazyVim/LazyVim/commit/5d18a46b6a7bb5b946a6c87b9a45a2738c9ec9c3)) +* **sidekick:** fancier lualine component ([b889978](https://github.com/LazyVim/LazyVim/commit/b8899781516da71ba0f63afa93fb4a6b25dff144)) + + +### Bug Fixes + +* **config:** clipboard:get() ([22851dc](https://github.com/LazyVim/LazyVim/commit/22851dce979c4cac379c6795ca7885c83c1c7eaf)) +* **copilot-native:** change Copilot-native's `` description to "Prev Suggestion" ([#6553](https://github.com/LazyVim/LazyVim/issues/6553)) ([089d0a5](https://github.com/LazyVim/LazyVim/commit/089d0a5ac1ab85238804e017ac1ef0dc0a8341f0)) +* **sidekick:** changed keymap to open new tool ([3d3739b](https://github.com/LazyVim/LazyVim/commit/3d3739b4b8943b5e7143d37f60bb0adbb6cf82f3)) + ## [15.5.0](https://github.com/LazyVim/LazyVim/compare/v15.4.0...v15.5.0) (2025-09-27) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 96aa3246..4c04eb36 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.5.0" -- x-release-please-version +M.version = "15.6.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 2f76d572a2b172e5e7e236d3e972443242c36b66 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 30 Sep 2025 18:10:36 +0200 Subject: [PATCH 471/496] fix(stylua): stylua is now also an LSP. Disable it since we use the CLI tool. --- lua/lazyvim/plugins/lsp/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/lsp/init.lua b/lua/lazyvim/plugins/lsp/init.lua index 2fe3ae97..5d93c399 100644 --- a/lua/lazyvim/plugins/lsp/init.lua +++ b/lua/lazyvim/plugins/lsp/init.lua @@ -71,6 +71,7 @@ return { ---@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 23b1da170f6367fafe0be47b9c141770ed75a78e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 1 Oct 2025 19:04:14 +0200 Subject: [PATCH 472/496] fix(copilot-native): schedule inline_completion.enable --- lua/lazyvim/plugins/extras/ai/copilot-native.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-native.lua b/lua/lazyvim/plugins/extras/ai/copilot-native.lua index 5b936885..a93e077a 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-native.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-native.lua @@ -45,7 +45,9 @@ return { }, 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() From 2df7988b1e9abcc2e3a882c38ea96b4da8b6edec Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 1 Oct 2025 17:05:13 +0000 Subject: [PATCH 473/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index f4206577..2b34a330 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 September 30 +*LazyVim.txt* For Neovim Last change: 2025 October 01 ============================================================================== Table of Contents *LazyVim-table-of-contents* From aabc03f88d30b0424926d9d894adc5c91eb84ec2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 1 Oct 2025 19:05:47 +0200 Subject: [PATCH 474/496] fix(sidekick): better keymaps --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 5af64c63..ba8a3368 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -64,12 +64,12 @@ return { 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", }, { "", @@ -82,9 +82,9 @@ return { { "ap", function() - require("sidekick.cli").select_prompt() + require("sidekick.cli").prompt() end, - desc = "Sidekick Ask Prompt", + desc = "Sidekick Prompt", mode = { "n", "v" }, }, }, From 2942bd4a0d738d693af51354e96aa7be5407d105 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 1 Oct 2025 22:18:05 +0200 Subject: [PATCH 475/496] feat(sidekick): updated keymaps for sidekick --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index ba8a3368..e8e88c26 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -51,42 +51,40 @@ return { 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", + }, }, }, } From fab399c90d10b5000dd19489a40d856fe3312edc Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 07:22:59 +0200 Subject: [PATCH 476/496] chore(main): release 15.7.0 (#6556) :robot: I have created a release *beep* *boop* --- ## [15.7.0](https://github.com/LazyVim/LazyVim/compare/v15.6.0...v15.7.0) (2025-10-01) ### Features * **sidekick:** updated keymaps for sidekick ([2942bd4](https://github.com/LazyVim/LazyVim/commit/2942bd4a0d738d693af51354e96aa7be5407d105)) ### Bug Fixes * **copilot-native:** schedule inline_completion.enable ([23b1da1](https://github.com/LazyVim/LazyVim/commit/23b1da170f6367fafe0be47b9c141770ed75a78e)) * **sidekick:** better keymaps ([aabc03f](https://github.com/LazyVim/LazyVim/commit/aabc03f88d30b0424926d9d894adc5c91eb84ec2)) * **stylua:** stylua is now also an LSP. Disable it since we use the CLI tool. ([2f76d57](https://github.com/LazyVim/LazyVim/commit/2f76d572a2b172e5e7e236d3e972443242c36b66)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index e40520b5..a54c61a0 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.6.0" + ".": "15.7.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 48d578c9..92842c17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [15.7.0](https://github.com/LazyVim/LazyVim/compare/v15.6.0...v15.7.0) (2025-10-01) + + +### Features + +* **sidekick:** updated keymaps for sidekick ([2942bd4](https://github.com/LazyVim/LazyVim/commit/2942bd4a0d738d693af51354e96aa7be5407d105)) + + +### Bug Fixes + +* **copilot-native:** schedule inline_completion.enable ([23b1da1](https://github.com/LazyVim/LazyVim/commit/23b1da170f6367fafe0be47b9c141770ed75a78e)) +* **sidekick:** better keymaps ([aabc03f](https://github.com/LazyVim/LazyVim/commit/aabc03f88d30b0424926d9d894adc5c91eb84ec2)) +* **stylua:** stylua is now also an LSP. Disable it since we use the CLI tool. ([2f76d57](https://github.com/LazyVim/LazyVim/commit/2f76d572a2b172e5e7e236d3e972443242c36b66)) + ## [15.6.0](https://github.com/LazyVim/LazyVim/compare/v15.5.0...v15.6.0) (2025-09-30) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4c04eb36..5a60a575 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.6.0" -- x-release-please-version +M.version = "15.7.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 7fb57a7081b1647c4a92058ccae0a71b28d0b3c0 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 2 Oct 2025 05:24:03 +0000 Subject: [PATCH 477/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 2b34a330..091b0880 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 01 +*LazyVim.txt* For Neovim Last change: 2025 October 02 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 188b2886147acb4d9e2a5c8ae7b73770fd66a92c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 2 Oct 2025 19:14:51 +0200 Subject: [PATCH 478/496] fix(sidekick): better keymaps --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 27 ++++++++++++++++------ 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index e8e88c26..6e80ba47 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -64,20 +64,27 @@ return { { "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" }, }, { "", @@ -85,6 +92,12 @@ return { 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", + }, }, }, } From dc1ffa5bcb66f46284f91a8593dda5c7c54a1824 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 2 Oct 2025 19:18:17 +0200 Subject: [PATCH 479/496] chore(main): release 15.7.1 (#6575) :robot: I have created a release *beep* *boop* --- ## [15.7.1](https://github.com/LazyVim/LazyVim/compare/v15.7.0...v15.7.1) (2025-10-02) ### Bug Fixes * **sidekick:** better keymaps ([188b288](https://github.com/LazyVim/LazyVim/commit/188b2886147acb4d9e2a5c8ae7b73770fd66a92c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a54c61a0..6cc4959a 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "15.7.0" + ".": "15.7.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 92842c17..1c7935c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [15.7.1](https://github.com/LazyVim/LazyVim/compare/v15.7.0...v15.7.1) (2025-10-02) + + +### Bug Fixes + +* **sidekick:** better keymaps ([188b288](https://github.com/LazyVim/LazyVim/commit/188b2886147acb4d9e2a5c8ae7b73770fd66a92c)) + ## [15.7.0](https://github.com/LazyVim/LazyVim/compare/v15.6.0...v15.7.0) (2025-10-01) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5a60a575..233328d5 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "15.7.0" -- x-release-please-version +M.version = "15.7.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From b9d38f692015fecaa72d55282b74a3d601e4c9fa Mon Sep 17 00:00:00 2001 From: "Md. Iftakhar Awal Chowdhury" <42291930+AtifChy@users.noreply.github.com> Date: Fri, 3 Oct 2025 00:52:41 +0600 Subject: [PATCH 480/496] fix(keymaps): update deprecated diagnostic keymap to latest api change (#6574) ## Description refectors deprecated `diagnostic_goto` calls to newer `vim.diagnostic.jump` API. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 938a2333..5709aa6f 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -120,10 +120,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 c220e04cd65b56331622dcf0ddcc6fe9d104dce9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 8 Oct 2025 21:26:13 +0200 Subject: [PATCH 481/496] ci: update test scripts --- scripts/test | 4 ++-- tests/minit.lua | 8 +++++++- vim.toml | 21 --------------------- vim.yml | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 24 deletions(-) delete mode 100644 vim.toml create mode 100644 vim.yml diff --git a/scripts/test b/scripts/test index ffbb5405..354a1a1c 100755 --- a/scripts/test +++ b/scripts/test @@ -1,3 +1,3 @@ -#!/bin/env bash +#!/usr/bin/env bash -nvim -l tests/minit.lua --minitest +nvim -l tests/minit.lua --minitest "$@" diff --git a/tests/minit.lua b/tests/minit.lua index 41907e75..c1d7c473 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -1,7 +1,13 @@ #!/usr/bin/env -S nvim -l vim.env.LAZY_STDPATH = ".tests" -load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))() +vim.env.LAZY_PATH = vim.fs.normalize("~/projects/lazy.nvim") + +if vim.fn.isdirectory(vim.env.LAZY_PATH) then + loadfile(vim.env.LAZY_PATH .. "/bootstrap.lua")() +else + load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"), "bootstrap.lua")() +end -- Setup lazy.nvim require("lazy.minit").setup({ diff --git a/vim.toml b/vim.toml deleted file mode 100644 index df7e67e6..00000000 --- a/vim.toml +++ /dev/null @@ -1,21 +0,0 @@ -[selene] -base = "lua51" -name = "vim" - -[vim] -any = true - -[jit] -any = true - -[assert] -any = true - -[describe] -any = true - -[it] -any = true - -[before_each.args] -any = true diff --git a/vim.yml b/vim.yml new file mode 100644 index 00000000..eb58a874 --- /dev/null +++ b/vim.yml @@ -0,0 +1,19 @@ +base: lua51 +lua_versions: + - luajit + +globals: + Snacks: + any: true + vim: + any: true + jit: + any: true + assert: + any: true + describe: + any: true + it: + any: true + before_each: + any: true From 8546f6232ecb1305a4ef9df281bad3512ba09da5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 8 Oct 2025 21:32:23 +0200 Subject: [PATCH 482/496] ci: update minit.lua --- tests/minit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/minit.lua b/tests/minit.lua index c1d7c473..37d7e1c8 100644 --- a/tests/minit.lua +++ b/tests/minit.lua @@ -3,7 +3,7 @@ vim.env.LAZY_STDPATH = ".tests" vim.env.LAZY_PATH = vim.fs.normalize("~/projects/lazy.nvim") -if vim.fn.isdirectory(vim.env.LAZY_PATH) then +if vim.fn.isdirectory(vim.env.LAZY_PATH) == 1 then loadfile(vim.env.LAZY_PATH .. "/bootstrap.lua")() else load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"), "bootstrap.lua")() From 74f3c7c36d5e46cc548e5a006b417653baf0a2ca Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 8 Oct 2025 19:33:56 +0000 Subject: [PATCH 483/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 091b0880..e55c8280 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 02 +*LazyVim.txt* For Neovim Last change: 2025 October 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a3e52dd346ea35db5521b66e46dca95d32f00cb4 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 9 Oct 2025 00:12:43 +0200 Subject: [PATCH 484/496] feat(sidekick): changed default keymaps for sidekick. Please check updated docs at sidekick.nvim --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 6e80ba47..52597b0e 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -56,6 +56,12 @@ return { -- 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, @@ -74,6 +80,11 @@ return { 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, @@ -86,18 +97,6 @@ return { 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", - }, }, }, } From aa2c43633adee0f80faf8d743d6476ea4f8ba5ca Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Thu, 9 Oct 2025 14:46:25 +0300 Subject: [PATCH 485/496] fix(xtras): load `copilot-native` before `blink` (#6588) ## Description `blink` Extra loads earlier than `copilot-native` Extra and that causes `ghost_text.enabled = vim.g.ai_cmp` to wrongly evaluate to `true` even though `copilot-native` explicitly sets `vim.g.ai_cmp = false`. I also changed the order of `blink` and `typescript` so that `blink` comes logically right after `copilot-native`, hope that is not a problem. If it is, feel free to revert the order and just keep the change about `copilot-native`. ## Related Issue(s) None, I was just trying to create a toggle mapping to disable/enable both NES and inline_completion and even though they were disabled, I could see ghost_text from blink. ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/xtras.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/xtras.lua b/lua/lazyvim/plugins/xtras.lua index 19a5c6da..5db08ef1 100644 --- a/lua/lazyvim/plugins/xtras.lua +++ b/lua/lazyvim/plugins/xtras.lua @@ -5,8 +5,9 @@ local prios = { ["lazyvim.plugins.extras.coding.nvim-cmp"] = 2, ["lazyvim.plugins.extras.editor.neo-tree"] = 2, ["lazyvim.plugins.extras.ui.edgy"] = 3, - ["lazyvim.plugins.extras.lang.typescript"] = 5, + ["lazyvim.plugins.extras.ai.copilot-native"] = 4, ["lazyvim.plugins.extras.coding.blink"] = 5, + ["lazyvim.plugins.extras.lang.typescript"] = 5, ["lazyvim.plugins.extras.formatting.prettier"] = 10, -- default core extra priority is 20 -- default priority is 50 From 92ff787e739a17df6e5ba4c505d3e3521ad47e52 Mon Sep 17 00:00:00 2001 From: Vlad <52591095+MeanderingProgrammer@users.noreply.github.com> Date: Thu, 9 Oct 2025 04:47:01 -0700 Subject: [PATCH 486/496] chore(render-markdown): use API to toggle (#6558) ## Description The `state` module in `render-markdown` is not expected to be accessed outside of the package and may be refactored in the future. Prevent any breaking changes in LazyVim by using the public API which was updated here: https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/accaa600ba59022171275adf6640dda13004bd6f ## Related Issue(s) None ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/markdown.lua | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index 33e9e457..ac5405e3 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -113,17 +113,8 @@ return { 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 a205ef889f329172edba33960f77830c37088d2d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 9 Oct 2025 11:47:28 +0000 Subject: [PATCH 487/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e55c8280..4398c40a 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 08 +*LazyVim.txt* For Neovim Last change: 2025 October 09 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 94c4603b6838fbe75343b6e3342b4343744157dc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 9 Oct 2025 18:08:27 +0200 Subject: [PATCH 488/496] fix(blink): disable blink left/right key in the cmdline --- lua/lazyvim/plugins/extras/coding/blink.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 790808b1..d5b9a57b 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -85,7 +85,11 @@ return { cmdline = { enabled = true, - keymap = { preset = "cmdline" }, + keymap = { + preset = "cmdline", + [""] = false, + [""] = false, + }, completion = { list = { selection = { preselect = false } }, menu = { From 4efd0e2bea2a387d6fcdea8cf36a62049e8bafed Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 9 Oct 2025 22:08:13 +0200 Subject: [PATCH 489/496] fix(terminal): term toggle keymaps now only work for snacks terminals. Closes #6573 --- lua/lazyvim/config/keymaps.lua | 8 ++------ lua/lazyvim/plugins/util.lua | 2 ++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index 5709aa6f..d8d7a10f 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -189,12 +189,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/lua/lazyvim/plugins/util.lua b/lua/lazyvim/plugins/util.lua index 8d8aa220..0357c3fb 100644 --- a/lua/lazyvim/plugins/util.lua +++ b/lua/lazyvim/plugins/util.lua @@ -23,6 +23,8 @@ return { 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 0e8069c78ee92279055236388df8c2019476767a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Oct 2025 06:45:12 +0200 Subject: [PATCH 490/496] feat(treesitter): added support for `disable` langs to indent/highlight/folds. Closes #6608 --- lua/lazyvim/plugins/treesitter.lua | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index 78f1b3b2..b53e9c37 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -21,12 +21,13 @@ return { 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", @@ -99,22 +100,32 @@ return { 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 c1aef3b62a21e0525c12681e28a64a2b7950d7d6 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 10 Oct 2025 04:46:21 +0000 Subject: [PATCH 491/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 4398c40a..ec2f0a19 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 09 +*LazyVim.txt* For Neovim Last change: 2025 October 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From e8c5fa7eae06539c883699507caeadb46d74f401 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 10 Oct 2025 20:57:42 +0200 Subject: [PATCH 492/496] fix(treesiter): check that `disable` options are tables --- lua/lazyvim/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/treesitter.lua b/lua/lazyvim/plugins/treesitter.lua index b53e9c37..5106da4e 100644 --- a/lua/lazyvim/plugins/treesitter.lua +++ b/lua/lazyvim/plugins/treesitter.lua @@ -110,7 +110,7 @@ return { 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 f8b062b130177f07d3c1c13b642402d42e980df5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 11 Oct 2025 00:05:16 +0200 Subject: [PATCH 493/496] feat(sidekick): added `ad` to close/detach a terminal/session --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 52597b0e..5b2c0976 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -74,6 +74,11 @@ return { -- 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, From 049db39de0f272e8368a4b3881ac5a13f0d04b09 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 11 Oct 2025 08:16:17 +0200 Subject: [PATCH 494/496] fix(sidekick): only add copilot to lspconfig when `opts.nes.enabled ~= false` --- lua/lazyvim/plugins/extras/ai/sidekick.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/sidekick.lua b/lua/lazyvim/plugins/extras/ai/sidekick.lua index 5b2c0976..71e76eb4 100644 --- a/lua/lazyvim/plugins/extras/ai/sidekick.lua +++ b/lua/lazyvim/plugins/extras/ai/sidekick.lua @@ -4,11 +4,13 @@ return { -- copilot-language-server { "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, }, -- lualine From eaa3d4d428de8a78235515721dc200f8e98781e8 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 11 Oct 2025 06:17:37 +0000 Subject: [PATCH 495/496] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index ec2f0a19..c64778ca 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 October 10 +*LazyVim.txt* For Neovim Last change: 2025 October 11 ============================================================================== Table of Contents *LazyVim-table-of-contents* From c2aa088300d908398eeb357685e5f215b396381a Mon Sep 17 00:00:00 2001 From: Zhizhen He Date: Sat, 11 Oct 2025 14:48:48 +0800 Subject: [PATCH 496/496] docs(README): bump Neovim requirement to 0.11.2 (#6611) ## Description Update neovim requirement in readme. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- README-CN.md | 2 +- README-DE.md | 2 +- README-ES.md | 2 +- README-IT.md | 2 +- README-JP.md | 2 +- README-KO.md | 2 +- README-PT.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README-CN.md b/README-CN.md index 83e5abfd..67132e59 100644 --- a/README-CN.md +++ b/README-CN.md @@ -54,7 +54,7 @@ LazyVim 是一个基于 [💤 lazy.nvim](https://github.com/folke/lazy.nvim) 的 ## ⚡️ 环境要求 -- Neovim >= **0.9.0** (需要用 **LuaJIT** 构建) +- Neovim >= **0.11.2** (需要用 **LuaJIT** 构建) - Git >= **2.19.0** (用于部分克隆支持) - 一个 [Nerd Font](https://www.nerdfonts.com/) 字体 **_(可选)_** - 一个用于 `nvim-treesitter` 的 **C** 编译器。看 [这里](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/README-DE.md b/README-DE.md index c087d7c6..a46aba0a 100644 --- a/README-DE.md +++ b/README-DE.md @@ -56,7 +56,7 @@ und die Einfachheit von einem vorgefertigten Setup. ## ⚡️ Vorraussetzungen -- Neovim >= **0.8.0** (gebraucht um mit **LuaJIT** zu bauen) +- Neovim >= **0.11.2** (gebraucht um mit **LuaJIT** zu bauen) - Git >= **2.19.0** (um Teil-Klone zu unterstützen) - eine [Nerd Font](https://www.nerdfonts.com/) **_(optional)_** diff --git a/README-ES.md b/README-ES.md index 06e64f96..3dd7f108 100644 --- a/README-ES.md +++ b/README-ES.md @@ -52,7 +52,7 @@ LazyVim es una configuración de Neovim impulsada por [💤 lazy.nvim](https://g ## ⚡️ Requisitos -- Neovim >= **0.9.0** (debe ser compilado con **LuaJIT**) +- Neovim >= **0.11.2** (debe ser compilado con **LuaJIT**) - Git >= **2.19.0** (para soporte de clones parciales) - una [Fuente Nerd](https://www.nerdfonts.com/) **_(opcional)_** - un compilador **C** para `nvim-treesitter`. Consulta [aquí](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/README-IT.md b/README-IT.md index 3ab7419a..3bf82a9c 100644 --- a/README-IT.md +++ b/README-IT.md @@ -57,7 +57,7 @@ insieme alla comodità di un setup preconfigurato. ## ⚡️ Requisiti -- Neovim >= **0.9.0** (deve essere compilato con **LuaJIT**) +- Neovim >= **0.11.2** (deve essere compilato con **LuaJIT**) - Git >= **2.19.0** (per supportare cloni parziali) - a [Nerd Font](https://www.nerdfonts.com/) **_(opzionale)_** - un compilatore **C** per `nvim-treesitter`. Leggi [qui](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/README-JP.md b/README-JP.md index d81f2cb9..e7a2da3d 100644 --- a/README-JP.md +++ b/README-JP.md @@ -54,7 +54,7 @@ LazyVimは、ゼロから始めるか、あらかじめ作成されたディス ## ⚡️ 必要要件 -- Neovim >= **0.9.0** (**LuaJIT**でビルドされている必要があります) +- Neovim >= **0.11.2** (**LuaJIT**でビルドされている必要があります) - Git >= **2.19.0** (部分的なcloneサポートのため) - [Nerd Font](https://www.nerdfonts.com/) **_(任意)_** - `nvim-treesitter`用の**C**コンパイラ。詳細は[こちら](https://github.com/nvim-treesitter/nvim-treesitter#requirements) diff --git a/README-KO.md b/README-KO.md index 84d28017..25ac67ef 100644 --- a/README-KO.md +++ b/README-KO.md @@ -52,7 +52,7 @@ LazyVim은 [💤 lazy.nvim](https://github.com/folke/lazy.nvim)를 기반으로 ## ⚡️ 요구사항 -- **0.9.0**이상의 Neovim (LuaJIT과 함께 개발이 되어져있어야함니다.) +- **0.11.2**이상의 Neovim (LuaJIT과 함께 개발이 되어져있어야함니다.) - **2.19.0**이상의 Git (이것은 부분적인 클론기능을 지원하기 위함입니다.) - [Nerd Font](https://www.nerdfonts.com/) **_(옵션)_** - `nvim-treesitter`를 위한 **C** 컴파일러. [이 문서](https://github.com/nvim-treesitter/nvim-treesitter#requirements)를 확인해주시기바랍니다. diff --git a/README-PT.md b/README-PT.md index 65d8c625..67bd6fb1 100644 --- a/README-PT.md +++ b/README-PT.md @@ -57,7 +57,7 @@ como necessário, junto com a conveniência de um setup pré-configurado. ## ⚡️ Requesitos -- Neovim >= **0.9.0** (preciso fazer build com **LuaJIT**) +- Neovim >= **0.11.2** (preciso fazer build com **LuaJIT**) - Git >= **2.19.0** (para suporte parcial de clones) - uma [Nerd Font](https://www.nerdfonts.com/) **_(opcional)_** - um compilador de **C** para `nvim-treesitter`. Mais informações [aqui](https://github.com/nvim-treesitter/nvim-treesitter#requirements)