From be0cb9622dd47a5f62fbb32ac6f485a33a253119 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Dec 2024 09:29:18 +0100 Subject: [PATCH 001/179] 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 002/179] 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 003/179] 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 004/179] 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 005/179] 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 006/179] 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 007/179] 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 008/179] 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 009/179] 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 010/179] 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 011/179] 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 012/179] 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 013/179] 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 014/179] 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 015/179] 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 016/179] 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 017/179] 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 018/179] 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 019/179] 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 020/179] 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 021/179] 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 022/179] 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 023/179] 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 024/179] 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 025/179] 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 026/179] 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 027/179] 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 028/179] 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 029/179] 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 030/179] 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 031/179] 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 032/179] 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 033/179] 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 034/179] 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 035/179] 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 036/179] 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 037/179] 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 038/179] 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 039/179] 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 040/179] 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 041/179] 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 042/179] 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 043/179] 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 044/179] 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 045/179] 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 046/179] 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 047/179] 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 048/179] 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 049/179] 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 050/179] 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 051/179] 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 052/179] 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 053/179] 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 054/179] 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 055/179] 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 056/179] 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 057/179] 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 058/179] 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 059/179] 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 060/179] 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 061/179] 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 062/179] 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 063/179] 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 064/179] 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 065/179] 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 066/179] 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 067/179] 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 068/179] 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 069/179] 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 070/179] 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 071/179] 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 072/179] 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 073/179] 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 074/179] 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 075/179] 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 076/179] 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 077/179] 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 078/179] 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 079/179] 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 080/179] 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 081/179] 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 082/179] 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 083/179] 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 084/179] 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 085/179] 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 086/179] 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 087/179] 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 088/179] 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 089/179] 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 090/179] 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 091/179] 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 092/179] 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 093/179] 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 094/179] 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 095/179] 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 096/179] 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 097/179] 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 098/179] 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 099/179] 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 100/179] 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 101/179] 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 102/179] 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 103/179] 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 104/179] 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 105/179] 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 106/179] 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 107/179] 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 108/179] 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 109/179] 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 110/179] 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 111/179] 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 112/179] 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 113/179] 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 114/179] 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 115/179] 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 116/179] 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 117/179] 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 118/179] 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 119/179] 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 120/179] 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 121/179] 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 122/179] 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 123/179] 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 124/179] 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 125/179] 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 126/179] 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 127/179] 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 128/179] 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 129/179] 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 130/179] chore(main): release 14.5.0 (#5109) :robot: I have created a release *beep* *boop* --- ## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) ### Features * **blink:** increase lazydev scores ([22015e0](https://github.com/LazyVim/LazyVim/commit/22015e0b4835ae148c19b459bf494fe5f72b415b)) ### Bug Fixes * **blink:** add `vim.snippet` fixes to blink (was already added to cmp). Fixes [#5067](https://github.com/LazyVim/LazyVim/issues/5067) ([5ea3cfa](https://github.com/LazyVim/LazyVim/commit/5ea3cfa48e6ac88b90282da86dba7799f67b2e30)) * **blink:** don't trigger automatically on insert ([2cf3d23](https://github.com/LazyVim/LazyVim/commit/2cf3d234bfc31a1a4eda282ddabc12987f762893)) * **blink:** remove show_on_insert_on_trigger_character since this has been fixed for {} and others ([0f3a120](https://github.com/LazyVim/LazyVim/commit/0f3a1201861e6d6e8834aa8937dcf3e4a70a937a)) * **illuminate:** disable snacks.words when illuminate extra is enabled. Fixes [#5125](https://github.com/LazyVim/LazyVim/issues/5125) ([d025115](https://github.com/LazyVim/LazyVim/commit/d0251155ab2a293136c933b4e925e1fa16d39a2d)) * **supermaven:** don't attach to bigfile and some snacks ft. Fixes [#5139](https://github.com/LazyVim/LazyVim/issues/5139) ([25ee13c](https://github.com/LazyVim/LazyVim/commit/25ee13ce29ad8c4e10d677e641955cfd3c810fb5)) * **vscode:** disable some snacks plugins in vscode. Closes [#5124](https://github.com/LazyVim/LazyVim/issues/5124) ([301135b](https://github.com/LazyVim/LazyVim/commit/301135b2749affe71645c610001c8253ae78c591)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 17 +++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 43bda57f..1a2b85d2 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.4.0" + ".": "14.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 23cbf257..f9ffbf67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) + + +### Features + +* **blink:** increase lazydev scores ([22015e0](https://github.com/LazyVim/LazyVim/commit/22015e0b4835ae148c19b459bf494fe5f72b415b)) + + +### Bug Fixes + +* **blink:** add `vim.snippet` fixes to blink (was already added to cmp). Fixes [#5067](https://github.com/LazyVim/LazyVim/issues/5067) ([5ea3cfa](https://github.com/LazyVim/LazyVim/commit/5ea3cfa48e6ac88b90282da86dba7799f67b2e30)) +* **blink:** don't trigger automatically on insert ([2cf3d23](https://github.com/LazyVim/LazyVim/commit/2cf3d234bfc31a1a4eda282ddabc12987f762893)) +* **blink:** remove show_on_insert_on_trigger_character since this has been fixed for {} and others ([0f3a120](https://github.com/LazyVim/LazyVim/commit/0f3a1201861e6d6e8834aa8937dcf3e4a70a937a)) +* **illuminate:** disable snacks.words when illuminate extra is enabled. Fixes [#5125](https://github.com/LazyVim/LazyVim/issues/5125) ([d025115](https://github.com/LazyVim/LazyVim/commit/d0251155ab2a293136c933b4e925e1fa16d39a2d)) +* **supermaven:** don't attach to bigfile and some snacks ft. Fixes [#5139](https://github.com/LazyVim/LazyVim/issues/5139) ([25ee13c](https://github.com/LazyVim/LazyVim/commit/25ee13ce29ad8c4e10d677e641955cfd3c810fb5)) +* **vscode:** disable some snacks plugins in vscode. Closes [#5124](https://github.com/LazyVim/LazyVim/issues/5124) ([301135b](https://github.com/LazyVim/LazyVim/commit/301135b2749affe71645c610001c8253ae78c591)) + ## [14.4.0](https://github.com/LazyVim/LazyVim/compare/v14.3.0...v14.4.0) (2024-12-15) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 4e10593c..574e56af 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.4.0" -- x-release-please-version +M.version = "14.5.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 751803f98bf3baaf7db1c1e2ddd28e082396124a Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Wed, 18 Dec 2024 20:49:13 +0800 Subject: [PATCH 131/179] feat(colorscheme): add fzf integration to catppuccin (#5175) ## Description ## Related Issue(s) ## Screenshots ## Checklist - [ ] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/colorscheme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/colorscheme.lua b/lua/lazyvim/plugins/colorscheme.lua index 93a89668..fa611bf4 100644 --- a/lua/lazyvim/plugins/colorscheme.lua +++ b/lua/lazyvim/plugins/colorscheme.lua @@ -19,6 +19,7 @@ return { cmp = true, dashboard = true, flash = true, + fzf = true, grug_far = true, gitsigns = true, headlines = true, From 28d3ee49709978eb350e5c6bfe1f2ce36138c1d3 Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 18 Dec 2024 12:50:24 +0000 Subject: [PATCH 132/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 4e391e96..d2aa5d34 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 17 +*LazyVim.txt* For Neovim Last change: 2024 December 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e Mon Sep 17 00:00:00 2001 From: Uzzal Devkota Date: Thu, 19 Dec 2024 03:13:04 +0545 Subject: [PATCH 133/179] fix(fzf): fzf.lua compatible hidden scrollbar (#5177) ## Description `--no-scrollbar` option is not supported by [fzf-lua](https://github.com/ibhagwan/fzf-lua) The recommended way is to set `winopts.preview.scrollbar=false` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..cf11d8ee 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,9 +89,6 @@ return { return { "default-title", fzf_colors = true, - fzf_opts = { - ["--no-scrollbar"] = true, - }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -115,6 +112,9 @@ return { winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", + preview = { + scrollbar = false, + }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From b51279c6d727a09cd3d2bf3c9d0cf829810280bb Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:28:39 +0100 Subject: [PATCH 134/179] fix(codeium): doesnt automatically load when `vim.g.ai_cmp` is set to false (#5182) ## Description I think the title of the PR says it all. Before the user has to manually load/trigger the plugin via the cmd (`:Codeium Auth`) or by requiring. PS: The copilot extra also has this event. ~~PPS: Ive also noticed that supermaven doesnt have this event setup, perhaps it suffers to the same issue when this option is disabled?~~ Edit: For the PPS, have tested supermaven, i can confirm, it loads properly. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/codeium.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/ai/codeium.lua b/lua/lazyvim/plugins/extras/ai/codeium.lua index d2d29a00..8d37d750 100644 --- a/lua/lazyvim/plugins/extras/ai/codeium.lua +++ b/lua/lazyvim/plugins/extras/ai/codeium.lua @@ -4,6 +4,7 @@ return { { "Exafunction/codeium.nvim", cmd = "Codeium", + event = "InsertEnter", build = ":Codeium Auth", opts = { enable_cmp_source = vim.g.ai_cmp, From c40692c1b0a95492eead8cc093972c634d54043b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 19 Dec 2024 08:29:06 +0100 Subject: [PATCH 135/179] revert: fix(fzf): fzf.lua compatible hidden scrollbar (#5177) This reverts commit 3a79273f3c3bbd22bcdba795b7b8fe6a949db96e. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index cf11d8ee..c70a6f14 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -89,6 +89,9 @@ return { return { "default-title", fzf_colors = true, + fzf_opts = { + ["--no-scrollbar"] = true, + }, defaults = { -- formatter = "path.filename_first", formatter = "path.dirname_first", @@ -112,9 +115,6 @@ return { winopts = { title = " " .. vim.trim((fzf_opts.prompt or "Select"):gsub("%s*:%s*$", "")) .. " ", title_pos = "center", - preview = { - scrollbar = false, - }, }, }, fzf_opts.kind == "codeaction" and { winopts = { From 2c2aa625464f29ee556c0980dbb3bccae45a1001 Mon Sep 17 00:00:00 2001 From: folke Date: Thu, 19 Dec 2024 07:30:13 +0000 Subject: [PATCH 136/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d2aa5d34..121bf4af 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 18 +*LazyVim.txt* For Neovim Last change: 2024 December 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From a3a28bf8e43f7239316942c2f2bac6e74b28586b Mon Sep 17 00:00:00 2001 From: Manuuurino <2855338+manuuurino@users.noreply.github.com> Date: Thu, 19 Dec 2024 15:41:11 +0100 Subject: [PATCH 137/179] perf(supermaven): add lazy-loading (#5183) ## Description As title, somehow these events have been forgotten, ive checked the git history of it aswell. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/ai/supermaven.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/ai/supermaven.lua b/lua/lazyvim/plugins/extras/ai/supermaven.lua index e491fd85..5d30f49c 100644 --- a/lua/lazyvim/plugins/extras/ai/supermaven.lua +++ b/lua/lazyvim/plugins/extras/ai/supermaven.lua @@ -1,6 +1,11 @@ return { { "supermaven-inc/supermaven-nvim", + event = "InsertEnter", + cmd = { + "SupermavenUseFree", + "SupermavenUsePro", + }, opts = { keymaps = { accept_suggestion = nil, -- handled by nvim-cmp / blink.cmp From 7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0 Mon Sep 17 00:00:00 2001 From: milanglacier Date: Fri, 20 Dec 2024 03:11:44 -0500 Subject: [PATCH 138/179] feat(lualine): add fzf extensions. (#5203) ## Description Similar to #5175, add `fzf` integration with lualine. Note that similar to #5175, integration with `fzf` is included unconditionally. I think we don't need to check if the users choose `fzf` as their default picker to conditionally add the fzf integration with lualine. ## Screenshots **Before**: Screenshot 2024-12-19 at 17 58 30 **After**: Screenshot 2024-12-19 at 17 59 28 --- lua/lazyvim/plugins/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index 2bb2c644..c4cb2a7b 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -159,7 +159,7 @@ return { end, }, }, - extensions = { "neo-tree", "lazy" }, + extensions = { "neo-tree", "lazy", "fzf" }, } -- do not add trouble symbols if aerial is enabled From c1ee761dd88ec71fa9c9eb9706828598e7522c5d Mon Sep 17 00:00:00 2001 From: folke Date: Fri, 20 Dec 2024 08:12:41 +0000 Subject: [PATCH 139/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 121bf4af..c584bc23 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 19 +*LazyVim.txt* For Neovim Last change: 2024 December 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 857f330c2139c328cfce0251b11713dc179d6a81 Mon Sep 17 00:00:00 2001 From: Igor Guerrero Date: Fri, 20 Dec 2024 11:10:45 -0600 Subject: [PATCH 140/179] fix(blink): remove compatibility with 0.7.6 release (#5212) ## Description With the version update 5 mins ago, I got an error with this setting. I'm not sure if removal is the correct way to fix this but it does runs well on my local. - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 139bf6c4..81762b8d 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -118,17 +118,6 @@ return { end end - --- NOTE: compat with latest version. Currenlty 0.7.6 - if not vim.g.lazyvim_blink_main then - ---@diagnostic disable-next-line: inject-field - opts.sources.completion = opts.sources.completion or {} - opts.sources.completion.enabled_providers = enabled - if vim.tbl_get(opts, "completion", "menu", "draw", "treesitter") then - ---@diagnostic disable-next-line: assign-type-mismatch - opts.completion.menu.draw.treesitter = true - end - end - -- Unset custom prop to pass blink.cmp validation opts.sources.compat = nil From 86de9c9e443572b0244ee9bbdcf5f10ecaabaf74 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Fri, 20 Dec 2024 18:35:22 +0100 Subject: [PATCH 141/179] fix(luasnip): use blink's luasnip source. Closes #5211 --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 6b16ba90..352bf659 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -67,12 +67,8 @@ return { { "saghen/blink.cmp", optional = true, - dependencies = { - { "saghen/blink.compat", opts = { impersonate_nvim_cmp = true } }, - { "saadparwaiz1/cmp_luasnip" }, - }, opts = { - sources = { compat = { "luasnip" } }, + sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) From d0c366e4d861b848bdc710696d5311dca2c6d540 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:36:49 +0100 Subject: [PATCH 142/179] chore(main): release 14.6.0 (#5176) :robot: I have created a release *beep* *boop* --- ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) ### Features * **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) * **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) ### Bug Fixes * **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) * **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) * **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) * **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) ### Performance Improvements * **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) ### Reverts * fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 26 ++++++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 1a2b85d2..a1d48029 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.5.0" + ".": "14.6.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f9ffbf67..429db78c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) + + +### Features + +* **colorscheme:** add fzf integration to catppuccin ([#5175](https://github.com/LazyVim/LazyVim/issues/5175)) ([751803f](https://github.com/LazyVim/LazyVim/commit/751803f98bf3baaf7db1c1e2ddd28e082396124a)) +* **lualine:** add fzf extensions. ([#5203](https://github.com/LazyVim/LazyVim/issues/5203)) ([7a16a75](https://github.com/LazyVim/LazyVim/commit/7a16a752ba1fa535bb54d6492fb8df6c72ab8ba0)) + + +### Bug Fixes + +* **blink:** remove compatibility with 0.7.6 release ([#5212](https://github.com/LazyVim/LazyVim/issues/5212)) ([857f330](https://github.com/LazyVim/LazyVim/commit/857f330c2139c328cfce0251b11713dc179d6a81)) +* **codeium:** doesnt automatically load when `vim.g.ai_cmp` is set to false ([#5182](https://github.com/LazyVim/LazyVim/issues/5182)) ([b51279c](https://github.com/LazyVim/LazyVim/commit/b51279c6d727a09cd3d2bf3c9d0cf829810280bb)) +* **fzf:** fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([3a79273](https://github.com/LazyVim/LazyVim/commit/3a79273f3c3bbd22bcdba795b7b8fe6a949db96e)) +* **luasnip:** use blink's luasnip source. Closes [#5211](https://github.com/LazyVim/LazyVim/issues/5211) ([86de9c9](https://github.com/LazyVim/LazyVim/commit/86de9c9e443572b0244ee9bbdcf5f10ecaabaf74)) + + +### Performance Improvements + +* **supermaven:** add lazy-loading ([#5183](https://github.com/LazyVim/LazyVim/issues/5183)) ([a3a28bf](https://github.com/LazyVim/LazyVim/commit/a3a28bf8e43f7239316942c2f2bac6e74b28586b)) + + +### Reverts + +* fix(fzf): fzf.lua compatible hidden scrollbar ([#5177](https://github.com/LazyVim/LazyVim/issues/5177)) ([c40692c](https://github.com/LazyVim/LazyVim/commit/c40692c1b0a95492eead8cc093972c634d54043b)) + ## [14.5.0](https://github.com/LazyVim/LazyVim/compare/v14.4.0...v14.5.0) (2024-12-17) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 574e56af..606ed797 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.5.0" -- x-release-please-version +M.version = "14.6.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 4e746d0e5625662e1f121b39f63836b653ed728b Mon Sep 17 00:00:00 2001 From: William Heryanto Date: Mon, 6 Jan 2025 11:52:36 +0700 Subject: [PATCH 143/179] fix(nlua): debugger not responding (#5319) ## Description Reference: https://github.com/jbyuki/one-small-step-for-vimkind/issues/45#issuecomment-2125749906 Fix nlua debug adapter not responding, which for some reason because of `fzf-lua`. ## Related Issue(s) ## Screenshots No screenshot instead I'm providing how to reproduce with assumption `dap.nlua` extra is enabled. Steps: 1. Launch the nlua `:lua require'osv'.launch({port=8086})` 2. Attach from any neovim instance to the debugger 1. Run the debugger - Can do `dc`; or - Can do `:lua require'dap'.continue()` 2. Choose `Attach to running Neovim instance (port = 8086)` 3. Prior to this changes, debugger will got timeout like the following ```text Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or `nlua` configuration. Check the logs for errors (:help dap.set_log_level) ``` ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c70a6f14..aa26f6e1 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -45,8 +45,9 @@ return { "ibhagwan/fzf-lua", cmd = "FzfLua", opts = function(_, opts) - local config = require("fzf-lua.config") - local actions = require("fzf-lua.actions") + local fzf = require("fzf-lua") + local config = fzf.config + local actions = fzf.actions -- Quickfix config.defaults.keymap.fzf["ctrl-q"] = "select-all+accept" From c8159b6abff959d1b029c87260edc05e8420a213 Mon Sep 17 00:00:00 2001 From: folke Date: Mon, 6 Jan 2025 04:53:25 +0000 Subject: [PATCH 144/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c584bc23..501d0fdc 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2024 December 20 +*LazyVim.txt* For Neovim Last change: 2025 January 06 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 05c3447558fa6eef7ae3c0d3e7ed1c281572274d Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Tue, 7 Jan 2025 13:04:17 +0200 Subject: [PATCH 145/179] fix(luasnip): correctly remove duplicate snippets (#5214) ## Description Remove `snippets` from `opts.sources.default` when Luasnip is enabled to not get duplicate snippets. ## Related Issue(s) Fixes #5210 ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 352bf659..54339e3e 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -68,7 +68,6 @@ return { "saghen/blink.cmp", optional = true, opts = { - sources = { default = { "luasnip" } }, snippets = { expand = function(snippet) require("luasnip").lsp_expand(snippet) @@ -85,4 +84,16 @@ return { }, }, }, + + -- Luasnip sources for blink + { + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + table.insert(opts.sources.default, "luasnip") + opts.sources.default = vim.tbl_filter(function(p) + return p ~= "snippets" + end, opts.sources.default) + end, + }, } From c1319cb7acfa4b9fb15121b5f6178eb4fb2db629 Mon Sep 17 00:00:00 2001 From: folke Date: Tue, 7 Jan 2025 11:05:24 +0000 Subject: [PATCH 146/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 501d0fdc..87ede8e0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 06 +*LazyVim.txt* For Neovim Last change: 2025 January 07 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8d2d9a9bd965aab0a752f24ec327d2f391a8406b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 8 Jan 2025 07:41:44 +0100 Subject: [PATCH 147/179] fix(blink): added new luasnip preset --- lua/lazyvim/plugins/extras/coding/luasnip.lua | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/luasnip.lua b/lua/lazyvim/plugins/extras/coding/luasnip.lua index 54339e3e..8b3daed7 100644 --- a/lua/lazyvim/plugins/extras/coding/luasnip.lua +++ b/lua/lazyvim/plugins/extras/coding/luasnip.lua @@ -69,31 +69,8 @@ return { optional = true, opts = { snippets = { - expand = function(snippet) - require("luasnip").lsp_expand(snippet) - end, - active = function(filter) - if filter and filter.direction then - return require("luasnip").jumpable(filter.direction) - end - return require("luasnip").in_snippet() - end, - jump = function(direction) - require("luasnip").jump(direction) - end, + preset = "luasnip", }, }, }, - - -- Luasnip sources for blink - { - "saghen/blink.cmp", - optional = true, - opts = function(_, opts) - table.insert(opts.sources.default, "luasnip") - opts.sources.default = vim.tbl_filter(function(p) - return p ~= "snippets" - end, opts.sources.default) - end, - }, } From 41f40b73d94f12cd6aa2d87bfee8808e76e80d5d Mon Sep 17 00:00:00 2001 From: folke Date: Wed, 8 Jan 2025 06:42:41 +0000 Subject: [PATCH 148/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 87ede8e0..3d00d26d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 07 +*LazyVim.txt* For Neovim Last change: 2025 January 08 ============================================================================== Table of Contents *LazyVim-table-of-contents* From d1529f650fdd89cb620258bdeca5ed7b558420c7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:58:56 +0100 Subject: [PATCH 149/179] chore(main): release 14.6.1 (#5320) :robot: I have created a release *beep* *boop* --- ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) ### Bug Fixes * **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) * **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) * **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index a1d48029..114400ff 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.0" + ".": "14.6.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 429db78c..2ea4a272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) + + +### Bug Fixes + +* **blink:** added new luasnip preset ([8d2d9a9](https://github.com/LazyVim/LazyVim/commit/8d2d9a9bd965aab0a752f24ec327d2f391a8406b)) +* **luasnip:** correctly remove duplicate snippets ([#5214](https://github.com/LazyVim/LazyVim/issues/5214)) ([05c3447](https://github.com/LazyVim/LazyVim/commit/05c3447558fa6eef7ae3c0d3e7ed1c281572274d)) +* **nlua:** debugger not responding ([#5319](https://github.com/LazyVim/LazyVim/issues/5319)) ([4e746d0](https://github.com/LazyVim/LazyVim/commit/4e746d0e5625662e1f121b39f63836b653ed728b)) + ## [14.6.0](https://github.com/LazyVim/LazyVim/compare/v14.5.0...v14.6.0) (2024-12-20) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 606ed797..fbe6b74c 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.0" -- x-release-please-version +M.version = "14.6.1" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 13044c298ed1837a2d938b64710528d359dc8407 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 14 Jan 2025 22:54:12 +0100 Subject: [PATCH 150/179] feat(extras): added extra for snacks picker (#5368) ## Description See https://github.com/folke/snacks.nvim/pull/445 NOTE: I'm **not** going to replace `fzf-lua` anytime soon. Learned my lessons with that one :) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/config/keymaps.lua | 8 +- lua/lazyvim/plugins/editor.lua | 6 + lua/lazyvim/plugins/extras/editor/fzf.lua | 3 + .../plugins/extras/editor/snacks_picker.lua | 127 ++++++++++++++++++ lua/lazyvim/plugins/ui.lua | 3 + lua/lazyvim/util/pick.lua | 6 +- 6 files changed, 147 insertions(+), 6 deletions(-) create mode 100644 lua/lazyvim/plugins/extras/editor/snacks_picker.lua diff --git a/lua/lazyvim/config/keymaps.lua b/lua/lazyvim/config/keymaps.lua index c618578b..48726b02 100644 --- a/lua/lazyvim/config/keymaps.lua +++ b/lua/lazyvim/config/keymaps.lua @@ -150,12 +150,12 @@ end if vim.fn.executable("lazygit") == 1 then map("n", "gg", function() Snacks.lazygit( { cwd = LazyVim.root.git() }) end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) - map("n", "gf", function() Snacks.lazygit.log_file() end, { desc = "Lazygit Current File History" }) - map("n", "gl", function() Snacks.lazygit.log({ cwd = LazyVim.root.git() }) end, { desc = "Lazygit Log" }) - map("n", "gL", function() Snacks.lazygit.log() end, { desc = "Lazygit Log (cwd)" }) + map("n", "gf", function() Snacks.picker.git_log_file() end, { desc = "Git Current File History" }) + map("n", "gl", function() Snacks.picker.git_log({ cwd = LazyVim.root.git() }) end, { desc = "Git Log" }) + map("n", "gL", function() Snacks.picker.git_log() end, { desc = "Git Log (cwd)" }) end -map("n", "gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" }) +map("n", "gb", function() Snacks.picker.git_log_line() end, { desc = "Git Blame Line" }) map({ "n", "x" }, "gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" }) map({"n", "x" }, "gY", function() Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false }) diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index f6a98605..95a1f7b9 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -397,4 +397,10 @@ return { return LazyVim.pick.want() == "telescope" end, }, + { + import = "lazyvim.plugins.extras.editor.snacks_picker", + enabled = function() + return LazyVim.pick.want() == "snacks" + end, + }, } diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..d4cd4093 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -286,6 +286,9 @@ return { { "neovim/nvim-lspconfig", opts = function() + if LazyVim.pick.want() ~= "fzf" then + return + end local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua new file mode 100644 index 00000000..c64775c2 --- /dev/null +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -0,0 +1,127 @@ +if lazyvim_docs then + -- In case you don't want to use `:LazyExtras`, + -- then you need to set the option below. + vim.g.lazyvim_picker = "snacks" +end + +---@module 'snacks' + +---@type LazyPicker +local picker = { + name = "snacks", + commands = { + files = "files", + live_grep = "grep", + oldfiles = "recent", + }, + + ---@param source string + ---@param opts? snacks.picker.Config + open = function(source, opts) + return Snacks.picker.pick(source, opts) + end, +} +if not LazyVim.pick.register(picker) then + return {} +end + +return { + desc = "Fast and modern file picker", + -- recommended = true, + { + "folke/snacks.nvim", + opts = { + picker = {}, + }, + -- stylua: ignore + keys = { + { ",", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "/", LazyVim.pick("grep"), desc = "Grep (Root Dir)" }, + { ":", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + -- find + { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, + { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, + { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, + { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, + { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, + { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + -- git + { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, + -- Grep + { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, + { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, + { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, + { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, + { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, + -- search + { 's"', function() Snacks.picker.registers() end, desc = "Registers" }, + { "sa", function() Snacks.picker.autocmds() end, desc = "Autocmds" }, + { "sc", function() Snacks.picker.command_history() end, desc = "Command History" }, + { "sC", function() Snacks.picker.commands() end, desc = "Commands" }, + { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, + { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, + { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, + { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, + { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, + { "sM", function() Snacks.picker.man() end, desc = "Man Pages" }, + { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, + { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, + { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, + { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + }, + }, + { + "folke/snacks.nvim", + opts = function(_, opts) + if LazyVim.has("trouble.nvim") then + return vim.tbl_deep_extend("force", opts or {}, { + picker = { + actions = require("trouble.sources.snacks").actions, + win = { + input = { + keys = { + [""] = { + "trouble_open", + mode = { "n", "i" }, + }, + }, + }, + }, + }, + }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = function() + if LazyVim.pick.want() ~= "snacks" then + return + end + local Keys = require("lazyvim.plugins.lsp.keymaps").get() + -- stylua: ignore + vim.list_extend(Keys, { + { "gd", function() Snacks.picker.lsp_definitions() end, desc = "Goto Definition", has = "definition" }, + { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, + { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, + { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, + { "ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols", has = "documentSymbol" }, + }) + end, + }, + { + "folke/todo-comments.nvim", + optional = true, + -- stylua: ignore + keys = { + { "st", function() Snacks.picker.todo_comments() end, desc = "Todo" }, + { "sT", function () Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } }) end, desc = "Todo/Fix/Fixme" }, + }, + }, +} diff --git a/lua/lazyvim/plugins/ui.lua b/lua/lazyvim/plugins/ui.lua index c4cb2a7b..d556d1f1 100644 --- a/lua/lazyvim/plugins/ui.lua +++ b/lua/lazyvim/plugins/ui.lua @@ -288,6 +288,9 @@ return { opts = { dashboard = { preset = { + pick = function(cmd, opts) + return LazyVim.pick(cmd, opts)() + end, header = [[ ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z diff --git a/lua/lazyvim/util/pick.lua b/lua/lazyvim/util/pick.lua index 526025a3..2736d7a5 100644 --- a/lua/lazyvim/util/pick.lua +++ b/lua/lazyvim/util/pick.lua @@ -42,11 +42,13 @@ function M.register(picker) return true end ----@return "telescope" | "fzf" +---@return "telescope" | "fzf" | "snacks" function M.want() vim.g.lazyvim_picker = vim.g.lazyvim_picker or "auto" if vim.g.lazyvim_picker == "auto" then - return LazyVim.has_extra("editor.telescope") and "telescope" or "fzf" + return LazyVim.has_extra("editor.snacks_picker") and "snacks" + or LazyVim.has_extra("editor.telescope") and "telescope" + or "fzf" end return vim.g.lazyvim_picker end From 52dae02c436e03de721d73b81b671624f9414b8c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 14 Jan 2025 21:55:09 +0000 Subject: [PATCH 151/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 3d00d26d..1ec65752 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 08 +*LazyVim.txt* For Neovim Last change: 2025 January 14 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 3660c52017462dfc472ff436261100a98ebea34d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:44:06 +0100 Subject: [PATCH 152/179] chore(main): release 14.7.0 (#5398) :robot: I have created a release *beep* *boop* --- ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) ### Features * **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 7 +++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 114400ff..7a337949 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.6.1" + ".": "14.7.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ea4a272..f48b40b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) + + +### Features + +* **extras:** added extra for snacks picker ([#5368](https://github.com/LazyVim/LazyVim/issues/5368)) ([13044c2](https://github.com/LazyVim/LazyVim/commit/13044c298ed1837a2d938b64710528d359dc8407)) + ## [14.6.1](https://github.com/LazyVim/LazyVim/compare/v14.6.0...v14.6.1) (2025-01-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index fbe6b74c..102ace9d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.6.1" -- x-release-please-version +M.version = "14.7.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 8307b0fe506a38417f3b7835e2c4b43d9a970946 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 15 Jan 2025 20:53:56 +0200 Subject: [PATCH 153/179] fix(snacks.picker): fix mapping for `Recent (cwd)` (#5407) ## Description The mapping `fR` was showing all recent files instead of the ones in the `cwd` only. ## Related Issue(s) None ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index c64775c2..522c4ce5 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -46,7 +46,7 @@ return { { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" }, { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, - { "fR", LazyVim.pick("oldfiles", { only_cwd = true }), desc = "Recent (cwd)" }, + { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, From 6aefa8ec3ea1918957dd7c30de4c8db18a34e0b4 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:54:50 +0000 Subject: [PATCH 154/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 1ec65752..c5ca33d7 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 14 +*LazyVim.txt* For Neovim Last change: 2025 January 15 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 09:58:28 +0100 Subject: [PATCH 155/179] feat(snacks): added git diff keymap to pick hunks with leader-gd --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 522c4ce5..4036a4f0 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -49,6 +49,7 @@ return { { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, + { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, { "gs", function() Snacks.picker.git_status() end, desc = "Git Status" }, -- Grep { "sb", function() Snacks.picker.lines() end, desc = "Buffer Lines" }, From 915aab99ef950ae4a7d8b3f967de3412f366bfd9 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 16 Jan 2025 08:59:38 +0000 Subject: [PATCH 156/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index c5ca33d7..0e78cf3d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 15 +*LazyVim.txt* For Neovim Last change: 2025 January 16 ============================================================================== Table of Contents *LazyVim-table-of-contents* From b19f2070b847a3067436f4d16a0cc5b84a9f9819 Mon Sep 17 00:00:00 2001 From: Yusuf Aktepe Date: Thu, 16 Jan 2025 12:01:30 +0300 Subject: [PATCH 157/179] feat(dial): add checkbox augend for markdown (#5411) ## Description Added support for markdown checkboxes. ( **[ ]** <-> **[x]** ) ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/dial.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/dial.lua b/lua/lazyvim/plugins/extras/editor/dial.lua index a9f7bb26..602b747c 100644 --- a/lua/lazyvim/plugins/extras/editor/dial.lua +++ b/lua/lazyvim/plugins/extras/editor/dial.lua @@ -140,6 +140,11 @@ return { }), }, markdown = { + augend.constant.new({ + elements = { "[ ]", "[x]" }, + word = false, + cyclic = true, + }), augend.misc.alias.markdown_header, }, json = { From 4f31bfab86402c819e5ea1e18b3c5d139628c864 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 16 Jan 2025 10:05:30 +0100 Subject: [PATCH 158/179] fix(markdown): disable checkbox rendering since it's annoying to edit --- lua/lazyvim/plugins/extras/lang/markdown.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/markdown.lua b/lua/lazyvim/plugins/extras/lang/markdown.lua index e7977cb5..a73fe114 100644 --- a/lua/lazyvim/plugins/extras/lang/markdown.lua +++ b/lua/lazyvim/plugins/extras/lang/markdown.lua @@ -104,6 +104,9 @@ return { sign = false, icons = {}, }, + checkbox = { + enabled = false, + }, }, ft = { "markdown", "norg", "rmd", "org" }, config = function(_, opts) From df7426eefa79d5dfa2fcbe2f381abfb2cca70bad Mon Sep 17 00:00:00 2001 From: Riri Date: Thu, 16 Jan 2025 18:37:59 +0800 Subject: [PATCH 159/179] fix(snacks.picker): respect lazyvim.config.kind_filter (#5415) ## Description Currently, snacks.picker does not filter symbols based on the kind_filter configured in lazyvim. This PR addresses that issue. ## Screenshots nil ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. Co-authored-by: ding.zhao --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 4036a4f0..601fcf1b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -112,7 +112,7 @@ return { { "gr", function() Snacks.picker.lsp_references() end, nowait = true, desc = "References" }, { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, - { "ss", function() Snacks.picker.lsp_symbols() end, desc = "LSP Symbols", has = "documentSymbol" }, + { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, }) end, }, From b729e653182abab3089903baf62a8d5b65bfe36d Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Fri, 17 Jan 2025 04:00:30 -0500 Subject: [PATCH 160/179] refactor(blink): color swatch icon upstreamed (#5141) ## Description I've upstreamed the block char vs. icon replacement for Tailwind colors so we shouldn't need this here anymore. I've replaced it by extending the default blink icons instead, just in case they introduce an icon which isn't yet covered by Lazy's, it would still show up (unlikely, but better, no?). ## Related Issue(s) none ## Screenshots none ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/coding/blink.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/blink.lua b/lua/lazyvim/plugins/extras/coding/blink.lua index 81762b8d..45e393e1 100644 --- a/lua/lazyvim/plugins/extras/coding/blink.lua +++ b/lua/lazyvim/plugins/extras/coding/blink.lua @@ -158,9 +158,7 @@ return { "saghen/blink.cmp", opts = function(_, opts) opts.appearance = opts.appearance or {} - opts.appearance.kind_icons = vim.tbl_extend("keep", { - Color = "██", -- Use block instead of icon for color items to make swatches more usable - }, LazyVim.config.icons.kinds) + opts.appearance.kind_icons = vim.tbl_extend("force", opts.appearance.kind_icons or {}, LazyVim.config.icons.kinds) end, }, From b574f01af7ab5eaccdef16db60c1fdd94e8ff12d Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Fri, 17 Jan 2025 09:01:25 +0000 Subject: [PATCH 161/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 0e78cf3d..e076c4bf 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 16 +*LazyVim.txt* For Neovim Last change: 2025 January 17 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 970d1a05da37554aa17b671c869431a7b387d8be Mon Sep 17 00:00:00 2001 From: Imron Gamidli <36050790+gogamid@users.noreply.github.com> Date: Sat, 18 Jan 2025 14:52:25 +0100 Subject: [PATCH 162/179] feat(chezmoi): add snacks picker integration for chezmoi files (#5429) ## Description We have a new picker Snacks picker, it means telescope and fzf-lua can be uninstalled. But chezmoi files still listed only with telescope and fzf-lua. In this pr we add snacks.picker integration if the user has chosen snacks.picker in the LazyVimExtras. --- lua/lazyvim/plugins/extras/util/chezmoi.lua | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lua/lazyvim/plugins/extras/util/chezmoi.lua b/lua/lazyvim/plugins/extras/util/chezmoi.lua index 633f3008..cffa6749 100644 --- a/lua/lazyvim/plugins/extras/util/chezmoi.lua +++ b/lua/lazyvim/plugins/extras/util/chezmoi.lua @@ -19,6 +19,38 @@ local pick_chezmoi = function() }, } fzf_lua.fzf_exec(results, opts) + elseif LazyVim.pick.picker.name == "snacks" then + local results = require("chezmoi.commands").list({ + args = { + "--path-style", + "absolute", + "--include", + "files", + "--exclude", + "externals", + }, + }) + local items = {} + + for _, czFile in ipairs(results) do + table.insert(items, { + text = czFile, + file = czFile, + }) + end + + ---@type snacks.picker.Config + local opts = { + items = items, + confirm = function(picker, item) + picker:close() + require("chezmoi.commands").edit({ + targets = { item.text }, + args = { "--watch" }, + }) + end, + } + Snacks.picker.pick(opts) end end From 4e8d75144de92e62eb58c87f61938118d3b1e37c Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sat, 18 Jan 2025 13:53:19 +0000 Subject: [PATCH 163/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index e076c4bf..d40afbc0 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 17 +*LazyVim.txt* For Neovim Last change: 2025 January 18 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 8787ec1227e10123ad7291cf916020d9a8626525 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 19 Jan 2025 18:33:47 +0100 Subject: [PATCH 164/179] feat(snacks.picker): added leader-sS to search lsp workspace symbols --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 601fcf1b..bd4d7677 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -113,6 +113,7 @@ return { { "gI", function() Snacks.picker.lsp_implementations() end, desc = "Goto Implementation" }, { "gy", function() Snacks.picker.lsp_type_definitions() end, desc = "Goto T[y]pe Definition" }, { "ss", function() Snacks.picker.lsp_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Symbols", has = "documentSymbol" }, + { "sS", function() Snacks.picker.lsp_workspace_symbols({ filter = LazyVim.config.kind_filter }) end, desc = "LSP Workspace Symbols", has = "workspace/symbols" }, }) end, }, From 8f58fe0b62ddd3ed23816ca7ae3b6d369a565dc5 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Sun, 19 Jan 2025 17:34:47 +0000 Subject: [PATCH 165/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index d40afbc0..bd9b385d 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 18 +*LazyVim.txt* For Neovim Last change: 2025 January 19 ============================================================================== Table of Contents *LazyVim-table-of-contents* From eb7b453b48ab7e3008013e0edf2822f622111e97 Mon Sep 17 00:00:00 2001 From: Daniel Chong Date: Mon, 20 Jan 2025 23:55:51 +1300 Subject: [PATCH 166/179] fix(snacks.picker): fix mapping for Projects for consistency (#5433) ## Description `fp` is the mapping for Telescope and fzf for [Projects](https://www.lazyvim.org/extras/util/project). This PR makes this shortcut consistent for snacks picker. ## Related Issue(s) ## Screenshots ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index bd4d7677..e286dff3 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -74,7 +74,7 @@ return { { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "qp", function() Snacks.picker.projects() end, desc = "Projects" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, }, { From 0e5d17537a433b0e8dc6d5e88eb4df4e69dbefc2 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:56:42 +0000 Subject: [PATCH 167/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index bd9b385d..23f8a322 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 19 +*LazyVim.txt* For Neovim Last change: 2025 January 20 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 66c3577bc779d31a7c2addd47de7cc6d215795ba Mon Sep 17 00:00:00 2001 From: Junyi Liu Date: Mon, 20 Jan 2025 07:16:14 -0500 Subject: [PATCH 168/179] perf(java): setting opts.dap_main to false to disable main class scan (#5391) ## Description For large Java project, calling `require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main)` has a huge performance impact on the LSP. I tested on a Java project with 3.7K java source files and 12K other files, a simple go_definition can take about 20-30 seconds. This change allow user to set the `opts.dap_main` to false so we can skip the main class scan. By using the `.lazy.lua` project specific setting, we can easily customize this option per project. ## Related Issue(s) #5387 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 520776fe..236c86c9 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -130,6 +130,7 @@ return { -- These depend on nvim-dap, but can additionally be disabled by setting false here. dap = { hotcodereplace = "auto", config_overrides = {} }, + -- Can set this to false to disable main class scan, which is a performance killer for large project dap_main = {}, test = true, settings = { @@ -246,7 +247,9 @@ return { if opts.dap and LazyVim.has("nvim-dap") and mason_registry.is_installed("java-debug-adapter") then -- custom init for Java debugger require("jdtls").setup_dap(opts.dap) - require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + if opts.dap_main then + require("jdtls.dap").setup_dap_main_class_configs(opts.dap_main) + end -- Java Test require Java debugger to work if opts.test and mason_registry.is_installed("java-test") then From 2bea40c447b72e54ffb2d5cddc98d7798990796f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:50:28 +0100 Subject: [PATCH 169/179] chore(main): release 14.8.0 (#5409) :robot: I have created a release *beep* *boop* --- ## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) ### Features * **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) * **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) * **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) * **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) ### Bug Fixes * **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) * **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) * **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) * **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) ### Performance Improvements * **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 23 +++++++++++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 7a337949..b3c4f00b 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.7.0" + ".": "14.8.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f48b40b9..1057fb57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,28 @@ # Changelog +## [14.8.0](https://github.com/LazyVim/LazyVim/compare/v14.7.0...v14.8.0) (2025-01-20) + + +### Features + +* **chezmoi:** add snacks picker integration for chezmoi files ([#5429](https://github.com/LazyVim/LazyVim/issues/5429)) ([970d1a0](https://github.com/LazyVim/LazyVim/commit/970d1a05da37554aa17b671c869431a7b387d8be)) +* **dial:** add checkbox augend for markdown ([#5411](https://github.com/LazyVim/LazyVim/issues/5411)) ([b19f207](https://github.com/LazyVim/LazyVim/commit/b19f2070b847a3067436f4d16a0cc5b84a9f9819)) +* **snacks.picker:** added leader-sS to search lsp workspace symbols ([8787ec1](https://github.com/LazyVim/LazyVim/commit/8787ec1227e10123ad7291cf916020d9a8626525)) +* **snacks:** added git diff keymap to pick hunks with leader-gd ([62cb4a4](https://github.com/LazyVim/LazyVim/commit/62cb4a465c490c7d41f7a3bf52fb0e222f2cf83b)) + + +### Bug Fixes + +* **markdown:** disable checkbox rendering since it's annoying to edit ([4f31bfa](https://github.com/LazyVim/LazyVim/commit/4f31bfab86402c819e5ea1e18b3c5d139628c864)) +* **snacks.picker:** fix mapping for `Recent (cwd)` ([#5407](https://github.com/LazyVim/LazyVim/issues/5407)) ([8307b0f](https://github.com/LazyVim/LazyVim/commit/8307b0fe506a38417f3b7835e2c4b43d9a970946)) +* **snacks.picker:** fix mapping for Projects for consistency ([#5433](https://github.com/LazyVim/LazyVim/issues/5433)) ([eb7b453](https://github.com/LazyVim/LazyVim/commit/eb7b453b48ab7e3008013e0edf2822f622111e97)) +* **snacks.picker:** respect lazyvim.config.kind_filter ([#5415](https://github.com/LazyVim/LazyVim/issues/5415)) ([df7426e](https://github.com/LazyVim/LazyVim/commit/df7426eefa79d5dfa2fcbe2f381abfb2cca70bad)) + + +### Performance Improvements + +* **java:** setting opts.dap_main to false to disable main class scan ([#5391](https://github.com/LazyVim/LazyVim/issues/5391)) ([66c3577](https://github.com/LazyVim/LazyVim/commit/66c3577bc779d31a7c2addd47de7cc6d215795ba)) + ## [14.7.0](https://github.com/LazyVim/LazyVim/compare/v14.6.1...v14.7.0) (2025-01-14) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 102ace9d..8a0b2ced 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.7.0" -- x-release-please-version +M.version = "14.8.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From dc8512fce1ec1cd4b0ca52d1077b2ed3894d51c8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:01 +0100 Subject: [PATCH 170/179] fix(root): pass args to root.get --- lua/lazyvim/util/root.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/util/root.lua b/lua/lazyvim/util/root.lua index b723b227..fc6d6d7d 100644 --- a/lua/lazyvim/util/root.lua +++ b/lua/lazyvim/util/root.lua @@ -1,8 +1,8 @@ ---@class lazyvim.util.root ---@overload fun(): string local M = setmetatable({}, { - __call = function(m) - return m.get() + __call = function(m, ...) + return m.get(...) end, }) From 6be7c4fee4fb755ff07f7bcc13eac96e1d8c279a Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:21:23 +0100 Subject: [PATCH 171/179] feat(snacks.picker): added alt-c to toggle between cwd/root dir --- .../plugins/extras/editor/snacks_picker.lua | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e286dff3..2b623179 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -27,11 +27,32 @@ end return { desc = "Fast and modern file picker", - -- recommended = true, + recommended = true, { "folke/snacks.nvim", opts = { - picker = {}, + picker = { + win = { + input = { + keys = { + [""] = { + "toggle_cwd", + mode = { "n", "i" }, + }, + }, + }, + }, + actions = { + ---@param p snacks.Picker + toggle_cwd = function(p) + local root = LazyVim.root({ buf = p.input.filter.current_buf, normalize = true }) + local cwd = vim.fs.normalize((vim.uv or vim.loop).cwd() or ".") + local current = p:cwd() + p:set_cwd(current == root and cwd or root) + p:find() + end, + }, + }, }, -- stylua: ignore keys = { From c7a7ab51129692927ae47f4e57ce22d10d48467e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:30:39 +0100 Subject: [PATCH 172/179] fix(vscode): diabled some snacks plugins. Fixes #5364 --- lua/lazyvim/plugins/extras/vscode.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/vscode.lua b/lua/lazyvim/plugins/extras/vscode.lua index b9b1e0b1..5115a2b4 100644 --- a/lua/lazyvim/plugins/extras/vscode.lua +++ b/lua/lazyvim/plugins/extras/vscode.lua @@ -57,9 +57,14 @@ return { { "snacks.nvim", opts = { + bigfile = { enabled = false }, + dashboard = { enabled = false }, indent = { enabled = false }, - scroll = { enabled = false }, + input = { enabled = false }, notifier = { enabled = false }, + picker = { enabled = false }, + quickfile = { enabled = false }, + scroll = { enabled = false }, statuscolumn = { enabled = false }, }, }, From 1e83b4f843f88678189df81b1c88a400c53abdbc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 20 Jan 2025 20:32:17 +0100 Subject: [PATCH 173/179] fix(sql): better nvim-cmp check. Closes #5188 --- lua/lazyvim/plugins/extras/lang/sql.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/lang/sql.lua b/lua/lazyvim/plugins/extras/lang/sql.lua index 075182d6..83de5ee1 100644 --- a/lua/lazyvim/plugins/extras/lang/sql.lua +++ b/lua/lazyvim/plugins/extras/lang/sql.lua @@ -48,7 +48,7 @@ return { vim.api.nvim_create_autocmd("FileType", { pattern = sql_ft, callback = function() - if LazyVim.has("nvim-cmp") then + if LazyVim.cmp_engine() == "nvim-cmp" then local cmp = require("cmp") -- global sources From 8b4e6ff70d682cad3b1f4999623c3f0ac639fa82 Mon Sep 17 00:00:00 2001 From: abeldekat <58370433+abeldekat@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:03:36 +0000 Subject: [PATCH 174/179] feat(snippets): an extra for mini.snippets (#5274) ## Description Mini.snippets, a plugin to manage and expand snippets, is currently in [beta](https://github.com/echasnovski/mini.nvim/issues/1428). I think the plugin is a very interesting alternative to `luasnip`. The following `lazydoc` will be added: ```lua if lazyvim_docs then -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows -- Motivation: Less clutter in completion windows and a more direct usage of snippits vim.g.lazyvim_mini_snippets_in_completion = true -- Using default mini.snippets, completion suggestions might appear directly after inserting a snippet -- This extra prevents that from happening. -- Motivation: A better display of the current snippet. -- Also, those completions do not appear when using luasnip or native snippets -- -- Set to `false` to enable completion suggestions directly after inserting a snippet vim.g.lazyvim_mini_snippets_override_expand_insert = true -- NOTE: Please also read: -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand -- :h MiniSnippets-session -- Example override for your own config: --[[ return { { "echasnovski/mini.snippets", opts = function(_, opts) -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() -- This provides a sensible quickstart, integrating with friendly-snippets -- and your own language-specific snippets -- -- In order to change opts.snippets, replace the entire table inside your own opts local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config") opts.snippets = { -- override opts.snippets provided by extra... -- Load custom file with global snippets first (order matters) snippets.gen_loader.from_file(config_path .. "/snippets/global.json"), -- Load snippets based on current language by reading files from -- "snippets/" subdirectories from 'runtimepath' directories. snippets.gen_loader.from_lang(), -- this is the default in the extra... } end, }, } --]] end ``` It's possible to use the code from this PR directly in your own configuration: 1. Copy the code to lua/extras/coding/mini_snippets.lua in your config folder 2. Restart nvim and enable the "user" extra for `mini.snippets` 3. Restart nvim ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --------- Co-authored-by: abeldekat --- .../plugins/extras/coding/mini-snippets.lua | 167 ++++++++++++++++++ 1 file changed, 167 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/coding/mini-snippets.lua diff --git a/lua/lazyvim/plugins/extras/coding/mini-snippets.lua b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua new file mode 100644 index 00000000..f68af110 --- /dev/null +++ b/lua/lazyvim/plugins/extras/coding/mini-snippets.lua @@ -0,0 +1,167 @@ +if lazyvim_docs then + -- Set to `false` to prevent "non-lsp snippets"" from appearing inside completion windows + -- Motivation: Less clutter in completion windows and a more direct usage of snippits + vim.g.lazyvim_mini_snippets_in_completion = true + + -- NOTE: Please also read: + -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-snippets.md#expand + -- :h MiniSnippets-session + + -- Example override for your own config: + --[[ + return { + { + "echasnovski/mini.snippets", + opts = function(_, opts) + -- By default, for opts.snippets, the extra for mini.snippets only adds gen_loader.from_lang() + -- This provides a sensible quickstart, integrating with friendly-snippets + -- and your own language-specific snippets + -- + -- In order to change opts.snippets, replace the entire table inside your own opts + + local snippets, config_path = require("mini.snippets"), vim.fn.stdpath("config") + + opts.snippets = { -- override opts.snippets provided by extra... + -- Load custom file with global snippets first (order matters) + snippets.gen_loader.from_file(config_path .. "/snippets/global.json"), + + -- Load snippets based on current language by reading files from + -- "snippets/" subdirectories from 'runtimepath' directories. + snippets.gen_loader.from_lang(), -- this is the default in the extra... + } + end, + }, + } +--]] +end + +local include_in_completion = vim.g.lazyvim_mini_snippets_in_completion == nil + or vim.g.lazyvim_mini_snippets_in_completion + +local function expand_from_lsp(snippet) + local insert = MiniSnippets.config.expand.insert or MiniSnippets.default_insert + insert({ body = snippet }) +end + +local function jump(direction) + local is_active = MiniSnippets.session.get(false) ~= nil + if is_active then + MiniSnippets.session.jump(direction) + return true + end +end + +---@type fun(snippets, insert) | nil +local expand_select_override = nil + +return { + -- disable builtin snippet support: + { "garymjr/nvim-snippets", optional = true, enabled = false }, + -- disable luasnip: + { "L3MON4D3/LuaSnip", optional = true, enabled = false }, + + -- add mini.snippets + desc = "mini.snippets(beta), a plugin to manage and expand snippets (alternative for luasnip)", + { + "echasnovski/mini.snippets", + event = "InsertEnter", -- don't depend on other plugins to load... + dependencies = "rafamadriz/friendly-snippets", + opts = function() + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_stop = function() end -- by design, should not stop the session! + ---@diagnostic disable-next-line: duplicate-set-field + LazyVim.cmp.actions.snippet_forward = function() + return jump("next") + end + + local mini_snippets = require("mini.snippets") + return { + snippets = { mini_snippets.gen_loader.from_lang() }, + + -- Following the behavior of vim.snippets, + -- the intended usage of is to be able to temporarily exit into normal mode for quick edits. + -- + -- If you'd rather stop the snippet on , activate the line below in your own config: + -- mappings = { stop = "" }, -- by default, see :h MiniSnippets-session + + expand = { + select = function(snippets, insert) + -- Close completion window on snippet select - vim.ui.select + -- Needed to remove virtual text for fzf-lua and telescope, but not for mini.pick... + local select = expand_select_override or MiniSnippets.default_select + select(snippets, insert) + end, + }, + } + end, + }, + + -- nvim-cmp integration + { + "hrsh7th/nvim-cmp", + optional = true, + dependencies = include_in_completion and { "abeldekat/cmp-mini-snippets" } or nil, + opts = function(_, opts) + local cmp = require("cmp") + local cmp_config = require("cmp.config") + + opts.snippet = { + expand = function(args) + expand_from_lsp(args.body) + cmp.resubscribe({ "TextChangedI", "TextChangedP" }) + cmp_config.set_onetime({ sources = {} }) + end, + } + + if include_in_completion then + table.insert(opts.sources, { name = "mini_snippets" }) + else + expand_select_override = function(snippets, insert) + -- stylua: ignore + if cmp.visible() then cmp.close() end + MiniSnippets.default_select(snippets, insert) + end + end + end, + -- stylua: ignore + -- counterpart to defined in cmp.mappings + keys = include_in_completion and { { "", function() jump("prev") end, mode = "i" } } or nil, + }, + + -- blink.cmp integration + { + "saghen/blink.cmp", + optional = true, + opts = function(_, opts) + -- Return early + if include_in_completion then + opts.snippets = { preset = "mini_snippets" } + return + end + + -- Standalone -- + expand_select_override = function(snippets, insert) + -- Schedule, otherwise blink's virtual text is not removed on vim.ui.select + require("blink.cmp").cancel() + vim.schedule(function() + MiniSnippets.default_select(snippets, insert) + end) + end + -- + -- Blink performs a require on blink.cmp.sources.snippets.default + -- By removing the source, the default engine will not be used + opts.sources.default = vim.tbl_filter(function(source) + return source ~= "snippets" + end, opts.sources.default) + opts.snippets = { -- need to repeat blink's preset here + expand = expand_from_lsp, + active = function() + return MiniSnippets.session.get(false) ~= nil + end, + jump = function(direction) + jump(direction == -1 and "prev" or "next") + end, + } + end, + }, +} From 7fb320700ad0162be33ce816f2ba6f9dda41883f Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:04:34 +0000 Subject: [PATCH 175/179] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 23f8a322..285451bb 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 January 20 +*LazyVim.txt* For Neovim Last change: 2025 January 23 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 332b32080c52727a16db90e06989caa0c378caa1 Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 10:51:36 -0500 Subject: [PATCH 176/179] feat(snacks.picker): added su to search undotree (#5447) ## Description As it reads on the title ;) ## Related Issue(s) None. ## Screenshots ![Screenshot 2025-01-22 at 14 02 30](https://github.com/user-attachments/assets/f8d2ba88-f279-4715-8120-7610c58bd269) ![Screenshot 2025-01-22 at 14 03 04](https://github.com/user-attachments/assets/08bc1b26-f49c-4f25-ad66-1166a3f72605) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index 2b623179..f47a2b29 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -68,6 +68,7 @@ return { { "fg", function() Snacks.picker.git_files() end, desc = "Find Files (git-files)" }, { "fr", LazyVim.pick("oldfiles"), desc = "Recent" }, { "fR", LazyVim.pick("oldfiles", { filter = { cwd = true }}), desc = "Recent (cwd)" }, + { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, -- git { "gc", function() Snacks.picker.git_log() end, desc = "Git Log" }, { "gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" }, @@ -94,8 +95,9 @@ return { { "sm", function() Snacks.picker.marks() end, desc = "Marks" }, { "sR", function() Snacks.picker.resume() end, desc = "Resume" }, { "sq", function() Snacks.picker.qflist() end, desc = "Quickfix List" }, + { "su", function() Snacks.picker.undo() end, desc = "Undotree" }, + -- ui { "uC", function() Snacks.picker.colorschemes() end, desc = "Colorschemes" }, - { "fp", function() Snacks.picker.projects() end, desc = "Projects" }, }, }, { From eea52be3447502dde77d9e6fa75fd597a0b5a86a Mon Sep 17 00:00:00 2001 From: Jorge Villalobos Date: Thu, 23 Jan 2025 13:19:48 -0500 Subject: [PATCH 177/179] feat(snacks.picker): added si to search icons (#5460) ## Description As it reads on the tin can. ## Related Issue(s) N/A ## Screenshots ![Screenshot 2025-01-23 at 11 49 49](https://github.com/user-attachments/assets/6c4d0e9a-0a8e-4128-9ef1-b7954ece2bc7) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index f47a2b29..fd08004b 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -88,6 +88,7 @@ return { { "sd", function() Snacks.picker.diagnostics() end, desc = "Diagnostics" }, { "sh", function() Snacks.picker.help() end, desc = "Help Pages" }, { "sH", function() Snacks.picker.highlights() end, desc = "Highlights" }, + { "si", function() Snacks.picker.icons() end, desc = "Icons" }, { "sj", function() Snacks.picker.jumps() end, desc = "Jumps" }, { "sk", function() Snacks.picker.keymaps() end, desc = "Keymaps" }, { "sl", function() Snacks.picker.loclist() end, desc = "Location List" }, From 7cf4185dc4d1fe49ad004d33a6703603fb4500ff Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:19 +0100 Subject: [PATCH 178/179] feat(snacks.picker): added `leader-sp` to search for plugin spec --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index fd08004b..e7a99239 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -78,6 +78,7 @@ return { { "sB", function() Snacks.picker.grep_buffers() end, desc = "Grep Open Buffers" }, { "sg", LazyVim.pick("live_grep"), desc = "Grep (Root Dir)" }, { "sG", LazyVim.pick("live_grep", { root = false }), desc = "Grep (cwd)" }, + { "sp", function() Snacks.picker.lazy() end, desc = "Search for Plugin Spec" }, { "sw", LazyVim.pick("grep_word"), desc = "Visual selection or word (Root Dir)", mode = { "n", "x" } }, { "sW", LazyVim.pick("grep_word", { root = false }), desc = "Visual selection or word (cwd)", mode = { "n", "x" } }, -- search From 83bf6360a1f28a3fc1afe31ae300247fc01c7a90 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 23 Jan 2025 19:22:47 +0100 Subject: [PATCH 179/179] feat(snacks.picker): added `leader-fB` to find any buffer (including hidden & nofile) --- lua/lazyvim/plugins/extras/editor/snacks_picker.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua index e7a99239..48bb7861 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_picker.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_picker.lua @@ -62,6 +62,7 @@ return { { "", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, -- find { "fb", function() Snacks.picker.buffers() end, desc = "Buffers" }, + { "fB", function() Snacks.picker.buffers({ hidden = true, nofile = true }) end, desc = "Buffers (all)" }, { "fc", LazyVim.pick.config_files(), desc = "Find Config File" }, { "ff", LazyVim.pick("files"), desc = "Find Files (Root Dir)" }, { "fF", LazyVim.pick("files", { root = false }), desc = "Find Files (cwd)" },