aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/highlight_spec.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-08-12 17:54:04 +0200
committerChristian Clason <c.clason@uni-graz.at>2023-08-14 00:14:35 +0200
commitfc0ee871de2f56dbb80879c912203a6372c54e1c (patch)
treeeb944a971daffb45b996d9f9083bfa0b40b43a39 /test/functional/treesitter/highlight_spec.lua
parent006152ff7aa6af65a90c1f52962447ffca848dee (diff)
downloadrneovim-fc0ee871de2f56dbb80879c912203a6372c54e1c.tar.gz
rneovim-fc0ee871de2f56dbb80879c912203a6372c54e1c.tar.bz2
rneovim-fc0ee871de2f56dbb80879c912203a6372c54e1c.zip
fix(treesitter)!: remove deprecated legacy injection format
Diffstat (limited to 'test/functional/treesitter/highlight_spec.lua')
-rw-r--r--test/functional/treesitter/highlight_spec.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua
index c88c5cd3e5..0528370e2a 100644
--- a/test/functional/treesitter/highlight_spec.lua
+++ b/test/functional/treesitter/highlight_spec.lua
@@ -442,7 +442,7 @@ describe('treesitter highlighting (C)', function()
exec_lua [[
local parser = vim.treesitter.get_parser(0, "c", {
- injections = {c = "(preproc_def (preproc_arg) @c) (preproc_function_def value: (preproc_arg) @c)"}
+ injections = {c = '(preproc_def (preproc_arg) @injection.content (#set! injection.language "c")) (preproc_function_def value: (preproc_arg) @injection.content (#set! injection.language "c"))'}
})
local highlighter = vim.treesitter.highlighter
test_hl = highlighter.new(parser, {queries = {c = hl_query}})
@@ -480,7 +480,7 @@ describe('treesitter highlighting (C)', function()
]])
exec_lua [[
- local injection_query = "(preproc_def (preproc_arg) @c) (preproc_function_def value: (preproc_arg) @c)"
+ local injection_query = '(preproc_def (preproc_arg) @injection.content (#set! injection.language "c")) (preproc_function_def value: (preproc_arg) @injection.content (#set! injection.language "c"))'
vim.treesitter.query.set("c", "highlights", hl_query)
vim.treesitter.query.set("c", "injections", injection_query)