Skip to content

Commit

Permalink
fix(sources-lsp): handle out-of-spec lsp symbol number, close #104
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Oct 19, 2023
1 parent 79309dc commit 6e52712
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lua/dropbar/sources/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ setmetatable(lsp_buf_symbols, {

-- Map symbol number to symbol kind
-- stylua: ignore start
local symbol_kind_names = {
local symbol_kind_names = setmetatable({
[1] = 'File',
[2] = 'Module',
[3] = 'Namespace',
Expand All @@ -76,7 +76,11 @@ local symbol_kind_names = {
[24] = 'Event',
[25] = 'Operator',
[26] = 'TypeParameter',
}
}, {
__index = function()
return ''
end,
})
-- stylua: ignore end

---Return type of the symbol table
Expand Down

0 comments on commit 6e52712

Please sign in to comment.