An open API service indexing awesome lists of open source software.

https://github.com/zed-extensions/nu

Zed support for the Nu language (https://www.nushell.sh)
https://github.com/zed-extensions/nu

Last synced: 18 days ago
JSON representation

Zed support for the Nu language (https://www.nushell.sh)

Awesome Lists containing this project

README

        

# Zed Nu

This extension adds support for the [Nu](https://github.com/nushell/nushell) 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.

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

### Example of Minimal lsp.nu

```nushell
# 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|
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"]
```