Files
outline.nvim/lua/symbols-outline/symbols.lua
simrat39 042c8466a2 feat(providers): Inital COC support
Closes #68
Still needs support for code actions/hover/rename etc
2021-10-06 12:58:44 -07:00

25 lines
701 B
Lua

local config = require('symbols-outline.config')
local M = {}
M.kinds = {
"File", "Module", "Namespace", "Package", "Class", "Method", "Property",
"Field", "Constructor", "Enum", "Interface", "Function", "Variable",
"Constant", "String", "Number", "Boolean", "Array", "Object", "Key", "Null",
"EnumMember", "Struct", "Event", "Operator", "TypeParameter"
}
function M.icon_from_kind(kind)
local symbols = config.options.symbols
if type(kind) == 'string' then
return symbols[kind].icon
end
-- If the kind is higher than the available ones then default to 'Object'
if kind > #M.kinds then kind = 19 end
return symbols[M.kinds[kind]].icon
end
return M