Skip to content
Open
25 changes: 25 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,13 @@ interface CallHierarchyClientCapabilities {
* capability as well.
*/
dynamicRegistration?: boolean;

/**
* Determines whether the client supports reference tags. If the value is missing,
* the server assumes that the client does not support reference tags.
* @since 3.18.0
*/
referencesItemSupport?: boolean;
}
```

Expand Down Expand Up @@ -69,6 +76,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 +105,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
12 changes: 10 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,14 @@ export interface ReferenceClientCapabilities {
* Whether references supports dynamic registration.
*/
dynamicRegistration?: boolean;

/**
* Determines whether the client supports and prefers Reference items instead
* of Location items. If this value is missing, the server assumes that the
* client accepts Location items as defined in earlier versions of the protocol.
* @since 3.18.0
*/
referencesTagSupport?: boolean;
}
```

Expand Down Expand Up @@ -62,6 +70,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": "referencesItemSupport",
"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": "referencesItemSupport",
"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[];
}
```