Skip to main content

Thonny plugin: syntax highlighting for HTML files

Project description

thonny-html-highlight

Syntax highlighting for HTML files in the Thonny IDE.

By default Thonny treats .html and .htm files as plain text. This plugin adds colour highlighting for:

  • Tag names (div, span, a, …)
  • Attribute names (class, href, data-value, …)
  • Attribute values ("foo", 'bar', …)
  • HTML comments (<!-- … -->)
  • DOCTYPE declarations (<!DOCTYPE html>)
  • Entity references (&amp;, &#169;, &#xA9;, …)
  • Angle-bracket punctuation

Requirements

  • Thonny 5.0 or later
  • Python 3.13 or later (bundled with Thonny 5)

Installation

Via Thonny's built-in package manager (recommended)

  1. Open Thonny.
  2. Go to Tools → Manage packages…
  3. Search for thonny-html-highlight.
  4. Click Install.
  5. Restart Thonny.

Via pip / uv (command line)

# Using pip
pip install thonny-html-highlight

# Using uv
uv pip install thonny-html-highlight

Then restart Thonny.

From source (development)

git clone https://github.com/mrmatho/thonny-html-highlight.git
cd thonny-html-highlight
uv pip install -e .

Restart Thonny after installing.

Usage

Open any .html or .htm file in Thonny — highlighting is applied automatically. No configuration is required.

Known limitations

  • Content inside <script> and <style> tags is treated as HTML, which may produce incorrect highlighting for JavaScript or CSS within those blocks.
  • Colours follow Thonny's default light theme. Integration with custom syntax themes is planned for a future release.

Development

# Run tests
uv run pytest

# Run tests with verbose output
uv run pytest -v

Licence

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thonny_html_highlight-0.1.3.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thonny_html_highlight-0.1.3-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file thonny_html_highlight-0.1.3.tar.gz.

File metadata

  • Download URL: thonny_html_highlight-0.1.3.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for thonny_html_highlight-0.1.3.tar.gz
Algorithm Hash digest
SHA256 025455e3943b93424f2feef12137f64be6861b5e029468ee9e919aef3c261fdb
MD5 1d32a73389d00dafa7d0567176f10263
BLAKE2b-256 2d8636de0af5939e295fa832a199a104e90a2f68d5c72b2950c5d34929a3ef59

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_html_highlight-0.1.3.tar.gz:

Publisher: publish.yml on mrmatho/thonny-html-highlight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thonny_html_highlight-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for thonny_html_highlight-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9f53dd499ea993c052172c021c302a52cd7aa92fb383ab8717299390c247a7c9
MD5 26ceb3ca7e9e04bdc690398edec4e41f
BLAKE2b-256 26b9ed339a844d3c777b9077929e74888179af793c16c86913b9d8f2e6c3c45e

See more details on using hashes here.

Provenance

The following attestation bundles were made for thonny_html_highlight-0.1.3-py3-none-any.whl:

Publisher: publish.yml on mrmatho/thonny-html-highlight

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page