Skip to content

auralanguage/vscode-syntax-highlights

Repository files navigation

Aura Language Support for VS Code

This extension provides syntax highlighting, language configuration, and basic support for the Aura programming language.

Features

  • Syntax Highlighting: Complete syntax highlighting for Aura language constructs
  • Language Configuration: Proper bracket matching, auto-closing pairs, and comment handling
  • Snippets: Code snippets for common Aura patterns
  • File Associations: Automatic recognition of .aura files

Supported Language Features

Keywords

  • Control flow: fn, if, else, while, for, in, return, let
  • Declarations: struct, module, import
  • Special: self

Types

  • Primitive types: Int, Bool, Char, String, Unit
  • Array types: [Int], [String], etc.

Literals

  • Integers: 42, 0, 100
  • Booleans: true, false
  • Characters: 'a', '\n'
  • Strings: "hello world"

Operators

  • Arithmetic: +, -, *, /
  • Comparison: ==, !=, <, <=, >, >=
  • Logical: &&, ||, !
  • Range: ..
  • Access: .
  • Assignment: =

Other Features

  • Module qualified names: module::function
  • Struct field access: object.field
  • Function calls and declarations
  • Comments: // line and /* block */

Installation

From VS Code Marketplace (Thats not supported yet)

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Aura Language Support"
  4. Click Install

From Source

  1. Clone this repository
  2. Run npm install
  3. Run npm run compile
  4. Press F5 to launch extension development host
  5. Test the extension in the new window

Usage

Once installed, VS Code will automatically recognize .aura files and apply syntax highlighting.

Manual File Association

If needed, you can manually associate files with the Aura language:

  1. Open a .aura file
  2. Click the language indicator in the status bar
  3. Select "Aura"

Configuration

The extension provides the following settings (accessible via settings.json):

{
  "aura.enableSyntaxHighlighting": true,
  "aura.formatOnSave": false
}

Contributing

Contributions are welcome! Please see the main Aura repository for contribution guidelines.

Development Setup

  1. Clone this repository
  2. Run npm install
  3. Open in VS Code
  4. Press F5 to start debugging

Testing

npm test

Building

npm run compile

Syntax Highlighting Scope Names

The extension uses the following TextMate scope names for syntax highlighting:

  • comment.line.double-slash.aura - Line comments
  • comment.block.aura - Block comments
  • string.quoted.double.aura - String literals
  • string.quoted.single.aura - Character literals
  • keyword.control.aura - Control flow keywords
  • keyword.other.aura - Other keywords like self
  • constant.language.boolean.aura - Boolean literals
  • storage.type.aura - Built-in types
  • storage.type.array.aura - Array type syntax
  • entity.name.function.aura - Function declarations
  • entity.name.function.call.aura - Function calls
  • entity.name.type.struct.aura - Struct declarations
  • entity.name.type.aura - Type names
  • entity.name.namespace.aura - Module qualifiers
  • constant.numeric.integer.aura - Integer literals
  • keyword.operator.*.aura - Various operators
  • variable.other.member.aura - Struct field access
  • variable.other.aura - Variable names

License

This extension is licensed under the MIT License. See LICENSE for details.

Related

About

designed for github.com/auralanguage/aura-lang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors