porcupine
porcupine copied to clipboard
Documenting syntax-highlighting
The existing documentation in porcupine/plugins/highlight/tree-sitter-token-mappings/README.md and default_filetypes.toml doesn't seem to be enough. It's still easy to get confused about a lot of things:
- Why does Porcupine support both pygments and tree-sitter?
- Why is it impossible (or at least, very hard) to make an efficient pygments highlighter that always works correctly?
- What are tree-sitter, py-tree-sitter, py-tree-sitter-languages and py-tree-sitter-builds?
- Where does Porcupine get the tree-sitter
.sofile it uses for syntax highlighting? - What languages are included in the
.sofile? - What are tree-sitter token mappings?
- Why is there not a token mapping for every language included in the
.sofile?
Recently Moosems has been confused about tree-sitter. I don't blame Moosems: this is confusing and I have documented it poorly :)