We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f3f916 commit 05fe20eCopy full SHA for 05fe20e
crates/emmylua_ls/src/handlers/document_symbol/builder.rs
@@ -98,8 +98,14 @@ impl<'a> DocumentSymbolBuilder<'a> {
98
for child in &symbol.children {
99
let child_symbol = self.document_symbols.get(child)?;
100
let lsp_range = self.document.to_lsp_range(child_symbol.range)?;
101
+ let child_symbol_name = if child_symbol.name.is_empty() {
102
+ "(empty)".to_string()
103
+ } else {
104
+ child_symbol.name.clone()
105
+ };
106
+
107
let mut lsp_document_symbol = DocumentSymbol {
- name: child_symbol.name.clone(),
108
+ name: child_symbol_name,
109
detail: child_symbol.detail.clone(),
110
kind: child_symbol.kind,
111
range: lsp_range.clone(),
0 commit comments