diff options
| author | 大猫子 <[email protected]> | 2026-02-01 02:30:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-31 12:30:45 -0600 |
| commit | 35f64b80fa6825f8c14fd1654a1331b19db94a20 (patch) | |
| tree | 47060dcdd0b42fbd77d4614c8dff6b9e1cf94702 /packages/web/src/content/docs | |
| parent | feca42b0255b5a099477ee7ce60b51eb5911a055 (diff) | |
| download | opencode-35f64b80fa6825f8c14fd1654a1331b19db94a20.tar.gz opencode-35f64b80fa6825f8c14fd1654a1331b19db94a20.zip | |
docs: fix documentation issues (#11435)
Co-authored-by: damaozi <[email protected]>
Diffstat (limited to 'packages/web/src/content/docs')
| -rw-r--r-- | packages/web/src/content/docs/lsp.mdx | 44 | ||||
| -rw-r--r-- | packages/web/src/content/docs/providers.mdx | 4 |
2 files changed, 48 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/lsp.mdx b/packages/web/src/content/docs/lsp.mdx index c1d23d4f5..707af84a0 100644 --- a/packages/web/src/content/docs/lsp.mdx +++ b/packages/web/src/content/docs/lsp.mdx @@ -87,6 +87,50 @@ Let's look at some examples. --- +### Environment variables + +Use the `env` property to set environment variables when starting the LSP server: + +```json title="opencode.json" {5-7} +{ + "$schema": "https://opencode.ai/config.json", + "lsp": { + "rust": { + "env": { + "RUST_LOG": "debug" + } + } + } +} +``` + +--- + +### Initialization options + +Use the `initialization` property to pass initialization options to the LSP server. These are server-specific settings sent during the LSP `initialize` request: + +```json title="opencode.json" {5-9} +{ + "$schema": "https://opencode.ai/config.json", + "lsp": { + "typescript": { + "initialization": { + "preferences": { + "importModuleSpecifierPreference": "relative" + } + } + } + } +} +``` + +:::note +Initialization options vary by LSP server. Check your LSP server's documentation for available options. +::: + +--- + ### Disabling LSP servers To disable **all** LSP servers globally, set `lsp` to `false`: diff --git a/packages/web/src/content/docs/providers.mdx b/packages/web/src/content/docs/providers.mdx index 2a8039452..685267214 100644 --- a/packages/web/src/content/docs/providers.mdx +++ b/packages/web/src/content/docs/providers.mdx @@ -1222,6 +1222,10 @@ To use Kimi K2 from Moonshot AI: You can configure opencode to use local models through Ollama. +:::tip +Ollama can automatically configure itself for OpenCode. See the [Ollama integration docs](https://docs.ollama.com/integrations/opencode) for details. +::: + ```json title="opencode.json" "ollama" {5, 6, 8, 10-14} { "$schema": "https://opencode.ai/config.json", |
