IDE Support

GALA ships with a GoLand/IntelliJ plugin, a VS Code extension and an LSP server that work together to provide a full development experience. The editor integrations handle local features instantly (syntax highlighting and bracket matching in both, plus code folding and live templates in IntelliJ), while the LSP server (gala lsp) adds type-aware intelligence (diagnostics, completion, inlay hints, go-to-definition).


Editor Setup

Every editor below talks to the same language server, gala lsp, which is part of the gala binary. Install the GALA CLI first (Getting Started) and check that gala version works in a terminal.

VS Code

  1. Install GALA (GALA.gala) from the Visual Studio Marketplace: search for GALA in the Extensions view, or run

    code --install-extension GALA.gala
    

    VSCodium, Cursor and other editors that use Open VSX can install it from Open VSX.

  2. Open a .gala file. The extension starts gala lsp.

The extension is a thin client: it registers the gala language for .gala files (syntax highlighting, comments, brackets) and starts gala lsp for diagnostics, hover, completion, signature help, inlay hints, go-to-definition, references and symbols. It runs gala from PATH. To run another binary, set gala.serverPath to its path; when that setting is not set, the GALA_PATH environment variable is used before PATH. Offline, install the gala-vscode-<version>.vsix attached to each release with Extensions > ... > Install from VSIX….

GoLand / IntelliJ IDEA

  1. Open Settings > Plugins > Marketplace, search for GALA (plugin page), install it and restart the IDE.
  2. Open a .gala file. The plugin starts gala lsp.

The plugin needs GoLand or IntelliJ IDEA 2025.2 or later. It parses .gala files itself for highlighting, folding, the structure view and live templates, and gets diagnostics, hover, completion and inlay hints from gala lsp. It runs the binary named by the GALA_PATH environment variable, or gala from PATH. Each release also attaches gala-intellij-plugin.zip, which installs with Settings > Plugins > gear icon > Install Plugin from Disk….

Neovim

Neovim 0.11 and later configure a language server without plugins. In init.lua:

vim.filetype.add({ extension = { gala = 'gala' } })

vim.lsp.config('gala', {
  cmd = { 'gala', 'lsp' },
  filetypes = { 'gala' },
  root_markers = { 'gala.mod', '.git' },
})
vim.lsp.enable('gala')

Neovim has no GALA syntax file, so this gives diagnostics, hover, completion and navigation but no syntax highlighting. On Neovim 0.10, register the same command, file type and root markers as a custom server in nvim-lspconfig.

Claude Code

The GALA plugin connects Claude Code to gala lsp, so an AI agent editing .gala files uses the same analysis as your editor:

The plugin starts the gala binary but does not include it: check that gala version works in the terminal you start Claude Code from. Then run in Claude Code:

/plugin marketplace add martianoff/gala
/plugin install gala@gala

Projects created with gala new include a .claude/settings.json that declares the marketplace, so Claude Code installs and enables the plugin once you trust the project folder. If gala is not on the PATH, Claude’s LSP tool fails with Command 'gala' not found and no GALA diagnostics reach it. Diagnostics cover what the GALA transpiler checks; errors that only the Go compiler finds in the generated code still need gala build. Full instructions: ide/claude-code.

Helix and other LSP clients

Any editor with an LSP client can use the server, which speaks JSON-RPC over stdin and stdout:

For Helix, add to languages.toml:

[language-server.gala]
command = "gala"
args = ["lsp"]

[[language]]
name = "gala"
scope = "source.gala"
file-types = ["gala"]
roots = ["gala.mod"]
comment-token = "//"
language-servers = ["gala"]

As in Neovim, there is no GALA grammar for Helix, so the language server gives diagnostics, hover, completion and navigation without syntax highlighting.

Verify

Run gala lsp in a terminal. It should start and wait for JSON-RPC messages on stdin/stdout. If you see no output and no errors, the server is running correctly.


Syntax Highlighting

The plugin provides rich syntax highlighting for all GALA constructs — keywords, types, string interpolation expressions, comments, operators, and built-in functions. Methods with receivers, pattern matching, and sealed type destructuring are all highlighted with distinct colors.

GALA syntax highlighting in IntelliJ showing methods, pattern matching, and string interpolation

The screenshot shows methods with receivers (func (p Person) FullInfo()), string interpolation (s"${p.name} (age ${p.age})"), and pattern matching on sealed types (case Circle(r) => ...) — all with distinct semantic coloring.


Type-Aware Code Completion

After typing a dot (.), the LSP server resolves the receiver’s type and offers context-aware completions — only the methods and fields that belong to that type. Each suggestion includes the full type signature.

GALA dot completion popup showing type-aware method and field suggestions for Order type

Here the cursor is inside a .Map() lambda on an Order value. The completion popup shows Order’s methods (ApplyDiscount, ToSummary, Validate) with return types, and its fields (id, items, total) — all resolved from the transpiler’s type information.


Go Interop Intelligence

Values whose type comes from a Go package used to be a dead end in the editor: no completion, nothing to click. That gap is closed — Go-backed code now behaves like GALA code.

.Size() / .ByteSize() magic methods

The transpiler lowers .Size() / .ByteSize() on Go primitive receivers (string, slice, map) to len(...) / utf8.RuneCountInString(...). Those receivers carry no GALA type metadata, so the editor used to know nothing about them. The LSP now mirrors the transpiler’s rule: both resolve to int, Size() is offered on string/slice/map and ByteSize() on string, and neither raises a false diagnostic. Because these methods have no source definition, go-to-definition on them correctly resolves to nothing rather than jumping to an unrelated same-named method.


Inlay Type Hints

The LSP server displays inferred types as inline hints next to val and var declarations. These hints come directly from the transpiler’s type resolver — the same types used for code generation — so they are always accurate.

Basic declarations and tuples

GALA inlay hints showing inferred types for tuple declarations and function return values

Inlay hints show Tuple[int, int] for pair declarations, int for simple values, and track types through function returns — all without explicit type annotations in the source code.

Method chains with Option types

GALA inlay hints tracking types through Option Map and GetOrElse method chains

The transpiler tracks types through method chains: validated.Map(...) produces Option[Order], chaining .Map((o) => o.ToSummary()) produces Option[string], and .GetOrElse("No order") unwraps to string. Each step is visible in the editor.


Structure View

The plugin provides a structure view panel showing the outline of your GALA file — types, sealed variants, methods, and fields at a glance.

GALA structure view showing sealed type Shape with Circle, Rectangle, Triangle variants and their fields

The structure view displays sealed type Shape with its variants (Circle, Rectangle, Triangle), each variant’s fields, and the auto-generated Apply/Unapply companion methods.


Full Feature List

Plugin features (local, no LSP needed)

LSP features (via gala lsp)