htmldjango highlight changes, ruff args, lsp zero config

This commit is contained in:
2023-02-06 07:07:52 -06:00
parent 167589deb1
commit da374365c8
7 changed files with 462 additions and 475 deletions
+5 -70
View File
@@ -3,77 +3,16 @@
;[
; "<"
; "/>"
; ">"
; "</"
; "/>"
;] @punctuation.bracket
;] @constant
(doctype) @comment
((tag_name) @type (#match? @type "^(head|body)$"))
((tag_name) @comment (#eq? @comment "html"))
;(element (start_tag ((tag_name) @function) (#eq? @function "template")))
;(element (end_tag ((tag_name) @function) (#eq? @function "template")))
;(attribute_name) @constant
;(element
; (start_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @_alpine))
; (end_tag ((tag_name) @function))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (start_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @_alpine))
; (end_tag ((tag_name) @function))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (self_closing_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^[@:]%l+.-$"))
;
;(element
; (self_closing_tag
; ((tag_name) @function)
; (attribute (attribute_name) @_alpine))
; (#lua-match? @_alpine "^x[-]%l+$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^[@:]%l+.-$"))
;
;(element
; (start_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^x[-]%l+$"))
;
;(element
; (self_closing_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^[@:]%l+.-$"))
;
;(element
; (self_closing_tag
; (attribute (attribute_name) @parameter))
; (#lua-match? @parameter "^x[-]%l+$"))
((attribute_name) @parameter
(#lua-match? @parameter "^up[-]%l+$"))
((attribute_name) @parameter
(#lua-match? @parameter "^x[-]%l+$"))
@@ -81,6 +20,7 @@
((attribute_name) @parameter
(#lua-match? @parameter "^[@:]%l+.-$"))
; colors regular variables in strings with tokyonight theme
((attribute
(attribute_name) @_alpine
(quoted_attribute_value (attribute_value) @operator))
@@ -90,8 +30,3 @@
(attribute_name) @_alpine
(quoted_attribute_value (attribute_value) @operator))
(#lua-match? @_alpine "^x[-]%l+$"))
[
"endfor"
"endif"
] @keyword
+7 -7
View File
@@ -11,11 +11,11 @@
(script_element
(raw_text) @javascript)
((text) @htmldjango (#lua-match? @htmldjango "^{%p%s+%l+.-%s+%p}$"))
((text) @htmldjango (#lua-match? @htmldjango "^{{%s+.-%s+}}$"))
((attribute
(quoted_attribute_value (attribute_value) @htmldjango))
(#lua-match? @htmldjango "^{{%s+.-%s+}}$"))
;((text) @htmldjango (#lua-match? @htmldjango "^{%p%s+%l+.-%s+%p}$"))
;
;((text) @htmldjango (#lua-match? @htmldjango "^{{%s+.-%s+}}$"))
;
;((attribute
; (quoted_attribute_value (attribute_value) @htmldjango))
; (#lua-match? @htmldjango "^{{%s+.-%s+}}$"))