From 9220c27e85d6d30166473999622aab5b387f3466 Mon Sep 17 00:00:00 2001 From: Farouk Brown Date: Tue, 22 Apr 2025 17:55:21 +0100 Subject: [PATCH 1/3] languages/render-markdown-nvim: add file_types as list set file_types as listOf (nullOr str) to allow merging --- docs/release-notes/rl-0.8.md | 4 ++++ modules/plugins/languages/markdown.nix | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 5dc3ca94..06a3267a 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -344,3 +344,7 @@ [howird](https://github.com/howird): - Change python dap adapter name from `python` to commonly expected `debugpy`. + +[aionoid](https://github.com/aionoid): + +- Fix [render-markdown.nvim] file_types option type to list, to accept merging. diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 62081549..008192e3 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -9,7 +9,7 @@ inherit (lib.modules) mkIf mkMerge; inherit (lib.options) mkEnableOption mkOption; inherit (lib.lists) isList; - inherit (lib.types) bool enum either package listOf str; + inherit (lib.types) bool enum either package listOf str nullOr; inherit (lib.nvim.lua) expToLua toLuaObject; inherit (lib.nvim.types) diagnostics mkGrammarOption mkPluginSetupOption; inherit (lib.nvim.dag) entryAnywhere; @@ -117,7 +117,13 @@ in { ''; }; - setupOpts = mkPluginSetupOption "render-markdown" {}; + setupOpts = mkPluginSetupOption "render-markdown" { + file_types = lib.mkOption { + type = listOf (nullOr str); + default = []; + description = "List of buffer filetypes to enable this plugin in. This will cause the plugin to attach to new buffers who have any of these filetypes."; + }; + }; }; }; From 95e2eec30b8d20c096c327ef5dd3887d7f859ae9 Mon Sep 17 00:00:00 2001 From: Farouk Brown Date: Tue, 22 Apr 2025 21:32:53 +0100 Subject: [PATCH 2/3] doc: format description to a multi-line string --- modules/plugins/languages/markdown.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 008192e3..21b4f4af 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -121,7 +121,12 @@ in { file_types = lib.mkOption { type = listOf (nullOr str); default = []; - description = "List of buffer filetypes to enable this plugin in. This will cause the plugin to attach to new buffers who have any of these filetypes."; + description = '' + List of buffer filetypes to enable this plugin in. + + This will cause the plugin to attach to new buffers who + have any of these filetypes. + ''; }; }; }; From 3e3d7171c1b8354065adf9890c2e2a469441f300 Mon Sep 17 00:00:00 2001 From: Farouk Brown Date: Tue, 22 Apr 2025 22:36:11 +0100 Subject: [PATCH 3/3] ref: change file_types type to nullOr(listOf str) --- modules/plugins/languages/markdown.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index 21b4f4af..4563bc44 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -119,8 +119,8 @@ in { setupOpts = mkPluginSetupOption "render-markdown" { file_types = lib.mkOption { - type = listOf (nullOr str); - default = []; + type = nullOr (listOf str); + default = null; description = '' List of buffer filetypes to enable this plugin in.