Added keymaps for special typescript functionality to remove unused variables and organize imports

This commit is contained in:
Josean Martinez 2022-10-19 11:49:03 -04:00
parent 6eb4d2d9ae
commit 27bcf7459a

View file

@ -39,7 +39,9 @@ local on_attach = function(client, bufnr)
-- typescript specific keymaps (e.g. rename file and update imports)
if client.name == "tsserver" then
keymap.set("n", "<leader>rf", ":TypescriptRenameFile<CR>")
keymap.set("n", "<leader>rf", ":TypescriptRenameFile<CR>") -- rename file and update imports
keymap.set("n", "<leader>oi", ":TypescriptOrganizeImports<CR>") -- organize imports (not in youtube nvim video)
keymap.set("n", "<leader>ru", ":TypescriptRemoveUnused<CR>") -- remove unused variables (not in youtube nvim video)
end
end