Skip to content

Type to search extensions

Nu

v0.0.10 Zed org

Nushell language support for Zed

Updated 5 months ago
82k downloads 36 stars Repository ↗

Zed Nu

This extension adds support for the Nu language.

Override Default Configuration (Optional)

You can minimize the configuration autoloaded when the server starts, which may improve performance as complicated Nushell configurations can slow down the language server.

{
  "lsp": {
    "nu": {
      "binary": {
        "path": "nu",
        "arguments": ["--config", "~/.config/nushell/lsp.nu", "--lsp"]
      }
    }
  }
}

Example of Minimal lsp.nu

# Configure PATH to search for external command completions
$env.path = $env.path
| split row (char esep)
| append ($env.HOME | path join ".cargo" "bin")
| uniq

# Set up external completer (requires carapace)
$env.CARAPACE_LENIENT = 1
$env.CARAPACE_BRIDGES = 'zsh'
$env.config.completions.external.completer = {|spans: list<string>|
  carapace $spans.0 nushell ...$spans
  | from json
  | if ($in | default [] | where value =~ '^-.*ERR$' | is-empty) { $in } else { null }
}

# Define extra library directories to load definitions from
const NU_LIB_DIRS = ["some/extra/lib"]
ZedExt An unofficial community project. Not affiliated with Zed Industries.

Data from Zed’s extension registry and GitHub · updated