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

Move language description configuration out of source code #7790

Closed
dkulieshov opened this issue Dec 8, 2017 · 3 comments
Closed

Move language description configuration out of source code #7790

dkulieshov opened this issue Dec 8, 2017 · 3 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/in-progress This issue has been taken by an engineer and is under active development.

Comments

@dkulieshov
Copy link

Right now we use LanguageDescription instances when we want to find which language corresponds to specific file and further which language server corresponds to mentioned file. Those LanguageDescription instances are configured inside Guice modules.

If we want to make it possible to have complete language server configuration as a part of workspace configuration, we need to find a way how we can move language description from Guice to workspace configuration or change the way we define a correspondence between file and language server instance.

@dkulieshov dkulieshov added kind/task Internal things, technical debt, and to-do tasks to be performed. team/ide labels Dec 8, 2017
@vparfonov vparfonov added kind/enhancement A feature request - must adhere to the feature request template. target/che6 and removed kind/task Internal things, technical debt, and to-do tasks to be performed. labels Dec 8, 2017
@tsmaeder
Copy link
Contributor

tsmaeder commented Dec 8, 2017

There are two things that link a particular resource to a language server:

  1. The language description links a path name to a language id
  2. A language server description maps a path name or language id to a language server launcher.

@ghost
Copy link

ghost commented Dec 13, 2017

But in this case we don't have a launcher as it is now. Language server starts in a container as part of CMD or entrypoint instructions.

@dkulieshov
Copy link
Author

dkulieshov commented Dec 14, 2017

I think the problem is likely within these lines of org.eclipse.che.api.languageserver.registry.LanguageServerRegistryImpl

public List<Collection<InitializedLanguageServer>> getApplicableLanguageServers(String fileUri)
      throws LanguageServerException {
    String projectPath = extractProjectPath(fileUri);
    LanguageDescription language = findLanguage(fileUri);
    if (projectPath == null || language == null) {
      return Collections.emptyList();
    }
    ...
}

If we can't find LanguageDescription that corresponds to a specific file we will skip further actions and won't have any language server returned. Language descriptions are configured in Guice modules, not workspace configuration, so to use container with new language server (which we should be able to add via workspace configuration) we have to add corresponding language description (which we can't add via workspace configuration but instead we have to edit Guice classes and recompile server).

@dkulieshov dkulieshov added status/in-progress This issue has been taken by an engineer and is under active development. and removed target/che6 labels Dec 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. status/in-progress This issue has been taken by an engineer and is under active development.
Projects
None yet
Development

No branches or pull requests

3 participants