mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
feat: enabled ts-plugin
support for astro
and svelte
This commit is contained in:
parent
e32d1918ae
commit
d64d761539
3 changed files with 5 additions and 11 deletions
|
@ -39,11 +39,7 @@ return {
|
||||||
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
||||||
{
|
{
|
||||||
name = "@astrojs/ts-plugin",
|
name = "@astrojs/ts-plugin",
|
||||||
location = LazyVim.get_pkg_path(
|
location = LazyVim.get_pkg_path("astro-language-server", "/node_modules/@astrojs/ts-plugin"),
|
||||||
"astro-language-server",
|
|
||||||
"/node_modules/@astrojs/ts-plugin",
|
|
||||||
{ warn = false }
|
|
||||||
),
|
|
||||||
enableForWorkspaceTypeScriptVersions = true,
|
enableForWorkspaceTypeScriptVersions = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -39,11 +39,7 @@ return {
|
||||||
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
LazyVim.extend(opts.servers.vtsls, "settings.vtsls.tsserver.globalPlugins", {
|
||||||
{
|
{
|
||||||
name = "typescript-svelte-plugin",
|
name = "typescript-svelte-plugin",
|
||||||
location = LazyVim.get_pkg_path(
|
location = LazyVim.get_pkg_path("svelte-language-server", "/node_modules/typescript-svelte-plugin"),
|
||||||
"svelte-language-server",
|
|
||||||
"/node_modules/typescript-svelte-plugin",
|
|
||||||
{ warn = false }
|
|
||||||
),
|
|
||||||
enableForWorkspaceTypeScriptVersions = true,
|
enableForWorkspaceTypeScriptVersions = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -246,7 +246,9 @@ function M.get_pkg_path(pkg, path, opts)
|
||||||
path = path or ""
|
path = path or ""
|
||||||
local ret = root .. "/packages/" .. pkg .. "/" .. path
|
local ret = root .. "/packages/" .. pkg .. "/" .. path
|
||||||
if opts.warn and not vim.loop.fs_stat(ret) then
|
if opts.warn and not vim.loop.fs_stat(ret) then
|
||||||
M.warn(("Mason package path not found for **%s**:\n- `%s`"):format(pkg, path))
|
M.warn(
|
||||||
|
("Mason package path not found for **%s**:\n- `%s`\nYou may need to force update the package."):format(pkg, path)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue