mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
Introduce @include
This commit is contained in:
parent
57424533a7
commit
f6bf56974e
3 changed files with 5 additions and 3 deletions
|
|
@ -79,6 +79,7 @@ are optional and will not have any effect for now.
|
||||||
`@operator`
|
`@operator`
|
||||||
`@keyword`
|
`@keyword`
|
||||||
`@exception`
|
`@exception`
|
||||||
|
`@include` keywords for including modules (e.g. import/from in Python)
|
||||||
|
|
||||||
`@type`
|
`@type`
|
||||||
`builtin`
|
`builtin`
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ hlmap["exception"] = "Exception"
|
||||||
hlmap["type"] = "Type"
|
hlmap["type"] = "Type"
|
||||||
hlmap["type.builtin"] = "Type"
|
hlmap["type.builtin"] = "Type"
|
||||||
hlmap["structure"] = "Structure"
|
hlmap["structure"] = "Structure"
|
||||||
|
hlmap["include"] = "Include"
|
||||||
|
|
||||||
function M.attach(bufnr, ft)
|
function M.attach(bufnr, ft)
|
||||||
local buf = bufnr or api.nvim_get_current_buf()
|
local buf = bufnr or api.nvim_get_current_buf()
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
; Keywords
|
; Keywords
|
||||||
|
|
||||||
"as" @keyword
|
"as" @include
|
||||||
"assert" @keyword
|
"assert" @keyword
|
||||||
"async" @keyword
|
"async" @keyword
|
||||||
"await" @keyword
|
"await" @keyword
|
||||||
|
|
@ -118,10 +118,10 @@
|
||||||
"exec" @keyword
|
"exec" @keyword
|
||||||
"finally" @keyword
|
"finally" @keyword
|
||||||
"for" @repeat
|
"for" @repeat
|
||||||
"from" @keyword
|
"from" @include
|
||||||
"global" @keyword
|
"global" @keyword
|
||||||
"if" @conditional
|
"if" @conditional
|
||||||
"import" @keyword
|
"import" @include
|
||||||
"lambda" @keyword
|
"lambda" @keyword
|
||||||
"nonlocal" @keyword
|
"nonlocal" @keyword
|
||||||
"pass" @keyword
|
"pass" @keyword
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue