Skip to content

Commit

Permalink
fix duplicated semantic token for decorators which caused them to not…
Browse files Browse the repository at this point in the history
… get highlighted as decorators in neovim
  • Loading branch information
DetachHead committed Dec 4, 2024
1 parent d77f150 commit 7445306
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ export class SemanticTokensWalker extends ParseTreeWalker {
}

override visitName(node: NameNode): boolean {
this._visitNameWithType(node, this._evaluator?.getType(node));
// covered by visitDecorator
if (node.parent?.nodeType !== ParseNodeType.Decorator) {
this._visitNameWithType(node, this._evaluator?.getType(node));
}
return super.visitName(node);
}

Expand Down

0 comments on commit 7445306

Please sign in to comment.