From 220148f47f175229232eee31982577fbdd637663 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 9 Nov 2024 15:49:39 +0100 Subject: [PATCH 001/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] =?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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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/217] 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