fedit

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

F# .fs · .fsi · .fsx
JavaScript .js · .mjs · .cjs
TypeScript .ts
TSX .tsx
Python .py
JSON .json
C# .cs
Go .go
Rust .rs
HTML .html · .htm
CSS .css
C .c · .h
PHP .php · .phtml
Shell .sh · .bash · .zsh · .ksh and common shell files
Markdown .md · .mdx · .markdown
XML .xml · .svg · .xsl · .xslt
Dart .dart
Just .just · Justfile
Make .mk · Makefile · GNUmakefile
Astro .astro
TOML .toml
Sema .sema
AppleScript .applescript
ReScript .res · .resi
Zig .zig

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 syntax object.
  • Binary and hex-view buffers deliberately skip syntax parsing.