Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LSP] Add TextDocumentEdit for textDocument/rename support. #2262

Merged
Merged
Changes from 1 commit
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
10 changes: 10 additions & 0 deletions common/lsp/lsp-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,13 @@ InlayHint:
tooltip?: string
paddingLeft?: boolean
paddingRight?: boolean

# -- textDcoument/rename

OptionalVersionedTextDocumentIdentifier:
<: TextDocumentIdentifier
version?: integer

TextDocumentEdit:
textDocument: OptionalVersionedTextDocumentIdentifier
edits: object # TextEdit[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need an array of things and don't want it untyped, you can mark it with a plus to get a vector of TextEdit.

edits+: TextEdit

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LMK if you want to use the object version or change to TextEdit[] (with edits+:).

Copy link
Contributor Author

@cdleary cdleary Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it sounds like a good idea and I hadn't realized the edits+ trick, sorry for the delay, should be able to push a new rev on Thurs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the status here ?

cdleary marked this conversation as resolved.
Show resolved Hide resolved
Loading