From 7fdd01f3aa1d72ec326dbf98a5a3f525dfb78991 Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Thu, 20 Jul 2023 09:41:58 +0200 Subject: [PATCH] Generate namespace semantic tokens for submodules --- .../pyright-internal/src/analyzer/semanticTokensWalker.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/pyright-internal/src/analyzer/semanticTokensWalker.ts b/packages/pyright-internal/src/analyzer/semanticTokensWalker.ts index ec98ec6f11dd..e543b455ed54 100644 --- a/packages/pyright-internal/src/analyzer/semanticTokensWalker.ts +++ b/packages/pyright-internal/src/analyzer/semanticTokensWalker.ts @@ -84,6 +84,10 @@ export class SemanticTokensWalker extends ParseTreeWalker { this._addItem(node.memberName.start, node.memberName.length, SemanticTokenTypes.class, []); break; } + + case TypeCategory.Module: + this._addItem(node.memberName.start, node.memberName.length, SemanticTokenTypes.namespace, []); + break; // fallthrough default: