bluwy/create-vite-extra

Recommendation on the lsp configuration

sigmaSd opened this issue · 2 comments

I tried vite-deno-svelte-ts template, it works (nice!), but the lsp get really confused,

svelte.config.js -> should be linted with deno lsp
vite.config.mts -> should be linted with tsserver ?
./src -> should be linted with svelte ? but also if I enable svelte there it gets confused because of the import syntax inside svelte.config.js

Is it the case of things currently , or are there ways to handle this ?

bluwy commented

vite.config.mts -> should be linted with tsserver ?

Not sure if it needs to be linted with tsserver? I think Deno can lint that too, but I'm not sure of the setup.

./src -> should be linted with svelte ? but also if I enable svelte there it gets confused because of the import syntax inside svelte.config.js

This is a little tricky since Svelte spins up it's own tsserver, and I think this is an issue for Vue etc too. There's some discussion at sveltejs/language-tools#1045 (comment)

So I'm not sure if there's a way to fix this, and it's the state of things now. What needs to be moved forward is having Svelte/Vue extensions be able to spin up Deno's lsp instead.

bluwy commented

Closing as I'm not really sure what's the solution here. I'd be happy to accept a community contribution if there's a solution to this though.