Skip to content
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

feat: allow finer-grained control of insertText #231

Closed
wants to merge 3 commits into from

Conversation

wkillerud
Copy link
Owner

@wkillerud wkillerud commented Sep 13, 2024

See the documentation for server-only settings for the details.

For #230

TODO:

  • Regression test Vue, Astro and Svelte in VS Code
    • User-authored styles
    • Sass built-ins
  • Test Vue, Astro and Svelte in Sublime Text
    • User-authored styles
    • Sass built-ins
  • Write automated tests for Astro and Svelte in language-services, they weren't covered it seems

@wkillerud
Copy link
Owner Author

wkillerud commented Sep 14, 2024

Before committing to all these settings: the spec allows for a different type of completion item that does a text edit with specified ranges.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_completion

Right now we use the simple model where

the client should filter against what the user has already typed using the word boundary rules of the language

I know the word boundary is what's caused some of the issues with . and $ in VS Code.

The second, while seemingly more complex, could well end up simpler for the server implementation, but certainly for language clients who won't have to deal with all these settings.

I'll leave this draft PR open, but I want to restart and try this other model with text edits before I continue down this path.

@wkillerud
Copy link
Owner Author

#232 is much more promising and future-proof

@wkillerud wkillerud closed this Sep 14, 2024
@wkillerud wkillerud deleted the completion-settings-per-lang branch September 28, 2024 15:06
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.

1 participant