Skip to content

Snagnar/fcdsl-vscode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Facto Language - VS Code Extension

Syntax highlighting for the Facto programming language.

Installation

Option 1: Development Mode (Quick Testing)

  1. Copy/move this entire facto-vscode folder to your VS Code extensions directory:

    • Windows: %USERPROFILE%\.vscode\extensions\
    • macOS: ~/.vscode/extensions/
    • Linux: ~/.vscode/extensions/
  2. Restart VS Code (or run "Developer: Reload Window" from the command palette)

  3. Open any .facto file — syntax highlighting should work immediately!

Option 2: Package as VSIX (For Distribution)

  1. Install vsce (VS Code Extension manager):

    npm install -g @vscode/vsce
  2. Package the extension:

    cd facto-vscode
    vsce package
  3. This creates facto-0.2.0.vsix. Install it via:

    • VS Code → Extensions → "..." menu → "Install from VSIX..."
    • Or: code --install-extension facto-0.2.0.vsix

Features

  • Keywords: func, return, import, as, when
  • Types: int, Signal, SignalType, Entity, Memory, Bundle
  • Built-ins: read, write, place, any, all
  • Comments: # and // line comments
  • Strings: Double-quoted with escape sequences
  • Numbers: Integers (decimal, hex, binary, octal)
  • Operators: All arithmetic, comparison, logical, and projection operators
  • Function highlighting: Definitions and calls
  • Property access: object.property syntax

File Extensions

  • .facto (primary)

Customizing

To modify the highlighting:

  • Edit syntaxes/facto.tmLanguage.json to change token patterns
  • Edit language-configuration.json for bracket matching, auto-indent, etc.

Testing

Open examples/demo.facto to see the highlighting in action.

About

Syntax Highlighting VSCode extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published