From 2a608f00d47bb6679a27a313fb0404e4d3a2196c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 18:32:46 +0100 Subject: [PATCH 01/11] fix(copilot-chat): added support for snacks picker. Closes #5432. Closes #5552 --- lua/lazyvim/plugins/extras/ai/copilot-chat.lua | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua index e71f4db1..d67da7b2 100644 --- a/lua/lazyvim/plugins/extras/ai/copilot-chat.lua +++ b/lua/lazyvim/plugins/extras/ai/copilot-chat.lua @@ -9,8 +9,17 @@ function M.pick(kind) LazyVim.warn("No " .. kind .. " found on the current line") return end - local ok = pcall(require, "fzf-lua") - require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items) + local map = { + telescope = "telescope", + fzf = "fzflua", + snacks = "snacks", + } + for _, def in pairs(LazyVim.config.get_defaults()) do + if def.enabled and map[def.name] then + return require("CopilotChat.integrations." .. map[def.name]).pick(items) + end + end + Snacks.notify.error("No picker found") end end From 0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 8 Feb 2025 20:34:17 +0100 Subject: [PATCH 02/11] feat(config): allow disabling the order check with `vim.g.lazyvim_check_order = false` --- lua/lazyvim/config/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 3ec3a62c..42afd66a 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -212,6 +212,10 @@ function M.setup(opts) "vscode", }) + if vim.g.lazyvim_check_order == false then + return + end + -- Check lazy.nvim import order local imports = require("lazy.core.config").spec.modules local function find(pat, last) From da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Feb 2025 12:14:05 +0100 Subject: [PATCH 03/11] feat(config): add option to disable the order check to warning message --- lua/lazyvim/config/init.lua | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 42afd66a..5ef66fd8 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -229,11 +229,18 @@ function M.setup(opts) local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins local plugins = find("^plugins$") or math.huge if lazyvim_plugins ~= 1 or extras > plugins then - vim.notify( - "The order of your `lazy.nvim` imports is incorrect:\n- `lazyvim.plugins` should be first\n- followed by any `lazyvim.plugins.extras`\n- and finally your own `plugins`", - "warn", - { title = "LazyVim" } - ) + local msg = { + "The order of your `lazy.nvim` imports is incorrect:", + "- `lazyvim.plugins` should be first", + "- followed by any `lazyvim.plugins.extras`", + "- and finally your own `plugins`", + "", + "If you think you know what you're doing, you can disable this check with:", + "```lua", + "vim.g.lazyvim_check_order = false", + "```", + } + vim.notify(table.concat(msg, "\n"), "warn", { title = "LazyVim" }) end end, }) From 66981fe5b2c220286a31292fce3cc82b0e17ae76 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Mon, 10 Feb 2025 11:15:22 +0000 Subject: [PATCH 04/11] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 496f9713..979ab2e6 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 08 +*LazyVim.txt* For Neovim Last change: 2025 February 10 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 121a2e27ef0f4d8ab64bf76768b9600c45fd2364 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 10 Feb 2025 23:27:24 +0100 Subject: [PATCH 05/11] fix(extras): disable import handling when loading `:LazyExtras` + changed some recommendations --- .../plugins/extras/coding/mini-surround.lua | 1 - lua/lazyvim/plugins/extras/editor/fzf.lua | 1 - .../plugins/extras/editor/snacks_explorer.lua | 40 +++++++++---------- lua/lazyvim/util/extras.lua | 1 + lua/lazyvim/util/plugin.lua | 3 +- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lua/lazyvim/plugins/extras/coding/mini-surround.lua b/lua/lazyvim/plugins/extras/coding/mini-surround.lua index 56d16a60..d8ff25c5 100644 --- a/lua/lazyvim/plugins/extras/coding/mini-surround.lua +++ b/lua/lazyvim/plugins/extras/coding/mini-surround.lua @@ -4,7 +4,6 @@ -- and more. return { "echasnovski/mini.surround", - recommended = true, keys = function(_, keys) -- Populate the keys based on the user's options local opts = LazyVim.opts("mini.surround") diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index aa26f6e1..c1dd76fd 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -40,7 +40,6 @@ end return { desc = "Awesome picker for FZF (alternative to Telescope)", - recommended = true, { "ibhagwan/fzf-lua", cmd = "FzfLua", diff --git a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua index 3e91f3ea..4163c799 100644 --- a/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua +++ b/lua/lazyvim/plugins/extras/editor/snacks_explorer.lua @@ -1,24 +1,24 @@ return { - { - "folke/snacks.nvim", - opts = { explorer = {} }, - keys = { - { - "fe", - function() - Snacks.explorer({ cwd = LazyVim.root() }) - end, - desc = "Explorer Snacks (root dir)", - }, - { - "fE", - function() - Snacks.explorer() - end, - desc = "Explorer Snacks (cwd)", - }, - { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, - { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, + desc = "Snacks File Explorer", + recommended = true, + "folke/snacks.nvim", + opts = { explorer = {} }, + keys = { + { + "fe", + function() + Snacks.explorer({ cwd = LazyVim.root() }) + end, + desc = "Explorer Snacks (root dir)", }, + { + "fE", + function() + Snacks.explorer() + end, + desc = "Explorer Snacks (cwd)", + }, + { "e", "fe", desc = "Explorer Snacks (root dir)", remap = true }, + { "E", "fE", desc = "Explorer Snacks (cwd)", remap = true }, }, } diff --git a/lua/lazyvim/util/extras.lua b/lua/lazyvim/util/extras.lua index fa87e820..6bc8eca2 100644 --- a/lua/lazyvim/util/extras.lua +++ b/lua/lazyvim/util/extras.lua @@ -83,6 +83,7 @@ end ---@param modname string ---@param source LazyExtraSource function M.get_extra(source, modname) + LazyVim.plugin.handle_defaults = false local enabled = vim.tbl_contains(M.state, modname) local spec = Plugin.Spec.new(nil, { optional = true, pkg = false }) spec:parse({ import = modname }) diff --git a/lua/lazyvim/util/plugin.lua b/lua/lazyvim/util/plugin.lua index c20a0fc8..e6cae997 100644 --- a/lua/lazyvim/util/plugin.lua +++ b/lua/lazyvim/util/plugin.lua @@ -5,6 +5,7 @@ local M = {} ---@type string[] M.core_imports = {} +M.handle_defaults = true M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" } @@ -81,7 +82,7 @@ end function M.fix_imports() local defaults ---@type table Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec) - if LazyVim.config.json.loaded then + if M.handle_defaults and LazyVim.config.json.loaded then -- extra disabled by defaults? defaults = defaults or LazyVim.config.get_defaults() local def = defaults[spec.import] From 9d426ed7fc57b285e0a89e011f7a35bd99cdc7f8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:53:22 +0100 Subject: [PATCH 06/11] chore(main): release 14.12.0 (#5553) :robot: I have created a release *beep* *boop* --- ## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) ### Features * **config:** add option to disable the order check to warning message ([da3b515](https://github.com/LazyVim/LazyVim/commit/da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2)) * **config:** allow disabling the order check with `vim.g.lazyvim_check_order = false` ([0bbce17](https://github.com/LazyVim/LazyVim/commit/0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805)) ### Bug Fixes * **copilot-chat:** added support for snacks picker. Closes [#5432](https://github.com/LazyVim/LazyVim/issues/5432). Closes [#5552](https://github.com/LazyVim/LazyVim/issues/5552) ([2a608f0](https://github.com/LazyVim/LazyVim/commit/2a608f00d47bb6679a27a313fb0404e4d3a2196c)) * **extras:** disable import handling when loading `:LazyExtras` + changed some recommendations ([121a2e2](https://github.com/LazyVim/LazyVim/commit/121a2e27ef0f4d8ab64bf76768b9600c45fd2364)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index c36e41c8..88facebb 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.11.0" + ".": "14.12.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 06ba397f..2b7c403b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) + + +### Features + +* **config:** add option to disable the order check to warning message ([da3b515](https://github.com/LazyVim/LazyVim/commit/da3b5159df326bc31d5a0ebdfa2c5cbbd32df9d2)) +* **config:** allow disabling the order check with `vim.g.lazyvim_check_order = false` ([0bbce17](https://github.com/LazyVim/LazyVim/commit/0bbce1775b7d6750d3c4d761f3ad1bcfb77fb805)) + + +### Bug Fixes + +* **copilot-chat:** added support for snacks picker. Closes [#5432](https://github.com/LazyVim/LazyVim/issues/5432). Closes [#5552](https://github.com/LazyVim/LazyVim/issues/5552) ([2a608f0](https://github.com/LazyVim/LazyVim/commit/2a608f00d47bb6679a27a313fb0404e4d3a2196c)) +* **extras:** disable import handling when loading `:LazyExtras` + changed some recommendations ([121a2e2](https://github.com/LazyVim/LazyVim/commit/121a2e27ef0f4d8ab64bf76768b9600c45fd2364)) + ## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 5ef66fd8..521cb808 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.11.0" -- x-release-please-version +M.version = "14.12.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions From 7fe0b47f177d1f47dd43dd44d9f267c4421a3684 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Tue, 11 Feb 2025 10:54:30 +0000 Subject: [PATCH 07/11] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 979ab2e6..6a579c49 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 10 +*LazyVim.txt* For Neovim Last change: 2025 February 11 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 75297733710951e81b505d88b2d728a5b0a9b6ab Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 11 Feb 2025 14:00:01 +0100 Subject: [PATCH 08/11] feat(lsp): use lsp_config picker instead of `LspInfo` --- lua/lazyvim/plugins/lsp/keymaps.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/lsp/keymaps.lua b/lua/lazyvim/plugins/lsp/keymaps.lua index 1b62a911..318ec911 100644 --- a/lua/lazyvim/plugins/lsp/keymaps.lua +++ b/lua/lazyvim/plugins/lsp/keymaps.lua @@ -13,7 +13,7 @@ function M.get() end -- stylua: ignore M._keys = { - { "cl", "LspInfo", desc = "Lsp Info" }, + { "cl", function() Snacks.picker.lsp_config() end, desc = "Lsp Info" }, { "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" }, { "gr", vim.lsp.buf.references, desc = "References", nowait = true }, { "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" }, From 0a5965b787e4d513b5a2e1182b35bd11ceafeeb3 Mon Sep 17 00:00:00 2001 From: Beartama <8091245+uyha@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:21:29 +0200 Subject: [PATCH 09/11] feat(editor): update parameter for fzf-lua (#5584) ## Description `fzf-lua` renames their parameter in https://github.com/ibhagwan/fzf-lua/commit/7cede182cf7463376669e102bd10d13f8ce05e52, so this PR updates the parameter also to stop the deprecation warning. ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index c1dd76fd..e9177457 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -288,10 +288,10 @@ return { local Keys = require("lazyvim.plugins.lsp.keymaps").get() -- stylua: ignore vim.list_extend(Keys, { - { "gd", "FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, - { "gr", "FzfLua lsp_references jump_to_single_result=true ignore_current_line=true", desc = "References", nowait = true }, - { "gI", "FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true", desc = "Goto Implementation" }, - { "gy", "FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, + { "gd", "FzfLua lsp_definitions jump1=true ignore_current_line=true", desc = "Goto Definition", has = "definition" }, + { "gr", "FzfLua lsp_references jump1=true ignore_current_line=true", desc = "References", nowait = true }, + { "gI", "FzfLua lsp_implementations jump1=true ignore_current_line=true", desc = "Goto Implementation" }, + { "gy", "FzfLua lsp_typedefs jump1=true ignore_current_line=true", desc = "Goto T[y]pe Definition" }, }) end, }, From 0db68916790808fd4eb284842c4d1a3d1c214e18 Mon Sep 17 00:00:00 2001 From: folke <292349+folke@users.noreply.github.com> Date: Wed, 12 Feb 2025 13:22:29 +0000 Subject: [PATCH 10/11] chore(build): auto-generate docs --- doc/LazyVim.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/LazyVim.txt b/doc/LazyVim.txt index 6a579c49..6dd2917b 100644 --- a/doc/LazyVim.txt +++ b/doc/LazyVim.txt @@ -1,4 +1,4 @@ -*LazyVim.txt* For Neovim Last change: 2025 February 11 +*LazyVim.txt* For Neovim Last change: 2025 February 12 ============================================================================== Table of Contents *LazyVim-table-of-contents* From 45d94b3197eaf3f35754b8ecb7adebfcebe5160d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:38:40 +0100 Subject: [PATCH 11/11] chore(main): release 14.13.0 (#5574) :robot: I have created a release *beep* *boop* --- ## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12) ### Features * **editor:** update parameter for fzf-lua ([#5584](https://github.com/LazyVim/LazyVim/issues/5584)) ([0a5965b](https://github.com/LazyVim/LazyVim/commit/0a5965b787e4d513b5a2e1182b35bd11ceafeeb3)) * **lsp:** use lsp_config picker instead of `LspInfo` ([7529773](https://github.com/LazyVim/LazyVim/commit/75297733710951e81b505d88b2d728a5b0a9b6ab)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ lua/lazyvim/config/init.lua | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index 88facebb..45cd5c1f 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "14.12.0" + ".": "14.13.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7c403b..292053a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [14.13.0](https://github.com/LazyVim/LazyVim/compare/v14.12.0...v14.13.0) (2025-02-12) + + +### Features + +* **editor:** update parameter for fzf-lua ([#5584](https://github.com/LazyVim/LazyVim/issues/5584)) ([0a5965b](https://github.com/LazyVim/LazyVim/commit/0a5965b787e4d513b5a2e1182b35bd11ceafeeb3)) +* **lsp:** use lsp_config picker instead of `LspInfo` ([7529773](https://github.com/LazyVim/LazyVim/commit/75297733710951e81b505d88b2d728a5b0a9b6ab)) + ## [14.12.0](https://github.com/LazyVim/LazyVim/compare/v14.11.0...v14.12.0) (2025-02-10) diff --git a/lua/lazyvim/config/init.lua b/lua/lazyvim/config/init.lua index 521cb808..586d1e7d 100644 --- a/lua/lazyvim/config/init.lua +++ b/lua/lazyvim/config/init.lua @@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util") ---@class LazyVimConfig: LazyVimOptions local M = {} -M.version = "14.12.0" -- x-release-please-version +M.version = "14.13.0" -- x-release-please-version LazyVim.config = M ---@class LazyVimOptions