v1.5.5
This release fixes editor highlighting for comments and multiline @match values.
Comment highlighting
Resterm supports four comment forms in .http and .rest files.
# Hash comment
// Slash comment
-- Dash comment
/*
* Block comment
*/These already worked in request files. The editor now highlights all of them consistently, including the comment text. Directives inside comments keep their directive and value colours.
/*
* @name health
*/
GET https://api.example.com/healthHighlighting now follows the same context rules as the parser. A comment marker is coloured as an .http comment only where Resterm treats the line as a comment.
In a mock response body, a leading comment marker is response data:
# @mock method=GET path=/message
HTTP/1.1 200 OK
Content-Type: text/plain
# This line is part of the response body.Inside a script block, comments belong to the script language. They are not .http comments:
GET https://api.example.com/items
> {%
// This is a JavaScript comment.
%}The // still starts a JavaScript comment, but it does not use Resterm's .http comment highlighting.
The same context rule applies to multipart requests. Lines between multipart boundaries are part data, even when they begin with a comment marker. Boundary lines such as --B are boundaries, not dash comments.
POST https://api.example.com/upload
Content-Type: multipart/form-data; boundary=B
--B
Content-Disposition: form-data; name="message"
# This line is part data.
--B--Multiline directives inside block comments are also highlighted across their continuation lines:
/*
* @assert (
* response.statusCode == 200
* )
*/
GET https://api.example.com/healthMultiline @match values
Quoted and bracketed @match option values now keep the option value color until their closing delimiter. Options that follow the closing delimiter are highlighted normally.
# @match json={"env":"dev",
# "region":"eu"} query={"page":"2"}On the second line, "region":"eu"} remains part of the json value. query uses the option key color, and {"page":"2"} uses the option-value color.
Header
The header now shows a workspace label before the workspace name when space allows. On narrow terminals, the label is hidden while the workspace name remains visible.
The selected request now uses a simpler > marker and is omitted when no request is selected.
Theme settings
This release does not require theme changes. The existing settings apply:
editor_metadata.comment_markercontrols.httpcomment markers and text.editor_metadata.directive_defaultandeditor_metadata.directive_colorscontrol directive names.editor_metadata.setting_keycontrols option keys.editor_metadata.setting_valuecontrols option values, including multiline values.editor_metadata.valuecontrols other directive values and positional fields.
Settings that are not present in a custom theme continue to use their default values.