Skip to content

[#83] Rework access to preferences #83 #117

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 12, 2023
Merged

Conversation

ruspl-afed
Copy link
Member

  • Support unified way to work with both project and workspace preferences
  • Provide UI to configure preferences in details

Support unified way to work with both project and worksapce preferences
Provide UI to configure preferences in details

Signed-off-by: Alexander Fedorov <[email protected]>

public class LspEditorPropertiesPage extends PropertyPage {
public final class LspEditorPropertiesPage extends PropertyPage {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be disabled or better hidden, when other ls provider is used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but currently we have nothing to distinguish one provider from another. Could be a a part of #81

load();
composite.setLayout(GridLayoutFactory.fillDefaults().numColumns(3).create());
composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
area = new ClangdConfigurationArea(composite, configuration.metadata());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All settings on project level make only sense, when we support one LS instance per project.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH, I forgot what is blocking us from having LS instance per project. Is this still a limitation of LSP4E?

Copy link
Contributor

@ghentschke ghentschke Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. There are two issues: To enable a single LS the boolean singleton element in the org.eclipse.lsp4e.languageServer extension point definition has to be set. To make this configurable, we could define a another language server which is a non-singleton. This solution needs an enable method for the ls definition, which is currently not implemented in the org.eclipse.lsp4e.languageServer extension point, to distinguish between our singleton or non-singleton server.

Another approach would be to make the singleton attribute settable via the org.eclipse.lsp4e.server.StreamConnectionProvider or org.eclipse.lsp4j.services.LanguageServer interface. This is preferred by me.

The other issue is the handling of external files. Which LS should be used for them? In most cases they have been opened by a project file via hyperlink. Here we have to track the origin file for each external file.

Copy link
Contributor

@ghentschke ghentschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @ruspl-afed Thank you very much. I am learning a lot!

@ruspl-afed
Copy link
Member Author

Thank you for review @ghentschke !

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.

3 participants