eclipse-lsp4e / eclipse-lsp4e/lsp4e

StreamConnectionProvider: getInitializationOptions with initial document URI

Open
#684 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
85
Forks
69
Avg merge
8h 33m
Merged PRs (30d)
6

Description

In order to determine the initialization options for a LS, the initial document or its uri would be very helpful in org.eclipse.cdt.lsp.internal.server.CLanguageServerStreamConnectionProvider.getInitializationOptions(URI).
In order to prevent an API change, a new method
org.eclipse.cdt.lsp.internal.server.CLanguageServerStreamConnectionProvider.getInitializationOptionsForDocument(IDocument initialDocument) could be provided.

Since the initialProject or initialPath can be outdated as mentioned in #683 as well, a solution could be to provide a LanguageServerWrapper start method with document/path/uri as argument: org.eclipse.lsp4e.LanguageServerWrapper.start(URI initialDocument) as already mentioned in #157 by @sebthom.

IMO an initialDocument would be better than an initialProject or initialPath. Both could be determined by the document.

What are your opinions?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading CLanguageServerStreamConnectionProvider.getInitializationOptions(URI) and the proposed getInitializationOptionsForDocument(IDocument), then inspect LanguageServerWrapper.start(URI initialDocument). Review related issues #683 and #157 and the seven comments; the issue needs a settled API design and agreed implementation scope before work can be considered done.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.