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

ALEFileRename command added. #4012

Merged
merged 4 commits into from
Dec 16, 2021
Merged

ALEFileRename command added. #4012

merged 4 commits into from
Dec 16, 2021

Conversation

daliusd
Copy link
Contributor

@daliusd daliusd commented Dec 13, 2021

This command renames file and uses tsserver getEditsForFileRename to
fix import paths in Typescript files.

This command renames file and uses tsserver `getEditsForFileRename` to
fix import paths in Typescript files.
@daliusd
Copy link
Contributor Author

daliusd commented Dec 14, 2021

@hsanson please review, I'm not sure who else could check this.

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

I do not have the setup to test this on my machine but looks good to me. It only needs some polishing for when someone runs ALERename when another LSP is running.

For example running ALERename with pyright LSP active shows "E488: Trailing characters" error.

Also running ALERename with no arguments results in "E119: Not enough arguments for function: ale#util#Input" error. Would be better to detect the command is being wrongly used and show a more user friendly error message.

@daliusd
Copy link
Contributor Author

daliusd commented Dec 16, 2021

I think it is good now. Tested with pyright - no problem. It seems all the problems were related to ale#util#Input change.

@daliusd daliusd requested a review from hsanson December 16, 2021 11:10
autoload/ale/filerename.vim Show resolved Hide resolved
autoload/ale/filerename.vim Outdated Show resolved Hide resolved
autoload/ale/filerename.vim Outdated Show resolved Hide resolved
@daliusd daliusd requested a review from hsanson December 16, 2021 16:54
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution and changes.

@hsanson hsanson merged commit 5b792c7 into dense-analysis:master Dec 16, 2021
@daliusd daliusd deleted the ale-file-rename branch December 17, 2021 06:10
@daliusd
Copy link
Contributor Author

daliusd commented Dec 17, 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.

2 participants