syntax highlighting
fedit uses tree-sitter grammars and queries to color source code. Parsing runs outside the editor update loop, and stale results are ignored when a buffer changes again.
controls
Run syntax on, syntax off, or syntax toggle from the command
palette. The setting persists in ~/.config/fedit/config.json.
Themes map tree-sitter captures—keywords, strings, comments, functions, types, numbers, operators, and punctuation—to their own syntax palette. Missing colors fall back to the theme's surface foreground.
supported languages
Extensionless shell scripts are also detected from their shebang. Language detection checks special filenames before extensions.
structural selection
Shift+Alt+Up expands the selection to the smallest enclosing syntax node; Shift+Alt+Down returns to the previous node. Ctrl+Alt+W is an additional expand binding. This works for any loaded grammar and is inert in hex view.
how updates stay responsive
Each text edit schedules a full parse on a background worker. The result carries the buffer id and edit tick; if the buffer has changed or closed before parsing finishes, the editor drops the result. Incremental tree edits are not implemented yet.
troubleshooting
-
If no colors appear, confirm highlighting is enabled with
syntax on. -
If one language stays plain, verify the file extension is listed above and inspect the
startup trace from
fedit --log <path>. -
User themes can override individual syntax colors in their optional
syntaxobject. - Binary and hex-view buffers deliberately skip syntax parsing.