From 9337acfb571188943c5bab9be83c4d29c3e8e0e8 Mon Sep 17 00:00:00 2001 From: Giovanni Smecca Date: Thu, 9 May 2024 13:23:38 -0500 Subject: [PATCH] fix(treesitter): Update string_value to string_content (#9) Update the Treesitter queries to use string_content instead of string_value to capture the content inside string literals, excluding the surrounding quotes. This change is made to adapt to the updates in nvim-treesitter and ensure compatibility with the latest version. Resolves #7 --- lua/neotest-pest/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/neotest-pest/init.lua b/lua/neotest-pest/init.lua index 87cffea..0aaf7ee 100644 --- a/lua/neotest-pest/init.lua +++ b/lua/neotest-pest/init.lua @@ -76,13 +76,13 @@ function NeotestAdapter.discover_positions(path) ((expression_statement (member_call_expression name: (name) @member_name (#eq? @member_name "group") - arguments: (arguments . (argument (string (string_value) @namespace.name))) + arguments: (arguments . (argument (string (string_content) @namespace.name))) ) @member )) @namespace.definition ((function_call_expression function: (name) @func_name (#match? @func_name "^(test|it)$") - arguments: (arguments . (argument (string (string_value) @test.name))) + arguments: (arguments . (argument (string (string_content) @test.name))) )) @test.definition ]]