add support for custom tags and filters

This commit is contained in:
danhanson committed 2026-09-07 14:24:25 -05:00
1 parent 10e52ace5d
commit eb81b73104
7 files changed
+29218 -28775

No files matched your search

+31 -32
View File
@@ -25,6 +25,7 @@ variable: (identifier) @variable.parameter
("in")
("=")
("|")
(":")
(".")] @operator
[
@@ -90,74 +91,72 @@ tag: [
("with")
("endwith")] @function
(filter .
[
("add:")
(filter
name: [
("add")
("addslashes")
("capfirst")
("center:")
("cut:")
("center")
("cut")
("date")
("date:")
("default:")
("default_if_none:")
("dictsort:")
("dictsortreversed:")
("divisibleby:")
("default")
("default_if_none")
("dictsort")
("dictsortreversed")
("divisibleby")
("escape")
("escapejs")
("escapeseq")
("filesizeformat")
("first")
("floatformat")
("floatformat:")
("force_escape")
("get_digit:")
("get_digit")
("iriencode")
("join:")
("join")
("json_script")
("json_script:")
("last")
("length")
("linebreaks")
("linebreaksbr")
("linenumbers")
("ljust:")
("ljust")
("lower")
("make_list")
("phone2numeric")
("pluralize")
("pluralize:")
("pprint")
("random")
("rjust:")
("rjust")
("safe")
("safeseq")
("slice:")
("slice")
("slugify")
("stringformat:")
("stringformat")
("striptags")
("time")
("time:")
("timesince")
("timesince:")
("timeuntil")
("timeuntil:")
("title")
("truncatechars:")
("truncatechars_html:")
("truncatewords:")
("truncatewords_html:")
("truncatechars")
("truncatechars_html")
("truncatewords")
("truncatewords_html")
("unordered_list")
("upper")
("urlencode")
("urlencode:")
("urlize")
("urlizetrunc:")
("urlizetrunc")
("wordcount")
("wordwrap:")
("yesno")
("yesno:")] @function)
("wordwrap")
("yesno")] @function)
; a filter or tag a "load" brought in, whose name the grammar does not know
(filter
name: (identifier) @function.call)
(custom_tag
tag: (identifier) @function.call)
(load
(identifier) @function)