🐛 fix(symbol): emit module symbols for unit

Fix Builder::CreateSymbol to handle SymbolKind::Module (Unit) so system/workspace loading can match file stems.
This commit is contained in:
csh 2025-12-14 13:13:54 +08:00
parent 2c9c0b2d8f
commit 566830bdb8
1 changed files with 8 additions and 0 deletions

View File

@ -232,6 +232,14 @@ namespace lsp::language::symbol
Symbol symbol = [&]() -> Symbol { Symbol symbol = [&]() -> Symbol {
switch (kind) switch (kind)
{ {
case protocol::SymbolKind::Module:
{
Unit unit;
unit.name = name;
unit.selection_range = location;
unit.range = location;
return Symbol(std::move(unit));
}
case protocol::SymbolKind::Class: case protocol::SymbolKind::Class:
{ {
Class cls; Class cls;