Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(README): add combined injections #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
```
Expand Down
3 changes: 3 additions & 0 deletions queries/injections.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
((text) @injection.content
(#set! injection.language "yaml")
(#set! injection.combined))