mirror of
https://github.com/josean-dev/dev-environment-files.git
synced 2025-01-08 17:21:23 +01:00
Added keymaps for special typescript functionality to remove unused variables and organize imports
This commit is contained in:
parent
6eb4d2d9ae
commit
27bcf7459a
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ local on_attach = function(client, bufnr)
|
||||||
|
|
||||||
-- typescript specific keymaps (e.g. rename file and update imports)
|
-- typescript specific keymaps (e.g. rename file and update imports)
|
||||||
if client.name == "tsserver" then
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue