microsoft / microsoft/language-server-protocol
Pass a selection range in CompletionParams for a completion request
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
related to #377
It would be very useful for the completion request interface to support sending selection ranges instead of being limited to a cursor position.
Examples of scenarios where this would be useful:
- the user selects an expression and wants to replace it
- the user inserts a snippet (perhaps from a previous completion), and wants completions for a selected placeholder
This is a serious deficiency, because there is no way for the server to infer the intent of the user to replace the selection with a completion. That intent must inform the returned completions set.
A possible further extension of this is to support multi-cursor and multi-selection completions.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the CompletionParams definition and the completion request interface in the language server protocol specification, then review related issue #377. Define how a selection range should be represented and transmitted, including whether multi-cursor or multi-selection completion is in scope; done means the protocol proposal clearly specifies the request shape and its intended behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100