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

feat: support workspace/willRenameFiles request #685

Merged
merged 4 commits into from
Feb 12, 2023

Conversation

antosha417
Copy link
Contributor

Hey! I've been working on a plugin for neovim that automatically applies workspace edits before moving files around. And it does not work with typescript. The problem with _typescript.applyRenameFile that edit is applied only after neovim moves the file.

So I wanted to implement workspase/willRenameFile command that returns the edit. We will be then able to preview and apply it if needed.

Closes #665
Closes antosha417/nvim-lsp-file-operations#6

src/lsp-server.ts Outdated Show resolved Hide resolved
src/lsp-server.ts Outdated Show resolved Hide resolved
src/lsp-server.ts Outdated Show resolved Hide resolved
src/lsp-server.ts Outdated Show resolved Hide resolved
@antosha417 antosha417 requested review from rchl and predragnikolic and removed request for rchl and predragnikolic February 11, 2023 23:32
src/lsp-server.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@predragnikolic predragnikolic left a comment

Choose a reason for hiding this comment

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

Cool stuff!

This means that the typescript language server can deprecate the custom _typescript.applyRenameFile request at some point

Co-authored-by: Предраг Николић <mail@predrag.pro>
@rchl rchl changed the title feat: support willRenameFiles request feat: support workspace/willRenameFiles request Feb 12, 2023
@rchl rchl merged commit c3f3529 into typescript-language-server:master Feb 12, 2023
@rchl
Copy link
Member

rchl commented Feb 12, 2023

Thanks

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.

Not working with tsserver? Preview rename file
3 participants