notes

Inlay hints for Whitespace

The syntax of the Whitespace programming language is invisible—it uses only space, tab, and line feed—so editing a program manually is tedious and most people will instead develop using a “Whitespace assembly” syntax with readable opcodes. I am working on a to-be language server for Whitespace that will use inlay hints to display the opcodes in the invisible syntax. The LSP only allows Type and Parameter values for InlayHintKind, which is exclusive of this use case (vscode#151920). I propose that this enum be extended to include a variant for this case.

This gist roughly demonstrates how the inlay hints would work for a Whitespace program: It includes the annotated example from the Whitespace tutorial formatted in the standard syntax, in Whitespace assembly syntax, and with inlay hints for assembly opcodes interspersed.