mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
neovimUtils.grammarToPlugin: improve error message on invalid grammarPlugins
Update pkgs/applications/editors/neovim/utils.nix Co-authored-by: Perchun Pak <github@perchun.it> Update pkgs/applications/editors/neovim/utils.nix Co-authored-by: Austin Horstman <khaneliman12@gmail.com> Update pkgs/applications/editors/neovim/utils.nix OH Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
2b552e98ea
commit
600f8504be
@ -176,7 +176,11 @@ let
|
||||
(lib.replaceStrings [ "-" ] [ "_" ])
|
||||
];
|
||||
|
||||
nvimGrammars = lib.mapAttrsToList (name: value: value.origGrammar) vimPlugins.nvim-treesitter.grammarPlugins;
|
||||
nvimGrammars = lib.mapAttrsToList (
|
||||
name: value:
|
||||
value.origGrammar
|
||||
or (builtins.throw "additions to `pkgs.vimPlugins.nvim-treesitter.grammarPlugins` set should be passed through `pkgs.neovimUtils.grammarToPlugin` first")
|
||||
) vimPlugins.nvim-treesitter.grammarPlugins;
|
||||
isNvimGrammar = x: builtins.elem x nvimGrammars;
|
||||
|
||||
toNvimTreesitterGrammar = callPackage ({ }:
|
||||
|
Loading…
Reference in New Issue
Block a user