microsoft / microsoft/vscode-extension-samples
Documentation for usage of CompletionItem's range property
@jrieken is already working on this.
Since May 31, 2022.
- Dominant language
- TypeScript
- Stars
- 10.2k
- Forks
- 3.9k
- PR merge metrics
- No merged PRs in 30d
Description
vscode's CompletionItem[^1] supports a range property which is (from the docs):
A range or a insert and replace range selecting the text that should be replaced by this completion item.
When omitted, the range of the current word is used as replace-range and as insert-range the start of the current word to the current position is used.
Note 1: A range must be a single line and it must contain the position at which completion has been requested. Note 2: A insert range must be a prefix of a replace range, that means it must be contained and starting at the same position.
Further documentation/an example illustrating how to use the range property would be incredibly useful.
Even better would be an example of how the trigger character(s) may be overwritten with either the insertText property or by some other method.
[^1]: Also wondering if this issue is related.
Contributor guide
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.
Assessment
This issue has not been assessed yet.