more stuff
This commit is contained in:
@@ -10,26 +10,30 @@
|
||||
"}}"
|
||||
] @comment
|
||||
|
||||
(django_empty_comment) @comment
|
||||
(string) @string
|
||||
|
||||
(integer) @number
|
||||
(float) @float
|
||||
|
||||
(true) @boolean
|
||||
(false) @boolean
|
||||
(none) @boolean
|
||||
|
||||
(identifier) @variable
|
||||
(attribute object: (primary_expression) @variable)
|
||||
(attribute attribute: (identifier) @property)
|
||||
|
||||
(tag_statement tag_name: (identifier) @keyword)
|
||||
(attribute object:
|
||||
(primary_expression) @variable)
|
||||
|
||||
(attribute attribute:
|
||||
(identifier) @property)
|
||||
|
||||
(tag_statement tag_name:
|
||||
(identifier) @function)
|
||||
|
||||
(tag_statement tag_argument:
|
||||
(keyword_argument keyword_name:
|
||||
((identifier) @parameter)))
|
||||
(keyword_argument keyword_name:
|
||||
((identifier) @parameter)))
|
||||
|
||||
(filter filter_name: ((identifier) @function))
|
||||
(filter filter_name:
|
||||
((identifier) @function))
|
||||
|
||||
[
|
||||
"for"
|
||||
@@ -39,6 +43,8 @@
|
||||
"and"
|
||||
"is"
|
||||
"as"
|
||||
"endfor"
|
||||
"endif"
|
||||
"else"
|
||||
"empty"
|
||||
] @keyword
|
||||
|
||||
;(content) @html
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
((content) @injection.content
|
||||
(#set! injection.language "html")
|
||||
(#set! injection.combined))
|
||||
@@ -1,18 +1,15 @@
|
||||
(type (string (string_content) @python))
|
||||
|
||||
(type (subscript (string (string_content) @python)))
|
||||
|
||||
((assignment
|
||||
(type
|
||||
(identifier) @_type)
|
||||
(string
|
||||
(string_content) @python))
|
||||
(type (identifier) @_type)
|
||||
(string (string_content) @python))
|
||||
(#eq? @_type "TypeAlias"))
|
||||
|
||||
((assignment
|
||||
(type
|
||||
(string
|
||||
(string_content) @_type))
|
||||
(string
|
||||
(string_content) @python))
|
||||
(type (string (string_content) @_type))
|
||||
(string (string_content) @python))
|
||||
(#eq? @_type "TypeAlias"))
|
||||
|
||||
(class_definition
|
||||
@@ -23,3 +20,18 @@
|
||||
|
||||
(((string (string_content) @python) @_str)
|
||||
(#match? @_str "^r.*$"))
|
||||
|
||||
((call
|
||||
(identifier) @_function
|
||||
(argument_list
|
||||
(string
|
||||
(string_content) @python)))
|
||||
(#any-of? @_function "cast" "NewType" "TypeVar" "TypedDict"))
|
||||
|
||||
; Too slow
|
||||
;((call
|
||||
; (identifier) @_function
|
||||
; (argument_list
|
||||
; (string
|
||||
; (string_content) @htmldjango)))
|
||||
;(#eq? @_function "Template"))
|
||||
|
||||
Reference in New Issue
Block a user