documentlanguagemodel Public
Use DLM in Zed
The dlm-lsp language server is editor-agnostic. Zed picks it up through a
custom language definition.
Install
pip install dlm-lsp
which dlm-lsp # confirm it's on PATH
Configure
Zed configures custom languages through ~/.config/zed/settings.json:
{
"languages": {
"DLM": {
"lsp": ["dlm-lsp"]
}
},
"lsp": {
"dlm-lsp": {
"binary": {
"path": "dlm-lsp",
"arguments": []
}
}
},
"file_types": {
"DLM": ["dlm"]
}
}
If dlm-lsp isn't on your PATH (e.g. installed inside a venv), set
binary.path to its absolute location:
"binary": {
"path": "/Users/you/.venvs/dlm/bin/dlm-lsp",
"arguments": []
}
Verify
Open any .dlm file in Zed. You should see:
- Diagnostics on schema errors (red squiggles in frontmatter on bad keys)
- Hover info on
base_model:keys - Completions on the base-model registry
The LSP log is reachable through the command palette → zed: open log.
Limitations vs. the VSCode extension
Zed clients consume the LSP only — they don't render the side panel or quick-insert UI. For those, use the VSCode extension. Everything that's diagnostic, hover, completion, or code-action is fully available in Zed.
View source
| 1 | # Use DLM in Zed |
| 2 | |
| 3 | The `dlm-lsp` language server is editor-agnostic. Zed picks it up through a |
| 4 | custom language definition. |
| 5 | |
| 6 | ## Install |
| 7 | |
| 8 | ```bash |
| 9 | pip install dlm-lsp |
| 10 | which dlm-lsp # confirm it's on PATH |
| 11 | ``` |
| 12 | |
| 13 | ## Configure |
| 14 | |
| 15 | Zed configures custom languages through `~/.config/zed/settings.json`: |
| 16 | |
| 17 | ```json |
| 18 | { |
| 19 | "languages": { |
| 20 | "DLM": { |
| 21 | "lsp": ["dlm-lsp"] |
| 22 | } |
| 23 | }, |
| 24 | "lsp": { |
| 25 | "dlm-lsp": { |
| 26 | "binary": { |
| 27 | "path": "dlm-lsp", |
| 28 | "arguments": [] |
| 29 | } |
| 30 | } |
| 31 | }, |
| 32 | "file_types": { |
| 33 | "DLM": ["dlm"] |
| 34 | } |
| 35 | } |
| 36 | ``` |
| 37 | |
| 38 | If `dlm-lsp` isn't on your PATH (e.g. installed inside a venv), set |
| 39 | `binary.path` to its absolute location: |
| 40 | |
| 41 | ```json |
| 42 | "binary": { |
| 43 | "path": "/Users/you/.venvs/dlm/bin/dlm-lsp", |
| 44 | "arguments": [] |
| 45 | } |
| 46 | ``` |
| 47 | |
| 48 | ## Verify |
| 49 | |
| 50 | Open any `.dlm` file in Zed. You should see: |
| 51 | |
| 52 | - Diagnostics on schema errors (red squiggles in frontmatter on bad keys) |
| 53 | - Hover info on `base_model:` keys |
| 54 | - Completions on the base-model registry |
| 55 | |
| 56 | The LSP log is reachable through the command palette → `zed: open log`. |
| 57 | |
| 58 | ## Limitations vs. the VSCode extension |
| 59 | |
| 60 | Zed clients consume the LSP only — they don't render the side panel or |
| 61 | quick-insert UI. For those, use the VSCode extension. Everything that's |
| 62 | diagnostic, hover, completion, or code-action is fully available in Zed. |