mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-30 12:24:28 +02:00
plugins/treesitter-context: add missing warning when treesitter is not enabled
This commit is contained in:
parent
cf6a614e8b
commit
535fc7d5d3
2 changed files with 5 additions and 1 deletions
|
@ -49,6 +49,10 @@ in {
|
||||||
cfg = config.plugins.treesitter-context;
|
cfg = config.plugins.treesitter-context;
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
|
warnings = mkIf (!config.plugins.treesitter.enable) [
|
||||||
|
"Nixvim: treesitter-context needs treesitter to function as intended"
|
||||||
|
];
|
||||||
|
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [cfg.package];
|
||||||
|
|
||||||
plugins.treesitter.moduleConfig.context = {
|
plugins.treesitter.moduleConfig.context = {
|
||||||
|
|
|
@ -174,7 +174,7 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPlugins = with pkgs;
|
extraPlugins =
|
||||||
if cfg.nixGrammars
|
if cfg.nixGrammars
|
||||||
then [(cfg.package.withPlugins (_: cfg.grammarPackages))]
|
then [(cfg.package.withPlugins (_: cfg.grammarPackages))]
|
||||||
else [cfg.package];
|
else [cfg.package];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue