Skip to content

Commit

Permalink
feat(pack): add fish pack (#817)
Browse files Browse the repository at this point in the history
* feat(pack): add fish pack

* fix(fish): Use mason-null-ls instead of none-ls

* Revert "fix(fish): Use mason-null-ls instead of none-ls"

This reverts commit 26232a1.

* fix(fish): add requirements in the README for fish pack

---------

Co-authored-by: Uzair Aftab <muaf@nmbu.no>
  • Loading branch information
manuuurino and Uzaaft committed Mar 30, 2024
1 parent 34a09c9 commit b1584b9
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lua/astrocommunity/pack/fish/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Elm Language Pack

Requires the following in your `PATH`

- [fish](https://github.com/fish-shell/fish-shell)

This plugin pack does the following:

- Adds `fish` Treesitter parser
- Adds `fish_indent` formatter
- Adds `fish` linter
41 changes: 41 additions & 0 deletions lua/astrocommunity/pack/fish/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
return {
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
if opts.ensure_installed ~= "all" then
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { "fish" })
end
end,
},
{
"nvimtools/none-ls.nvim",
optional = true,
opts = function(_, opts)
local nls = require "null-ls"
if type(opts.sources) == "table" then
opts.sources = vim.list_extend(opts.sources, {
nls.builtins.formatting.fish_indent,
nls.builtins.diagnostics.fish,
})
end
end,
},
{
"stevearc/conform.nvim",
optional = true,
opts = {
formatters_by_ft = {
fish = { "fish_indent" },
},
},
},
{
"mfussenegger/nvim-lint",
optional = true,
opts = {
linters_by_ft = {
fish = { "fish" },
},
},
},
}

0 comments on commit b1584b9

Please sign in to comment.