From 4597d8683e87acff52b3d67f21507d101450d031 Mon Sep 17 00:00:00 2001 From: muneebusmani Date: Mon, 10 Jun 2024 16:18:31 +0500 Subject: [PATCH] added zsh support --- lua/lazyvim/plugins/extras/lang/zsh.lua | 37 +++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/zsh.lua diff --git a/lua/lazyvim/plugins/extras/lang/zsh.lua b/lua/lazyvim/plugins/extras/lang/zsh.lua new file mode 100644 index 00000000..c6dfdf5d --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/zsh.lua @@ -0,0 +1,37 @@ +-- a workaround for getting completions in zsh scripts +return { + recommended = function() + return LazyVim.extras.wants({ + ft = "zsh", + -- root = { ""}, + }) + end, + { + "nvim-treesitter/nvim-treesitter", + opts = { ensure_installed = { "bash" } }, + }, + { + "mason.nvim", + opts = { ensure_installed = { "beautysh" } }, + }, + { + "nvimtools/none-ls.nvim", + optional = true, + opts = function(_, opts) + local nls = require("null-ls") + opts.sources = vim.list_extend(opts.sources or {}, { + nls.builtins.diagnostics.zsh, + }) + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + bashls = { + filetypes = { "sh", "zsh", "bash" }, + }, + }, + }, + }, +}