:format
does not work in unsaved buffers
#12024
Unanswered
gruhn
asked this question in
Troubleshooting
Replies: 1 comment
-
This is a limitation of LSP: LSP features only work on buffers that are backed by files. It should work to define an external formatter ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Nothing terrible, but I noticed that the
:format
command doesn't seem to do anything in unsaved buffers. Sometimes I just want to pretty print some JSON, without saving it anywhere.Reproduction Steps
{ "json_key": [1,2,3] }
):set-language json
:format
(no effect):w temp.json
:format
(now it works)Screen.Recording.2024-11-07.at.12.48.35.mov
Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
iTerm2
Installation Method
nixpkgs
Helix Version
helix 24.7 (079f544)
Beta Was this translation helpful? Give feedback.
All reactions