mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-16 23:41:12 +02:00
Merge branch 'LazyVim:main' into feature/copilot-source-update
This commit is contained in:
commit
4078ae60b9
11 changed files with 80 additions and 38 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
".": "14.11.0"
|
".": "14.13.0"
|
||||||
}
|
}
|
||||||
|
|
22
CHANGELOG.md
22
CHANGELOG.md
|
@ -1,5 +1,27 @@
|
||||||
# Changelog
|
# 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)
|
||||||
|
|
||||||
|
|
||||||
|
### 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)
|
## [14.11.0](https://github.com/LazyVim/LazyVim/compare/v14.10.0...v14.11.0) (2025-02-08)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
*LazyVim.txt* For Neovim Last change: 2025 February 08
|
*LazyVim.txt* For Neovim Last change: 2025 February 12
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
Table of Contents *LazyVim-table-of-contents*
|
Table of Contents *LazyVim-table-of-contents*
|
||||||
|
|
|
@ -3,7 +3,7 @@ _G.LazyVim = require("lazyvim.util")
|
||||||
---@class LazyVimConfig: LazyVimOptions
|
---@class LazyVimConfig: LazyVimOptions
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.version = "14.11.0" -- x-release-please-version
|
M.version = "14.13.0" -- x-release-please-version
|
||||||
LazyVim.config = M
|
LazyVim.config = M
|
||||||
|
|
||||||
---@class LazyVimOptions
|
---@class LazyVimOptions
|
||||||
|
@ -212,6 +212,10 @@ function M.setup(opts)
|
||||||
"vscode",
|
"vscode",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if vim.g.lazyvim_check_order == false then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
-- Check lazy.nvim import order
|
-- Check lazy.nvim import order
|
||||||
local imports = require("lazy.core.config").spec.modules
|
local imports = require("lazy.core.config").spec.modules
|
||||||
local function find(pat, last)
|
local function find(pat, last)
|
||||||
|
@ -225,11 +229,18 @@ function M.setup(opts)
|
||||||
local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins
|
local extras = find("^lazyvim%.plugins%.extras%.", true) or lazyvim_plugins
|
||||||
local plugins = find("^plugins$") or math.huge
|
local plugins = find("^plugins$") or math.huge
|
||||||
if lazyvim_plugins ~= 1 or extras > plugins then
|
if lazyvim_plugins ~= 1 or extras > plugins then
|
||||||
vim.notify(
|
local msg = {
|
||||||
"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`",
|
"The order of your `lazy.nvim` imports is incorrect:",
|
||||||
"warn",
|
"- `lazyvim.plugins` should be first",
|
||||||
{ title = "LazyVim" }
|
"- 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
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,8 +9,17 @@ function M.pick(kind)
|
||||||
LazyVim.warn("No " .. kind .. " found on the current line")
|
LazyVim.warn("No " .. kind .. " found on the current line")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local ok = pcall(require, "fzf-lua")
|
local map = {
|
||||||
require("CopilotChat.integrations." .. (ok and "fzflua" or "telescope")).pick(items)
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
-- and more.
|
-- and more.
|
||||||
return {
|
return {
|
||||||
"echasnovski/mini.surround",
|
"echasnovski/mini.surround",
|
||||||
recommended = true,
|
|
||||||
keys = function(_, keys)
|
keys = function(_, keys)
|
||||||
-- Populate the keys based on the user's options
|
-- Populate the keys based on the user's options
|
||||||
local opts = LazyVim.opts("mini.surround")
|
local opts = LazyVim.opts("mini.surround")
|
||||||
|
|
|
@ -40,7 +40,6 @@ end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
desc = "Awesome picker for FZF (alternative to Telescope)",
|
desc = "Awesome picker for FZF (alternative to Telescope)",
|
||||||
recommended = true,
|
|
||||||
{
|
{
|
||||||
"ibhagwan/fzf-lua",
|
"ibhagwan/fzf-lua",
|
||||||
cmd = "FzfLua",
|
cmd = "FzfLua",
|
||||||
|
@ -289,10 +288,10 @@ return {
|
||||||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
vim.list_extend(Keys, {
|
vim.list_extend(Keys, {
|
||||||
{ "gd", "<cmd>FzfLua lsp_definitions jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
{ "gd", "<cmd>FzfLua lsp_definitions jump1=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
||||||
{ "gr", "<cmd>FzfLua lsp_references jump_to_single_result=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
{ "gr", "<cmd>FzfLua lsp_references jump1=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
||||||
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
{ "gI", "<cmd>FzfLua lsp_implementations jump1=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
||||||
{ "gy", "<cmd>FzfLua lsp_typedefs jump_to_single_result=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
{ "gy", "<cmd>FzfLua lsp_typedefs jump1=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
return {
|
return {
|
||||||
{
|
desc = "Snacks File Explorer",
|
||||||
"folke/snacks.nvim",
|
recommended = true,
|
||||||
opts = { explorer = {} },
|
"folke/snacks.nvim",
|
||||||
keys = {
|
opts = { explorer = {} },
|
||||||
{
|
keys = {
|
||||||
"<leader>fe",
|
{
|
||||||
function()
|
"<leader>fe",
|
||||||
Snacks.explorer({ cwd = LazyVim.root() })
|
function()
|
||||||
end,
|
Snacks.explorer({ cwd = LazyVim.root() })
|
||||||
desc = "Explorer Snacks (root dir)",
|
end,
|
||||||
},
|
desc = "Explorer Snacks (root dir)",
|
||||||
{
|
|
||||||
"<leader>fE",
|
|
||||||
function()
|
|
||||||
Snacks.explorer()
|
|
||||||
end,
|
|
||||||
desc = "Explorer Snacks (cwd)",
|
|
||||||
},
|
|
||||||
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
|
|
||||||
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"<leader>fE",
|
||||||
|
function()
|
||||||
|
Snacks.explorer()
|
||||||
|
end,
|
||||||
|
desc = "Explorer Snacks (cwd)",
|
||||||
|
},
|
||||||
|
{ "<leader>e", "<leader>fe", desc = "Explorer Snacks (root dir)", remap = true },
|
||||||
|
{ "<leader>E", "<leader>fE", desc = "Explorer Snacks (cwd)", remap = true },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ function M.get()
|
||||||
end
|
end
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
M._keys = {
|
M._keys = {
|
||||||
{ "<leader>cl", "<cmd>LspInfo<cr>", desc = "Lsp Info" },
|
{ "<leader>cl", function() Snacks.picker.lsp_config() end, desc = "Lsp Info" },
|
||||||
{ "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
|
{ "gd", vim.lsp.buf.definition, desc = "Goto Definition", has = "definition" },
|
||||||
{ "gr", vim.lsp.buf.references, desc = "References", nowait = true },
|
{ "gr", vim.lsp.buf.references, desc = "References", nowait = true },
|
||||||
{ "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
{ "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
||||||
|
|
|
@ -83,6 +83,7 @@ end
|
||||||
---@param modname string
|
---@param modname string
|
||||||
---@param source LazyExtraSource
|
---@param source LazyExtraSource
|
||||||
function M.get_extra(source, modname)
|
function M.get_extra(source, modname)
|
||||||
|
LazyVim.plugin.handle_defaults = false
|
||||||
local enabled = vim.tbl_contains(M.state, modname)
|
local enabled = vim.tbl_contains(M.state, modname)
|
||||||
local spec = Plugin.Spec.new(nil, { optional = true, pkg = false })
|
local spec = Plugin.Spec.new(nil, { optional = true, pkg = false })
|
||||||
spec:parse({ import = modname })
|
spec:parse({ import = modname })
|
||||||
|
|
|
@ -5,6 +5,7 @@ local M = {}
|
||||||
|
|
||||||
---@type string[]
|
---@type string[]
|
||||||
M.core_imports = {}
|
M.core_imports = {}
|
||||||
|
M.handle_defaults = true
|
||||||
|
|
||||||
M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
M.lazy_file_events = { "BufReadPost", "BufNewFile", "BufWritePre" }
|
||||||
|
|
||||||
|
@ -81,7 +82,7 @@ end
|
||||||
function M.fix_imports()
|
function M.fix_imports()
|
||||||
local defaults ---@type table<string, LazyVimDefault>
|
local defaults ---@type table<string, LazyVimDefault>
|
||||||
Plugin.Spec.import = LazyVim.inject.args(Plugin.Spec.import, function(_, spec)
|
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?
|
-- extra disabled by defaults?
|
||||||
defaults = defaults or LazyVim.config.get_defaults()
|
defaults = defaults or LazyVim.config.get_defaults()
|
||||||
local def = defaults[spec.import]
|
local def = defaults[spec.import]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue