-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathtodo_comments.lua
More file actions
41 lines (38 loc) · 1.26 KB
/
Copy pathtodo_comments.lua
File metadata and controls
41 lines (38 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
local M = {}
M.config = function()
local status_ok, todo = pcall(require, "todo-comments")
if not status_ok then
return
end
local icons = require("user.lsp_kind").todo_comments
todo.setup {
keywords = {
FIX = { icon = icons.FIX },
TODO = { icon = icons.TODO, alt = { "WIP" } },
HACK = { icon = icons.HACK, color = "hack" },
WARN = { icon = icons.WARN },
PERF = { icon = icons.PERF },
NOTE = { icon = icons.NOTE, alt = { "INFO", "NB" } },
ERROR = { icon = icons.ERROR, color = "error", alt = { "ERR" } },
REFS = { icon = icons.REFS },
SAFETY = { icon = icons.SHIELD, color = "hint" },
audit = { icon = icons.WARN, color = "warning" },
-- auditissue = { icon = icons.ERROR, color = "error", alt = { "audit-issue" } },
-- auditinfo = { icon = icons.NOTE, color = "hint", alt = { "audit-info" } },
},
highlight = {
max_line_len = 120,
pattern = { [[.*<(KEYWORDS)\s*:]], [[\/\/.+(audit)\s+]] },
},
colors = {
error = { "DiagnosticError" },
warning = { "DiagnosticWarn" },
info = { "DiagnosticInfo" },
hint = { "DiagnosticHint" },
hack = { "Function" },
ref = { "FloatBorder" },
default = { "Identifier" },
},
}
end
return M