feat(plugins): add todo highlight
This commit is contained in:
parent
88de0e2dbd
commit
a00aaa6361
3 changed files with 41 additions and 4 deletions
|
@ -17,10 +17,11 @@ local plugins = {
|
||||||
'gitsigns',
|
'gitsigns',
|
||||||
'kommentary',
|
'kommentary',
|
||||||
'statusline',
|
'statusline',
|
||||||
'theme', -- if default theme is disabled, you will need to update add your own statusline
|
|
||||||
'treesitter',
|
|
||||||
'telescope',
|
'telescope',
|
||||||
'terminal',
|
'terminal',
|
||||||
|
'theme', -- if default theme is disabled, you will need to update add your own statusline
|
||||||
|
'todo-comments',
|
||||||
|
'treesitter',
|
||||||
'nvim-tree',
|
'nvim-tree',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,8 @@ local icons = {
|
||||||
info = '',
|
info = '',
|
||||||
error = '',
|
error = '',
|
||||||
hint = '',
|
hint = '',
|
||||||
|
perf = ' ',
|
||||||
|
note = ' ',
|
||||||
branch = '',
|
branch = '',
|
||||||
file = '',
|
file = '',
|
||||||
dotdotdot = '…',
|
dotdotdot = '…',
|
||||||
|
@ -17,6 +19,8 @@ local icons = {
|
||||||
symlink = '',
|
symlink = '',
|
||||||
line_number = '',
|
line_number = '',
|
||||||
debug = ' ',
|
debug = ' ',
|
||||||
|
flame = ' ',
|
||||||
|
check = ' ',
|
||||||
trace = '✎',
|
trace = '✎',
|
||||||
git = {
|
git = {
|
||||||
unstaged = '✗',
|
unstaged = '✗',
|
||||||
|
|
|
@ -216,6 +216,38 @@ return packer.startup(function()
|
||||||
disable = vim.tbl_contains(user_plugins.disable, 'kommentary'),
|
disable = vim.tbl_contains(user_plugins.disable, 'kommentary'),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- todo highlights
|
||||||
|
use({
|
||||||
|
'folke/todo-comments.nvim',
|
||||||
|
requires = 'nvim-lua/plenary.nvim',
|
||||||
|
config = function()
|
||||||
|
local icons = require('cosmic.core.theme.icons')
|
||||||
|
require('todo-comments').setup({
|
||||||
|
keywords = {
|
||||||
|
FIX = {
|
||||||
|
icon = icons.debug, -- icon used for the sign, and in search results
|
||||||
|
color = 'error', -- can be a hex color, or a named color (see below)
|
||||||
|
alt = { 'FIXME', 'BUG', 'FIXIT', 'ISSUE', 'fix', 'fixme', 'bug' }, -- a set of other keywords that all map to this FIX keywords
|
||||||
|
-- signs = false, -- configure signs for some keywords individually
|
||||||
|
},
|
||||||
|
TODO = { icon = icons.check, color = 'info', alt = { 'todo' } },
|
||||||
|
HACK = { icon = icons.flame, color = 'warning', alt = { 'hack' } },
|
||||||
|
WARN = { icon = icons.warn, color = 'warning', alt = { 'WARNING', 'XXX', 'warn', 'warning' } },
|
||||||
|
PERF = { icon = icons.perf, alt = { 'OPTIM', 'PERFORMANCE', 'OPTIMIZE', 'perf', 'performance' } },
|
||||||
|
NOTE = { icon = icons.note, color = 'hint', alt = { 'INFO', 'note' } },
|
||||||
|
},
|
||||||
|
colors = {
|
||||||
|
error = { 'DiagnosticError', 'ErrorMsg', '#DC2626' },
|
||||||
|
warning = { 'DiagnosticWarning', 'WarningMsg', '#FBBF24' },
|
||||||
|
info = { 'DiagnosticInformation', '#2563EB' },
|
||||||
|
hint = { 'DiagnosticHint', '#10B981' },
|
||||||
|
default = { 'Identifier', '#7C3AED' },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
event = 'BufRead',
|
||||||
|
disable = vim.tbl_contains(user_plugins.disable, 'todo-comments'),
|
||||||
|
})
|
||||||
-- colorized hex codes
|
-- colorized hex codes
|
||||||
use({
|
use({
|
||||||
'norcalli/nvim-colorizer.lua',
|
'norcalli/nvim-colorizer.lua',
|
||||||
|
|
Loading…
Add table
Reference in a new issue