Skip to content

bajrangCoder/zed-mojo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed Mojo

A Zed extension to provide Mojo language support with syntax highlighting and LSP integration.

Features

  • Syntax highlighting via tree-sitter
  • Language Server Protocol (LSP) support

Installation

  1. Install the Magic Package Manager
  2. Clone this repository
  3. Open Zed and click "Install Dev Extension" from the extensions page
  4. Select the cloned repository

Configuration

LSP Settings

Configure the Language Server Protocol in your Zed settings:

{
  "lsp": {
    "mojo": {
      "settings": {
        "lsp_path": "/name/my-proj/.magic/envs/default/bin/mojo-lsp-server", // path to mojo-lsp-server
        "args": ["--log=verbose"] // additional args
      }
    }
  },
}

Formatter Settings

Enable formatting by adding following in zed setting :

{
  "languages": {
    "mojo": {
      "formatter": {
        "external": {
          "command": "magic",
          "arguments": ["run", "mojo", "format", "-q", "-"]
        }
      }
    }
  }
}

Grammar

The extension uses tree-sitter-mojo for syntax highlighting.

Contributing

Feedback and contributions are welcome! Please share your suggestions to help improve this extension.

Note

The Magic Package Manager is required for the LSP functionality to work properly.

Warning

This extension is not published to zed extension store, as it isn't stable and isn't completed yet.

About

Mojo support for Zed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published