mirror of
https://github.com/microsoft/language-server-protocol.git
synced 2025-12-23 08:48:16 +00:00
Add string value definition (#1893)
This commit is contained in:
parent
b9c4429703
commit
0a0ccb4bfb
6 changed files with 36 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,3 +2,4 @@ npm-debug.log
|
|||
_site/
|
||||
.bundle/
|
||||
vendor/
|
||||
.jekyll-metadata
|
||||
|
|
@ -897,4 +897,6 @@
|
|||
- type: 'InlineCompletionList'
|
||||
link: '#inlineCompletionList'
|
||||
- type: 'InlineCompletionItem'
|
||||
link: '#inlineCompletionItem'
|
||||
link: '#inlineCompletionItem'
|
||||
- type: 'StringValue'
|
||||
link: '#stringValue'
|
||||
|
|
@ -56,6 +56,8 @@
|
|||
anchor: textDocumentPositionParams
|
||||
- title: Document Filter
|
||||
anchor: documentFilter
|
||||
- title: String Value
|
||||
anchor: stringValue
|
||||
- title: Text Edit
|
||||
anchor: textEdit
|
||||
- title: Text Edit Array
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export interface InlineCompletionItem {
|
|||
* The text to replace the range with. Must be set.
|
||||
* Is used both for the preview and the accept operation.
|
||||
*/
|
||||
insertText: string;
|
||||
insertText: string | StringValue;
|
||||
|
||||
/**
|
||||
* A text that is used to decide if this inline completion should be
|
||||
|
|
|
|||
|
|
@ -451,6 +451,7 @@ There are quite some JSON structures that are shared between different requests
|
|||
{% include_relative types/textDocumentPositionParams.md %}
|
||||
{% include_relative types/documentFilter.md %}
|
||||
|
||||
{% include_relative types/stringValue.md %}
|
||||
{% include_relative types/textEdit.md %}
|
||||
{% include_relative types/textEditArray.md %}
|
||||
{% include_relative types/textDocumentEdit.md %}
|
||||
|
|
|
|||
28
_specifications/lsp/3.18/types/stringValue.md
Normal file
28
_specifications/lsp/3.18/types/stringValue.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#### <a href="#stringValue" name="stringValue" class="anchor"> String Value </a>
|
||||
|
||||
Template strings for inserting text and controlling the editor cursor upon insertion.
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* A string value used as a snippet is a template which allows to insert text
|
||||
* and to control the editor cursor when insertion happens.
|
||||
*
|
||||
* A snippet can define tab stops and placeholders with `$1`, `$2`
|
||||
* and `${3:foo}`. `$0` defines the final tab stop, it defaults to
|
||||
* the end of the snippet. Variables are defined with `$name` and
|
||||
* `${name:default value}`.
|
||||
*
|
||||
* @since 3.18.0
|
||||
*/
|
||||
export interface StringValue {
|
||||
/**
|
||||
* The kind of string value.
|
||||
*/
|
||||
kind: 'snippet';
|
||||
|
||||
/**
|
||||
* The snippet string.
|
||||
*/
|
||||
value: string;
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue