update
This commit is contained in:
1 parent
19d9347db9
commit
3ac528c554
72 files changed
+1734
-3140
No files matched your search
@@ -1,3 +1,15 @@
|
||||
local source_action = function(name)
|
||||
return function()
|
||||
vim.lsp.buf.code_action({
|
||||
apply = true,
|
||||
context = {
|
||||
only = { string.format("source.%s.ts", name) },
|
||||
diagnostics = {},
|
||||
},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
local inlayHints = {
|
||||
includeInlayParameterNameHints = "all",
|
||||
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
|
||||
@@ -47,6 +59,23 @@ return {
|
||||
inlayHints = inlayHints,
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>co",
|
||||
source_action("organizeImports"),
|
||||
desc = "Organize Imports",
|
||||
},
|
||||
{
|
||||
"<leader>cM",
|
||||
source_action("addMissingImports"),
|
||||
desc = "Add Missing Imports",
|
||||
},
|
||||
{
|
||||
"<leader>cR",
|
||||
source_action("removeUnused"),
|
||||
desc = "Remove Unused Imports",
|
||||
},
|
||||
},
|
||||
},
|
||||
denols = {
|
||||
root_dir = require("lspconfig").util.root_pattern("deno.json", "deno.jsonc", "deno.lock"),
|
||||
|
||||
Reference in new issue
Block a user