diff --git a/config/nvim/lua/lsp/bash.lua b/config/nvim/lua/lsp/bash.lua new file mode 100644 index 0000000..91a92b4 --- /dev/null +++ b/config/nvim/lua/lsp/bash.lua @@ -0,0 +1,9 @@ +vim.api.nvim_create_autocmd('FileType', { + pattern = 'sh', + callback = function() + vim.lsp.start({ + name = 'bash-language-server', + cmd = { 'bash-language-server', 'start' }, + }) + end, +}) diff --git a/config/nvim/lua/lsp/init.lua b/config/nvim/lua/lsp/init.lua index 9ddc3e4..62b0bb3 100644 --- a/config/nvim/lua/lsp/init.lua +++ b/config/nvim/lua/lsp/init.lua @@ -1 +1,3 @@ nvim_lsp = require'lspconfig' + +require('lsp.bash')