-
Notifications
You must be signed in to change notification settings - Fork 0
Editor Zed
Zed is the most complete editor setup in this repository because Lexicon includes a dev extension under:
Editors/Zed/lexicon
The extension attaches lexicon-lsp to Lexicon, Rust, and Go buffers.
swift build -c release --product lexicon-lspEither put it on PATH:
cp .build/release/lexicon-lsp /usr/local/bin/lexicon-lspOr keep the absolute path for Zed settings:
/absolute/path/to/Lexicon/.build/release/lexicon-lsp
Open Zed settings and add:
{
"lsp": {
"lexicon-lsp": {
"binary": {
"path": "/absolute/path/to/Lexicon/.build/release/lexicon-lsp"
}
}
}
}If lexicon-lsp is already on PATH, this setting is optional.
In Zed:
- Open the command palette.
- Run
zed: install dev extension. - Select
Editors/Zed/lexicon.
Zed's extension docs call this "Install Dev Extension". Rust must be installed through rustup for dev extensions that include Rust/Wasm code.
At your workspace root, add:
{
"lexicon": "commerce.lexicon"
}The file can be named lexicon-lsp.json, .lexicon-lsp.json, lexicon.conf, or .lexicon.conf.
zed Examples/ZedOpen demo.lexicon, demo.rs, or demo.go.
Try completing after:
l!(test.type.even.or:
l("test.type.even.The LSP should offer valid path segments such as bad and no. The intentionally wrong bed examples should be diagnosed as unknown Lexicon paths.
The extension manifest registers:
-
Lexiconfiles with the.lexiconsuffix. -
lexicon-lspfor Lexicon, Rust, and Go. - language IDs
lexicon,rust, andgo.
The Lexicon language config uses hard tabs and # line comments.
If nothing starts:
- Run
swift build -c release --product lexicon-lsp. - Confirm the configured path exists and is executable.
- Open Zed logs with
zed: open log. - Launch Zed from a terminal with
zed --foregroundfor more extension output. - Confirm
lexicon-lsp.jsonpoints to a lexicon path relative to the config file.
If .lexicon files show indentation diagnostics, convert leading spaces to tabs.