diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-07-18 17:38:19 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-18 17:46:01 +0200 |
| commit | 35fa869b538a933c41dc4a122edaeab52e912eb3 (patch) | |
| tree | a40fe47f9defc7778e824c150f9c25721de7f857 | |
| parent | bot(lockfile): update djot, fortran, scala (diff) | |
| download | nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar.gz nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar.bz2 nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar.lz nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar.xz nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.tar.zst nvim-treesitter-35fa869b538a933c41dc4a122edaeab52e912eb3.zip | |
feat(latex): injections for luacode, asy{def} environments
| -rw-r--r-- | lockfile.json | 2 | ||||
| -rw-r--r-- | queries/latex/injections.scm | 19 |
2 files changed, 13 insertions, 8 deletions
diff --git a/lockfile.json b/lockfile.json index 3fd2bdb6f..04e483412 100644 --- a/lockfile.json +++ b/lockfile.json @@ -387,7 +387,7 @@ "revision": "854a40e99f7c70258e522bdb8ab584ede6196e2e" }, "latex": { - "revision": "08d8b885a3fa67a6e8aa8edd8988eaa55db46ba4" + "revision": "107435ada4c4c422ba4f951336b5e566b86ac3ca" }, "ledger": { "revision": "8a841fb20ce683bfbb3469e6ba67f2851cfdf94a" diff --git a/queries/latex/injections.scm b/queries/latex/injections.scm index c0dbdc0a6..53d808c1d 100644 --- a/queries/latex/injections.scm +++ b/queries/latex/injections.scm @@ -17,15 +17,20 @@ code: (source_code) @injection.content (#set! injection.language "python")) +(luacode_environment + code: (source_code) @injection.content + (#set! injection.language "lua")) + +(asy_environment + code: (source_code) @injection.content + (#set! injection.language "c")) + +(asydef_environment + code: (source_code) @injection.content + (#set! injection.language "c")) + (minted_environment (begin language: (curly_group_text (text) @injection.language)) (source_code) @injection.content) - -((generic_environment - (begin - name: (curly_group_text - (text) @_env))) @injection.content - (#set! injection.language "c") - (#any-of? @_env "asy" "asydef")) |
