- Update the tree-siiter of c3
- Update the zed-api
- Automatically download c3lsp from perrymason/c3-lsp
- Optional custom c3lsp path via
c3lsp.jsonor Zed LSP settings - Inline runnables for C3 tests (
@test)
The extension now marks test runnables in two cases:
- Function-level attribute:
fn void my_test() @test { ... } - Module-level attribute:
module foo @test;(every function in that file is runnable)
To make the runnable button execute your C3 tests, bind the c3-test tag in .zed/tasks.json or global tasks.json.
[
{
"label": "c3: test current function",
"command": "c3c",
"args": ["test", "--test-filter", "$ZED_CUSTOM_TEST_NAME"],
"tags": ["c3-test"]
}
]If your setup does not expose $ZED_CUSTOM_TEST_NAME, use $ZED_SYMBOL or remove the filter to run all tests.
The extension resolves the c3lsp binary path in this order:
c3lsp.json(orcs3lsp.json) in your project root- Zed LSP settings (
lsp.c3.binary.path) - Bundled auto-downloaded default (
c3lsp/server/bin/release/c3lsp)
When c3lsp.json or Zed settings provide a path, the extension uses that path directly.
Relative paths are resolved from the project root.
Custom paths are not chmod'ed by the extension; ensure your binary is executable.
{
"lsp": {
"path": "/absolute/or/relative/path/to/c3lsp"
}
}{
"lsp": {
"c3": {
"binary": {
"path": "/absolute/or/relative/path/to/c3lsp"
}
}
}
}- Open Zed's command palette
Ctrl+Shift+Pand selectextensions - Search for
C3and click onInstall
git clone https://github.com/AineeJames/c3-zed- Open Zed's command palette
Ctrl+Shift+Pand selectextensions - Click on
Install Dev Extensionand select the cloned directory
- Tree Sitter: c3lang/tree-sitter-c3
- LSP: perrymason/c3-lsp
Warning
This plugin is a WIP and may not work as expected. This plugin hasn't been fully tested on Mac and Linux