Merge branch 'LazyVim:main' into feature/copilot-source-update

This commit is contained in:
Zhou Fang 2025-02-14 23:07:26 +09:00 committed by GitHub
commit 4078ae60b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 80 additions and 38 deletions

View file

@ -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

View file

@ -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")

View file

@ -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,
},

View file

@ -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 },
},
}