diff --git a/.config/nvim/after/queries/html/injections.scm b/.config/nvim/after/queries/html/injections.scm new file mode 100644 index 0000000..e183fb0 --- /dev/null +++ b/.config/nvim/after/queries/html/injections.scm @@ -0,0 +1,36 @@ +;; extends + +; AlpineJS attributes +(attribute + (attribute_name) @_attr + (#lua-match? @_attr "^x%-%l") + (#not-any-of? @_attr "x-teleport" "x-ref" "x-transition") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "javascript")) + +; Blade escaped JS attributes +; +(element + (_ + (tag_name) @_tag + (#lua-match? @_tag "^x%-%l") + (attribute + (attribute_name) @_attr + (#lua-match? @_attr "^::%l") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "javascript")))) + +; Blade PHP attributes +; +(element + (_ + (tag_name) @_tag + (#lua-match? @_tag "^x%-%l") + (attribute + (attribute_name) @_attr + (#lua-match? @_attr "^:%l") + (quoted_attribute_value + (attribute_value) @injection.content) + (#set! injection.language "php_only")))) diff --git a/.config/nvim/after/queries/php/indents.scm b/.config/nvim/after/queries/php/indents.scm new file mode 100644 index 0000000..b2044f3 --- /dev/null +++ b/.config/nvim/after/queries/php/indents.scm @@ -0,0 +1,10 @@ +;; extends + +[ + ; prevent double indent for `return new class ...` + (return_statement + (object_creation_expression)) + ; prevent double indent for `return function() { ... }` + (return_statement + (anonymous_function_creation_expression)) +] @indent.dedent diff --git a/.config/nvim/queries/blade/folds.scm b/.config/nvim/queries/blade/folds.scm new file mode 100644 index 0000000..0705d92 --- /dev/null +++ b/.config/nvim/queries/blade/folds.scm @@ -0,0 +1,8 @@ +((directive_start) @start + (directive_end) @end.after + (#set! role block)) + + +((bracket_start) @start + (bracket_end) @end + (#set! role block)) diff --git a/.config/nvim/queries/blade/highlights.scm b/.config/nvim/queries/blade/highlights.scm new file mode 100644 index 0000000..2c9c2cd --- /dev/null +++ b/.config/nvim/queries/blade/highlights.scm @@ -0,0 +1,4 @@ +(directive) @tag +(directive_start) @tag +(directive_end) @tag +(comment) @comment @spell diff --git a/.config/nvim/queries/blade/injections.scm b/.config/nvim/queries/blade/injections.scm new file mode 100644 index 0000000..bd3ead0 --- /dev/null +++ b/.config/nvim/queries/blade/injections.scm @@ -0,0 +1,15 @@ +((text) @injection.content + (#not-has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language php)) + +((text) @injection.content + (#has-ancestor? @injection.content "envoy") + (#set! injection.combined) + (#set! injection.language bash)) + +((php_only) @injection.content + (#set! injection.combined) + (#set! injection.language php_only)) +((parameter) @injection.content + (#set! injection.language php_only)) diff --git a/.gitignore b/.gitignore index bba3fe8..517a9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,5 @@ hackin/ .config/Thunar/ .config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml .config/composer/vendor/ +go/pkg +.config/systemd/