Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>NASM x86/x86_64 IntelliSenseNew to Visual Studio Code? Get it now.
NASM x86/x86_64 IntelliSense

NASM x86/x86_64 IntelliSense

Alec269

|
1 install
| (0) | Free
Language Server Protocol-based IntelliSense, hover docs, diagnostics, and symbol navigation for NASM-style x86/x86_64 assembly.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NASM x86/x86_64 IntelliSense

NASM IntelliSense is a VS Code extension that adds (Simple) language-server powered editing for NASM-style x86 and x86_64 assembly:

  • Autocomplete for instructions, registers, directives, and in-file labels/constants.
  • Hover docs for core instructions, registers, and directives.
  • Diagnostics by running the local nasm assembler.
  • Go to Definition for labels and equ constants.
  • Syntax highlighting via a NASM TextMate grammar.

This extension is built on the Language Server Protocol (LSP) with a dedicated Node-based language server.

Example

Intellisense Highlighting

Features

  • Autocomplete

    • Instructions: common x86/x86_64 instructions (mov, add, cmp, jmp, call, ret, syscall, etc.).
    • Registers: 8/16/32/64-bit GPRs (rax, eax, ax, al, etc.), segment registers, and flags.
    • Directives: section, segment, global, extern, equ, %define, db/dw/dd/dq, resb/resw/resd/resq, and more.
    • Symbols: labels (_start:) and equ-style constants from the current document.
  • Hover Documentation

    • Hover over an instruction to see:
      • A NASM-styled usage line (e.g. mov dest, src).
      • A short description.
    • Hover over a register to see its size and category.
    • Hover over a directive for a description.
    • Hover over a label/constant for a short classification (label vs equ).
  • Diagnostics (error highlighting)

    • Uses your local nasm installation to compile the file to a temporary .asm and parse its error/warning messages.
    • Reports NASM errors and warnings as editor diagnostics with squiggles.
    • Fully optional and configurable (see below).
  • Go to Definition

    • F12 / “Go to Definition” on:
      • A label use jumps to the label declaration.
      • A constant use jumps to its equ definition.
    • Currently scoped to the current file.
  • Syntax Highlighting

    • TextMate grammar for nasm:
      • Comments (;).
      • Labels.
      • Instructions.
      • Directives.
      • Registers.
      • Numeric literals (hex/decimal).
      • Strings (single and double quotes).

BTW, TextMate grammar is what vscode uses to colourise tokens.

Configuration

All settings live under the nasmIntellisense section:

  • nasmIntellisense.nasmPath (string, default: "nasm"):

    • Path to the nasm executable.
    • Override this if nasm is not on your PATH or has a nonstandard name.
  • nasmIntellisense.enableDiagnostics (boolean, default: true):

    • If true, the server runs nasm to provide error diagnostics.
    • If false, no diagnostics are produced, but autocomplete, hover, go to definition, and highlighting still work.
    • You can toggle this at any time using the “NASM IntelliSense: Toggle Diagnostics” command.
  • nasmIntellisense.diagnosticsOnSaveOnly (boolean, default: true):

    • If true, diagnostics are only run on save.
    • If false, diagnostics may run after edits (debounced on the server side).
  • nasmIntellisense.arch ("x86" | "x86_64", default: "x86_64"):

    • Architecture used when invoking nasm:
      • "x86_64" → -f elf64
      • "x86" → -f elf32

Commands

  • NASM IntelliSense: Restart Language Server

    • Stops and restarts the language server.
    • Useful after changing configuration or updating nasm.
  • NASM IntelliSense: Show Server Status

    • Shows whether the language server is currently running.
  • NASM IntelliSense: Toggle Diagnostics

    • Flips nasmIntellisense.enableDiagnostics for the current workspace.
    • Use this to quickly turn off error squiggles while keeping:
      • Syntax highlighting.
      • Completions.
      • Hover docs.
      • Go to Definition.

Requirements

  • VS Code on a supported version (see engines.vscode in package.json).
  • Node.js for extension development (if you are building from source).
  • NASM assembler (optional, but required for diagnostics):
    • Install nasm and ensure it is on your PATH, or set nasmIntellisense.nasmPath.

Building and Running (from source)

  • Install dependencies:
npm install
cd server
npm install
cd ..
  • Compile the extension:
npm run compile
  • Debug / Run Extension:
    • Open the project folder in VS Code.
    • Use the “Run Extension” launch configuration (F5).
    • In the Extension Development Host that opens:
      • Open examples/test.asm, or any .asm / .nasm file.
      • Start editing to see completions, hover info, highlighting, and (if enabled) diagnostics.

Known Quirks and Limitations

  • Partial instruction set

    • The built-in instruction database covers common core instructions, not the full x86/x86_64 ISA.
    • Completions and hover docs for very specialized or rare mnemonics may be missing.
  • Per-file symbol navigation only

    • “Go to Definition” currently works within a single file.
    • Cross-file symbol resolution (e.g. across multiple .asm files with extern/global) is not implemented.
  • Diagnostics rely on NASM

    • If nasm is not installed or not found:
      • No diagnostics will appear.
      • You should see a one-time warning from the extension.
    • The extension does not ship its own assembler; it only shells out to your local nasm.
  • Diagnostics granularity

    • NASM error messages are mapped to entire lines.
    • Column-level ranges are approximated to the full line, so squiggles may appear under the whole line rather than the exact token.

Contributing / Extending

  • Extend the instruction set

    • Add or refine instructions, registers, and directives in server/src/nasmData.ts.
  • Improve parsing

    • Enhance server/src/parser.ts if you want more accurate label/constant detection or future features like document symbols.
  • Add more language features

    • The language server is built with vscode-languageserver; you can extend it with:
      • Signature help.
      • Document symbols (outline).
      • References and rename.

I am so Sorry

This extension was made with help from AI- claude and cursor.

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