Skip to content

Commit

Permalink
Add WorkspaceEditMetadata support (#1881)
Browse files Browse the repository at this point in the history
Add types from matching vscode-langaugeserver-node PR

Co-authored-by: Dirk Bäumer <dirkb@microsoft.com>
  • Loading branch information
debonte and dbaeumer authored Jan 31, 2024
1 parent 62a1fbc commit b9c4429
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _data/linkableTypes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@
link: '#workspace_applyEdit'
- type: 'ApplyWorkspaceEditParams'
link: '#applyWorkspaceEditParams'
- type: 'WorkspaceEditMetadata'
link: '#workspaceEditMetadata'
- type: 'ApplyWorkspaceEditResult'
link: '#applyWorkspaceEditResult'
- type: 'ApplyWorkspaceEditResponse'
Expand Down
8 changes: 8 additions & 0 deletions _specifications/lsp/3.18/types/workspaceEdit.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ export interface WorkspaceEditClientCapabilities {
*/
groupsOnLabel?: boolean;
};

/**
* Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s.
*
* @since 3.18.0
* @proposed
*/
metadataSupport?: boolean;
}
```

Expand Down
25 changes: 25 additions & 0 deletions _specifications/lsp/3.18/workspace/applyEdit.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ export interface ApplyWorkspaceEditParams {
* The edits to apply.
*/
edit: WorkspaceEdit;

/**
* Additional data about the edit.
*
* @since 3.18.0
* @proposed
*/
metadata?: WorkspaceEditMetadata;
}
```

<div class="anchorHolder"><a href="#workspaceEditMetadata" name="workspaceEditMetadata" class="linkableAnchor"></a></div>

```typescript
/**
* Additional data about a workspace edit.
*
* @since 3.18.0
* @proposed
*/
export interface WorkspaceEditMetadata {
/**
* Signal to the editor that this edit is a refactoring.
*/
isRefactoring?: boolean;
}
```

Expand Down

0 comments on commit b9c4429

Please sign in to comment.