Add mini.hipatterns to replace todo-comments
This commit is contained in:
@@ -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 = {
|
||||||
|
|||||||
@@ -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,
|
|
||||||
} }
|
|
||||||
Reference in New Issue
Block a user