fix(symbols): Handle unkown symbols
Default to the Object icon Closes #28
This commit is contained in:
@@ -34,6 +34,10 @@ M.kinds = {
|
||||
"EnumMember", "Struct", "Event", "Operator", "TypeParameter"
|
||||
}
|
||||
|
||||
function M.icon_from_kind(kind) return M[M.kinds[kind]].icon end
|
||||
function M.icon_from_kind(kind)
|
||||
-- If the kind is higher than the available ones then default to 'Object'
|
||||
if kind > #M.kinds then kind = 19 end
|
||||
return M[M.kinds[kind]].icon
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Reference in New Issue
Block a user