2023-11-07 01:50:27 +01:00
|
|
|
{lib, ...}: let
|
2024-03-12 01:47:01 +01:00
|
|
|
inherit (lib.options) mkOption mkEnableOption;
|
|
|
|
inherit (lib.types) str;
|
|
|
|
inherit (lib.nvim.binds) mkMappingOption;
|
2023-11-07 01:50:27 +01:00
|
|
|
in {
|
2023-03-01 11:26:58 +01:00
|
|
|
options.vim.notes.todo-comments = {
|
2023-06-05 22:10:25 +02:00
|
|
|
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";
|
2023-03-01 11:26:58 +01:00
|
|
|
|
|
|
|
patterns = {
|
|
|
|
highlight = mkOption {
|
2024-03-12 01:47:01 +01:00
|
|
|
type = str;
|
2023-03-01 11:26:58 +01:00
|
|
|
default = ''[[.*<(KEYWORDS)(\([^\)]*\))?:]]'';
|
|
|
|
description = "vim regex pattern used for highlighting comments";
|
|
|
|
};
|
|
|
|
|
|
|
|
search = mkOption {
|
2024-03-12 01:47:01 +01:00
|
|
|
type = str;
|
2023-03-01 11:26:58 +01:00
|
|
|
default = ''[[\b(KEYWORDS)(\([^\)]*\))?:]]'';
|
|
|
|
description = "ripgrep regex pattern used for searching comments";
|
|
|
|
};
|
|
|
|
};
|
2023-04-18 18:14:44 +02:00
|
|
|
|
|
|
|
mappings = {
|
|
|
|
quickFix = mkMappingOption "Open Todo-s in a quickfix list" "<leader>tdq";
|
|
|
|
telescope = mkMappingOption "Open Todo-s in telescope" "<leader>tds";
|
|
|
|
trouble = mkMappingOption "Open Todo-s in Trouble" "<leader>tdt";
|
|
|
|
};
|
2023-03-01 11:26:58 +01:00
|
|
|
};
|
|
|
|
}
|