Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions _specifications/lsp/3.18/language/callHierarchy.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ interface CallHierarchyClientCapabilities {
* capability as well.
*/
dynamicRegistration?: boolean;

/**
* Determines whether the client supports reference tags.
* @since 3.18.0
*/
referenceItemSupport?: boolean;
}
```

Expand Down Expand Up @@ -69,6 +75,19 @@ _Response_:
<div class="anchorHolder"><a href="#callHierarchyItem" name="callHierarchyItem" class="linkableAnchor"></a></div>

```typescript
export namespace ReferenceTag {
/**
* Determines a read access to the referenced symbol.
*/
export const Read = 1;
/**
* Determines a write access to the referenced symbol.
*/
export const Write = 2;
}

export type ReferenceTag = 1 | 2;

export interface CallHierarchyItem {
/**
* The name of this item.
Expand All @@ -85,6 +104,11 @@ export interface CallHierarchyItem {
*/
tags?: SymbolTag[];

/**
* Reference tags of this item.
*/
referenceTags?: ReferenceTag[];

/**
* More detail for this item, e.g. the signature of a function.
*/
Expand Down
10 changes: 8 additions & 2 deletions _specifications/lsp/3.18/language/references.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export interface ReferenceClientCapabilities {
* Whether references supports dynamic registration.
*/
dynamicRegistration?: boolean;

/**
* Determines whether the client supports reference tags.
* @since 3.18.0
*/
referenceItemSupport?: boolean;
}
```

Expand Down Expand Up @@ -62,6 +68,6 @@ export interface ReferenceContext {
}
```
_Response_:
* result: [`Location`](#location)[] \| `null`
* partial result: [`Location`](#location)[]
* result: [`Location`](#location)[] \| [`Reference`](#reference)[] \| `null`
* partial result: [`Location`](#location)[] \| [`Reference`](#reference)[]
* error: code and message set in case an exception happens during the reference request.
53 changes: 53 additions & 0 deletions _specifications/lsp/3.18/metaModel/metaModel.json
Original file line number Diff line number Diff line change
Expand Up @@ -3043,6 +3043,18 @@
"optional": true,
"documentation": "Tags for this item."
},
{
"name": "referenceTags",
"type": {
"kind": "array",
"element": {
"kind": "reference",
"name": "ReferenceTag"
}
},
"optional": true,
"documentation": "Reference tags for this item, i.e. determines the operations on the referenced symbol, read, write or both"
},
{
"name": "detail",
"type": {
Expand Down Expand Up @@ -12722,6 +12734,16 @@
},
"optional": true,
"documentation": "Whether references supports dynamic registration."
},
{
"name": "referenceItemSupport",
"type": {
"kind": "reference",
"name": "ClientReferenceTagSupportOption"
},
"optional": true,
"documentation": "Determines whether the client supports reference tags.",
"since": "3.18.0"
}
],
"documentation": "Client Capabilities for a {@link ReferencesRequest}."
Expand Down Expand Up @@ -13153,6 +13175,16 @@
},
"optional": true,
"documentation": "Whether implementation supports dynamic registration. If this is set to `true`\nthe client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`\nreturn value for the corresponding server capability as well."
},
{
"name": "referenceItemSupport",
"type": {
"kind": "reference",
"name": "ClientReferenceTagSupportOption"
},
"optional": true,
"documentation": "Determines whether the client supports reference tags.",
"since": "3.18.0"
}
],
"documentation": "@since 3.16.0",
Expand Down Expand Up @@ -14573,6 +14605,27 @@
"documentation": "Symbol tags are extra annotations that tweak the rendering of a symbol.\n\n@since 3.16",
"since": "3.16"
},
{
"name": "RferenceTag",
"type": {
"kind": "base",
"name": "uinteger"
},
"values": [
{
"name": "Read",
"value": 1,
"documentation": "Determines a read access to the referenced symbol."
},
{
"name": "Write",
"value": 2,
"documentation": "Determines a write access to the referenced symbol."
}
],
"documentation": "Reference tags are extra annotations that provide additional information about references.\n\n@since 3.18",
"since": "3.18"
},
{
"name": "UniquenessLevel",
"type": {
Expand Down
9 changes: 9 additions & 0 deletions _specifications/lsp/3.18/types/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#### <a href="#reference" name="reference" class="anchor">Reference</a>

Represents a reference inside the workspace. A reference has a location and can have one or more tags.
```typescript
interface Reference {
location: Location;
referenceTags?: ReferenceTag[];
}
```