microsoft / microsoft/language-server-protocol

Support that client and server agree on the word boundaries of a language

Open
#937 26 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request initialization
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

Filtering of completion items in the simple insert text case is based on word boundaries of the language (see https://github.com/microsoft/language-server-protocol/issues/898#issuecomment-593968008).

Since completion items are generated by the server they both must have the same understanding of what a word boundary is. I see different possibilities to address this:

  1. standardize on the word boundaries. IMO not a good solution since it will be hard to achieve
  2. client retrieve word boundaries from the server. The problem with this approach is that basic editing experiences require to start up a server. Especially in remote cases this can cause quite some problems
  3. client tells server about its word boundary configuration. This can be achieved in two ways:
    1. in the intialize call
    2. using a getConfiguration call send from the client to the server.

I am actually in favor of the 3.ii.

Contributor guide

No contributing guide indexed for this repository

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 the linked language-server-protocol issue 898 comment and the three approaches described here, especially the proposed getConfiguration path. Resolve which protocol mechanism should carry word-boundary configuration, document the decision, and confirm that both client and server can use the same boundaries for completion filtering.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, developer-experience
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.