Forester 6.0 › Overview [N0GL]

This release contains no language changes. We summarise the main changes below.

  1. HTML by default; XML in maintenance mode. In short, Forester now defaults to emitting HTML, which is not currently customisable. In the future we will consider allowing custom stylesheets as well as other customisation hooks. For users who wish to customise their forest output, the XML output is preserved under the --emit-xml flag, but you will need to render the XML locally to HTML now that browsers are removing XSLT support. Please see this article for more detailed instructions. We understand that many users will not yet be able to move to the HTML mode because of various customisations they have built on top of the XML mode; we would like to hear from you, because we are working on a design that would enable more extensibility on the HTML side in the future.
  2. Performance. Forester 6.0 is several times faster across the board, thanks to more thorough use of multicore OCaml features. If you encounter any problems (e.g. deadlock), please contact us; we have done our best to make this solid, but correct use of multicore OCaml is a little challenging and we may have yet made some mistakes.
  3. Semantic tokenisation. Forester’s language server now emits semantic tokens; this means that editors (like Neovim) that support LSP semantic tokenization will have automatically syntax-highlight Forester documents without requiring a tree-sitter or TextMate grammar.
  4. Live preview. When you use an editor that can connect to Forester’s language server (like Helix or Neovim), Forester automatically starts up a preview server that you can access in your web browser at localhost:8080.
    • Forester renders pages on-demand, which means that you no longer have to wait for the entire forest to render every time you change one thing. The preview is refreshed live as you type in your editor. Note that live updates are only available through the language server.
    • If you add edit_command = "/usr/bin/my-editor {tree}" to the [forest] block of forest.toml, an edit button will appear next to each tree in the preview mode; ctrl-e may also be used to invoke the configured editor.
    • In the live preview, Forester’s (limited) documentation can be accessed the lower-right-hand corner of the window.
  5. New search palette. In order to reduce our dependency on the JavaScript ecosystem, Forester now comes with its own homemade search palette, built in OCaml using Daniel Bünzli’s brr library. When in live preview mode (see above), it supports full-text search across your entire forest.
  6. Hypermedia approach. Forester’s main priority going forward remains its static output, which can be uploaded to any dumb web hosting provider, such as your University pages. We are, however, experimenting with the use of more sophisticated hypermedia controls (via HTMX) to provide better interactivity; the HTMX mode is currently used in the preview server and nowhere else.
  7. Better LSP compliance. Forester now emits UTF-16 character offsets, which are de facto required by most language clients. This opens the door to the possibility of a working Visual Studio Code extension, whose development is now underway.
  8. Improved unofficial Windows support. It is now possible in principle to run Forester on Windows (with thanks to Anil Madhavapeddy and other Eio contributors for their contributions). Forester’s developers do not use Windows, so we do not make any guarantees about Forester on Windows, but the situation is at least improved.