summary refs log tree commit diff
path: root/.config/nvim/lua/plugins/haunt.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/haunt.lua')
-rw-r--r--.config/nvim/lua/plugins/haunt.lua47
1 files changed, 47 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/haunt.lua b/.config/nvim/lua/plugins/haunt.lua
new file mode 100644
index 0000000..aa24cec
--- /dev/null
+++ b/.config/nvim/lua/plugins/haunt.lua
@@ -0,0 +1,47 @@
+return {
+  {
+    enabled = true,
+    'https://github.com/TheNoeTrevino/haunt.nvim',
+    lazy = true,
+    opts = {
+      sign = '',
+      -- sign_hl = nil,
+      -- line_hl = nil,
+      -- virt_text_hl = nil,
+      data_dir = nil,
+      annotation_prefix = '  ',
+      -- virt_text_pos = 'eol',
+      virt_text_pos = 'above',
+      picker_keys = {
+        delete = { key = 'ctrl-x' },
+        edit_annotation = { key = 'ctrl-e' },
+      },
+    },
+    cmd = {
+      'HauntAnnoate',
+      'HauntDelete',
+      'HauntList',
+      'HauntNext',
+      'HauntPrev',
+      'HauntQfAll',
+    },
+    keys = {
+      { '[h', '<cmd>HauntPrev<cr>', desc = 'haunt: prev annotation', silent = true },
+      { ']h', '<cmd>HauntNext<cr>', desc = 'haunt: next annotation', silent = true },
+      { '<leader>h', '<nop>', desc = 'haunt' },
+      { '<leader>ha', '<cmd>HauntAnnotate<cr>', desc = 'haunt: annotate', silent = true },
+      { '<leader>ha', '<cmd>HauntAnnotate<cr>', desc = 'haunt: annotate', silent = true },
+      { '<leader>hd', '<cmd>HauntDelete<cr>', desc = 'haunt: delete', silent = true },
+      { '<leader>hl', '<cmd>HauntList<cr>', desc = 'haunt: list', silent = true },
+      { '<leader>hf', '<cmd>HauntQfAll<cr>', desc = 'haunt: quickfix', silent = true },
+      {
+        '<leader>ht',
+        function()
+          require('haunt.api').toggle_all_lines()
+        end,
+        desc = 'haunt: toggle all',
+        silent = true,
+      },
+    },
+  },
+}