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, 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. 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 uses VS Code's parenthesis pairing and 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. 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 Core functions and traversal syntax, 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. 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 |
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.
Return
Use:
ret expression;
inside a function.
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.
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.