From 9640c739da4c274edce2d195fd81bb0dfe693de7 Mon Sep 17 00:00:00 2001 From: Baptiste Bourdet Date: Sun, 3 Dec 2023 21:59:45 +0100 Subject: [PATCH 1/2] docs(README): add combined injections --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b094abf..aa57a28 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ I've stopped using helm (which I mostly written this package for) on a daily basis, so I don't really keep up with the development of tree sitter, and nvim-tree-sitter. So this project won't receive any attention from me in the near future. -If you are interested in mainaining the project, feel free to fork the repo, and if the fork is maintained I will gladly delegate you this repository or link it. +If you are interested in maintaining the project, feel free to fork the repo, and if the fork is maintained I will gladly delegate you this repository or link it. # tree-sitter-go-template @@ -35,7 +35,14 @@ If you are interested in mainaining the project, feel free to fork the repo, and ```vimscript autocmd BufNewFile,BufRead * if search('{{.\+}}', 'nw') | setlocal filetype=gotmpl | endif ``` -* Define language injection for yaml in ~/.config/nvim/queries/gotmpl/injections.scm: +* Define language injection for yaml in `~/.config/nvim/queries/gotmpl/injections.scm`: + ```scheme + ((text) @injection.content + (#set! injection.language "yaml") + (#set! injection.combined)) + ``` + If you are experimenting issue with the `combined` feature you can try to + disable it and use only the following: ```scheme (text) @yaml ``` From 1ff98a3d36858b1b301ae994d591f3dd462fb702 Mon Sep 17 00:00:00 2001 From: Baptiste Bourdet Date: Sun, 3 Dec 2023 22:04:29 +0100 Subject: [PATCH 2/2] feat(queries): add injection file --- queries/injections.scm | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 queries/injections.scm diff --git a/queries/injections.scm b/queries/injections.scm new file mode 100644 index 0000000..4a562ee --- /dev/null +++ b/queries/injections.scm @@ -0,0 +1,3 @@ +((text) @injection.content + (#set! injection.language "yaml") + (#set! injection.combined))