feat(ui/config): Add config option to change icons and highlights

Closes #37
Kinda related to #19
This commit is contained in:
simrat39
2021-07-17 20:28:50 -07:00
parent fea9ce74e2
commit 3e9e019b03
4 changed files with 72 additions and 32 deletions

View File

@@ -1,5 +1,6 @@
local vim = vim
local symbols = require('symbols-outline.symbols')
local config = require('symbols-outline.config')
local symbol_kinds = require('symbols-outline.symbols').kinds
local M = {}
M.markers = {
@@ -26,13 +27,15 @@ local function highlight_text(name, text, hl_group)
end
function M.setup_highlights()
local symbols = config.options.symbols
-- markers
highlight_text("marker_middle", M.markers.middle, "Comment")
highlight_text("marker_vertical", M.markers.vertical, "Comment")
highlight_text("markers_horizontal", M.markers.horizontal, "Comment")
highlight_text("markers_bottom", M.markers.bottom, "Comment")
for _, value in ipairs(symbols.kinds) do
for _, value in ipairs(symbol_kinds) do
local symbol = symbols[value]
highlight_text(value, symbol.icon, symbol.hl)
end