I am a new Kakoune user starting to use the
kak-lsp plugin for working with Rust. The
lsp-formatting command has an indent width of 8 spaces, but I’m more used to 4 (I’m coming from emacs, where the indentation engine happens to use that many spaces).
How do I adjust the width down to 4 spaces and, out of curiosity, what is doing the actual reformatting? I thought it might be
rustfmt, according to
cargo, that isn’t installed. So it must be some other component in the system.
While I’m at it, is there a way to have a single key (such as Tab) do indentation. Emacs does that, but it doesn’t have to be that specific key. Maybe a best practice is to have a dedicated key combination to run the formatting (or automatically do it on save or compile).