plugins/todo-comments: support conditional key mapping

This commit is contained in:
Austin Horstman 2024-09-06 23:31:49 -05:00
parent 4e5bd1d79b
commit 87e3c4a1b2
No known key found for this signature in database
2 changed files with 26 additions and 1 deletions

View file

@ -1,3 +1,4 @@
{ lib, ... }:
{
empty = {
plugins.todo-comments.enable = true;
@ -166,6 +167,27 @@
};
};
conditional-mappings =
{ config, ... }:
{
plugins.telescope.enable = true;
plugins.todo-comments = {
enable = true;
keymaps = {
todoTrouble.key = lib.mkIf config.plugins.trouble.enable "<leader>xq";
todoTelescope = lib.mkIf config.plugins.telescope.enable {
key = "<leader>ft";
keywords = [
"TODO"
"FIX"
"FIX"
];
};
};
};
};
without-ripgrep = {
plugins.todo-comments = {
enable = true;