mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 02:13:23 +00:00
neovimUtils.grammarToPlugin: improve error message on invalid grammarPlugins (#357062)
This commit is contained in:
commit
36be531246
@ -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