feat(typescript)!: the typescript extra now uses vtsls instead of tsserver. You may want to update your lsp settings.

This commit is contained in:
Folke Lemaitre 2024-05-29 15:10:53 +02:00
parent cf46d265ff
commit fba06ce9f5
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
3 changed files with 84 additions and 57 deletions

View file

@ -26,14 +26,18 @@ return {
volar = {},
-- Volar 2.0 has discontinued their "take over mode" which in previous version provided support for typescript in vue files.
-- The new approach to get typescript support involves using the typescript language server along side volar.
tsserver = {
init_options = {
plugins = {
-- Use typescript language server along with vue typescript plugin
{
name = "@vue/typescript-plugin",
location = vue_typescript_plugin,
languages = { "javascript", "typescript", "vue" },
vtsls = {
settings = {
vtsls = {
tsserver = {
globalPlugins = {
-- Use typescript language server along with vue typescript plugin
{
name = "@vue/typescript-plugin",
location = vue_typescript_plugin,
languages = { "vue" },
},
},
},
},
},