We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eccb661 commit 52c82f6Copy full SHA for 52c82f6
lua/debugprint/utils.lua
@@ -27,6 +27,7 @@ M.find_treesitter_variable = function()
27
return nil
28
else
29
local node_type = node:type()
30
+ local parent_node_type = node:parent():type()
31
32
local variable_name
33
@@ -41,10 +42,12 @@ M.find_treesitter_variable = function()
41
42
-- lua, typescript -> identifier
43
-- sh -> variable_name
44
-- typescript -> shorthand_property_identifier_pattern (see issue #60)
45
+ -- Makefile -> variable_reference
46
if
47
node_type == "identifier"
48
or node_type == "variable_name"
49
or node_type == "shorthand_property_identifier_pattern"
50
+ or parent_node_type == "variable_reference"
51
then
52
return variable_name
53
0 commit comments