Skip to content

Commit

Permalink
feat: added kind symbol highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 30, 2024
1 parent 86da179 commit de08657
Showing 1 changed file with 48 additions and 14 deletions.
62 changes: 48 additions & 14 deletions lua/trouble/config/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,62 @@ local Util = require("trouble.util")

local M = {}

-- stylua: ignore
local defaults = {
-- General
Normal = "NormalFloat",
Text = "Normal",
Preview = "Visual",
Normal = "NormalFloat",
Text = "Normal",
Preview = "Visual",

-- Item
FileName = "Directory",
Source = "Comment",
Pos = "LineNr",
Count = "TabLineSel",
FileName = "Directory",
Directory = "Directory",
IconDirectory = "Special",
Source = "Comment",
Pos = "LineNr",
Count = "TabLineSel",

-- Indent Guides
Indent = "LineNr",
IndentFoldClosed = "CursorLineNr",
IndentFoldOpen = "TroubleIndent",
IndentTop = "TroubleIndent",
IndentMiddle = "TroubleIndent",
IndentLast = "TroubleIndent",
IndentWs = "TroubleIndent",
Indent = "LineNr",
IndentFoldClosed = "CursorLineNr",
IndentFoldOpen = "TroubleIndent",
IndentTop = "TroubleIndent",
IndentMiddle = "TroubleIndent",
IndentLast = "TroubleIndent",
IndentWs = "TroubleIndent",

-- LSP Symbol Kinds
IconArray = "@punctuation.bracket",
IconBoolean = "@boolean",
IconClass = "@type",
IconConstant = "@constant",
IconConstructor = "@constructor",
IconEnum = "@lsp.type.enum",
IconEnumMember = "@lsp.type.enumMember",
IconEvent = "Special",
IconField = "@field",
IconFile = "Normal",
IconFunction = "@function",
IconInterface = "@lsp.type.interface",
IconKey = "@lsp.type.keyword",
IconMethod = "@method",
IconModule = "@namespace",
IconNamespace = "@namespace",
IconNull = "@constant.builtin",
IconNumber = "@number",
IconObject = "@constant",
IconOperator = "@operator",
IconPackage = "@namespace",
IconProperty = "@property",
IconString = "@string",
IconStruct = "@lsp.type.struct",
IconTypeParameter = "@lsp.type.typeParameter",
IconVariable = "@variable",
}

function M.setup()
M.link(defaults)
M.source("fs")
end

---@param prefix? string
Expand Down

0 comments on commit de08657

Please sign in to comment.