From 2973c90754267076b85b6fd7f661827dc17174c5 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 27 Jan 2023 23:28:29 +0000 Subject: Add bash language server support --- lua/lsp.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'lua') diff --git a/lua/lsp.lua b/lua/lsp.lua index f21556e..7a8e3f8 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -43,6 +43,15 @@ configs.pylsp = { } } +configs.bash = { + default_config = { + cmd = { 'bash-language-server', 'start' }, + filetypes = { "sh", "bash", "zsh" }, + settings = {}, + root_dir = nvim_lsp.util.root_pattern(""), + } +} + local has_words_before = function() unpack = unpack or table.unpack local line, col = unpack(vim.api.nvim_win_get_cursor(0)) @@ -209,6 +218,11 @@ nvim_lsp.pylsp.setup({ on_attach = M.on_attach, }) +nvim_lsp.bash.setup({ + capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()), + on_attach = M.on_attach, +}) + vim.cmd[[hi DiagnosticUnderlineError gui=undercurl guisp=salmon]] vim.cmd[[hi DiagnosticUnderlineWarn gui=undercurl guisp=gold]] -- cgit