ela
Contents

ManualEditors

Colour without the server

In the terminalela --spec colour-without-the-server

ela-editor's generate.ela writes three files from what ela says about itself: the keywords from ela --spec keywords, the built-ins from ela --builtins --json, and the string forms and their escapes from ela --spec strings. They are never edited by hand, and its tests fail when one differs from what ela gives.

Without the parser, the files colour by pattern. The name after proc is a function, and the name after struct or enum a type. Mode.FAST, a name with a capital first letter and a member, is a type and an enum member. The word after name: in a parameter list or a struct's field is a type, and str.split(, a built-in package's proc called, is a built-in function. Each file uses its format's standard names for these, so an editor's theme colours them.

File in ela-editorColoursUsed by
grammar/ela.tmLanguage.jsona TextMate grammar, scope source.elaShiki, GitHub's code views, VS Code and VSCodium through the folder above
syntax/ela.vima Vim syntax filethe Neovim plugin, before the server answers; Vim
gtksourceview/ela.langa GtkSourceView 5 language fileKAT800, GNOME Text Editor and other GtkSourceView editors; ela's package installs it

Vim, which has no vim.lsp, colours ela with the syntax file alone: syntax/ela.vim copied to ~/.vim/syntax/ela.vim, and this line in ~/.vim/ftdetect/ela.vim. Tested with Vim 9:

autocmd BufRead,BufNewFile *.ela setfiletype ela