-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
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
- setup rnix-lsp
- open .nix file
{
description = "bug";
}
- use format command or write with auto-format
- the text is formated correctly
- whole buffer remains in selection
Helix log
2022-06-03T08:39:34.329 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///Users/xxx/projects/helix/test.nix"}}
2022-06-03T08:39:39.975 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/formatting","params":{"options":{"insertSpaces":true,"tabSize":2},"textDocument":{"uri":"file:///Users/xxx/projects/helix/test.nix"}},"id":1}
2022-06-03T08:39:39.976 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":1,"result":[{"newText":"{\n description = \"bug\";\n}\n","range":{"end":{"character":0,"line":3},"start":{"character":0,"line":0}}}]}
2022-06-03T08:39:39.976 helix_lsp::transport [INFO] <- [{"newText":"{\n description = \"bug\";\n}\n","range":{"end":{"character":0,"line":3},"start":{"character":0,"line":0}}}]
2022-06-03T08:39:39.978 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/didChange","params":{"contentChanges":[{"range":{"end":{"character":0,"line":3},"start":{"character":0,"line":0}},"text":"{\n description = \"bug\";\n}\n"}],"textDocument":{"uri":"file:///Users/xxx/projects/helix/test.nix","version":3}}}
2022-06-03T08:39:39.978 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///Users/xxx/projects/helix/test.nix"}}
2022-06-03T08:39:41.569 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"shutdown","params":null,"id":2}
2022-06-03T08:39:41.569 helix_lsp::transport [INFO] <- {"jsonrpc":"2.0","id":2,"result":null}
2022-06-03T08:39:41.570 helix_lsp::transport [INFO] <- null
2022-06-03T08:39:41.570 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"exit","params":null}
2022-06-03T08:39:41.571 helix_lsp::transport [ERROR] err: <- StreamClosed
2022-06-03T08:39:41.571 helix_lsp::transport [ERROR] err: <- StreamClosed
Platform
macOS
Terminal Emulator
kitty
Helix Version
22.05-24-gfd4858c0