File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/SourceKitLSP/Swift Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -171,10 +171,11 @@ fileprivate final class DocumentSymbolsFinder: SyntaxAnyVisitor {
171171 }
172172
173173 override func visit( _ node: DeinitializerDeclSyntax ) -> SyntaxVisitorContinueKind {
174+ // LSP doesn't have a destructor kind. constructor is the closest match and also what clangd for destructors.
174175 return record (
175176 node: node,
176177 name: node. deinitKeyword. text,
177- symbolKind: . null ,
178+ symbolKind: . constructor ,
178179 range: node. rangeWithoutTrivia,
179180 selection: node. deinitKeyword. rangeWithoutTrivia
180181 )
Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ final class DocumentSymbolTests: XCTestCase {
748748 children: [
749749 DocumentSymbol (
750750 name: " deinit " ,
751- kind: . null ,
751+ kind: . constructor ,
752752 range: positions [ " 4️⃣ " ] ..< positions [ " 6️⃣ " ] ,
753753 selectionRange: positions [ " 4️⃣ " ] ..< positions [ " 5️⃣ " ] ,
754754 children: [ ]
You can’t perform that action at this time.
0 commit comments