From ff7d772d46132121675dd41e7539b146149b106b Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Sat, 7 Oct 2023 09:32:31 +0200 Subject: [PATCH] feat(nvim): add bash-language-server --- vim/lua/lsp_config.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vim/lua/lsp_config.lua b/vim/lua/lsp_config.lua index aa81e31..7f26dc6 100644 --- a/vim/lua/lsp_config.lua +++ b/vim/lua/lsp_config.lua @@ -178,3 +178,16 @@ nvim_lsp.lua_ls.setup({ }, on_attach = on_attach, }) + +-- Bash language server + +-- https://github.com/bash-lsp/bash-language-server#neovim +vim.api.nvim_create_autocmd("FileType", { + pattern = "sh", + callback = function() + vim.lsp.start({ + name = "bash-language-server", + cmd = { "bash-language-server", "start" }, + }) + end, +})