Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Syntax Highlighting for Arm AssemblyNew to Visual Studio Code? Get it now.
Syntax Highlighting for Arm Assembly

Syntax Highlighting for Arm Assembly

squarewave

| (0) | Free
Arm assembly syntax support for Visual Studio Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Syntax highlighting for Arm® assembly in Visual Studio Code

This is an extension that adds syntax highlighting for the Arm Assembly language to Visual Studio Code. The extension supports the ARMv7-A, -R and -M instruction sets, including Thumb2, advanded SIMD and floating point instructions.

It supports the ARM Unified Assembler Language (UAL), and it does not (fully) support Armv8 or AArch64 instruction sets.

The extension supports syntax and most directives of GNU as.

It works well with many standard themes. But you can adjust colors and other text attributes via standard configuration functionality in Visual Studio Code's settings.json file.

The following screenshot shows an example source code with the Dark Modern theme:

Example of source code highlighting

The extension is derived from Dan Underwood's extension Arm Assembly.

Installation

You can install the extension from the VS Code Extension Marketplace or from a .vsix file.

Install from Extension Marketplace

To install the extension from within VS Code open the Extensions view via Ctrl-Shift-x or by clicking on the Extensions icon in the Activity Bar on the side of VS Code. Then search for armv7.

Also see Extension Marketplace in the VS Code documentation.

Install from .vsix file

Download the .vsix file from here. Then install it either from within VS Code or on the command line.

From within VS Code open the Command Palette via Ctrl-Shift-p and execute the command Extensions: Install from VSIX....

On the command line execute the following command:

code --install-extension path-to-vsix-file

Also see Install from a VSIX in the VS Code documentation.

Customization

You can use configuration in a settings.json file to change colors and other properties of the respective syntax elements (tokens). Also see Theming and Syntax colors in the VS Code documentation. For example, in mnemonics that contain condition codes for conditional execution you can highlight the condition codes to visually separate them from the original instructions:

Example of highlighted condition codes

This can be achieved with the following settings (also see Settings JSON file):

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "condition.arm",
                "settings": {
                    "foreground": "#ffa1e0"
                }
            }
        ]
    }
}

If you are used to unicolored conditional branch instructions (like bne) and want to keep them along with colored condition codes in other instructions, you can use the following setting:

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "condition.arm",
                "settings": {
                    "foreground": "#ffa1e0"
                }
            },
            {
                "scope": "support.function.mnemonic.branch.arm condition.arm",
                "settings": {
                    "foreground": "#dcdcaa"
                }
            }
        ]
    }
}

This changes the color of condition codes except those in the context of branch instructions. In this example the color of the latter is set to the same color as regular mnemonics.

Tokens can have multiple scopes assigned simultaneously. In this example the condition code of the branch instruction has the scope condition.arm and the parent scope support.function.mnemonic.branch.arm assigned. Note the space character in the second scope specifier in the json example. This is similar to CSS descendent selectors which VS Code supports when evaluating the scope keys. Here it means that the color of condition codes (scope condition.arm) is set to #dcdcaa when the condition code has support.function.mnemonic.branch.arm as parent scope.

The scope key does not only accept a single string but also an array of strings. The following example defines the same color for the condition codes and for section names to make them stick out a bit:

Example of highlighted section name

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": ["condition.arm", "keyword.control.directive.sectionname.arm"],
                "settings": {
                    "foreground": "#ffa1e0"
                }
            }
        ]
    }
}

There are some more scopes/tokens available. For example, the '!' in addressing modes with write-back has an own scope. A possible use is to render the '!' with different properties, e.g., as bold face to make it slighly more visible. So, it may be less likely to be missed:

Write-back in bold face

{
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "write-back.arm",
                "settings": {
                    "fontStyle": "bold"
                }
            }
        ]
    }
}

Use VS Code's Scope inspector to find out what scopes are assigned to what tokens. Also see Textmate tokens and scopes for more information about how scopes work.

License

MIT

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