Skip to content

Commit

Permalink
fix(fish): none-ls opts.sources not being created if it doesn't exi…
Browse files Browse the repository at this point in the history
…st (#893)

* fix(fish-shell): `opts.sources` not being created if it doesn't exist

* fix formatting
  • Loading branch information
Axlefublr authored Apr 18, 2024
1 parent 738444a commit 13b816d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/astrocommunity/pack/fish/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ return {
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
if not opts.sources then opts.sources = {} end
opts.sources = vim.list_extend(opts.sources, {
nls.builtins.formatting.fish_indent,
nls.builtins.diagnostics.fish,
})
end,
},
{
Expand Down

0 comments on commit 13b816d

Please sign in to comment.