forked from folke/trouble.nvim
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcolors.lua
34 lines (29 loc) · 863 Bytes
/
colors.lua
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
local util = require("trouble.util")
local M = {}
local links = {
TextError = "TroubleText",
TextWarning = "TroubleText",
TextInformation = "TroubleText",
TextHint = "TroubleText",
Text = "Normal",
File = "Directory",
Source = "Comment",
Code = "Comment",
Location = "LineNr",
FoldIcon = "CursorLineNr",
Normal = "Normal",
Count = "TabLineSel",
Preview = "Search",
Indent = "LineNr",
SignOther = "TroubleSignInformation",
}
function M.setup()
for k, v in pairs(links) do
vim.api.nvim_command("hi def link Trouble" .. k .. " " .. v)
end
for _, severity in pairs(util.severity) do
vim.api.nvim_command("hi def link Trouble" .. severity .. " " .. util.get_severity_label(severity))
vim.api.nvim_command("hi def link TroubleSign" .. severity .. " " .. util.get_severity_label(severity, "Sign"))
end
end
return M