Fork of zed-extensions/odin
  • Rust 49.9%
  • Tree-sitter Query 26.2%
  • Python 23.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
zed-zippy[bot] 914a4336bd
Update CI workflows to 3183c04 (#57)
Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-25 18:55:38 +00:00
.github/workflows Update CI workflows to 3183c04 (#57) 2026-03-25 18:55:38 +00:00
languages/odin Set hard tabs as default (#37) 2025-12-30 12:10:03 +01:00
resources/lldb Load a custom LLDB py script to enhance the display of Odin slices, maps, strings, and unions (#23) 2026-02-08 13:56:16 +01:00
src Load a custom LLDB py script to enhance the display of Odin slices, maps, strings, and unions (#23) 2026-02-08 13:56:16 +01:00
.gitignore Bump version to v0.2.3 (#2) 2025-03-31 16:10:05 -05:00
Cargo.lock Bump version to v0.3.11 (#47) 2026-02-08 14:10:11 +01:00
Cargo.toml Bump version to v0.3.11 (#47) 2026-02-08 14:10:11 +01:00
extension.toml Bump version to v0.3.11 (#47) 2026-02-08 14:10:11 +01:00
LICENSE Initial commit 2024-11-12 22:19:59 +01:00
README.md Update README.md (#42) 2025-12-30 18:57:32 +01:00

🔨 Odin Language Support for Zed

This project provides Odin programming language support, featuring syntax highlighting and code navigation via Tree-sitter, Language Server capabilities like autocompletion and diagnostics, and full debugging support.


Language Server

This extension automatically updates to the latest OLS (Odin Language Server) monthly build on each startup.

Using a Custom OLS Binary

If you want to use a specific OLS version or a locally built binary, you can override the automatic download:

{
  "lsp": {
    "ols": {
      "binary": {
        "path": "/path/to/your/ols",
        "arguments": []
      }
    }
  }
}

Binary Resolution Order

The extension searches for the OLS binary in the following priority order:

  1. Custom binary path - If configured in settings (see above)
  2. System PATH - Checks if ols is available in your system PATH
  3. Cached binary - Uses previously downloaded version if available
  4. GitHub download - Downloads latest release from DanielGavin/ols

Configuration

Add OLS configuration directly in your Zed settings.json. This approach works project-wide and doesn't require additional files:

{
  "lsp": {
    "ols": {
      "initialization_options": {
        "enable_hover": true,
        "enable_snippets": true,
        "enable_procedure_snippet": true,
        "enable_completion_matching": true,
        "enable_references": true,
        "enable_document_symbols": true,
        "enable_format": true,
        "enable_document_links": true,
        "collections": [
          {
            "name": "shared",
            "path": "/path/to/shared"
          }
        ]
      }
    }
  }
}

Use ols.json in Workspace Root

Alternatively, create an ols.json file at the root of your workspace.For more configuration options, see the OLS documentation.


Snippets

You can define custom code snippets to speed up your Odin development workflow.

Creating Snippets

  1. Open the command palette (Cmd/Ctrl+Shift+P)
  2. Run snippets: configure snippets
  3. Create or edit odin.json in the snippets directory
  4. Add your snippets in JSON format

Example snippet:

{
  "Main procedure": {
    "prefix": "main",
    "body": [
      "package main",
      "",
      "import \"core:fmt\"",
      "",
      "main :: proc() {",
      "\t$0",
      "}"
    ],
    "description": "Creates a main package with imports"
  }
}

For detailed information about creating and using snippets, see Zed's snippet documentation.


Debugging

This extension supports debugging Odin applications using LLDB.