mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-15 09:50:04 -04:00
Python: highlight future import (#2936)
* Python: highlight future import * Use constant.builtin
This commit is contained in:
parent
4d53ee5c05
commit
f1373051e5
2 changed files with 5 additions and 0 deletions
|
|
@ -224,6 +224,7 @@
|
||||||
] @keyword.return
|
] @keyword.return
|
||||||
(yield "from" @keyword.return)
|
(yield "from" @keyword.return)
|
||||||
|
|
||||||
|
(future_import_statement "from" @include "__future__" @constant.builtin)
|
||||||
(import_from_statement "from" @include)
|
(import_from_statement "from" @include)
|
||||||
"import" @include
|
"import" @include
|
||||||
|
|
||||||
|
|
|
||||||
4
tests/query/highlights/python/future_import.py
Normal file
4
tests/query/highlights/python/future_import.py
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
from __future__ import print_function
|
||||||
|
# ^ @include
|
||||||
|
# ^ @constant.builtin
|
||||||
|
# ^ @include
|
||||||
Loading…
Add table
Add a link
Reference in a new issue