feat: yoink asciidoc from nmd

This commit is contained in:
NotAShelf 2023-04-18 00:59:23 +03:00
parent 544792e0b9
commit 1829e321b5
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
4 changed files with 20 additions and 2 deletions

View file

@ -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;
}

17
lib/nmd.nix Normal file
View file

@ -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;
};
}

View file

@ -23,7 +23,7 @@ with builtins; {
map_cr = mkOption {
type = types.bool;
default = true;
description = "map <CR> on insert mode";
description = nvim.nmd.asciiDoc ''map <CR> on insert mode'';
};
map_complete = mkOption {

View file

@ -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.<lang>.treesitter` option
'';