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

Preference store per language #937

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

angelozerr
Copy link
Contributor

Preference store per language

Signed-off-by: azerr azerr@redhat.com

@angelozerr
Copy link
Contributor Author

This PR provides the capability to have a preference store per language ID.

This PR is very important (please merge it before the release) to support in the future spacesForTab preferences per language.

@angelozerr
Copy link
Contributor Author

This PR doesn't work -( since it seems that we can have a preference store per plugin. It is really annoying.

@angelozerr angelozerr marked this pull request as draft November 2, 2022 10:19
@mickaelistria
Copy link
Contributor

This PR doesn't work -( since it seems that we can have a preference store per plugin. It is really annoying.

Do you mean that the current code ignores the store, fails at creating it, or throws other errors...?
If this helps, you may consider creating another scope dedicated to Wild Web Developer prefs.

@mickaelistria
Copy link
Contributor

One possibility would be to create some kind of SubPreferenceStore that would allow to use a single store, but have a projection and subset of it. So when asking for preference tabsWidth, such SubPreferenceStore would actually request languageServerId/tabWith on the preferenceStore of org.eclipse.wildwebdeveloper.

@angelozerr
Copy link
Contributor Author

@mickaelistria we need to use spacesForTab and not languageServerId/tabWith as key, because this settings should be used:

  • by LSP4E for formatting
  • by the editor when user will press on Tab, it should generate some spaces (if spacesForTab is enabled)
  • by TM4E with onEnterRules

For the 2 last usecase, languageServerId/tabWith is unkwown.

I can manage those all usecases with eclipse-platform/eclipse.platform.text#109

@akurtakov
Copy link
Contributor

What is the status of this one? PRs lurking around are generally not helpful if no one plans to work on them.

Signed-off-by: azerr <azerr@redhat.com>
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.

None yet

3 participants