We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Formatting a TypeScript file in helix causes whitespace to be removed. Check the logs for the cause.
typescript-language-server 0.9.7
Asciinema
I expect the TypeScript file to be formatted while maintaining whitespace.
Instead, all whitespace is removed.
2022-03-29T21:30:20.307 helix_lsp::transport [INFO] -> {"jsonrpc":"2.0","method":"textDocument/formatting","params":{"options":{"insertSpaces":false,"tabSize":0},"textDocument":{"uri":"[file:///home/terry/work/vk/client/pages/index.tsx"}},"id":1](file:///home/terry/work/vk/client/pages/index.tsx%22%7D%7D,%22id%22:1)[](https://matrix.to/#/!zMuVRxoqjyxyjSEBXc:matrix.org/$sC7Oal8kNmIX5UFfl8tmpjqjvD22ko-FuA-sZ990yrI?via=matrix.org&via=tchncs.de&via=mozilla.org)}
Linux
alacritty 0.10.1
helix 22.03 (c8082a1)
The text was updated successfully, but these errors were encountered:
This is because we use FormattingOptions::default() https://github.com/helix-editor/helix/blob/f2dd3d446914ec0953cd7e056d430fc3b959e75d/helix-view/src/document.rs#L415=
FormattingOptions::default()
We should construct FormattingOptions according to doc settings and use ...Default::default() for the rest of the fields.
FormattingOptions
...Default::default()
Sorry, something went wrong.
fix: Don't rely on FormattingOptions::default()
c18de0e
Refs #1884
Can you try c18de0e ?
Fixed!
No branches or pull requests
Summary
Formatting a TypeScript file in helix causes whitespace to be removed. Check the logs for the cause.
typescript-language-server 0.9.7
Reproduction Steps
Asciinema
I expect the TypeScript file to be formatted while maintaining whitespace.
Instead, all whitespace is removed.
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
alacritty 0.10.1
Helix Version
helix 22.03 (c8082a1)
The text was updated successfully, but these errors were encountered: