Skip to content

fix(svelte): only attach to existing files #3899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025

Conversation

igorlfs
Copy link
Contributor

@igorlfs igorlfs commented Jun 10, 2025

Similar to #3875, but this time I checked, and the server actually doesn't support schemas other than file://.

@justinmk
Copy link
Member

justinmk commented Jun 11, 2025

Does requires_workspace=true fix the issue? Even if the server claims to not require a workspace, if it requires a file on-disk then we will just treat it as requiring a workspace. The distinction is just silly and having to add special-case code like this as a workaround is not worth the maintenance cost.

Is this a separate issue from neovim/neovim#34208 (comment) , i.e.:

Would it help if root() returns an absolute path instead of '' or '.' ?

@igorlfs
Copy link
Contributor Author

igorlfs commented Jun 13, 2025

Does requires_workspace=true fix the issue?

No, it doesn't.

Is this a separate issue from neovim/neovim#34208 (comment) , i.e.:

Unfortunately, it is. At first, I thought they were the same, too. But the Svelte LSP doesn't care about the root_dir at all, it just won't work with virtual files.

and having to add special-case code like this as a workaround is not worth the maintenance cost.

I'm fine with keeping this to my own config if you consider it's not worth it adding here. Let me know 👍🏼

@justinmk
Copy link
Member

Need to think about a more maintainable approach, but this is helpful meanwhile. Thanks

@justinmk justinmk merged commit c36916f into neovim:master Jun 13, 2025
6 checks passed
@igorlfs igorlfs deleted the fix/svelte-attach branch June 13, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants