forked from AstroNvim/user_example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugins): protect ensure_installed table from community packs
- Loading branch information
Showing
2 changed files
with
29 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
return { | ||
"nvim-treesitter/nvim-treesitter", | ||
opts = { | ||
-- ensure_installed = { "lua" }, | ||
}, | ||
opts = function(_, opts) | ||
-- add more things to the ensure_installed table protecting against community packs modifying it | ||
if not opts.ensure_installed then opts.ensure_installed = {} end | ||
require("astronvim.utils").list_insert_unique(opts.ensure_installed, { | ||
-- "lua" | ||
}) | ||
end, | ||
} |