diff --git a/lib/default.nix b/lib/default.nix index e7b721b..37840c1 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -3,4 +3,5 @@ booleans = import ./booleans.nix {inherit lib;}; types = import ./types {inherit lib;}; languages = import ./languages.nix {inherit lib;}; + nmd = import ./nmd.nix; } diff --git a/lib/nmd.nix b/lib/nmd.nix new file mode 100644 index 0000000..fd945f1 --- /dev/null +++ b/lib/nmd.nix @@ -0,0 +1,17 @@ +# Copied from nmd master: https://gitlab.com/rycee/nmd/-/blob/master/default.nix?ref_type=heads +# Allows asciiDoc in options. It is easier to copy & keep updated then figure out how to pass the nmd input +# along to user modules +{ + # Indicates that the given text should be interpreted as AsciiDoc markup. + asciiDoc = text: { + _type = "asciiDoc"; + inherit text; + }; + + # Indicates that the given text should be interpreted as AsciiDoc markup and + # used in a literal context. + literalAsciiDoc = text: { + _type = "literalAsciiDoc"; + inherit text; + }; +} diff --git a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix b/modules/autopairs/nvim-autopairs/nvim-autopairs.nix index ecfda6f..1b3f8b7 100644 --- a/modules/autopairs/nvim-autopairs/nvim-autopairs.nix +++ b/modules/autopairs/nvim-autopairs/nvim-autopairs.nix @@ -23,7 +23,7 @@ with builtins; { map_cr = mkOption { type = types.bool; default = true; - description = "map on insert mode"; + description = nvim.nmd.asciiDoc ''map on insert mode''; }; map_complete = mkOption { diff --git a/modules/treesitter/treesitter.nix b/modules/treesitter/treesitter.nix index a1928a5..84a09ea 100644 --- a/modules/treesitter/treesitter.nix +++ b/modules/treesitter/treesitter.nix @@ -19,7 +19,7 @@ in { grammars = mkOption { type = with types; listOf package; default = []; - description = '' + description = nvim.nmd.asciiDoc '' List of treesitter grammars to install. For supported languages use the `vim.language..treesitter` option '';