Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Flecs ScriptNew to Visual Studio Code? Get it now.
Flecs Script

Flecs Script

Sander Mertens

|
4 installs
| (0) | Free
Syntax highlighting, code completion and snippets for Flecs Script (.flecs files)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Flecs Script for Visual Studio Code

Language support for Flecs Script, the runtime interpreted DSL of the Flecs Entity Component System for defining scenes, assets and configuration.

Features

  • Syntax highlighting for .flecs files:
    • Keywords (using, with, template, prop, const, if, else, for, in, match, new, export, include, module, fn, prefab, slot)
    • Type definitions (struct, enum, bitmask, member, constant, ...)
    • Primitive types (bool, char, u8–u64, i8–i64, f32, f64, string, entity, id, ...)
    • Components, tags, pairs (Rel, Tgt) and inheritance (entity : Prefab)
    • Variables ($var, $ shorthand) and string interpolation ("$var", "{expr}")
    • Annotations (@brief, @color, @tree, ...)
    • Line and block comments, numbers (including hex), multiline strings
  • Code completion:
    • Keywords, primitive types and builtin tags/relationships
    • Builtin functions and constants (flecs.script.core, flecs.script.math)
    • Entity methods after . (name(), path(), parent(), has(), doc_*())
    • Annotations after @
    • Variables after $ (scanned from const/prop declarations in the document)
    • Components, templates and entities declared in the document
  • Hover documentation for keywords, builtin functions and types
  • Snippets for common constructs (struct, template, prefab, for, match, ...)
  • Bracket matching, auto-closing pairs, auto-indentation and comment toggling

Example

using flecs.meta

struct Position {
  x = f32
  y = f32
}

template Tree {
  prop height: 10

  Trunk {
    Position: {0, $height / 2}
  }
}

prefab SpaceShip {
  MaxSpeed: {value: 100}
}

my_spaceship : SpaceShip {
  Position: {x: 10, y: 20}
}

for i in 0..10 {
  "tree_$i" {
    Tree: {height: $i + 5}
  }
}

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft