Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

PML Syntax Highlighting

Mouiz LANIKPEKOUNMouiz LANIKPEKOUN146 downloads

Syntax highlighting for AVEVA PML/PML2 code: ```pml blocks in notes, and raw .pml, .pmlobj, .pmlfnc, .pmlfrm, .pmlmac, .pmlcmd files opened directly.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates8

Colors AVEVA PML (Programmable Macro Language, PML1 and PML2) code: ```pml fenced blocks in notes (Reading mode and Live Preview), and raw .pml, .pmlobj, .pmlfnc, .pmlfrm, .pmlmac, .pmlcmd files opened directly. Also folds PML blocks.

PML syntax highlighting in light and dark themes

Generated by preview.html from the plugin's real styles.css and a JS port of src/tokenizer.ts. Colors are Obsidian's documented default theme variables, so this is a faithful approximation rather than a live screenshot of one particular theme.

Coverage

  • Comments ($* ...)
  • Strings ('...', |...|)
  • Local variables (!var) and global variables (!!var)
  • UDA/attribute references (:attribute)
  • Keywords (define, method, endmethod, if/then/endif, do/enddo, handle any/endhandle, …)
  • Built-in types (STRING, ARRAY, REAL, DBREF, …), plus user-defined extra type words (module-specific DB elements)
  • Numbers
  • Method and member names after a . (!obj.method(), !!ce.owner.name, define method .foo())
  • Raw .pml-family files open in their own editable view (line numbers, undo/redo, same highlighting)
  • Code folding for if/endif, do/enddo, define method|function|object/end..., setup form/endsetup, handle/endhandle, in both fenced blocks and raw files
  • Settings tab: toggle Reading mode / Live Preview / raw-file highlighting / folding independently, per-category color overrides

Not a language server: no autocompletion, no error diagnostics, no cross-file symbol resolution. Visual coloring plus light editing aids (folding, an editable raw-file view).

Install

From Obsidian: Settings → Community plugins → Browse → search "PML Syntax Highlighting" → Install → Enable.

Manual install: download main.js, manifest.json and styles.css from the latest release, copy them into <vault>/.obsidian/plugins/syd-pml-highlight/, then enable "PML Syntax Highlighting" in Obsidian's Community Plugins settings. To build the files yourself, see Dev below.

Requires Obsidian 1.13.0 or later.

Dev

npm install --legacy-peer-deps
npm run build   # writes main.js; with manifest.json and styles.css, that is the whole plugin
npm run dev     # esbuild watch mode

--legacy-peer-deps is required: the obsidian devDependency's own peer dependency on @codemirror/state is newer than the version this repo pins directly, and plain npm install refuses to resolve that conflict (ERESOLVE). It's harmless here — Obsidian provides the real CodeMirror modules at runtime (see esbuild.config.mjs's external list); these devDependencies only exist for TypeScript's type-checking.

Rendering preview

preview.html renders the shipped styles.css against a JS port of the tokenizer, using Obsidian's documented default theme colors (light + dark), without needing Obsidian open. Useful to catch coloring issues before a real in-app check.

npm run preview   # serves the repo at http://localhost:4321/preview.html

Open the URL, and (optionally) screenshot both panels. The tokenizer in preview.html is a manual port of tokenizePmlLine/KEYWORDS/TYPES/TOKEN_RE in src/tokenizer.ts — if you change any of those, update preview.html to match, and add new coverage to its BLOCKS array. A new token class also needs its theme variable declared in preview.html's own :root blocks, which only define the colors currently in use: without it the token renders in the default text color and the preview silently understates the change. This is a close approximation of Obsidian's real rendering, not a substitute for actually checking inside Obsidian.

Feedback, license and affiliation

Bugs and requests: GitHub issues. MIT license.

This is an independent personal project, not affiliated with, endorsed by or sponsored by AVEVA. AVEVA is named only to say which language the plugin colors.

HealthExcellent
ReviewPassed
About
Color AVEVA PML/PML2 code: ```pml blocks in notes (Reading mode and Live Preview), and raw .pml, .pmlobj, .pmlfnc, .pmlfrm, .pmlmac, .pmlcmd files opened directly in their own editable view. Highlighting covers comments, strings, local/global variables, UDA/attribute references, keywords, built-in and user-defined types, and numbers. Code folding for if/do/define/setup form/handle blocks. Toggle Reading mode, Live Preview, raw-file highlighting, and folding independently, and override colors per category. Purely visual coloring plus folding — no autocompletion or diagnostics.
SyntaxAppearance
Details
Current version
0.7.0
Last updated
2 weeks ago
Created
3 weeks ago
Updates
8 releases
Downloads
146
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
Mouiz LANIKPEKOUNMouiz LANIKPEKOUNml9373
GitHubml9373
  1. Community
  2. Plugins
  3. Syntax
  4. PML Syntax Highlighting

Related plugins

Minimal Theme Settings

Control the colors and fonts in Minimal Theme.

Hider

Hide interface elements such as tooltips, status bar, titlebar, and more.

Supercharged Links

Add attributes to internal links with the values of target note's frontmatter attributes.

Note Toolbar

Add customizable toolbars to your notes.

Style Settings

Adjust theme, plugin, and snippet CSS variables.

Link Favicons

See the favicon for a linked website.

Chat View

Chat View lets you quickly and easily create elegant Chat UIs in your Markdown Files.

Custom Font Loader

Customize your vault with any font you want (+ Support for Android and iOS).

Pretty Properties

Makes note properties look more fun: adds side image, banners, list property colors and allows to hide specific properties.

Lapel

Show the heading levels in the gutter of the editor.