diff options
| author | Stefan Wienert <info@stefanwienert.de> | 2021-07-10 17:36:49 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-11-30 23:40:49 +0100 |
| commit | dec2ba27a8a64ac2e3e65d961561893052e36782 (patch) | |
| tree | cda7efc6cf360d3701ddbd82545bfabda62a464a /queries | |
| parent | 81d4077fa0f414464bcb2aaff24a45e5da9c697f (diff) | |
Feat: Added Pug parser with inital queries
Diffstat (limited to 'queries')
| -rw-r--r-- | queries/pug/highlights.scm | 27 | ||||
| -rw-r--r-- | queries/pug/injections.scm | 7 | ||||
| -rw-r--r-- | queries/vue/injections.scm | 9 |
3 files changed, 43 insertions, 0 deletions
diff --git a/queries/pug/highlights.scm b/queries/pug/highlights.scm new file mode 100644 index 00000000..ba57b51d --- /dev/null +++ b/queries/pug/highlights.scm @@ -0,0 +1,27 @@ +(comment) @comment +(tag_name) @tag +( + (tag_name) @constant.builtin + ; https://www.script-example.com/html-tag-liste + (#any-of? @constant.builtin + "head" "title" "base" "link" "meta" "style" + "body" "article" "section" "nav" "aside" "h1" "h2" "h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address" + "p" "hr" "pre" "blockquote" "ol" "ul" "menu" "li" "dl" "dt" "dd" "figure" "figcaption" "main" "div" + "a" "em" "strong" "small" "s" "cite" "q" "dfn" "abbr" "ruby" "rt" "rp" "data" "time" "code" "var" "samp" "kbd" "sub" "sup" "i" "b" "u" "mark" "bdi" "bdo" "span" "br" "wbr" + "ins" "del" + "picture" "source" "img" "iframe" "embed" "object" "param" "video" "audio" "track" "map" "area" + "table" "caption" "colgroup" "col" "tbody" "thead" "tfoot" "tr" "td" "th " + "form" "label" "input" "button" "select" "datalist" "optgroup" "option" "textarea" "output" "progress" "meter" "fieldset" "legend" + "details" "summary" "dialog" + "script" "noscript" "template" "slot" "canvas") +) +(content) @none +(quoted_attribute_value) @string +(id) @constant +(class) @constant +(attribute_name) @symbol +( + (attribute_name ) @keyword + (#match? @keyword "^(:|v-bind|v-|\\@)") +) @keyword + diff --git a/queries/pug/injections.scm b/queries/pug/injections.scm new file mode 100644 index 00000000..02774440 --- /dev/null +++ b/queries/pug/injections.scm @@ -0,0 +1,7 @@ +(javascript) @javascript + +( + (attribute_name) @_attribute_name + (quoted_attribute_value (attribute_value ) @javascript) + (#match? @_attribute_name "^(:|v-bind|v-|\\@)") +) diff --git a/queries/vue/injections.scm b/queries/vue/injections.scm index 4d372da3..346019c1 100644 --- a/queries/vue/injections.scm +++ b/queries/vue/injections.scm @@ -25,4 +25,13 @@ (quoted_attribute_value (attribute_value) @javascript))) +( + (template_element + (start_tag + (attribute + (quoted_attribute_value (attribute_value) @_lang))) + (raw_text) @pug) + (#match? @_lang "pug") +) + (comment) @comment |
