Skip to content

Commit

Permalink
fix: hack around LSP server not reporting symbol name (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jul 25, 2022
1 parent 67bddec commit 86b8341
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/aerial/backends/lsp/callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ local function process_symbols(symbols, bufnr)
end
local include_item = range and include_kind[kind]

if include_item then
-- Check symbol.name because some LSP servers return a nil name
if include_item and symbol.name then
local name = symbol.name
-- Some LSP servers return multiline symbols with newlines
local nl = string.find(symbol.name, "\n")
Expand Down

0 comments on commit 86b8341

Please sign in to comment.