diff --git a/_specifications/lsp/3.18/language/callHierarchy.md b/_specifications/lsp/3.18/language/callHierarchy.md index 6567d119b..95595e1d5 100644 --- a/_specifications/lsp/3.18/language/callHierarchy.md +++ b/_specifications/lsp/3.18/language/callHierarchy.md @@ -23,6 +23,12 @@ interface CallHierarchyClientCapabilities { * capability as well. */ dynamicRegistration?: boolean; + + /** + * Determines whether the client supports reference tags. + * @since 3.18.0 + */ + referenceItemSupport?: boolean; } ``` @@ -69,6 +75,19 @@ _Response_:
```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. @@ -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. */ diff --git a/_specifications/lsp/3.18/language/references.md b/_specifications/lsp/3.18/language/references.md index e7d2e0303..d3dc8d611 100644 --- a/_specifications/lsp/3.18/language/references.md +++ b/_specifications/lsp/3.18/language/references.md @@ -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; } ``` @@ -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. diff --git a/_specifications/lsp/3.18/metaModel/metaModel.json b/_specifications/lsp/3.18/metaModel/metaModel.json index a69917b1a..c05fdf075 100644 --- a/_specifications/lsp/3.18/metaModel/metaModel.json +++ b/_specifications/lsp/3.18/metaModel/metaModel.json @@ -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": { @@ -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}." @@ -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", @@ -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": { diff --git a/_specifications/lsp/3.18/types/reference.md b/_specifications/lsp/3.18/types/reference.md new file mode 100644 index 000000000..3d6b53f55 --- /dev/null +++ b/_specifications/lsp/3.18/types/reference.md @@ -0,0 +1,9 @@ +#### Reference + +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[]; +} +```