Closed cryptomilk closed 2 years ago
This isn't my area of expertise and is not related to null-ls, but to my knowledge, =
uses equalprg
(see :h 'equalprg'
), and I'm not sure if it can be hooked into LSP formatting.
You can use LSP formatting for gq
formatting, which uses formatprg
(see :h vim.lsp.formatexpr()
). Other than that, your best bet is to just map the key yourself.
FAQ
Issues
Neovim Version
0.6.1
Operating System
Fedora
Minimal config
Steps to reproduce
sample.sh:
nvim --clean -u minimal_init.lua sample.sh
Expected behavior
I would expect that when pressing
=
that my buffer gets formatted byshfmt
. However nothing happens. This works fine with diagnostics-language-server.I need to run:
lua vim.lsp.buf.formatting_sync()
to get the formatting done ...Actual behavior
Pressing
=
should format the complete buffer.Debug log
...
Help
No
Implementation help
No response
Requirements