Skip to content

Type rename provider [Uses VS Code proposed API] - #304

Closed
xorye wants to merge 1 commit into
redhat-developer:masterfrom
xorye:onTypeRename_WIP
Closed

xorye wants to merge 1 commit into
redhat-developer:masterfrom
xorye:onTypeRename_WIP

Conversation

@xorye

@xorye xorye commented Aug 5, 2020 •

Copy link
Copy Markdown

Follows HTML's implementation: microsoft/vscode@01e01b1

To test this PR, you need the server side PR as well eclipse-lemminx/lemminx#836

Signed-off-by: David Kwon [email protected]

@xorye

xorye commented Aug 5, 2020 •

Copy link
Copy Markdown
Author

You need to use VS Code insiders: https://code.visualstudio.com/api/advanced-topics/using-proposed-api#using-a-proposed-api and set editor.renameOnType to true.

Currently, registerOnTypeRenameProvider is only available in the proposed VS Code API: https://github.com/microsoft/vscode/blob/16fb610b10d7cce67e5e70158e1ec93003e902d3/src/vs/vscode.proposed.d.ts#L1192

Demo for HTML: microsoft/vscode#88424 (comment)

@xorye xorye mentioned this pull request Aug 6, 2020
@xorye

xorye commented Aug 6, 2020 •

Copy link
Copy Markdown
Author

Demo:
onTypeRename

But we still suffer from this issue: #213 (comment)
onTypeRenameCompletion

@xorye
xorye marked this pull request as ready for review August 10, 2020 14:42
@xorye xorye changed the title Type rename provider WIP Type rename provider Aug 10, 2020
@xorye xorye changed the title Type rename provider Type rename provider [Uses VS Code proposed API] Aug 10, 2020
Comment thread package.json
"license": "EPL-1.0",
"bugs": "https://github.com/redhat-developer/vscode-xml/issues",
"preview": true,
"enableProposedApi": true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we can only use it in insiders. The marketplace rejects publishing when enableProposedApi:true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need to wait for microsoft/vscode#105394

@angelozerr

Copy link
Copy Markdown
Contributor

But we still suffer from this issue: #213 (comment)

It's very strange because this problem should be fixed. The only problem that I have seen is when you do this usecase with a XML element which doesnt comes from a XSD Schema (but it seems that it's not our usecase).

In the demo, I noticed that when you remove the d character completion opens, inmy case the completion is not opened (I must do a Ctrl+Space to open completion). Is there a settings for that?

@angelozerr

Copy link
Copy Markdown
Contributor

Please note the onTypeRanme is now in the LSP 3.16 specification. I have created an issue in LSP4J eclipse-lsp4j/lsp4j#469 If I understand correctly, we will avoid developping TypeScript code for supporting mirror cursor.

@angelozerr

Copy link
Copy Markdown
Contributor

Today this type rename provider became linked editing range with a LSP specification. This PR is replaced with #432

@angelozerr angelozerr closed this Apr 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants