File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,27 @@ return {
1818 },
1919 {
2020 " AstroNvim/astrolsp" ,
21+ optional = true ,
2122 --- @type AstroLSPOpts
2223 opts = {
2324 --- @diagnostic disable : missing-fields
2425 config = {
26+ vtsls = {
27+ settings = {
28+ vtsls = {
29+ tsserver = {
30+ globalPlugins = {
31+ {
32+ name = " typescript-svelte-plugin" ,
33+ location = vim .fn .expand " $MASON/packages/svelte-language-server/node_modules/typescript-svelte-plugin" ,
34+ configNamespace = " typescript" ,
35+ enableForWorkspaceTypeScriptVersions = true ,
36+ },
37+ },
38+ },
39+ },
40+ },
41+ },
2542 svelte = {
2643 settings = {
2744 typescript = {
Original file line number Diff line number Diff line change @@ -48,13 +48,6 @@ return {
4848 },
4949 vtsls = {
5050 filetypes = vtsls_ft ,
51- settings = {
52- vtsls = {
53- tsserver = {
54- globalPlugins = {},
55- },
56- },
57- },
5851 before_init = function (_ , config )
5952 local registry_ok , registry = pcall (require , " mason-registry" )
6053 if not registry_ok then return end
@@ -67,6 +60,11 @@ return {
6760 configNamespace = " typescript" ,
6861 enableForWorkspaceTypeScriptVersions = true ,
6962 }
63+ config = config or {}
64+ config .settings = config .settings or {}
65+ config .settings .vtsls = config .settings .vtsls or {}
66+ config .settings .vtsls .tsserver = config .settings .vtsls .tsserver or {}
67+ config .settings .vtsls .tsserver .globalPlugins = config .settings .vtsls .tsserver .globalPlugins or {}
7068
7169 astrocore .list_insert_unique (config .settings .vtsls .tsserver .globalPlugins , { vue_plugin_config })
7270 end
You can’t perform that action at this time.
0 commit comments