Druim Language SupportOfficial Visual Studio Code language support for Druim, an actively developed programming language built around explicit structure, deterministic parsing, clear token boundaries, and intentional state semantics. This extension registers Druim as a language in Visual Studio Code and provides syntax highlighting, structural editing, completions, hover documentation, signature help, folding, navigation, snippets, comments, explicit conversion-expression support, and the included Druim color theme.
FeaturesLanguage RecognitionFiles ending in The extension registers the language ID:
Syntax HighlightingDruim syntax highlighting covers the language's major lexical and structural forms, including:
Structural EditingThe extension understands Druim's structural delimiters and assists with creating and removing them. Source BoundariesTyping:
in a file that does not yet contain a complete Druim source-boundary pair generates:
Three blank lines are created between the opening and closing boundaries, and the cursor is placed at column 0 of the middle blank line. Backspacing from that untouched generated position collapses the entire generated source scaffold back to:
Once a complete source-boundary pair exists, automatic comment construction only operates inside those boundaries. BoxesTyping:
creates an empty inline Box:
with the cursor inside the collection. Pressing Enter from the empty collection expands it:
Backspacing out of the untouched empty structure also removes the generated closing delimiter. BagsTyping:
creates:
Pressing Enter expands the empty Bag:
Backspacing out of the untouched empty structure removes the generated closing delimiter. FunctionsTyping a Druim function structural opener expands the function into Druim's parameter/body form:
The cursor is placed in the parameter section. Backspacing out of an untouched generated function removes the generated remainder of the function structure. LoopsTyping:
generates Druim's three-section loop structure:
The sections are:
Backspacing from the untouched first setup position removes the generated loop structure. BlocksTyping a block opener at the required structural position generates:
Block continuation uses:
A continuation remains part of the same lexical block scope rather than creating a nested block. CommentsDruim uses explicit opening and closing comment delimiters. Single-line comment:
Multiline comment:
The extension supports automatic comment construction and demotion between empty multiline and single-line forms. Automatic comment construction only operates inside an existing Druim source-boundary pair. Outside those bounds, Comments are not permitted inside function parameter lists or function call argument lists. The extension prevents comment construction in those regions, including through the standard comment command. The standard VS Code comment shortcut is supported:
through the command:
Code CompletionCompletion items are provided for:
Core functions insert a normal call form with the cursor inside the argument list. Hover DocumentationHovering Druim syntax displays contextual documentation. Richer hover documentation is currently available for conversion expressions, Core functions, traversal syntax, user-defined functions, parameters, and bindings, including relevant information such as:
Signature HelpSignature help is available while writing:
Core function signature help includes parameter descriptions, return information, behavioral notes, and examples. Go to DefinitionCtrl+Click / Go to Definition supports:
Resolution accounts for Druim scope behavior rather than treating every matching identifier as a global symbol. FoldingFolding is supported for Druim structures including:
Druim ThemeThe extension includes the Druim dark color theme. It is designed around the language's syntax categories, including distinct treatment for built-in Core functions. To enable it:
Druim Language Quick ReferenceDruim is under active development. This section documents the currently established syntax represented by the language tooling. Source BoundaryA complete Druim source file is bounded by:
The same token opens and closes the source. In the VS Code extension, typing Statement TerminatorStatements use:
Example:
Bindings and StateDefine —
|
| Type | Meaning |
|---|---|
num |
Whole-number numeric type |
dec |
Decimal numeric type |
flag |
Boolean flag type |
text |
Text value type |
void |
Absence of a value |
Explicit Type Conversion Expressions
Druim provides four dedicated conversion expressions:
num(expression)
dec(expression)
text(expression)
flag(expression)
These are language-level conversion expressions, not Core functions.
void(...) is invalid.
Druim does not perform implicit coercion. Conversion is explicit, and converting a value to its existing type returns the value unchanged.
num(expression)
Converts a supported value to num.
When converting a dec, Druim rounds to the nearest integer. Exact .5 ties round away from zero.
Numeric text must be strict: an optional sign, at least one digit, and no surrounding whitespace, exponent notation, or partial parsing.
dec(expression)
Converts a supported value to dec.
Decimal text must be strict: an optional sign, at least one digit, and an optional decimal point followed by at least one digit.
text(expression)
Converts a supported value to its canonical Druim text representation.
void converts to:
void
flag(expression)
Converts a supported value to its canonical truth value.
void converts to:
false
Boxes and Bags may be converted to flag.
Function values and Core functions are rejected as conversion inputs.
void cannot be converted to num or dec.
Flag Literals
true
false
Numeric Literals
Whole numbers:
0
42
123
Decimals require digits on both sides of the decimal point:
0.5
12.34
1.0
Forms such as these are not valid decimal literals:
.5
1.
1..2
Text Literals
Text literals use double quotes:
message = "Hello, Druim";
Text Interpolation
A Druim expression can be embedded into text using:
:. expression .:
Example form:
message = "Value: :. value .:";
Identifiers
Druim identifiers may contain ASCII letters, digits, and underscores.
Unlike many languages, an identifier may begin with a digit as long as the complete identifier contains at least one non-digit character.
Valid forms include:
value
value2
1value
9lives
123abc
123_456
_thing
An all-digit sequence is a numeric literal rather than an identifier:
123
Structures
Blocks
A block uses:
:{
}:
A continuation uses:
}{
Example shape:
:{
first = 1;
}{
second = 2;
}:
}{ continues the same lexical block scope.
Nested blocks are not part of the current canonical block model.
Loops
A loop has exactly three structural sections:
:<
setup
>?<
condition
>?<
process
>:
The separators are:
>?<
Functions
A function declaration uses:
fn name :(parameters)(
body
):
Example:
fn double :(value)(
ret value * 2;
):
Parameters are parameter forms, not restricted to bare identifiers; parameter defaults are supported by the language model.
Comments are not permitted anywhere inside a function parameter list. From the opening :( through the parameter-closing )(, neither single-line (:- ... -:) nor multiline (:-- ... --:) comment syntax is valid.
Return
Use:
ret expression;
inside a function.
Function Calls
A function call uses:
name(arguments)
Comments are not permitted anywhere inside a function call argument list. From the opening ( through its matching ), neither single-line (:- ... -:) nor multiline (:-- ... --:) comment syntax is valid.
Boxes
A Box is an ordered collection:
values = :[
10,
20,
30
]:;
Boxes use indexed traversal.
Indexes are zero-based.
Bags
A Bag is a named collection:
player = :|
name: "Aryn",
score: 10
|:;
Bags use named traversal.
Traversal
Druim distinguishes retrieval from existence testing.
Get — ::
Retrieves a member from a traversable value.
Bag member
player::name
Box index
values::[0]
Text index
word::[0]
For a valid selector whose member does not exist, Get evaluates to:
void
Get may be chained when the retrieved value is itself traversable.
Example:
player::inventory::[0]
Has — :?
Tests whether a valid member exists and returns a flag.
Named member
player:?name
Indexed member
values:?[0]
Text index
word:?[0]
A valid missing member or out-of-range index returns:
false
Has is terminal because its result is a flag.
It may follow a Get traversal:
player::inventory:?[2]
Indexed Selectors
Indexed traversal uses:
[index]
The index must be a non-negative num.
Boxes and text support indexed selectors.
Bags do not.
Text indexing is character-based rather than byte-based.
Invalid selector forms produce a diagnostic rather than being treated as a normal missing member.
Core Functions
Core functions are callable operations supplied directly by Druim.
rise(text)
Converts all characters in a text value to uppercase.
result = rise("Druim");
Result:
DRUIM
fall(text)
Converts all characters in a text value to lowercase.
result = fall("Druim");
Result:
druim
cap(text)
Uppercases the first Unicode character of a text value and leaves the remainder unchanged.
result = cap("druim");
Result:
Druim
An empty text value remains empty.
cut(text, start, [end])
Returns a substring of a text value.
startis inclusive.endis optional.endis exclusive.
Example:
result = cut("Druim", 1, 4);
Result:
rui
size(text)
Returns the character count of a text value.
result = size("Druim");
Result:
5
Text length is based on characters rather than raw byte length.
fuse(text, text, ...)
Concatenates two or more text values.
result = fuse("Dru", "im");
Result:
Druim
fuse requires at least two text arguments.
Text concatenation is intentionally handled by fuse; arithmetic + is not the text concatenation operator.
Operators
Arithmetic
+ addition
- subtraction / unary negation where valid
* multiplication
/ division
% modulo
+ is arithmetic-only.
Comparison
== equal
!= not equal
< less than
<= less than or equal
> greater than
>= greater than or equal
Logical
&& logical AND
|| logical OR
! logical NOT
Print — |>
Prints an expression using Druim's text conversion and appends a newline.
|> ("Hello, Druim");
Editor Commands
Toggle Comment
Command:
Druim: Toggle Line Comment
Default keybinding:
Ctrl+/
The command understands Druim's explicit comment delimiters rather than applying JavaScript/C-style comments.
The command does nothing when the selection begins or ends inside a function parameter list or function call argument list, because comments are invalid in those regions.
Installation
Visual Studio Marketplace
Once published, install Druim Language Support from the Visual Studio Marketplace or directly from the Extensions view inside Visual Studio Code.
Search for:
Druim Language Support
Install from VSIX
A packaged .vsix can also be installed manually:
- Open Visual Studio Code.
- Open the Extensions view.
- Open the
...menu. - Choose Install from VSIX...
- Select the Druim
.vsixpackage.
Development
Repository:
https://github.com/rustiphyde/druim-lang
The VS Code extension lives in the Druim project under:
vscode-druim/
To package the extension locally:
vsce package
Release Status
Druim and its editor tooling are under active development.
The 0.1.x extension series should be considered an early public language-support release. Existing tooling is usable, but additional documentation, diagnostics, semantic awareness, editor assistance, and language features will continue to arrive in later versions.
Extension releases can evolve independently while remaining compatible with the registered druim language mode.
License
MIT License
Copyright (c) 2026 Rusty Hoppins
See the included LICENSE file for the full license text.