mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
Merge branch 'LazyVim:main' into main
This commit is contained in:
commit
4261e3d573
19 changed files with 207 additions and 94 deletions
2
.github/.release-please-manifest.json
vendored
2
.github/.release-please-manifest.json
vendored
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
".": "14.11.0"
|
||||
".": "14.14.0"
|
||||
}
|
||||
|
|
|
|||
39
CHANGELOG.md
39
CHANGELOG.md
|
|
@ -1,5 +1,44 @@
|
|||
# Changelog
|
||||
|
||||
## [14.14.0](https://github.com/LazyVim/LazyVim/compare/v14.13.0...v14.14.0) (2025-02-15)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **extras:** setup neogen and mini.snippets integration ([#5594](https://github.com/LazyVim/LazyVim/issues/5594)) ([5788b9d](https://github.com/LazyVim/LazyVim/commit/5788b9d1e06dfb5f99f92354dc550c9f2c5a6710))
|
||||
* **keymaps:** enable toggling in quickfix list and location list ([#5608](https://github.com/LazyVim/LazyVim/issues/5608)) ([32e575a](https://github.com/LazyVim/LazyVim/commit/32e575aa75792c63f710f0bdc3e2fb5aa8ea75ad))
|
||||
* **snacks.picker:** added support for Project shortcuts in other dashboards ([#5607](https://github.com/LazyVim/LazyVim/issues/5607)) ([401ef48](https://github.com/LazyVim/LazyVim/commit/401ef48fcd617534b017ef471309bb1bd6465131))
|
||||
* **snacks.picker:** move trouble keymap from `ctrl+t` -> `alt+t` ([4aff006](https://github.com/LazyVim/LazyVim/commit/4aff0063a42bbc499cfa03feb6e58d4339c0950d))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **blink:** `blink` released new version, remove previous hack ([#5616](https://github.com/LazyVim/LazyVim/issues/5616)) ([b35015a](https://github.com/LazyVim/LazyVim/commit/b35015ac59f0c630b2efe18ccf10d693397d0ca4))
|
||||
* **blink:** `cmdline` is now top-level on main branch ([#5615](https://github.com/LazyVim/LazyVim/issues/5615)) ([0458e46](https://github.com/LazyVim/LazyVim/commit/0458e46dcca49cc404062e04a9054a8bd058dcd3))
|
||||
* **blink:** enable Neovim native mapping with `<Tab>` ([#5617](https://github.com/LazyVim/LazyVim/issues/5617)) ([e7f8e4f](https://github.com/LazyVim/LazyVim/commit/e7f8e4faba0c6d397526238923f1aeff1740d09c))
|
||||
|
||||
## [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 March 01
|
||||
|
||||
==============================================================================
|
||||
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.14.0" -- x-release-please-version
|
||||
LazyVim.config = M
|
||||
|
||||
---@class LazyVimOptions
|
||||
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -94,8 +94,21 @@ map("n", "<leader>l", "<cmd>Lazy<cr>", { desc = "Lazy" })
|
|||
-- new file
|
||||
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
|
||||
|
||||
map("n", "<leader>xl", "<cmd>lopen<cr>", { desc = "Location List" })
|
||||
map("n", "<leader>xq", "<cmd>copen<cr>", { desc = "Quickfix List" })
|
||||
-- location list
|
||||
map("n", "<leader>xl", function()
|
||||
local success, err = pcall(vim.fn.getloclist(0, { winid = 0 }).winid ~= 0 and vim.cmd.lclose or vim.cmd.lopen)
|
||||
if not success and err then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end, { desc = "Location List" })
|
||||
|
||||
-- quickfix list
|
||||
map("n", "<leader>xq", function()
|
||||
local success, err = pcall(vim.fn.getqflist({ winid = 0 }).winid ~= 0 and vim.cmd.cclose or vim.cmd.copen)
|
||||
if not success and err then
|
||||
vim.notify(err, vim.log.levels.ERROR)
|
||||
end
|
||||
end, { desc = "Quickfix List" })
|
||||
|
||||
map("n", "[q", vim.cmd.cprev, { desc = "Previous Quickfix" })
|
||||
map("n", "]q", vim.cmd.cnext, { desc = "Next Quickfix" })
|
||||
|
|
@ -166,7 +179,7 @@ map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
|||
|
||||
-- highlights under cursor
|
||||
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
|
||||
map("n", "<leader>uI", "<cmd>InspectTree<cr>", { desc = "Inspect Tree" })
|
||||
map("n", "<leader>uI", function() vim.treesitter.inspect_tree() vim.api.nvim_input("I") end, { desc = "Inspect Tree" })
|
||||
|
||||
-- LazyVim Changelog
|
||||
map("n", "<leader>L", function() LazyVim.news.changelog() end, { desc = "LazyVim Changelog" })
|
||||
|
|
|
|||
|
|
@ -1,28 +1,3 @@
|
|||
local M = {}
|
||||
|
||||
---@param kind string
|
||||
function M.pick(kind)
|
||||
return function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
local items = actions[kind .. "_actions"]()
|
||||
if not items then
|
||||
LazyVim.warn("No " .. kind .. " found on the current line")
|
||||
return
|
||||
end
|
||||
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
|
||||
|
||||
return {
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
|
|
@ -62,16 +37,25 @@ return {
|
|||
{
|
||||
"<leader>aq",
|
||||
function()
|
||||
local input = vim.fn.input("Quick Chat: ")
|
||||
if input ~= "" then
|
||||
require("CopilotChat").ask(input)
|
||||
end
|
||||
vim.ui.input({
|
||||
prompt = "Quick Chat: ",
|
||||
}, function(input)
|
||||
if input ~= "" then
|
||||
require("CopilotChat").ask(input)
|
||||
end
|
||||
end)
|
||||
end,
|
||||
desc = "Quick Chat (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
-- Show prompts actions with telescope
|
||||
{ "<leader>ap", M.pick("prompt"), desc = "Prompt Actions (CopilotChat)", mode = { "n", "v" } },
|
||||
{
|
||||
"<leader>ap",
|
||||
function()
|
||||
require("CopilotChat").select_prompt()
|
||||
end,
|
||||
desc = "Prompt Actions (CopilotChat)",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local chat = require("CopilotChat")
|
||||
|
|
|
|||
|
|
@ -79,7 +79,10 @@ return {
|
|||
-- with blink.compat
|
||||
compat = {},
|
||||
default = { "lsp", "path", "snippets", "buffer" },
|
||||
cmdline = {},
|
||||
},
|
||||
|
||||
cmdline = {
|
||||
enabled = false,
|
||||
},
|
||||
|
||||
keymap = {
|
||||
|
|
@ -140,6 +143,7 @@ return {
|
|||
items = transform_items and transform_items(ctx, items) or items
|
||||
for _, item in ipairs(items) do
|
||||
item.kind = kind_idx or item.kind
|
||||
item.kind_icon = LazyVim.config.icons.kinds[item.kind_name] or item.kind_icon or nil
|
||||
end
|
||||
return items
|
||||
end
|
||||
|
|
|
|||
|
|
@ -140,21 +140,25 @@ return {
|
|||
end
|
||||
|
||||
-- Standalone --
|
||||
local blink = require("blink.cmp")
|
||||
expand_select_override = function(snippets, insert)
|
||||
-- Schedule, otherwise blink's virtual text is not removed on vim.ui.select
|
||||
require("blink.cmp").cancel()
|
||||
blink.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
|
||||
-- By removing the source, that 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,
|
||||
expand = function(snippet)
|
||||
expand_from_lsp(snippet)
|
||||
blink.resubscribe()
|
||||
end,
|
||||
active = function()
|
||||
return MiniSnippets.session.get(false) ~= nil
|
||||
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")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"danymat/neogen",
|
||||
dependencies = LazyVim.has("mini.snippets") and { "mini.snippets" } or {},
|
||||
cmd = "Neogen",
|
||||
keys = {
|
||||
{
|
||||
|
|
@ -17,6 +18,7 @@ return {
|
|||
|
||||
local map = {
|
||||
["LuaSnip"] = "luasnip",
|
||||
["mini.snippets"] = "mini",
|
||||
["nvim-snippy"] = "snippy",
|
||||
["vim-vsnip"] = "vsnip",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ return {
|
|||
{ "<leader>fR", function() Snacks.picker.recent({ filter = { cwd = true }}) end, desc = "Recent (cwd)" },
|
||||
{ "<leader>fp", function() Snacks.picker.projects() end, desc = "Projects" },
|
||||
-- git
|
||||
{ "<leader>gc", function() Snacks.picker.git_log() end, desc = "Git Log" },
|
||||
{ "<leader>gd", function() Snacks.picker.git_diff() end, desc = "Git Diff (hunks)" },
|
||||
{ "<leader>gs", function() Snacks.picker.git_status() end, desc = "Git Status" },
|
||||
{ "<leader>gS", function() Snacks.picker.git_stash() end, desc = "Git Stash" },
|
||||
|
|
@ -121,7 +120,7 @@ return {
|
|||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<c-t>"] = {
|
||||
["<a-t>"] = {
|
||||
"trouble_open",
|
||||
mode = { "n", "i" },
|
||||
},
|
||||
|
|
@ -168,6 +167,50 @@ return {
|
|||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
optional = true,
|
||||
opts = function(_, dashboard)
|
||||
local button = dashboard.button("p", " " .. " Projects", [[<cmd> lua Snacks.picker.projects() <cr>]])
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
table.insert(dashboard.section.buttons.val, 4, button)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"echasnovski/mini.starter",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local items = {
|
||||
{
|
||||
name = "Projects",
|
||||
action = [[lua Snacks.picker.projects()]],
|
||||
section = string.rep(" ", 22) .. "Telescope",
|
||||
},
|
||||
}
|
||||
vim.list_extend(opts.items, items)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
if not vim.tbl_get(opts, "config", "center") then
|
||||
return
|
||||
end
|
||||
local projects = {
|
||||
action = "lua Snacks.picker.projects()",
|
||||
desc = " Projects",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
}
|
||||
|
||||
projects.desc = projects.desc .. string.rep(" ", 43 - #projects.desc)
|
||||
projects.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 3, projects)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
optional = true,
|
||||
|
|
|
|||
|
|
@ -3,22 +3,12 @@ local pick_chezmoi = function()
|
|||
require("telescope").extensions.chezmoi.find_files()
|
||||
elseif LazyVim.pick.picker.name == "fzf" then
|
||||
local fzf_lua = require("fzf-lua")
|
||||
local results = require("chezmoi.commands").list()
|
||||
local chezmoi = require("chezmoi.commands")
|
||||
|
||||
local opts = {
|
||||
fzf_opts = {},
|
||||
fzf_colors = true,
|
||||
actions = {
|
||||
["default"] = function(selected)
|
||||
chezmoi.edit({
|
||||
targets = { "~/" .. selected[1] },
|
||||
args = { "--watch" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
local actions = {
|
||||
["enter"] = function(selected)
|
||||
fzf_lua.actions.vimcmd_entry("ChezmoiEdit", selected, { cwd = os.getenv("HOME") })
|
||||
end,
|
||||
}
|
||||
fzf_lua.fzf_exec(results, opts)
|
||||
fzf_lua.files({ cmd = "chezmoi managed --include=files,symlinks", actions = actions })
|
||||
elseif LazyVim.pick.picker.name == "snacks" then
|
||||
local results = require("chezmoi.commands").list({
|
||||
args = {
|
||||
|
|
@ -65,6 +55,7 @@ return {
|
|||
},
|
||||
{
|
||||
"xvzc/chezmoi.nvim",
|
||||
cmd = { "ChezmoiEdit" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>sz",
|
||||
|
|
@ -120,6 +111,27 @@ return {
|
|||
table.insert(opts.config.center, 5, projects)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local chezmoi_entry = {
|
||||
icon = " ",
|
||||
key = "c",
|
||||
desc = "Config",
|
||||
action = pick_chezmoi,
|
||||
}
|
||||
local config_index
|
||||
for i = #opts.dashboard.preset.keys, 1, -1 do
|
||||
if opts.dashboard.preset.keys[i].key == "c" then
|
||||
table.remove(opts.dashboard.preset.keys, i)
|
||||
config_index = i
|
||||
break
|
||||
end
|
||||
end
|
||||
table.insert(opts.dashboard.preset.keys, config_index, chezmoi_entry)
|
||||
end,
|
||||
},
|
||||
|
||||
-- Filetype icons
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,12 +42,14 @@ return {
|
|||
"pwntester/octo.nvim",
|
||||
opts = function(_, opts)
|
||||
vim.treesitter.language.register("markdown", "octo")
|
||||
if LazyVim.has("telescope.nvim") then
|
||||
if LazyVim.has_extra("editor.telescope") then
|
||||
opts.picker = "telescope"
|
||||
elseif LazyVim.has("fzf-lua") then
|
||||
elseif LazyVim.has_extra("editor.fzf") then
|
||||
opts.picker = "fzf-lua"
|
||||
elseif LazyVim.has_extra("editor.snacks_picker") then
|
||||
opts.picker = "snacks"
|
||||
else
|
||||
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua`")
|
||||
LazyVim.error("`octo.nvim` requires `telescope.nvim` or `fzf-lua` or `snacks.nvim`")
|
||||
end
|
||||
|
||||
-- Keep some empty windows in sessions
|
||||
|
|
|
|||
|
|
@ -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" },
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ local prios = {
|
|||
-- default priority is 50
|
||||
["lazyvim.plugins.extras.editor.aerial"] = 100,
|
||||
["lazyvim.plugins.extras.editor.outline"] = 100,
|
||||
["lazyvim.plugins.extras.ui.alpha"] = 19,
|
||||
["lazyvim.plugins.extras.ui.dashboard-nvim"] = 19,
|
||||
["lazyvim.plugins.extras.ui.mini-starter"] = 19,
|
||||
}
|
||||
|
||||
if vim.g.xtras_prios then
|
||||
|
|
|
|||
|
|
@ -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
Reference in a new issue