We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7dbcff4 commit e811865Copy full SHA for e811865
lua/debugprint/utils.lua
@@ -38,9 +38,14 @@ M.find_treesitter_variable = function()
38
variable_name = vim.treesitter.query.get_node_text(node, 0)
39
end
40
41
- -- lua -> identifier
42
- -- sh -> variable_name
43
- if node_type == "identifier" or node_type == "variable_name" then
+ -- lua, typescript -> identifier
+ -- sh -> variable_name
+ -- typescript -> shorthand_property_identifier_pattern (see issue #60)
44
+ if
45
+ node_type == "identifier"
46
+ or node_type == "variable_name"
47
+ or node_type == "shorthand_property_identifier_pattern"
48
+ then
49
return variable_name
50
else
51
return nil
0 commit comments