Permissively-licensed Python bindings for Lexilla, the lexer library for Scintilla.
Real CreateLexer/ILexer5 bindings exist: create_lexer, get_lexer_count,
get_lexer_name, and a Lexer class (name/identifier, property get/set,
word_list_set, and the raw pointer for SCI_SETILEXER). Lex/Fold and
the cross-binding/wheel-publishing work are not done yet. Nothing is
published to PyPI yet. See
GitHub Issues for what's next.
Lexilla creates the lexer objects (ILexer5) that a Scintilla editor widget
attaches via SCI_SETILEXER — it's a separate, Qt-free C++ library from
Scintilla itself since Scintilla 5.0. This project exposes that library
directly to Python, so any Scintilla binding can create and configure lexers,
not just one tied to a specific Qt/GTK/wx binding — see
docs/specs/mission.md for the full background.
lexilla aims to be:
- MIT licensed — usable in open-source or closed-source projects freely
- A faithful, low-level binding of Lexilla's
CreateLexer/ILexer5C++ API — not a redesign of it - Binding-agnostic — no dependency on any particular Scintilla binding;
the lexer pointer it creates works with any of them via
SCI_SETILEXER - Available as pre-built wheels for Linux (x86_64, aarch64), Windows (x86_64), and macOS (arm64, x86_64)
- Not affiliated with the Scintilla/Lexilla project
Not yet published. Once it is:
pip install lexillaFor convenience glue with pyside6-scintilla:
pip install lexilla[pyside6-scintilla]Version numbers follow <Lexilla version>.<binding revision> — e.g. 5.5.0.0
is binding revision 0 for Lexilla 5.5.0. The binding revision increments
for releases of this package that don't correspond to a new Lexilla version,
and resets to 0 when Lexilla itself releases a new version.
| Doc | Contents |
|---|---|
| docs/specs/ | Design specifications and action plans for in-progress and planned work |
| docs/specs/mission.md | Project background, goals, and design decisions |
| GitHub Issues | Ordered list of upcoming work |
| Project board | Joint roadmap for lexilla-py and pyside6-scintilla; issues/PRs from both repos are auto-added |
| docs/bindings.md | How the nanobind bindings are built, and how they're expected to grow |
| docs/build.md | Build prerequisites, local build/rebuild, wheels, and publishing |
| docs/auditing.md | How to verify the vendored Lexilla source matches upstream |
| docs/documenting.md | How the docs site is built (stub) |
| docs/testpypi.md | Setting up TestPyPI trusted publishing |
| examples/ | Standalone example apps (planned) |
src/lexilla_vendor/— HPND License (Lexilla, copyright Neil Hodgson)- Everything else — MIT License