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 Javascript rename folder #4104

Open
tien opened this issue Jul 21, 2023 · 8 comments
Open

LSP Javascript rename folder #4104

tien opened this issue Jul 21, 2023 · 8 comments

Comments

@tien
Copy link

tien commented Jul 21, 2023

Currently you can rename individual Javascript file with lsp-javascript-rename-file and have imports automatically updated. The same can't be done for folder. Would be nice to have that option for working with large projects.

@yyoncho
Copy link
Member

yyoncho commented Jul 21, 2023

Is this supported by the server?

@tien
Copy link
Author

tien commented Jul 21, 2023

I'm not too sure... But VSCode can do it. And technically if you can do it one file we can do it recursively for every JS files under a directory?

@yyoncho
Copy link
Member

yyoncho commented Jul 21, 2023

VScode is using tsserver, not typescript-language-server. Technically, I can implement the whole JS support in elisp but the overall idea is to have a thin client and the server to provide functionality like this.

@tien
Copy link
Author

tien commented Jul 21, 2023

Oh I didn't even know that VSCode use tsserver which isn't a LSP? Seeing that LSP was developed for/by VSCode, learning something new everyday :)

But yeah, would make sense to have this functionality provided by the server I guess.

This would be huge though, pretty much the only major missing functionality compared to VSCode. Can pretty much switch my workflow to emacs entirely if this is available.

@yyoncho
Copy link
Member

yyoncho commented Jul 21, 2023

microsoft/TypeScript#39459

@tien
Copy link
Author

tien commented Jul 21, 2023

@yyoncho I found this on the typescript-language-server repo, and they argue that this should be done by the client instead of the server.

@yyoncho
Copy link
Member

yyoncho commented Jul 21, 2023

that can be implemented in lsp-mode

@tien
Copy link
Author

tien commented Jul 23, 2023

Awesome, wonder if this could be implemented as a language agnostic function lsp-rename-folder or something? So that integration with other tools is possible. I.e renaming folder with tree-macs

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

No branches or pull requests

2 participants