From ed630680454c9b7c7825e4d93b4ea6750d840e61 Mon Sep 17 00:00:00 2001 From: KoushikReddy Date: Sat, 18 Apr 2026 09:27:06 -0700 Subject: [PATCH] fix: add missing children field to DocumentSymbol TypedDict The LSP v3.17 spec defines DocumentSymbol.children as an optional list of nested DocumentSymbol entries. The field was absent from the TypedDict, causing type checkers to flag access to 'children' on DocumentSymbol objects and requiring # type: ignore workarounds in ls.py. --- src/solidlsp/lsp_protocol_handler/lsp_types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solidlsp/lsp_protocol_handler/lsp_types.py b/src/solidlsp/lsp_protocol_handler/lsp_types.py index ffb6135e..c96f5fce 100644 --- a/src/solidlsp/lsp_protocol_handler/lsp_types.py +++ b/src/solidlsp/lsp_protocol_handler/lsp_types.py @@ -2456,8 +2456,8 @@ class DocumentSymbol(TypedDict): selectionRange: "Range" """ The range that should be selected and revealed when this symbol is being picked, e.g the name of a function. Must be contained by the `range`. """ - - # TODO: I think this type is missing the 'children' field - DJ + children: NotRequired[list["DocumentSymbol"]] + """ Children of this symbol, e.g. properties of a class. """ class DocumentSymbolRegistrationOptions(TypedDict):