A DeepSeek Harness bundle that adds one read-only lsp tool — go to definition, find references, find implementations, and hover — backed by the language servers already installed on the machine.
It is a thin composition: three shipped packages plus a server table.
- '@deepseek-ai/dsh-lsp' # capability seam
- '@deepseek-ai/dsh-lsp-stdio' # spawns and pools language servers
- '@deepseek-ai/dsh-tool-lsp' # the model-facing `lsp` toolBoth were found the hard way; both fail silently at install time or later, so they are worth knowing before editing.
Only patches that ship with the application are parsed with the js tag. An installed bundle's overlay goes through a stricter validator:
YAMLException: unknown tag !<tag:yaml.org,2002:js>
So every value here is a literal, and anything that would be computed ($HOME, JAVA_HOME) is delegated to a shell wrapper instead:
rust:
command: /bin/sh
args: ['-c', 'exec "$HOME/.cargo/bin/rust-analyzer"']exec replaces the shell and inherits its descriptors, so the process is still a plain stdio language server.
Launched from Finder, the DSH process runs with:
PATH=/usr/bin:/bin:/usr/sbin:/sbin
Homebrew (/opt/homebrew/bin) and cargo (~/.cargo/bin) are not on it. Every entry therefore sets env.PATH itself:
env:
PATH: /opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbinBare command names are resolved on that child PATH at load time. A single entry that fails to resolve prevents every provider from registering — the table is all-or-nothing, and the failure does not appear until you run a query.
/usr/local/bin is included for Intel Homebrew.
jdtls 1.63 requires Java 25+ and refuses to start (exit 13, "Application could not be found in the registry") on older JDKs. Because a bundle patch cannot compute a path, the Java entry wraps the launch:
export JAVA_HOME="${JDTLS_JAVA_HOME:-/opt/homebrew/opt/openjdk@25/...}"; exec jdtlsThe fallback is a Homebrew opt symlink — version-stable, unlike Cellar/<version>. Override without editing the file:
export JDTLS_JAVA_HOME=/path/to/jdk25| Language | Command | Extensions |
|---|---|---|
| Java | jdtls |
.java |
| Python | pyright-langserver --stdio |
.py .pyi |
| Go | gopls |
.go |
| Rust | rust-analyzer |
.rs |
| TypeScript / JavaScript | vtsls --stdio |
.ts .tsx .js .jsx .mjs .cjs |
| Vue | vue-language-server --stdio |
.vue |
Every server is lazy: a process starts on the first query matching its extension, is pooled per (server, workspace), and is disposed with the service. Queries read the file fresh each time (didOpen → request → didClose), so stale buffers cannot answer.
This bundle is published at https://github.com/noid-l/dsh-code-navigation.
# from a pinned Git commit — the updatable form
plugin_manager: install_bundle target=git+https://github.com/noid-l/dsh-code-navigation.git#<40-char-commit>
# read the commit to pin from the clone you just exported
git rev-parse HEADFrom the Plugin Manager UI: Plugins → Add plugin, paste that same git+… spec. An install via a Git spec is marked updatable, so Discover can offer newer commits of this repository.
# or from a local tarball, when hacking on it
npm pack --pack-destination ../dist
plugin_manager: install_bundle target=<absolute path>/dsh-code-navigation-<version>.tgzInstalling from a directory does not work for this bundle: pnpm add of a linked directory creates a link: and does not install the package's own dependencies, which then fails with ERR_MODULE_NOT_FOUND: Cannot find package '@deepseek-ai/dsh-lsp'. A tarball or a Git spec is a real package, so its dependencies are installed.
A Git spec must pin a full 40-character commit. A branch, tag, or range installs but is not updatable, and reinstallation after a failed update could not restore the previous version.
Change cordis.patch.yml → bump version → repack → remove → install → query a real file. Config edits are silent when they fail: the bundle still reports applied, the lsp tool is still registered, and only a query reveals that no provider registered.
# Python and TypeScript are cheap to check; Java needs jdtls to index.
lsp goToDefinition file_path=main.py line=1 character=20lsp uses the Session working directory as the workspace root. A file outside it fails with LSP_FILE_OUTSIDE_WORKSPACE — change the working directory first.
- No sandbox. Language servers run with the user's filesystem and process authority; the provider trusts what it is configured to spawn.
- Cold start returns empty results. The first query after a server launches can answer
No results.even though the position is valid —vtslsraced its project load andrust-analyzerits crate graph. Retry once; the second query answers. - Rust needs a Cargo project. A lone
.rsfile with noCargo.tomlyields empty results: rust-analyzer has no crate to resolve against. It also needs a real binary —~/.cargo/bin/rust-analyzeris a rustup proxy that fails withUnknown binary 'rust-analyzer' in official toolchainuntil the component is installed:rustup component add rust-analyzer
- Rust ignores mid-identifier offsets. A position inside an identifier may return
No results.where its first character resolves; aim at the symbol start. - Vue needs a real project. With no
vuedependency present,vue-language-serveranswersinitializein ~400 ms but never answerstextDocument/definition; verify in a project that hasnode_modules. - UTF-16 coordinates. Positions are one-based line/character; an off-symbol position returns an empty result, which is a normal no-result, not an error.
- Indexing lag.
jdtlsreturns partial results while it builds a project index. - Orphaned servers. A hard-killed harness leaves language servers running until they exit on their own; graceful shutdown only happens through service disposal.
Measured against this machine (Python, Java, TypeScript, Rust). Each row is a real query, not an assumption:
| Language | Query | Result |
|---|---|---|
| Python | definition of an imported class | lib.py:4:7 ✅ |
| Python | references of that class | 3 sites, declaration included ✅ |
| Java | definition of a method call | Demo.java:6:19 ✅ |
| TypeScript | definition of a method call | tslib.ts:4:3 ✅ |
| TypeScript | hover on an imported type | (alias) class Point ✅ |
| Rust | definition / references of a fn | main.rs:1:4 / two sites ✅ |
| Vue | definition of a component import | timed out in a dependency-less project |
Go (gopls) is configured but was not exercised.