Add mini.hipatterns to replace todo-comments

This commit is contained in:
2026-01-27 20:51:15 +01:00
parent 24142e1fad
commit cd2bc14c64
2 changed files with 11 additions and 22 deletions

View File

@@ -104,6 +104,17 @@ require('mini.files').setup({ -- file browser
Map('n', '<leader>o', MiniFiles.open, { desc = "Open mini file browser" }) Map('n', '<leader>o', MiniFiles.open, { desc = "Open mini file browser" })
require('mini.jump').setup() -- extends f,F,t,T to work across multiple lines require('mini.jump').setup() -- extends f,F,t,T to work across multiple lines
require('mini.cursorword').setup() -- highlight words beneath the cursor require('mini.cursorword').setup() -- highlight words beneath the cursor
require('mini.hipatterns').setup({
highlighters = {
bug = { pattern = '%f[%w]()BUG()%f[%W]', group = '@comment.error' },
warn = { pattern = '%f[%w]()WARN()%f[%W]', group = '@comment.warning' },
todo = { pattern = '%f[%w]()TODO()%f[%W]', group = '@comment.todo' },
note = { pattern = '%f[%w]()NOTE()%f[%W]', group = '@comment.note' },
-- Highlight hex color strings (`#rrggbb`) using that color
-- hex_color = MiniHipatterns.gen_highlighter.hex_color(),
},
})
require('mini.icons').setup() require('mini.icons').setup()
require('mini.indentscope').setup({ require('mini.indentscope').setup({
draw = { draw = {

View File

@@ -1,22 +0,0 @@
---@module 'lazy'
---@type LazySpec
return { {
'folke/todo-comments.nvim', -- for highlighting TODO and stuff comments
event = 'VeryLazy',
dependencies = { 'nvim-lua/plenary.nvim' },
---@module 'todo-comments'
---@type TodoOptions
opts = {
signs = false,
colors = {
hint = { "Comment" }
},
},
config = function(_, opts)
local todo = require 'todo-comments'
todo.setup(opts)
Map('n', '<leader>st', '<cmd>TodoTelescope keywords=TODO,FIX,BUG,WARN<cr>',
{ desc = '[S]earch [T]odos]' })
end,
} }