From e6cc8af7e520f480c183fb99dd9272aa0dfc23f3 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Tue, 24 Oct 2023 09:09:53 +0200 Subject: [PATCH] Ajout : bash-language-server pour Neovim --- config/nvim/lua/lsp/bash.lua | 9 +++++++++ config/nvim/lua/lsp/init.lua | 2 ++ 2 files changed, 11 insertions(+) create mode 100644 config/nvim/lua/lsp/bash.lua 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')