Skip to content

Commit 42b9c0a

Browse files
Add deprecation status to SymbolInformation (#4102)
1 parent d0a7159 commit 42b9c0a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

private/buf/buflsp/symbol.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,17 @@ func (s *symbol) GetSymbolInformation() protocol.SymbolInformation {
299299
default:
300300
kind = protocol.SymbolKindVariable
301301
}
302+
var isDeprecated bool
303+
if _, ok := s.ir.Deprecated().AsBool(); ok {
304+
isDeprecated = true
305+
}
302306
return protocol.SymbolInformation{
303307
Name: name,
304308
Kind: kind,
305309
Location: location,
306310
ContainerName: containerName,
311+
// TODO: Use Tags with a protocol.CompletionItemTagDeprecated if the client supports tags.
312+
Deprecated: isDeprecated,
307313
}
308314
}
309315

0 commit comments

Comments
 (0)