文档
English Docs
LSP Servers

LSP Servers

OpenCode supports Language Server Protocol (LSP) for code intelligence.

Experimental Feature

Enable LSP tool with:

export OPENCODE_EXPERIMENTAL_LSP_TOOL=true

Features

  • Go-to-definition
  • Find references
  • Hover information
  • Code diagnostics

Configuration

LSP servers can be configured for various languages. OpenCode will automatically download and configure LSP servers when needed.

Disabling Downloads

export OPENCODE_DISABLE_LSP_DOWNLOAD=true