Compare commits

..

No commits in common. "82adb655f157438243d59e8ee201d7daed949daf" and "8e69a6afe8dd5b266957a6510dc4c56ac068f601" have entirely different histories.

4 changed files with 8 additions and 103 deletions

View file

@ -53,10 +53,6 @@ jobs:
if: steps.version.outputs.SKIP != 'true' if: steps.version.outputs.SKIP != 'true'
run: nix build .#streamd-windows -o result-windows run: nix build .#streamd-windows -o result-windows
- name: Build Zed extension
if: steps.version.outputs.SKIP != 'true'
run: nix build .#zed-extension-zip -o result-zed-extension-zip
- name: Prepare release artifacts - name: Prepare release artifacts
if: steps.version.outputs.SKIP != 'true' if: steps.version.outputs.SKIP != 'true'
run: | run: |
@ -64,7 +60,6 @@ jobs:
cp result-deb release/streamd_${{ steps.version.outputs.VERSION }}_amd64.deb cp result-deb release/streamd_${{ steps.version.outputs.VERSION }}_amd64.deb
cp result-musl/bin/streamd release/streamd-${{ steps.version.outputs.VERSION }}-linux-x86_64 cp result-musl/bin/streamd release/streamd-${{ steps.version.outputs.VERSION }}-linux-x86_64
cp result-windows/bin/streamd.exe release/streamd-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe cp result-windows/bin/streamd.exe release/streamd-${{ steps.version.outputs.VERSION }}-windows-x86_64.exe
cp result-zed-extension-zip release/streamd-zed-extension-${{ steps.version.outputs.VERSION }}.zip
- name: Create release - name: Create release
if: steps.version.outputs.SKIP != 'true' if: steps.version.outputs.SKIP != 'true'

View file

@ -153,41 +153,6 @@ Add to `~/.config/zed/settings.json`:
The `"..."` keeps Zed's default Markdown servers (e.g. `marksman`) active alongside streamd. The `"..."` keeps Zed's default Markdown servers (e.g. `marksman`) active alongside streamd.
#### Zed Extension (WSL2)
If you run Zed on Windows with streamd installed inside WSL2, use the pre-built Zed extension instead of the manual config above. The extension auto-detects Windows and routes LSP communication through WSL2.
**1. Install streamd in WSL2** (e.g. via the `.deb` package):
```bash
wget https://git.konstantinfickel.de/kfickel/streamd/releases/download/vX.Y.Z/streamd_X.Y.Z_amd64.deb
sudo dpkg -i streamd_X.Y.Z_amd64.deb
```
**2. Download the extension** from the same release page:
```
streamd-zed-extension-X.Y.Z.zip
```
**3. Extract the zip** to a permanent folder on your Windows machine, e.g.:
```
C:\Users\<you>\zed-extensions\streamd-zed-extension\
```
The folder must contain `extension.toml` and `extension.wasm`.
**4. Install the extension in Zed** via the command palette (`Ctrl+Shift+P`):
```
zed: install dev extension
```
Point Zed to the extracted folder.
**5. Verify** by opening a Markdown file inside a directory that contains `.streamd.toml``@` completions and diagnostics should become active.
### Neovim (nvim-lspconfig) ### Neovim (nvim-lspconfig)
**1. Register the server** — add to your Neovim config (e.g. `~/.config/nvim/init.lua` or a plugin file): **1. Register the server** — add to your Neovim config (e.g. `~/.config/nvim/init.lua` or a plugin file):

View file

@ -141,36 +141,6 @@
}; };
}; };
mkGitHooksDev =
system:
let
pkgs = mkPkgs system;
toolchain = pkgs.rust-bin.stable.latest.default;
in
git-hooks.lib.${system}.run {
src = ./.;
hooks = {
rustfmt = {
enable = true;
package = toolchain;
};
clippy = {
enable = true;
package = toolchain;
settings.denyWarnings = true;
};
cargo-test = {
enable = true;
name = "cargo test";
entry = "${toolchain}/bin/cargo test";
pass_filenames = false;
language = "system";
files = "\\.(rs|toml)$";
};
commitizen.enable = true;
};
};
mkMuslCraneLib = mkMuslCraneLib =
system: system:
let let
@ -229,21 +199,6 @@
in in
craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; }); craneLib.buildPackage (commonArgs // { inherit cargoArtifacts; });
mkZedExtensionZip =
system:
let
pkgs = mkPkgs system;
zed-extension = mkZedExtension system;
in
pkgs.runCommand "streamd-zed-extension-${version}.zip" {
nativeBuildInputs = [ pkgs.zip ];
} ''
mkdir -p streamd-zed-extension
cp ${zed-extension}/extension.toml streamd-zed-extension/
cp ${zed-extension}/extension.wasm streamd-zed-extension/
zip -r $out streamd-zed-extension
'';
mkStreamdDeb = mkStreamdDeb =
system: system:
let let
@ -295,10 +250,9 @@
streamd-deb = mkStreamdDeb system; streamd-deb = mkStreamdDeb system;
streamd-windows = mkStreamdWindows system; streamd-windows = mkStreamdWindows system;
zed-extension = mkZedExtension system; zed-extension = mkZedExtension system;
zed-extension-zip = mkZedExtensionZip system;
in in
{ {
inherit streamd streamd-musl streamd-deb streamd-windows zed-extension zed-extension-zip; inherit streamd streamd-musl streamd-deb streamd-windows zed-extension;
default = streamd; default = streamd;
} }
); );
@ -385,7 +339,7 @@
]; ];
shellHook = '' shellHook = ''
${(mkGitHooksDev system).shellHook} ${(mkGitHooksCheck system).shellHook}
''; '';
}; };
} }

View file

@ -1,4 +1,4 @@
use zed_extension_api::{self as zed, Command, LanguageServerId, Os, Result, Worktree, current_platform}; use zed_extension_api::{self as zed, Command, LanguageServerId, Result, Worktree};
struct StreamdExtension; struct StreamdExtension;
@ -12,20 +12,11 @@ impl zed::Extension for StreamdExtension {
_language_server_id: &LanguageServerId, _language_server_id: &LanguageServerId,
_worktree: &Worktree, _worktree: &Worktree,
) -> Result<Command> { ) -> Result<Command> {
let (os, _) = current_platform(); Ok(Command {
if os == Os::Windows { command: "streamd".into(),
Ok(Command { args: vec!["lsp".into()],
command: "wsl".into(), env: vec![],
args: vec!["streamd".into(), "lsp".into()], })
env: vec![],
})
} else {
Ok(Command {
command: "streamd".into(),
args: vec!["lsp".into()],
env: vec![],
})
}
} }
} }