From 26ac80e307981237d6c9ab0951e2e3be36cf776a Mon Sep 17 00:00:00 2001 From: rook1e Date: Fri, 7 Jun 2024 14:02:54 +0800 Subject: [PATCH] feat(lang): add bash support fix(lang/bash): remove duplicate bash treesitter --- lua/lazyvim/plugins/extras/lang/bash.lua | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/bash.lua diff --git a/lua/lazyvim/plugins/extras/lang/bash.lua b/lua/lazyvim/plugins/extras/lang/bash.lua new file mode 100644 index 00000000..fba7a001 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/bash.lua @@ -0,0 +1,32 @@ +return { + recommended = function() + return LazyVim.extras.wants({ + ft = "sh", + }) + end, + + -- LSP + { + "williamboman/mason.nvim", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { + "bash-language-server", + "shellcheck", + "shfmt", + }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + bashls = {}, + }, + }, + }, + + -- Treesitter for bash is installed by default. + -- Linter(shellchecker) and formatter(shfmt) can be triggered by bashls. +}