nvim/lua/cosmic/core/comments/init.lua
2021-11-29 14:35:04 -08:00

25 lines
1.2 KiB
Lua

local icons = require('cosmic.core.theme.icons')
local config = require('cosmic.config')
require('todo-comments').setup(vim.tbl_deep_extend('force', {
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' },
HACK = { icon = icons.flame, color = 'warning' },
WARN = { icon = icons.warn, color = 'warning', alt = { 'WARNING', 'XXX' } },
PERF = { icon = icons.perf, alt = { 'OPTIM', 'PERFORMANCE', 'OPTIMIZE' } },
NOTE = { icon = icons.note, color = 'hint', alt = { 'INFO' } },
},
colors = {
error = { 'DiagnosticError', 'ErrorMsg', '#DC2626' },
warning = { 'DiagnosticWarning', 'WarningMsg', '#FBBF24' },
info = { 'DiagnosticInformation', '#2563EB' },
hint = { 'DiagnosticHint', '#10B981' },
default = { 'Identifier', '#7C3AED' },
},
}, config.comments or {}))