49 lines
1.1 KiB
Lua
49 lines
1.1 KiB
Lua
return {
|
|
"neovim/nvim-lspconfig",
|
|
---@class PluginLspOpts
|
|
opts = {
|
|
---@type lspconfig.options
|
|
servers = {
|
|
pyright = {},
|
|
marksman = {},
|
|
--@type lspconfig.options.tsserver
|
|
tsserver = {
|
|
keys = {
|
|
{
|
|
"<leader>co",
|
|
function()
|
|
vim.lsp.buf.code_action({
|
|
apply = true,
|
|
context = {
|
|
only = { "source.organizeImports.ts" },
|
|
diagnostics = {},
|
|
},
|
|
})
|
|
end,
|
|
desc = "Organize Imports",
|
|
},
|
|
{
|
|
"<leader>cR",
|
|
function()
|
|
vim.lsp.buf.code_action({
|
|
apply = true,
|
|
context = {
|
|
only = { "source.removeUnused.ts" },
|
|
diagnostics = {},
|
|
},
|
|
})
|
|
end,
|
|
desc = "Remove Unused Imports",
|
|
},
|
|
},
|
|
---@diagnostic disable-next-line: missing-fields
|
|
settings = {
|
|
completions = {
|
|
completeFunctionCalls = true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|