update and remove lsp inlay deprecated plugin
This commit is contained in:
parent
030882309d
commit
7fdfc21a4d
6 changed files with 23 additions and 121 deletions
|
@ -26,69 +26,6 @@ return {
|
|||
main = "copilot",
|
||||
},
|
||||
{ "zbirenbaum/copilot-cmp", opts = {}, main = "copilot_cmp" },
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
dependencies = {
|
||||
{ "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
|
||||
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
|
||||
},
|
||||
opts = {
|
||||
chat_autocomplete = true,
|
||||
mappings = {
|
||||
complete = {
|
||||
insert = "",
|
||||
},
|
||||
},
|
||||
window = {
|
||||
layout = "float",
|
||||
relative = "cursor",
|
||||
width = 1,
|
||||
height = 0.4,
|
||||
row = 1,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>ch",
|
||||
function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
require("CopilotChat.integrations.telescope").pick(actions.help_actions())
|
||||
end,
|
||||
desc = "CopilotChat - Help actions",
|
||||
mode = { "n", "v", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>cp",
|
||||
function()
|
||||
local actions = require("CopilotChat.actions")
|
||||
require("CopilotChat.integrations.telescope").pick(actions.prompt_actions())
|
||||
end,
|
||||
desc = "CopilotChat - Prompt actions",
|
||||
mode = { "n", "v", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>cq",
|
||||
function()
|
||||
local input = vim.fn.input("Quick Chat: ")
|
||||
if input ~= "" then
|
||||
require("CopilotChat").ask(input, { selection = require("CopilotChat.select").buffer })
|
||||
end
|
||||
end,
|
||||
desc = "CopilotChat - Quick chat",
|
||||
mode = { "n", "v", "x" },
|
||||
},
|
||||
{
|
||||
"<leader>cc",
|
||||
function()
|
||||
require("CopilotChat").toggle()
|
||||
end,
|
||||
desc = "CopilotChat - Toggle",
|
||||
mode = { "n", "v", "x" },
|
||||
},
|
||||
},
|
||||
-- See Commands section for default commands if you want to lazy load on them
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
-- See `:help cmp`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
local function lsp_clients()
|
||||
local clients = {}
|
||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
||||
for _, client in pairs(vim.lsp.get_clients()) do
|
||||
clients[#clients + 1] = client.name
|
||||
end
|
||||
table.sort(clients)
|
||||
|
@ -9,7 +9,7 @@ end
|
|||
|
||||
local function langs()
|
||||
local l = {}
|
||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
||||
for _, client in pairs(vim.lsp.get_clients()) do
|
||||
local out = nil
|
||||
if client.name == "pyright" then
|
||||
out = vim.fn.system({ "python", "-V" })
|
||||
|
|
|
@ -32,28 +32,6 @@ return {
|
|||
event = "BufEnter",
|
||||
dependencies = {
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{
|
||||
"lvimuser/lsp-inlayhints.nvim",
|
||||
init = function()
|
||||
vim.api.nvim_create_augroup("LspAttach_inlayhints", { clear = true })
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = "LspAttach_inlayhints",
|
||||
callback = function(args)
|
||||
if not (args.data and args.data.client_id) then
|
||||
return
|
||||
end
|
||||
|
||||
local bufnr = args.buf
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
type_hints = { prefix = " ::" },
|
||||
},
|
||||
main = "lsp-inlayhints",
|
||||
},
|
||||
{ "b0o/schemastore.nvim" },
|
||||
-- Automatically install LSPs and related tools to stdpath for Neovim
|
||||
{ "williamboman/mason.nvim", enabled = not NIX, config = true }, -- NOTE: Must be loaded before dependants
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue