NVIM: Typescript-only keymaps added only when ts files are loaded

This commit is contained in:
Pratik Tripathy
2024-05-13 22:50:01 +05:30
parent cdc7f24982
commit ee91353e1a
3 changed files with 28 additions and 28 deletions

View File

@@ -152,34 +152,6 @@ return {
end,
})
end,
keys = {
{
"<leader>cu",
function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.organizeImports.ts" },
diagnostics = {},
},
})
end,
desc = "Typescript: Organize Imports",
},
{
"<leader>cU",
function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { "source.removeUnused.ts" },
diagnostics = {},
},
})
end,
desc = "Typescript: Remove Unused Imports",
},
},
},
{