neovim-flake/modules/notes/todo-comments/todo-comments.nix

30 lines
961 B
Nix
Raw Normal View History

{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str;
inherit (lib.nvim.binds) mkMappingOption;
in {
2023-03-01 11:26:58 +01:00
options.vim.notes.todo-comments = {
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 {
type = str;
2023-03-01 11:26:58 +01:00
default = ''[[.*<(KEYWORDS)(\([^\)]*\))?:]]'';
description = "vim regex pattern used for highlighting comments";
};
search = mkOption {
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
};
}