Skip to content

Commit eb5dbc1

Browse files
committed
fix(rust): more ast nodes can be used in postfix
1 parent b65f7ff commit eb5dbc1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/luasnip-snippets/snippets/rust/postfix.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ local expr_query = [[
99
(call_expression)
1010
(identifier)
1111
(field_expression)
12+
(integer_literal)
13+
(string_literal)
1214
] @prefix
1315
]]
1416

@@ -18,7 +20,10 @@ local expr_or_type_query = [[
1820
(call_expression)
1921
(identifier)
2022
(field_expression)
23+
(integer_literal)
24+
(string_literal)
2125
26+
(type_identifier)
2227
(generic_type)
2328
(scoped_type_identifier)
2429
(reference_type)
@@ -30,6 +35,8 @@ local expr_node_types = {
3035
["call_expression"] = true,
3136
["identifier"] = true,
3237
["field_expression"] = true,
38+
["integer_literal"] = true,
39+
["string_literal"] = true,
3340
}
3441

3542
---@param trig string

0 commit comments

Comments
 (0)