🐛 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:
parent
2c9c0b2d8f
commit
566830bdb8
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue