mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-02 00:54:50 +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
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
|
|
@ -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*
|
||||
|
|
|
@ -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.13.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
@ -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)
|
||||
|
@ -225,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,
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -40,7 +40,6 @@ end
|
|||
|
||||
return {
|
||||
desc = "Awesome picker for FZF (alternative to Telescope)",
|
||||
recommended = true,
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
cmd = "FzfLua",
|
||||
|
@ -289,10 +288,10 @@ return {
|
|||
local Keys = require("lazyvim.plugins.lsp.keymaps").get()
|
||||
-- stylua: ignore
|
||||
vim.list_extend(Keys, {
|
||||
{ "gd", "<cmd>FzfLua lsp_definitions jump_to_single_result=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 },
|
||||
{ "gI", "<cmd>FzfLua lsp_implementations jump_to_single_result=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" },
|
||||
{ "gd", "<cmd>FzfLua lsp_definitions jump1=true ignore_current_line=true<cr>", desc = "Goto Definition", has = "definition" },
|
||||
{ "gr", "<cmd>FzfLua lsp_references jump1=true ignore_current_line=true<cr>", desc = "References", nowait = true },
|
||||
{ "gI", "<cmd>FzfLua lsp_implementations jump1=true ignore_current_line=true<cr>", desc = "Goto Implementation" },
|
||||
{ "gy", "<cmd>FzfLua lsp_typedefs jump1=true ignore_current_line=true<cr>", desc = "Goto T[y]pe Definition" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
return {
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = { explorer = {} },
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
Snacks.explorer({ cwd = LazyVim.root() })
|
||||
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 },
|
||||
desc = "Snacks File Explorer",
|
||||
recommended = true,
|
||||
"folke/snacks.nvim",
|
||||
opts = { explorer = {} },
|
||||
keys = {
|
||||
{
|
||||
"<leader>fe",
|
||||
function()
|
||||
Snacks.explorer({ cwd = LazyVim.root() })
|
||||
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 },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ function M.get()
|
|||
end
|
||||
-- stylua: ignore
|
||||
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" },
|
||||
{ "gr", vim.lsp.buf.references, desc = "References", nowait = true },
|
||||
{ "gI", vim.lsp.buf.implementation, desc = "Goto Implementation" },
|
||||
|
|
|
@ -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 })
|
||||
|
|
|
@ -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<string, LazyVimDefault>
|
||||
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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue