summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyren223 <contact@kyren.codes>2026-06-22 01:35:58 +0300
committerKyren223 <contact@kyren.codes>2026-06-22 01:35:58 +0300
commit416dce6b9ea46a570f0d3eeafd2650f0e5bb0ee5 (patch)
treebfb2d6d9f5e46bb5d04ee63f4a63f8e295a3a909
parent0243af5d1f0ca3cf3f492999dbbfc6756216fa72 (diff)
todo-comments with snack broke for some reason, idk when, I guess I can
no longer use it then, welp
-rw-r--r--.config/nvim/lua/plugins/snacks.lua83
-rw-r--r--.config/nvim/lua/plugins/todo-comments.lua78
2 files changed, 122 insertions, 39 deletions
diff --git a/.config/nvim/lua/plugins/snacks.lua b/.config/nvim/lua/plugins/snacks.lua
index aa942f9..9241b82 100644
--- a/.config/nvim/lua/plugins/snacks.lua
+++ b/.config/nvim/lua/plugins/snacks.lua
@@ -414,5 +414,88 @@ return {
end,
desc = 'Toggle [T]erminal',
},
+
+ {
+ '<leader>st',
+ function()
+ -- vim.cmd('TodoLocList<cr>q')
+ require('snacks').picker({
+ layout = 'telescope',
+ follow = true,
+ hidden = true,
+ finder = 'proc',
+ cmd = 'rg',
+ args = {
+ '--color=never',
+ '--no-heading',
+ '--with-filename',
+ '--line-number',
+ '--column',
+ '--hidden',
+ '--follow',
+ -- The immutable background filter pattern
+ [[\b(TODO|FIXME|BUG|HACK)\b]],
+ },
+ -- Transform raw ripgrep text output into structured items snacks can read
+ transform = function(item)
+ local file, line, col, text = item.text:match('^([^:]+):(%d+):(%d+):(.*)$')
+ if file then
+ item.file = file
+ item.pos = { tonumber(line), tonumber(col) - 1 }
+ item.text = text
+ end
+ return item
+ end,
+ -- Custom mapping injection
+ win = {
+ input = {
+ keys = {
+ ['<CR>'] = { 'confirm', mode = { 'n', 'i' } },
+ },
+ },
+ list = {
+ keys = {
+ ['<CR>'] = 'confirm',
+ },
+ },
+ },
+ })
+ -- Snacks.picker.grep({
+ -- layout = 'telescope',
+ -- follow = true,
+ -- hidden = true,
+ -- keywords = { 'TODO', 'WIP', 'FIX', 'FIXME', 'OPTIMIZE', 'SECURE' },
+ -- args = { '--regexp', '\\b(TODO|FIXME|BUG|HACK)\\b' },
+ -- })
+ end,
+ desc = '[S]earch [T]odos',
+ },
+ {
+ '<leader>sn',
+ function()
+ Snacks.picker.todo_comments({
+ layout = 'telescope',
+ follow = true,
+ hidden = true,
+ keywords = {
+ 'NOTE',
+ 'INFO',
+ 'DOCS',
+ 'TEST',
+ 'WARN',
+ 'WARNING',
+ 'SECURITY',
+ 'HACK',
+ 'IMPORTANT',
+ 'PERF',
+ 'STUDY',
+ 'UNSAFE',
+ 'SAFETY',
+ 'ERROR',
+ },
+ })
+ end,
+ desc = '[S]earch [N]otes',
+ },
},
}
diff --git a/.config/nvim/lua/plugins/todo-comments.lua b/.config/nvim/lua/plugins/todo-comments.lua
index 17ad1cf..8ee1a65 100644
--- a/.config/nvim/lua/plugins/todo-comments.lua
+++ b/.config/nvim/lua/plugins/todo-comments.lua
@@ -3,45 +3,45 @@ return {
dependencies = { 'nvim-lua/plenary.nvim' },
event = 'VeryLazy',
keys = {
- {
- '<leader>st',
- function()
- Snacks.picker.todo_comments({
- layout = 'telescope',
- follow = true,
- hidden = true,
- keywords = { 'TODO', 'WIP', 'FIX', 'FIXME', 'OPTIMIZE', 'SECURE' },
- })
- end,
- desc = '[S]earch [T]odos',
- },
- {
- '<leader>sn',
- function()
- Snacks.picker.todo_comments({
- layout = 'telescope',
- follow = true,
- hidden = true,
- keywords = {
- 'NOTE',
- 'INFO',
- 'DOCS',
- 'TEST',
- 'WARN',
- 'WARNING',
- 'SECURITY',
- 'HACK',
- 'IMPORTANT',
- 'PERF',
- 'STUDY',
- 'UNSAFE',
- 'SAFETY',
- 'ERROR',
- },
- })
- end,
- desc = '[S]earch [N]otes',
- },
+ -- {
+ -- '<leader>st',
+ -- function()
+ -- Snacks.picker.todo_comments({
+ -- layout = 'telescope',
+ -- follow = true,
+ -- hidden = true,
+ -- keywords = { 'TODO', 'WIP', 'FIX', 'FIXME', 'OPTIMIZE', 'SECURE' },
+ -- })
+ -- end,
+ -- desc = '[S]earch [T]odos',
+ -- },
+ -- {
+ -- '<leader>sn',
+ -- function()
+ -- Snacks.picker.todo_comments({
+ -- layout = 'telescope',
+ -- follow = true,
+ -- hidden = true,
+ -- keywords = {
+ -- 'NOTE',
+ -- 'INFO',
+ -- 'DOCS',
+ -- 'TEST',
+ -- 'WARN',
+ -- 'WARNING',
+ -- 'SECURITY',
+ -- 'HACK',
+ -- 'IMPORTANT',
+ -- 'PERF',
+ -- 'STUDY',
+ -- 'UNSAFE',
+ -- 'SAFETY',
+ -- 'ERROR',
+ -- },
+ -- })
+ -- end,
+ -- desc = '[S]earch [N]otes',
+ -- },
},
opts = {
signs = false,