Rename the language from Dino to Rex

Files use .rex, the command is rex, and the crate, runtime prefixes,
docs, editor files and examples all use the new name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Your NameandClaude Opus 5.5 committed 2026-11-08 13:51:23 +01:00
1 parent 2f44f09b6a
commit 7cf9727bcd
94 files changed
+858 -858

No files matched your search

+29 -29
View File
@@ -1,20 +1,20 @@
# Editor support for Dino
# Editor support for Rex
Everything here talks to the compiler itself, so what you see in the editor is exactly what
`dino run` would tell you.
`rex run` would tell you.
| You get | How |
|---------|-----|
| Syntax colours | a grammar file (VS Code, Neovim, Vim) |
| Errors underlined as you type | the language server, `dino lsp` |
| Format the file (and on save) | the same server, using `dino fmt` |
| Errors underlined as you type | the language server, `rex lsp` |
| Format the file (and on save) | the same server, using `rex fmt` |
| Outline, go to definition, hover, completion, parameter hints | the same server (reads the file's names; no type checking) |
First put the `dino` program on your `PATH`:
First put the `rex` program on your `PATH`:
```text
cargo build --release
cp target/release/dino ~/.local/bin/ # or anywhere on your PATH
cp target/release/rex ~/.local/bin/ # or anywhere on your PATH
```
## VS Code
@@ -24,14 +24,14 @@ The extension is in `editors/vscode/`.
```text
cd editors/vscode
npm install # downloads the small language-client library
npx @vscode/vsce package # makes dino-0.1.0.vsix
code --install-extension dino-0.1.0.vsix
npx @vscode/vsce package # makes rex-0.1.0.vsix
code --install-extension rex-0.1.0.vsix
```
To try it without installing, open the `editors/vscode` folder in VS Code and press **F5**.
If `dino` is not on your `PATH`, set **Dino: Server Path** in the settings to the full path.
Format-on-save and 4-space indents are switched on for `.dino` files by default.
If `rex` is not on your `PATH`, set **Rex: Server Path** in the settings to the full path.
Format-on-save and 4-space indents are switched on for `.rex` files by default.
## Neovim
@@ -40,19 +40,19 @@ Put the `vim/` folder on your runtime path to get file detection and colours, fo
```text
mkdir -p ~/.config/nvim/syntax ~/.config/nvim/ftdetect
cp vim/syntax/dino.vim ~/.config/nvim/syntax/
cp vim/ftdetect/dino.vim ~/.config/nvim/ftdetect/
cp vim/syntax/rex.vim ~/.config/nvim/syntax/
cp vim/ftdetect/rex.vim ~/.config/nvim/ftdetect/
```
Then in `init.lua` (Neovim 0.8 or newer):
```lua
vim.api.nvim_create_autocmd("FileType", {
pattern = "dino",
pattern = "rex",
callback = function(args)
vim.lsp.start({
name = "dino",
cmd = { "dino", "lsp" },
name = "rex",
cmd = { "rex", "lsp" },
root_dir = vim.fs.dirname(args.file),
})
vim.bo.shiftwidth = 4
@@ -61,7 +61,7 @@ vim.api.nvim_create_autocmd("FileType", {
})
-- format when saving
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.dino",
pattern = "*.rex",
callback = function() vim.lsp.buf.format({ async = false }) end,
})
```
@@ -73,26 +73,26 @@ Plain Vim gets the colours from the same two files (no language server).
Add this to `~/.config/helix/languages.toml`:
```toml
[language-server.dino]
command = "dino"
[language-server.rex]
command = "rex"
args = ["lsp"]
[[language]]
name = "dino"
scope = "source.dino"
file-types = ["dino"]
name = "rex"
scope = "source.rex"
file-types = ["rex"]
comment-token = "//"
indent = { tab-width = 4, unit = " " }
language-servers = ["dino"]
language-servers = ["rex"]
auto-format = true
```
## Any other editor
Anything that can run a language server works: start `dino lsp` (it speaks the standard
protocol over stdin/stdout) for files ending in `.dino`. It supports diagnostics and
Anything that can run a language server works: start `rex lsp` (it speaks the standard
protocol over stdin/stdout) for files ending in `.rex`. It supports diagnostics and
whole-file formatting. The grammar for colours is the TextMate file
`vscode/syntaxes/dino.tmLanguage.json`, which Sublime Text, Zed and many others can read.
`vscode/syntaxes/rex.tmLanguage.json`, which Sublime Text, Zed and many others can read.
## What the server does (and doesn't) do yet
@@ -105,7 +105,7 @@ whole-file formatting. The grammar for colours is the TextMate file
## Opcode
Opcode (the C++ editor in `~/Desktop/Porn/Linux/Clean/opcode`) knows Dino out of the box: colours,
`//` comments, snippets, the outline, format with `dino fmt -`, and the language server
(`dino lsp`) for errors, go to definition, hover, completion and parameter hints. It only needs
`dino` on your `PATH` (see the top of this page).
Opcode (the C++ editor in `~/Desktop/Porn/Linux/Clean/opcode`) knows Rex out of the box: colours,
`//` comments, snippets, the outline, format with `rex fmt -`, and the language server
(`rex lsp`) for errors, go to definition, hover, completion and parameter hints. It only needs
`rex` on your `PATH` (see the top of this page).