From 9b8805e1a9f4353af8ec7eb12dbca7e1dd37fb27 Mon Sep 17 00:00:00 2001 From: Nicolas Goudry Date: Mon, 10 Jun 2024 08:09:00 +0200 Subject: [PATCH] feat(plugins): add todo-comments --- plugins/todo-comments.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 plugins/todo-comments.nix diff --git a/plugins/todo-comments.nix b/plugins/todo-comments.nix new file mode 100644 index 0000000..0bba0bf --- /dev/null +++ b/plugins/todo-comments.nix @@ -0,0 +1,30 @@ +_: + +{ + opts = { + enable = true; + # highlight.pattern = ".*<(KEYWORDS)\s*"; + # search.pattern = "\\b(KEYWORDS)"; + }; + + rootOpts.keymaps = [ + { + mode = "n"; + key = "fT"; + action.__raw = "function() TelescopeWithTheme('todo', {}, 'todo-comments') end"; + options.desc = "Find TODOs"; + } + { + mode = "n"; + key = "]T"; + action.__raw = "function() require('todo-comments').jump_next() end"; + options.desc = "Next TODO comment"; + } + { + mode = "n"; + key = "[T"; + action.__raw = "function() require('todo-comments').jump_prev() end"; + options.desc = "Previous TODO comment"; + } + ]; +}