mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(extras.lang.vue) missing typescript autocomplete in .vue files (#3401)
* Fix missing autocomplete in .vue files The existing Vue extra was not properly configuring vtsls to use the globalPlugin: '@vue/typescript-plugin' This commit fixes missing typescript autocomplete in .vue files. * move @vue/typescript-plugin back to extend function call * tidy LazyVim.extend() arguments
This commit is contained in:
parent
abc6554e24
commit
07ff12f5eb
1 changed files with 7 additions and 5 deletions
|
@ -18,9 +18,9 @@ return {
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = function(_, opts)
|
opts = function(_, opts)
|
||||||
local vue_typescript_plugin = require("mason-registry").get_package("vue-language-server"):get_install_path()
|
local vue_typescript_plugin = require("mason-registry")
|
||||||
.. "/node_modules/@vue/language-server"
|
.get_package("vue-language-server")
|
||||||
.. "/node_modules/@vue/typescript-plugin"
|
:get_install_path() .. "/node_modules/@vue/language-server" .. "/node_modules/@vue/typescript-plugin"
|
||||||
|
|
||||||
opts.servers = vim.tbl_deep_extend("force", opts.servers, {
|
opts.servers = vim.tbl_deep_extend("force", opts.servers, {
|
||||||
volar = {},
|
volar = {},
|
||||||
|
@ -38,12 +38,14 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
LazyVim.extend(opts.servers.vtsls.settings.vtsls.tsserver.globalPlugins, {
|
||||||
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
|
||||||
name = "@vue/typescript-plugin",
|
name = "@vue/typescript-plugin",
|
||||||
location = vue_typescript_plugin,
|
location = vue_typescript_plugin,
|
||||||
languages = { "vue" },
|
languages = { "vue" },
|
||||||
|
configNamespace = "typescript",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue