Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Prolog Syntax Highlighter (SWI)New to Visual Studio Code? Get it now.
Prolog Syntax Highlighter (SWI)

Prolog Syntax Highlighter (SWI)

Yasuo-Higano

|
9 installs
| (0) | Free
SWI-Prolog syntax highlighting for VS Code (.pl auto-associated)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Prolog Syntax Highlighter (SWI)

A VS Code extension for SWI-Prolog that provides syntax highlighting for Prolog source code.

Example of View

Overview

This extension provides syntax highlighting and basic editor support when editing Prolog files (.pl, .pro, .prolog) in VS Code.

Main Features

Syntax Highlighting

  • Comments: Line comments (%) and block comments (/* */)
  • Strings: Single-quoted ('...') and double-quoted ("...") strings
  • Quasi-quotations: SWI-Prolog quasi-quotation notation ({|...|})
  • Numbers:
    • Integers
    • Floating-point numbers
    • Hexadecimal (0x...)
    • Binary (0b...)
    • Octal (0o...)
    • Character codes (0'x)
  • Variables:
    • Anonymous variable (_)
    • Named variables (_Var, Var)
  • Directives: :- module, :- use_module, :- dynamic, etc.
  • DCG notation: --> operator
  • Operators: =, is, =:=, ==, :-, ?-, etc.
  • Built-in predicates: true, false, write, findall, member, append, etc.

Editor Features

  • Auto-completion: Auto-closing of brackets ((), [], {}) and quotes (', ")
  • Comment configuration: Toggle support for line and block comments
  • Indentation: Default tab size of 2 spaces

File Associations

  • Automatically recognizes .pl files as Prolog (configurable in settings)
  • Also supports .pro and .prolog extensions
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft