Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vorto-editor.dev/llms.txt

Use this file to discover all available pages before exploring further.

Vorto’s language system is fully open: anything you can express in the built-in language table you can also define or override in your config.toml. You add a [languages.<name>] block for the language definition and, if it needs an LSP server, a matching [lsp.<server-name>] block. Vorto merges your entries onto the built-in defaults at startup, so a partial block changes only the fields you specify.

Add a new language

The minimal definition for a language that isn’t already built in is a name, a list of file extensions, and optionally a comment token:
[languages.fish]
extensions = ["fish"]
comment_token = "#"
With just this, Vorto will recognise .fish files and enable comment toggling. Add more fields as needed.

Full example: Fish shell

The following block configures Fish shell with a tree-sitter grammar, a custom LSP server, and a non-default indent width:
[languages.fish]
extensions = ["fish"]
comment_token = "#"
indent_width = 4
lsp = ["fish-lsp"]

[lsp.fish-lsp]
command = "fish-lsp"
args = ["--stdio"]
root_markers = [".git"]
1

Define the language block

Add a [languages.<name>] section to ~/.config/vorto/config.toml. Set extensions to the file extensions that should trigger this language, and comment_token to the single-line comment prefix:
[languages.fish]
extensions = ["fish"]
comment_token = "#"
indent_width = 4
Per-language editor settings (indent_width, tab_width, use_tabs, etc.) go directly in the language block — they are not nested under a sub-table.
2

Reference a tree-sitter grammar

By default Vorto looks for a grammar whose filename stem matches the language name. If the grammar has a different name, set it explicitly:
[languages.fish]
extensions = ["fish"]
grammar = "fish-shell"
Install the grammar before opening files of this type:
vorto grammar install fish-shell
Custom grammars must be installed manually. Only the languages listed in vorto grammar list have built-in recipes; for anything else you’ll need to build the grammar library yourself and place it in the grammar directory (shown in the output of vorto grammar list).
3

Define the LSP server

If your language has an LSP server, define it in a [lsp.<server-name>] block. command is required for any server that isn’t already built in:
[lsp.fish-lsp]
command = "fish-lsp"
args = ["--stdio"]
root_markers = [".git"]
root_markers is a list of filenames that Vorto looks for when walking up the directory tree to find the workspace root. The server starts when any of these files is found.
4

Attach the server to the language

Set the lsp field on the language block to a list of server names. The names must match keys in the [lsp] table:
[languages.fish]
extensions = ["fish"]
comment_token = "#"
indent_width = 4
lsp = ["fish-lsp"]
5

Configure a formatter (optional)

Set formatter to run an external command on save. The buffer’s text is piped on stdin and the command’s stdout replaces the buffer:
[languages.fish]
extensions = ["fish"]
comment_token = "#"
formatter = { command = "fish_indent", args = [] }
When formatter is set, it takes precedence over textDocument/formatting from the LSP.

Override a built-in language

You don’t need to re-state every field to change a built-in language — only the fields you include are changed. For example, to swap Python’s formatter from the default (none) to black:
[languages.python]
formatter = { command = "black", args = ["-"] }
To change only the indent width for Go without touching anything else:
[languages.go]
indent_width = 4
tab_width = 4
The lsp field is replaced whole, not merged. If you set lsp = ["my-server"] on a built-in language, the built-in servers for that language are dropped. Re-state any built-in server names you still want:
[languages.python]
lsp = ["pyright", "my-extra-server"]

Workspace-local config

Place a .vorto file (or a .vorto/config.toml directory form) at your project root to apply language overrides only within that project. The workspace config takes precedence over ~/.config/vorto/config.toml. This is useful for project-specific formatters or indent settings without affecting your global config.