-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
format with rnix-lsp leaves selection #2655
Comments
The LSP sent back a whole document replacement rather than a bunch of changes, so we aren't able to figure out where the new location of the cursor is. Since this is sort of like deleting the whole document first, then appending into the selection you're left with a whole document selection. |
I guess we'd need a workaround similar to emacs-lsp/lsp-mode#258 |
@mtoohey31 thanks for your work on rnix-lsp and nixpkgs-fmt. nowadays i use nil + alejandra. i gave #4041 a quick try and it seems to work very well. |
You're welcome! I actually just switched to nil too 🙂 I came across #4041 because I was wondering why I wasn't running into the problem described in this issue, since nil also applies full-document edits. |
Summary
when using format with rnix-lsp the whole buffer remains selected after formatting. this does not happen with other lsps (tested with rust-analyzer and typescript ls)
Reproduction Steps
Helix log
Platform
macOS
Terminal Emulator
kitty
Helix Version
22.05-24-gfd4858c0
The text was updated successfully, but these errors were encountered: