Complete feature reference for NASM x86/x86-64 and MIPS assembly support in CLion. Use the dialect toggle to filter by language, or press ⌘K to search.
The plugin adds first-class IDE support for two assembly dialects:
The extensions .asm, .s, and .inc are shared by many assemblers. When the plugin encounters one of these files it reads the first 2 048 characters and inspects the content:
Detected as NASM if the file contains any of:
section .text%macroglobal _startDetected as MIPS if the file contains any of:
$t0.globl mainsyscallIf neither pattern matches, the file is left to the IDE's default handling. Files with the dedicated .nasm or .mips extension are always assigned the correct type without content sniffing.
The plugin tokenizes assembly source into distinct categories and assigns each its own colour. Every category can be customised independently.
Open Settings → Editor → Color Scheme, then select either NASM Assembly or MIPS Assembly from the language list. Each token category listed above has its own entry with independent foreground colour, bold, and italic controls.
Hovering over any instruction, register, or label shows a documentation popup. Also accessible via View → Quick Documentation (Ctrl+Q / ⌃J).
For NASM only, certain instructions display a coloured badge next to their name:
Below the instruction name the popup shows the canonical operand shape:
Both NASM and MIPS registers display colour-coded ABI volatility badges:
Select registers also carry special-purpose sections in their popup:
Example register popups:
Hovering over a label reference shows a popup. If doc-comments appear immediately above the label definition (no blank lines between), the plugin parses and renders them.
Every Word: line opens its own section, and the recognised section labels share the same taxonomy as the instruction popups. Common header synonyms are folded onto their canonical names:
Sections are emitted in the canonical order Flags → Operands → Clobbers → Result → Note, regardless of the order they appear in the comment. Any custom Word: section you add (e.g. Todo:, Side-effects:) is preserved and sorted after the canonical ones.
NASM comments start with ;. Write one Word: header per line; an indented continuation line with no new header is appended to the section above it.
The Input: and Output: headers fold onto Operands: and Result:, and the popup renders in canonical order:
Inspections run in the background as you type and highlight problems with coloured underlines. All inspections can be enabled or disabled individually via Settings → Editor → Inspections → Assembly.
When Undefined symbol fires on the target of a call instruction, a quick-fix appears: Declare as extern. Applying it inserts extern <name> at the top of the file.
In addition to the built-in static inspections, the plugin ships an external annotator that actually invokes the real assembler binary in the background and surfaces its file:line diagnostics inline — catching errors that purely syntactic analysis cannot (unknown directives, encoding violations, etc.).
PATH. Enable or suppress it per-dialect under Settings → Editor → Inspections → Assembly → External annotator. On Windows, install nasm via the official installer and ensure it is added to PATH; for MIPS, use the cross-assembler that ships with your toolchain (e.g. via WSL or MSYS2).Pressing Tab or Ctrl+Space shows a context-aware autocomplete list. The plugin looks at where the caret sits on the line and offers a different set of suggestions for each position.
Completions are case-insensitive. NASM registers are offered in lowercase (rax, xmm0, ymm15, k1). MIPS registers are offered with the $ prefix ($t0, $ra, $zero, $f12).
equ symbols: a buffer defined as msg db "..." or a constant defined as MAX equ 100 now appears in the lookup alongside registers. NASM %define symbols are offered as well.Hold Ctrl (Windows/Linux) or ⌘ (macOS) and click any label reference to jump to its definition. The editor scrolls to and highlights the label definition line.
Keyboard shortcut: place the cursor on a label reference and press Ctrl+B / ⌘B.
When a label has at least one reference elsewhere in the file, a gutter icon (subtypes arrow) appears on the label definition line. Clicking it opens a popup listing all usages; selecting one navigates to that reference.
This works for all label kinds in both NASM (labels ending in :, including local labels prefixed with .) and MIPS.
Place the cursor on any label and press Alt+F7 to find all usages across files, including cross-file extern/global symbols.
Rename a label in-place with Shift+F6. Goto symbol (Ctrl+Alt+Shift+N) lists every label across all assembly files in the project.
View → Tool Windows → Structure (Alt+7 / ⌘7) opens the Structure panel, which displays a hierarchical overview of the current file.
The tree contains two kinds of nodes:
section directive (section .text, section .data, etc.)Click the Alphabetical sort button in the Structure panel toolbar to toggle between source order and alphabetical order for labels. Both NASM and MIPS support this toggle.
Labelled code regions can be collapsed in the editor. A fold marker (▶ / ▼) appears in the gutter next to the first line of each foldable block.
Click the gutter marker or use Ctrl+NumPad− / ⌘⌥− to collapse; Ctrl+NumPad+ / ⌘⌥+ to expand.
The default fold granularity follows the label structure of the file — each label-to-next-label region is independently foldable.
When the cursor is adjacent to a [ or ] character (used for memory operands in both NASM and MIPS), the plugin highlights the matching bracket. This works for deeply nested or complex effective-address expressions:
The highlight is immediate and does not require any keypress.
The plugin registers new-file templates for both dialects. To use them:
Each template creates a file with the appropriate extension and a minimal skeleton (section declarations, a _start / main entry point) so you can begin writing code immediately without boilerplate.
Live templates are in-editor code snippets triggered by typing an abbreviation and pressing Tab or selecting from the popup opened by Ctrl+J. They expand at the cursor position and place the caret at the first editable spot.
lbldoc template also appears in basic completion.Use the standard IDE Toggle Comment action to comment or uncomment the selected lines:
The action is aware of the current file type, so it always inserts the correct comment character. When toggling off, it removes the leading comment character (and any trailing whitespace left behind).
The plugin handles string literals as you type — completing quote pairs and keeping an in-progress string recognised before it is closed.
Typing an opening quote in string position — inside .data declarations and instruction operands — inserts the matching closing quote and leaves the caret between the pair. Previously the closing quote had to be typed by hand, and the lone opener lexed as a bad character until it was.
An unterminated opening quote is recognised as a string while you are still typing. The lexer accepts a lone opener ("hel, 'foo, `bar) and extends the string token to the end of the line, so the text is highlighted as a string instead of an error. A fully terminated string is always matched first, so closing quotes take precedence whenever they are present.