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 (
&,©,©, …) - 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)
- Open Thonny.
- Go to Tools → Manage packages…
- Search for
thonny-html-highlight. - Click Install.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
025455e3943b93424f2feef12137f64be6861b5e029468ee9e919aef3c261fdb
|
|
| MD5 |
1d32a73389d00dafa7d0567176f10263
|
|
| BLAKE2b-256 |
2d8636de0af5939e295fa832a199a104e90a2f68d5c72b2950c5d34929a3ef59
|
Provenance
The following attestation bundles were made for thonny_html_highlight-0.1.3.tar.gz:
Publisher:
publish.yml on mrmatho/thonny-html-highlight
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thonny_html_highlight-0.1.3.tar.gz -
Subject digest:
025455e3943b93424f2feef12137f64be6861b5e029468ee9e919aef3c261fdb - Sigstore transparency entry: 1727717121
- Sigstore integration time:
-
Permalink:
mrmatho/thonny-html-highlight@111e9e26bba6a4e53e6040924da3923b93970574 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/mrmatho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@111e9e26bba6a4e53e6040924da3923b93970574 -
Trigger Event:
release
-
Statement type:
File details
Details for the file thonny_html_highlight-0.1.3-py3-none-any.whl.
File metadata
- Download URL: thonny_html_highlight-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f53dd499ea993c052172c021c302a52cd7aa92fb383ab8717299390c247a7c9
|
|
| MD5 |
26ceb3ca7e9e04bdc690398edec4e41f
|
|
| BLAKE2b-256 |
26b9ed339a844d3c777b9077929e74888179af793c16c86913b9d8f2e6c3c45e
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thonny_html_highlight-0.1.3-py3-none-any.whl -
Subject digest:
9f53dd499ea993c052172c021c302a52cd7aa92fb383ab8717299390c247a7c9 - Sigstore transparency entry: 1727717241
- Sigstore integration time:
-
Permalink:
mrmatho/thonny-html-highlight@111e9e26bba6a4e53e6040924da3923b93970574 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/mrmatho
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@111e9e26bba6a4e53e6040924da3923b93970574 -
Trigger Event:
release
-
Statement type: