helix icon indicating copy to clipboard operation
helix copied to clipboard

Added command to rename current document, with lsp support

Open ontley opened this issue 2 years ago • 1 comments
trafficstars

#4393

Includes willRenameFiles and didRenameFiles requests to the language server. Honestly not sure if didRenameFiles is even needed here

Should file changes suggested by the language server be automatically saved if the file didn't have any other changes?

ontley avatar Jan 14 '23 12:01 ontley

There is already https://github.com/helix-editor/helix/pull/4514 but it doesn't cover the LSP renaming

the-mikedavis avatar Jan 14 '23 14:01 the-mikedavis

Nice one! Really happy that it includes LSP rename support 👍🏻

cor avatar Jan 18 '23 20:01 cor

I added the rnm alias for the command, referring to #4514 (comment)

ontley avatar Jan 18 '23 22:01 ontley

I wonder if it would be good to add a feature to automatically save suggested changes from the lsp if a file didn't have changes before, saves the trouble of opening every file and saving manually, or perhaps a status message saying which files changed?

ontley avatar Jan 18 '23 22:01 ontley

Looking forward to this!

devgioele avatar Feb 13 '23 13:02 devgioele

I need to test this, but do suggested changes cause non-open files to be opened?

I wonder if it would be good to add a feature to automatically save suggested changes from the lsp if a file didn't have changes before, saves the trouble of opening every file and saving manually

IMO it's not needed, as :wa is easy enough, and there's already editor.auto-save. I get wanting transactionality, since the rename is immediate, but IDT it warrants a special case.

edrex avatar Mar 23 '23 00:03 edrex

I need to test this, but do suggested changes cause non-open files to be opened?

I wonder if it would be good to add a feature to automatically save suggested changes from the lsp if a file didn't have changes before, saves the trouble of opening every file and saving manually

IMO it's not needed, as :wa is easy enough, and there's already editor.auto-save. I get wanting transactionality, since the rename is immediate, but IDT it warrants a special case.

Ah I didn't even know about :wa, I guess it's not needed then

ontley avatar Mar 24 '23 20:03 ontley

Ah I didn't even know about :wa

It's a vimism. There's also :wqa.

edrex avatar Mar 26 '23 04:03 edrex

Should the lsp errors be displayed in the status bar, along with the message that the file was successfully renamed?

ontley avatar Mar 27 '23 19:03 ontley

Why it is not merged already?

ghost avatar Jul 07 '23 07:07 ghost

Why it is not merged already?

Waiting for reviews

ontley avatar Jul 07 '23 07:07 ontley

Why it is not merged already?

Waiting for reviews

Can anyone review or contributors only?

ghost avatar Jul 07 '23 07:07 ghost

Why it is not merged already?

Waiting for reviews

Can anyone review or contributors only?

Only "reviewers with write access" and I can't even request reviews

ontley avatar Jul 07 '23 07:07 ontley

Why it is not merged already?

Waiting for reviews

Can anyone review or contributors only?

you are probably new to opensource. A PR needs to be reviewed by a miantainer before its merged. Only maintainers can review PRs. We can't just trust random people with code review. There are hundreds of issues and PRs for us to get through so it can take a while.

pascalkuthe avatar Jul 07 '23 13:07 pascalkuthe

Why it is not merged already?

Waiting for reviews

Can anyone review or contributors only?

you are probably new to opensource. A PR needs to be reviewed by a miantainer before its merged. Only maintainers can review PRs. We can't just trust random people with code review. There are hundreds of issues and PRs for us to get through so it can take a while.

yeah, I am new. Thanks for providing information about reviews!

ghost avatar Jul 07 '23 13:07 ghost