Nemantix Syntax Highlighter
Syntax highlight support for the Nemantix language in VS Code.
Example script:
@completion: frozen
action preprocess_ticket >> clean the ticket text and extract key signals for downstream steps. <<:
in:
raw_ticket (required) >> raw support ticket text <<
__in
out:
structured_ticket >> structured record with cleaned text, language, and content <<
__out
body:
[ [text] = [raw_ticket] ?? "Ticket-XYZ <no_content>" ]
[ [prefix_size] = size("Ticket") + 1]
do llm using ["Provide the language of the ticket: " | [text]]
producing [[lang]]
do llm using ["Extract the ticket content: " | [text]]
producing [[content]]
[ [structured_ticket] = (
"code": substring([text], [prefix_size], [prefix_size] + 3),
"lang": [lang],
"content": [content]
)]
return [structured_ticket]
__body
__action
{my_label}
@breakdown: true
deliberate GenerateTicket when >>> create a new ticket for the user support <<<:
guidelines:
>>> Given a description of an issue, generate a ticket:
- format: Ticket-XXX, where XXX is the code
- fields: name, code, lang, and issue.
<<<
__
@completion: _->frozen
plan:
in:
error_code (required) >> short error code or identifier, non-empty
description (required) >> human-readable problem description
user_id (default [1]) >> reporter identifier if available
__in
out:
ticket >> structured ticket payload <<
__out
body:
>> ticket generation code <<
@breakpoint
do action preprocess_ticket using [[raw_ticket]] producing [[ticket]]
return [[ticket]]
__
__plan
__deliberate
Code snippets
The extension supports code snippets for the main blocks of the language:
action name >> microprompt <<:
body:
__body
__action
- Deliberate block (type
del):
deliberate name when >> microprompt <<:
plan:
body:
__body
__plan
__deliberate
- Guidelines block (type
guide), to be used within a deliberate:
guidelines:
>>> description <<<
__guidelines