From 28f4237e4faf664fd9b1170f4dc515fffd0aa16a Mon Sep 17 00:00:00 2001 From: Francesco Prem Solidoro Date: Thu, 22 May 2025 01:30:46 +0200 Subject: [PATCH 1/3] notes/norg: fix broken grammars and add norg-meta --- modules/plugins/notes/neorg/config.nix | 2 +- modules/plugins/notes/neorg/neorg.nix | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/plugins/notes/neorg/config.nix b/modules/plugins/notes/neorg/config.nix index fab5079d..f8c18ea9 100644 --- a/modules/plugins/notes/neorg/config.nix +++ b/modules/plugins/notes/neorg/config.nix @@ -35,7 +35,7 @@ in { (mkIf cfg.treesitter.enable { vim.treesitter.enable = true; - vim.treesitter.grammars = [cfg.treesitter.norgPackage]; + vim.treesitter.grammars = [cfg.treesitter.norgPackage cfg.treesitter.norgMetaPackage]; }) ]); } diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index 6b5cf18e..34b4687e 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -4,9 +4,9 @@ pkgs, ... }: let - inherit (lib.options) mkEnableOption mkOption; + inherit (lib.options) mkPackageOption mkEnableOption mkOption; inherit (lib.types) submodule listOf str; - inherit (lib.nvim.types) mkGrammarOption mkPluginSetupOption; + inherit (lib.nvim.types) mkPluginSetupOption; in { options.vim.notes.neorg = { enable = mkEnableOption '' @@ -44,7 +44,12 @@ in { treesitter = { enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;}; - norgPackage = mkGrammarOption pkgs "norg"; + norgPackage= mkPackageOption pkgs ["norg-meta treesitter"] { + default = ["tree-sitter-grammars" "tree-sitter-norg"]; + }; + norgMetaPackage = mkPackageOption pkgs ["norg-meta treesitter"] { + default = ["tree-sitter-grammars" "tree-sitter-norg-meta"]; + }; }; }; } From 4e0e8206c3da8af52a0f1c721c3b86818738993b Mon Sep 17 00:00:00 2001 From: Francesco Prem Solidoro Date: Wed, 16 Jul 2025 16:47:49 +0200 Subject: [PATCH 2/3] notes/neorg: fix formatting --- modules/plugins/notes/neorg/neorg.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/notes/neorg/neorg.nix b/modules/plugins/notes/neorg/neorg.nix index 34b4687e..684519c9 100644 --- a/modules/plugins/notes/neorg/neorg.nix +++ b/modules/plugins/notes/neorg/neorg.nix @@ -44,7 +44,7 @@ in { treesitter = { enable = mkEnableOption "Neorg treesitter" // {default = config.vim.languages.enableTreesitter;}; - norgPackage= mkPackageOption pkgs ["norg-meta treesitter"] { + norgPackage = mkPackageOption pkgs ["norg-meta treesitter"] { default = ["tree-sitter-grammars" "tree-sitter-norg"]; }; norgMetaPackage = mkPackageOption pkgs ["norg-meta treesitter"] { From e20d673d6e648fefb91c7df43099bf26016504db Mon Sep 17 00:00:00 2001 From: Francesco Prem Solidoro Date: Wed, 16 Jul 2025 19:32:58 +0200 Subject: [PATCH 3/3] docs/rl-0.8: add neorg fix entry --- docs/release-notes/rl-0.8.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 8c88cd56..87561a9d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -463,3 +463,6 @@ leverage the pattern introduced in commit [fc8206e7a61d ("flake: utilize nix-systems for overridable flake systems")]( https://github.com/NotAShelf/nvf/commit/fc8206e7a61d7eb02006f9010e62ebdb3336d0d2). + +[soliprem](https://github.com/soliprem): +- fix broken `neorg` grammars