Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Python FragmentsNew to Visual Studio Code? Get it now.
Python Fragments

Python Fragments

The Running Algorithm

|
1 install
| (0) | Free
LSP support for the Python Fragments transpiler
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Python Fragments Extension for VS Code

VS Code extension for the Python Fragments transpiler - bringing HTML syntax directly into Python, similar to how JSX brings HTML into JavaScript.

VS Code completions demo

Features

  • Syntax highlighting for fragment syntax (<>, </>, tags, {{ }} interpolations)
  • Full LSP support via fragments-lsp: diagnostics, hover, go-to-definition, completions, and semantic tokens powered by Pyright

Requirements

The fragments-lsp language server must be installed in your Python environment:

pip install fragments-lsp

The extension discovers the language server automatically from the Python interpreter selected in the Python extension.

Usage

Open any .py file that uses fragment syntax. The extension activates automatically for Python files.

Configuration

Setting Description
fragments.serverPath Override the path to the fragments-lsp executable. By default it is derived from the active Python interpreter.

Commands

Command Description
Python Fragments: Restart Language Server Restart the LSP if it gets into a bad state.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft