> ## 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.

# Built-in language support in Vorto: extensions and servers

> A reference of every language Vorto supports by default — file extensions, tree-sitter grammar recipe, built-in LSP server, and default formatter.

Vorto ships with built-in definitions for 44 languages. Each definition covers the file extensions (and exact filenames where relevant) that map to the language, which tree-sitter grammar recipe is used, and any default LSP server or formatter. You do not need any configuration to use these languages — install the grammar and the LSP server binary, and Vorto picks them up automatically.

## Built-in language table

| Language         | Extensions / filenames                                | Grammar recipe | Built-in LSP server                   | Default formatter      |
| ---------------- | ----------------------------------------------------- | -------------- | ------------------------------------- | ---------------------- |
| Rust             | `.rs`                                                 | `rust`         | `rust-analyzer`                       | `rustfmt`              |
| Python           | `.py`                                                 | `python`       | `pyright`                             | —                      |
| Go               | `.go`                                                 | `go`           | `gopls`                               | `gofmt`                |
| JavaScript       | `.js`, `.jsx`, `.mjs`, `.cjs`                         | `javascript`   | `typescript-language-server`          | —                      |
| TypeScript       | `.ts`                                                 | `typescript`   | `vtsls`, `typescript-language-server` | —                      |
| TSX              | `.tsx`                                                | `tsx`          | `vtsls`, `typescript-language-server` | —                      |
| TOML             | `.toml`                                               | `toml`         | `taplo`                               | —                      |
| Kotlin           | `.kt`, `.kts`                                         | `kotlin`       | `kotlin-lsp`                          | —                      |
| C                | `.c`, `.h`                                            | `c`            | `clangd`                              | —                      |
| C++              | `.cpp`, `.cc`, `.cxx`, `.hpp`, `.hh`, `.hxx`          | `cpp`          | `clangd`                              | —                      |
| Java             | `.java`                                               | `java`         | `jdtls`                               | —                      |
| Bash             | `.sh`, `.bash`                                        | `bash`         | `bash-language-server`                | —                      |
| JSON             | `.json`                                               | `json`         | `vscode-json-language-server`         | —                      |
| YAML             | `.yaml`, `.yml`                                       | `yaml`         | `yaml-language-server`                | —                      |
| Markdown         | `.md`, `.markdown`                                    | `markdown`     | `marksman`                            | —                      |
| HTML             | `.html`, `.htm`                                       | `html`         | `vscode-html-language-server`         | —                      |
| CSS              | `.css`                                                | `css`          | `vscode-css-language-server`          | —                      |
| Lua              | `.lua`                                                | `lua`          | `lua-language-server`                 | —                      |
| Ruby             | `.rb`                                                 | `ruby`         | `ruby-lsp`                            | —                      |
| SQL              | `.sql`                                                | `sql`          | —                                     | —                      |
| Zig              | `.zig`, `.zon`                                        | `zig`          | `zls`                                 | `zig fmt --stdin`      |
| Dockerfile       | `.dockerfile`, `Dockerfile`, `Containerfile`          | `dockerfile`   | —                                     | —                      |
| Make             | `.mk`, `.make`, `Makefile`, `makefile`, `GNUmakefile` | `make`         | —                                     | —                      |
| HCL / Terraform  | `.hcl`, `.tf`, `.tfvars`                              | `hcl`          | `terraform-ls`                        | —                      |
| Diff             | `.diff`, `.patch`                                     | `diff`         | —                                     | —                      |
| Vue              | `.vue`                                                | `vue`          | `vue-language-server`                 | —                      |
| Svelte           | `.svelte`                                             | `svelte`       | `svelteserver`                        | —                      |
| Haskell          | `.hs`                                                 | `haskell`      | `haskell-language-server-wrapper`     | —                      |
| Elixir           | `.ex`, `.exs`                                         | `elixir`       | `lexical`, `elixir-ls`                | —                      |
| Nix              | `.nix`                                                | `nix`          | `nixd`, `nil`                         | —                      |
| C#               | `.cs`                                                 | `c-sharp`      | `csharp-ls`                           | —                      |
| Swift            | `.swift`                                              | `swift`        | `sourcekit-lsp`                       | —                      |
| PHP              | `.php`                                                | `php`          | `intelephense`                        | —                      |
| Dart             | `.dart`                                               | `dart`         | `dart`                                | `dart format`          |
| OCaml            | `.ml`, `.mli`                                         | `ocaml`        | `ocamllsp`                            | `ocamlformat`          |
| GraphQL          | `.graphql`, `.gql`                                    | `graphql`      | `graphql-lsp`                         | —                      |
| Fish             | `.fish`                                               | `fish`         | `fish-lsp`                            | `fish_indent`          |
| Julia            | `.jl`                                                 | `julia`        | `julia` (LanguageServer.jl)           | —                      |
| Gleam            | `.gleam`                                              | `gleam`        | `gleam`                               | `gleam format --stdin` |
| Scala            | `.scala`, `.sbt`, `.sc`                               | `scala`        | `metals`                              | —                      |
| Odin             | `.odin`                                               | `odin`         | `ols`                                 | —                      |
| Protocol Buffers | `.proto`                                              | `proto`        | `protols`                             | —                      |
| CMake            | `.cmake`, `CMakeLists.txt`                            | `cmake`        | `cmake-language-server`               | —                      |
| XML              | `.xml`, `.xsd`, `.xsl`, `.xslt`, `.svg`, `.wsdl`      | `xml`          | `lemminx`                             | —                      |

## Notes on specific languages

**TypeScript and TSX** each have a separate language entry so that the JSX-aware `tsx` grammar and its queries are used for `.tsx` files. Both languages try `vtsls` first and fall back to `typescript-language-server`; whichever binary is found on `PATH` is used. Configure `lsp = [...]` in `[languages.typescript]` if you want to restrict to a single server.

**C and C++** both use `clangd`. `.h` files are routed to C by default; C++-specific headers (`.hpp`, `.hh`, `.hxx`) are routed to C++.

**JavaScript** includes `.jsx`, `.mjs`, and `.cjs` extensions in addition to `.js`.

**Markdown** installs only the block-level grammar from `tree-sitter-grammars/tree-sitter-markdown`. The inline grammar requires injection support that is not yet implemented.

**SQL**, **Dockerfile**, **Make**, and **Diff** have built-in grammar recipes but no built-in LSP server.

**Go** and **Make** use tab indentation by default — `gofmt` requires it for Go, and Make recipes are tab-indented by syntax.

**HCL** covers Terraform (`.tf`, `.tfvars`) and generic HCL configs (`.hcl`) through a single grammar. The `terraform-ls` server is attached by default.

**Vue** and **Svelte** use HTML-style comment tokens (`<!--`) since the outermost layer of each single-file component is a template. Comments inside `<script>` blocks will be incorrect until grammar injection is wired up.

**Elixir** and **Nix** each register two LSP servers — the preferred server is listed first, and the first binary found on `PATH` wins (the same pattern as TypeScript). Set `lsp = [...]` in `[languages.elixir]` or `[languages.nix]` to pin a specific server.

**OCaml** uses a single language entry for both `.ml` and `.mli`. Files share `ocamllsp` and `ocamlformat`.

**Swift** depends on `sourcekit-lsp`, which ships with the Swift toolchain — install Swift and the server is already on `PATH`.

**Julia** and **Gleam** host their language server inside the language's own runtime rather than a standalone binary: Julia launches `LanguageServer.jl` through the `julia` executable, and Gleam's server is built into the `gleam` CLI. Install the toolchain and the server comes with it.

**Scala** maps `.scala` sources, `.sbt` build files, and `.sc` worksheets to a single entry, served by `metals` (install it through Coursier).

**XML** also covers `.xsd`, `.xsl`, `.xslt`, `.svg`, and `.wsdl`. There is no line-comment token, so the `<space>c` toggle uses the `<!-- -->` block form.

## Installing grammars and LSP servers

Grammar recipes and LSP server configurations are independent. You need to install both separately:

<Steps>
  <Step title="Install the tree-sitter grammar">
    ```bash theme={null}
    vorto grammar install rust
    ```

    This builds the shared library and writes query files to `~/.config/vorto/`. See [Installing tree-sitter grammars](/languages/grammars) for full details.
  </Step>

  <Step title="Install the LSP server binary">
    Install the server binary through your system's package manager or language toolchain. For example:

    ```bash theme={null}
    # Rust
    rustup component add rust-analyzer

    # Python
    pip install pyright

    # Go
    go install golang.org/x/tools/gopls@latest

    # Zig
    # Download zls from https://github.com/zigtools/zls/releases
    ```

    The binary must be on your `PATH` when you start Vorto.
  </Step>
</Steps>

## Adding custom languages

You can add support for languages not listed here by declaring a `[languages.<name>]` block in `~/.config/vorto/config.toml`:

```toml theme={null}
[languages.mylang]
extensions = ["mlg"]
comment_token = "//"
lsp = ["my-lsp-server"]

[lsp.my-lsp-server]
command = "my-lsp"
args = ["--stdio"]
root_markers = ["myproject.json"]
```

You can also override any field for a built-in language. For example, to add an extra extension to Rust:

```toml theme={null}
[languages.rust]
extensions = ["rs", "rlib"]
```

<Note>
  LSP server binaries are never bundled with Vorto. You must install them separately and ensure they are available on your `PATH`.
</Note>
