refactor(lsp): move typescript keymaps to typescript

This commit is contained in:
Folke Lemaitre 2023-01-08 21:07:42 +01:00
parent a44054fc62
commit 26a3d8c1f3
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 10 additions and 6 deletions

View file

@ -25,11 +25,6 @@ function M.on_attach(client, buffer)
self:map("<leader>cf", format, { desc = "Format Document", has = "documentFormatting" })
self:map("<leader>cf", format, { desc = "Format Range", mode = "v", has = "documentRangeFormatting" })
self:map("<leader>cr", M.rename, { expr = true, desc = "Rename", has = "rename" })
if client.name == "tsserver" and pcall(require, "typescript") then
self:map("<leader>co", "TypescriptOrganizeImports", { desc = "Organize Imports" })
self:map("<leader>cR", "TypescriptRenameFile", { desc = "Rename File" })
end
end
function M.new(client, buffer)