IDE Support

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


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.


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 auto-generated methods like IsCircle(), IsRectangle(), IsTriangle().


Full Feature List

Plugin features (local, no LSP needed)

LSP features (via gala lsp)


Installation

GoLand / IntelliJ IDEA

  1. Install the GALA CLI from releases and add it to your PATH
  2. Install the plugin: Settings > Plugins > Install from Disk > select gala-intellij-plugin.zip from releases
  3. Restart the IDE — the LSP server starts automatically when you open a .gala file

VS Code

Add to .vscode/settings.json:

{
  "lsp.servers": {
    "gala": {
      "command": "gala",
      "args": ["lsp"],
      "filetypes": ["gala"]
    }
  }
}

Neovim

require('lspconfig.configs').gala = {
  default_config = {
    cmd = { 'gala', 'lsp' },
    filetypes = { 'gala' },
    root_dir = require('lspconfig.util').root_pattern('gala.mod', '.git'),
  },
}
require('lspconfig').gala.setup({})

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.