Python: base type inside a multi level type square bracket is detected as variable #1899
Open
3 tasks done
Labels
bug
Something isn't working
Before reporting
:TSUpdate
Describe the bug
Any base type (
str
,int
, etc) used inside a multi-level type declaration is detected as a variable, not as a type.To Reproduce
Given the following code snippet:
The
str
atparam_1
andint
atparam_2
are highlighted as types, but thestr
atparam_3
andint
atparam_4
aren't.Expected behavior
I would expect all the occurrences of a base type inside a type definition to have the same highlight group.
Output of
:checkhealth nvim_treesitter
Output of
nvim --version
Additional context
Using the
:TSHighlightCapturesUnderCursor
command I got:str
fromparam_1
:str
fromparam_2
the same:str
fromparam_3
we see it's missing@type
:str
fromparam_4
:This issue was originally created at tree-sitter/tree-sitter-python#110 and moved here as suggested by @stsewd
The text was updated successfully, but these errors were encountered: