Skip to content

Commit fed6d4a

Browse files
fix(parser): handle reqeust name from comment
1 parent cbe31e7 commit fed6d4a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lua/rest-nvim/parser/init.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ function M.parse(node, source, context)
280280
table.insert(handlers, M.parse_request_handler(child, source, context))
281281
elseif node_type == "request_separator" then
282282
name = get_node_field_text(child, "value", source)
283+
elseif node_type == "comment" and get_node_field_text(child, "name", source) == "name" then
284+
name = get_node_field_text(child, "value", source) or name
283285
end
284286
end
285287

0 commit comments

Comments
 (0)