Skip to content

Commit

Permalink
Rename onTypeRename to LinkedEditing
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Dec 1, 2020
1 parent 3344911 commit df42c47
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
6 changes: 4 additions & 2 deletions _data/specification-3-16-toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
children:
- title: URI
anchor: uri
- title: Regular Expression
anchor: regExp
- title: Text Documents
anchor: textDocuments
- title: Position
Expand Down Expand Up @@ -221,8 +223,8 @@
anchor: callHierarchy_outgoingCalls
- title: semantic tokens
anchor: textDocument_semanticTokens
- title: onTypeRename
anchor: textDocument_onTypeRename
- title: linkedEditing
anchor: textDocument_linkedEditing
- title: moniker
anchor: textDocument_moniker
- title: Change Log
Expand Down
31 changes: 15 additions & 16 deletions _specifications/specification-3-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -7415,20 +7415,19 @@ _Response_:
* result: void
* error: code and message set in case an exception happens during the 'workspace/semanticTokens/refresh' request

#### <a href="#textDocument_onTypeRename" name="textDocument_onTypeRename" class="anchor">On Type Rename (:leftwards_arrow_with_hook:)</a>
#### <a href="#textDocument_linkedEditing" name="textDocument_linkedEditing" class="anchor">Linked Editing (:leftwards_arrow_with_hook:)</a>

> *Since version 3.16.0*
The on type rename request is sent from the client to the server to return for a given position in a document the range of the symbol at the position and all ranges that have the same content and can be renamed together. Optionally a word pattern can be returned to describe valid contents. A rename to one of the ranges can be applied to all other ranges if the new content
is valid. If no result-specific word pattern is provided, the word pattern from the client's language configuration is used.
The linked editing request is sent from the client to the server to return for a given position in a document the range of the symbol at the position and all ranges that have the same content. Optionally a word pattern can be returned to describe valid contents. A rename to one of the ranges can be applied to all other ranges if the new content is valid. If no result-specific word pattern is provided, the word pattern from the client's language configuration is used.

_Client Capabilities_:

* property name (optional): `textDocument.onTypeRename`
* property type: `OnTypeRenameClientCapabilities` defined as follows:
* property name (optional): `textDocument.linkedEditing`
* property type: `LinkedEditingClientCapabilities` defined as follows:

```typescript
export interface OnTypeRenameClientCapabilities {
export interface LinkedEditingClientCapabilities {
/**
* Whether implementation supports dynamic registration.
* If this is set to `true` the client supports the new
Expand All @@ -7441,40 +7440,40 @@ export interface OnTypeRenameClientCapabilities {

_Server Capability_:

* property name (optional): `onTypeRenameProvider`
* property type: `boolean` \| `OnTypeRenameOptions` \| `OnTypeRenameRegistrationOptions` defined as follows:
* property name (optional): `linkedEditingProvider`
* property type: `boolean` \| `LinkedEditingOptions` \| `LinkedEditingRegistrationOptions` defined as follows:

```typescript
export interface OnTypeRenameOptions extends WorkDoneProgressOptions {
export interface LinkedEditingOptions extends WorkDoneProgressOptions {
}
```

_Registration Options_: `OnTypeRenameRegistrationOptions` defined as follows:
_Registration Options_: `LinkedEditingRegistrationOptions` defined as follows:

```typescript
export interface OnTypeRenameRegistrationOptions extends
export interface LinkedEditingRegistrationOptions extends
TextDocumentRegistrationOptions, OnTypeRenameOptions,
StaticRegistrationOptions {
}
```

_Request_:

* method: `textDocument/onTypeRename`
* params: `OnTypeRenameParams` defined as follows:
* method: `textDocument/linkedEditing`
* params: `LinkedEditingParams` defined as follows:

```typescript
export interface OnTypeRenameParams extends TextDocumentPositionParams,
export interface LinkedEditingParams extends TextDocumentPositionParams,
WorkDoneProgressParams {
}
```

_Response_:

* result: `OnTypeRenameRanges` \| `null` defined as follows:
* result: `LinkedEditingRanges` \| `null` defined as follows:

```typescript
export interface OnTypeRenameRanges {
export interface LinkedEditingRanges {
/**
* A list of ranges that can be renamed together. The ranges must have
* identical length and contain identical text content. The ranges cannot overlap.
Expand Down

0 comments on commit df42c47

Please sign in to comment.