mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix: vtls add select ts version
This commit is contained in:
parent
d6c555b0d2
commit
561b232958
1 changed files with 21 additions and 1 deletions
|
|
@ -21,7 +21,20 @@ return {
|
|||
require("vtsls").config(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- add typescript to treesitter
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
vim.list_extend(opts.ensure_installed, { "typescript", "tsx" })
|
||||
end
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
["tsconfig.tsbuildinfo"] = "json",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- correctly setup lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
|
|
@ -93,6 +106,13 @@ return {
|
|||
end,
|
||||
desc = "Fix all diagnostics",
|
||||
},
|
||||
{
|
||||
"<leader>cV",
|
||||
function()
|
||||
require("vtsls").commands.select_ts_version(0)
|
||||
end,
|
||||
desc = "Select TS workspace version",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue