Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pack): add bash language pack #55

Merged
merged 1 commit into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions lua/astrocommunity/pack/bash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Bash Language Pack

This plugin pack does the following:

- Adds `bash` Treesitter parser
- Adds `bashls` language server
- Adds `shfmt` formatter
- Adds `shellcheck` linter
- Adds `bash` debugger
42 changes: 42 additions & 0 deletions lua/astrocommunity/pack/bash/bash.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table or string "all".
if not opts.ensure_installed then
opts.ensure_installed = {}
elseif opts.ensure_installed == "all" then
return
end
-- Add the "julia" and "toml" language to opts.ensure_installed.
table.insert(opts.ensure_installed, "bash")
end,
},
{
"williamboman/mason-lspconfig.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
-- Add julia lsp and toml lsp to ensure_installed
table.insert(opts.ensure_installed, "bashls")
end,
},
{
"jay-babu/mason-null-ls.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
-- Add julia lsp and toml lsp to ensure_installed
vim.list_extend(opts.ensure_installed, { "shellcheck", "shfmt" })
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
opts = function(_, opts)
-- Ensure that opts.ensure_installed exists and is a table
if not opts.ensure_installed then opts.ensure_installed = {} end
-- Add julia lsp and toml lsp to ensure_installed
table.insert(opts.ensure_installed, "bash")
end,
},
}