Support formatting
I tried to format the buffer, but nothing happen..
:lua vim.lsp.buf.formatting()
NVIM v0.5.1
Build type: Debug
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -DNVIM_TS_HAS_SET_MATCH_LIMIT -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=1 -I/home/pi/Downloads/neovim/build/config -I/home/pi/Downloads/neovim/src -I/home/pi/Downloads/neovim/.deps/usr/include -I/usr/include -I/home/pi/Downloads/neovim/build/src/nvim/auto -I/home/pi/Downloads/neovim/build/include
Compiled by pi@raspberrypi
Features: +acl +iconv +tui
Looking for this feature too
This article explains how to get formatting work with shell scripts: https://smarttech101.com/nvim-lsp-set-up-null-ls-for-beginners/
Basically you need shfmt and null-ls configured to use it.
(I have no affiliation with the site, just found it to solve my problem.)
Ideally we want to integrate a formatter into the server, but currently this is not supported.
If you want formatting in Helix you can use the shfmt binary out of the box with this setting: https://github.com/helix-editor/helix/wiki/External-binary-formatter-configuration#shfmt
Using null-ls you can get formatting via shfmt. Would be really cool to just integrate shfmt into the bash-language server so we don't need to use null-ls