r: changing treesitter package definition to mkGrammarOption

This commit is contained in:
Soliprem 2024-09-24 12:34:56 +02:00
parent ae90ed1706
commit 42d7294a5e

View file

@ -10,6 +10,7 @@
inherit (lib.lists) isList; inherit (lib.lists) isList;
inherit (lib.types) enum either listOf package str; inherit (lib.types) enum either listOf package str;
inherit (lib.nvim.lua) expToLua; inherit (lib.nvim.lua) expToLua;
inherit (lib.nvim.types) mkGrammarOption;
cfg = config.vim.languages.r; cfg = config.vim.languages.r;
@ -42,11 +43,7 @@ in {
treesitter = { treesitter = {
enable = mkEnableOption "R treesitter" // {default = config.vim.languages.enableTreesitter;}; enable = mkEnableOption "R treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkOption { package = mkGrammarOption pkgs "r";
description = "R treesitter grammar to use";
type = package;
default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.r;
};
}; };
lsp = { lsp = {