diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/method/textDocument/documentSymbol.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/method/textDocument/documentSymbol.lua b/server/src/method/textDocument/documentSymbol.lua index fdfe832a..7484bb97 100644 --- a/server/src/method/textDocument/documentSymbol.lua +++ b/server/src/method/textDocument/documentSymbol.lua @@ -1,4 +1,5 @@ local core = require 'core' +local lang = require 'language' local function posToRange(lines, start, finish) local start_row, start_col = lines:rowcol(start) @@ -18,6 +19,9 @@ end local function convertRange(lines, symbol) symbol.range = posToRange(lines, symbol.range[1], symbol.range[2]) symbol.selectionRange = posToRange(lines, symbol.selectionRange[1], symbol.selectionRange[2]) + if symbol.name == '' then + symbol.name = lang.script.SYMBOL_ANONYMOUS + end if symbol.children then for _, child in ipairs(symbol.children) do |