Skip to content

Commit

Permalink
Replace typscript-tools -> nvim-vtsls
Browse files Browse the repository at this point in the history
  • Loading branch information
ldonnez committed Sep 4, 2024
1 parent 2306ce3 commit f5a2ea1
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"nvim-lspconfig": { "branch": "master", "commit": "6bfd9210e312af6cfedba05d272e85618c93ab0d" },
"nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "585860a1865853d2c287c8ef534297da8115818e" },
"nvim-vtsls": { "branch": "main", "commit": "45c6dfea9f83a126e9bfc5dd63430562b3f8af16" },
"nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" },
"oil.nvim": { "branch": "master", "commit": "4f3c6780ff272d8facab69a658cf8693582b7a54" },
"persisted.nvim": { "branch": "main", "commit": "b975b6762bb79efd76453d822a53547c37066aec" },
Expand Down
26 changes: 26 additions & 0 deletions .config/nvim/lua/plugins/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ return {
{
"pmizio/typescript-tools.nvim",
ft = { "typescript", "typescriptreact", "javascript", "javascriptreact", "json" },
enabled = false,
opts = {
on_attach = function(client, bufnr)
keymaps.on_attach(client, bufnr)
Expand All @@ -50,4 +51,29 @@ return {
end,
},
},
{
"yioneko/nvim-vtsls",
keys = {
{
"gS",
function()
require("vtsls").commands.goto_source_definition()
end,
mode = { "n" },
desc = "Go to source definition Typescript",
},
},
ft = {
"typescript",
"typescriptreact",
"javascript",
"javascriptreact",
"json",
config = function()
require("vtsls").config({
refactor_auto_rename = true,
})
end,
},
},
}
15 changes: 15 additions & 0 deletions .config/nvim/lua/plugins/lsp/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ local servers = {
},
},
terraformls = {},
vtsls = {
settings = {
vtsls = {
autoUseWorkspaceTsdk = true,
experimental = {
completion = {
enableServerSideFuzzyMatch = true,
},
},
},
typescript = {
updateImportsOnFileMove = "always",
},
},
},
}

return servers

0 comments on commit f5a2ea1

Please sign in to comment.