VS Code Extensions
NPF (Network Performance Framework) Syntax Highlighting

NPF (Network Performance Framework) Syntax Highlighting

by TomBarbette

Syntax highlighting for Network Performance Framework (.npf) files

Downloads

5

Rating

— (0)

Version

1.0.0

Last updated

Jul 03, 2026

This extension provides rich color syntax highlighting and configuration for Network Performance Framework (.npf) files in VS Code.

NPF Extension Icon

Features

  • Section Recognition: Full highlighting of NPF sections (e.g. %info, %variables, %config, %script, %init, %exit, %pyexit, %file, %import). Supports tag-gated sections (e.g. tls:%script, %-nostat:import).
  • Multi-language Embedding:
    • Automatically embeds Shell Script (Bash) syntax inside %script, %init, and %exit blocks.
    • Automatically embeds Python syntax inside %pyexit blocks.
  • NPF Syntax Specials:
    • Highlights NPF Math $(( ... )) as Python code. Correctly ignores escaped bash arithmetic \$(( ... )).
    • Highlights NPF variables ($VAR, ${VAR}) and node attributes (e.g. ${server:0:ip}) within scripts, files, and math blocks.
  • Jinja2 Support: Highlights Jinja expressions {{ ... }} and blocks {% ... %} inside your scripts.
  • Variables & Config Styling: Displays ranges [1-8], sets {a,b,c}, and tag gates (nocongestion:CONGESTION=cubic) cleanly.
  • Comments: Full support for # and // comment syntax.

Installation

From Source (Local Development)

To use this extension locally, clone the npf repository and symlink the extension folder to your VS Code extensions folder:

ln -s "/path/to/npf/misc/vscode-npf" ~/.vscode/extensions/vscode-npf

(For Antigravity IDE users, symlink to ~/.antigravity-ide/extensions/vscode-npf instead).

Then reload your VS Code window (Cmd+Shift+P -> Developer: Reload Window).

Extension Settings

This extension contributes the npf language ID and associates it with all .npf files automatically.

License

This extension is released under the MIT License.

Related extensions