mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
plugins/todo-comments: fix missing mkRaw for pattern options (#242)
This commit is contained in:
parent
933c87c282
commit
8fed61902a
2 changed files with 27 additions and 8 deletions
|
@ -114,8 +114,14 @@ in {
|
|||
"fg" or "bg" or empty.
|
||||
'';
|
||||
|
||||
pattern = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
||||
pattern =
|
||||
helpers.defaultNullOpts.mkNullable
|
||||
(with types; either str (listOf str))
|
||||
".*<(KEYWORDS)\\s*:"
|
||||
''
|
||||
Pattern or list of patterns, used for highlighting (vim regex)
|
||||
|
||||
Note: the provided pattern will be embedded as such: `[[PATTERN]]`.
|
||||
'';
|
||||
|
||||
commentsOnly = helpers.defaultNullOpts.mkBool true ''
|
||||
|
@ -168,9 +174,11 @@ in {
|
|||
```
|
||||
'';
|
||||
|
||||
pattern = helpers.defaultNullOpts.mkStr "[[\b(KEYWORDS):]]" ''
|
||||
pattern = helpers.defaultNullOpts.mkStr "\\b(KEYWORDS):" ''
|
||||
Regex that will be used to match keywords.
|
||||
Don't replace the (KEYWORDS) placeholder.
|
||||
|
||||
Note: the provided pattern will be embedded as such: `[[PATTERN]]`.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -226,16 +234,27 @@ in {
|
|||
before
|
||||
keyword
|
||||
after
|
||||
pattern
|
||||
exclude
|
||||
;
|
||||
pattern =
|
||||
helpers.ifNonNull' cfg.highlight.pattern
|
||||
(helpers.mkRaw "[[${cfg.highlight.pattern}]]");
|
||||
multiline_pattern = cfg.highlight.multilinePattern;
|
||||
multiline_context = cfg.highlight.multilineContext;
|
||||
comments_only = cfg.highlight.commentsOnly;
|
||||
max_line_len = cfg.highlight.maxLineLen;
|
||||
};
|
||||
colors = cfg.colors;
|
||||
search = cfg.search;
|
||||
search = helpers.ifNonNull' cfg.search {
|
||||
inherit (cfg.search) command args;
|
||||
pattern =
|
||||
helpers.ifNonNull' cfg.search.pattern
|
||||
(
|
||||
if isList cfg.search.pattern
|
||||
then (map (p: helpers.mkRaw p) cfg.search.pattern)
|
||||
else helpers.mkRaw "[[${cfg.search.pattern}]]"
|
||||
);
|
||||
};
|
||||
}
|
||||
// cfg.extraOptions;
|
||||
in
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
before = "";
|
||||
keyword = "wide";
|
||||
after = "fg";
|
||||
pattern = "[[.*<(KEYWORDS)\s*:]]";
|
||||
pattern = ''.*<(KEYWORDS)\s*:'';
|
||||
commentsOnly = true;
|
||||
maxLineLen = 400;
|
||||
exclude = [];
|
||||
|
@ -86,7 +86,7 @@
|
|||
"--line-number"
|
||||
"--column"
|
||||
];
|
||||
pattern = "[[\b(KEYWORDS):]]";
|
||||
pattern = ''\b(KEYWORDS):'';
|
||||
};
|
||||
|
||||
keymapsSilent = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue