Updated on 2026-08-03 GMT+08:00

LSP

Language Server Protocol (LSP) is a standardized protocol for providing language services. By decoupling language services from the IDE, LSP enables an independent language server process to deliver core capabilities such as code analysis, fast navigation, and symbol search.

CodeArts Agent features a built-in local LSP function. Once enabled, the agent can leverage these language services to provide code analysis, code navigation, and symbol information, enabling more accurate code comprehension and modification.

Supported Mainstream LSP Servers

Table 1 Supported mainstream LSP servers

LSP Server

Extension Name

Requirement

jdtls

.java

Ensure that Java SDK 21 or later has been installed.

typescript-language-server

.ts, .tsx, .js, .jsx, .mjs, .cjs, .mts, and .cts

Ensure that TypeScript has been installed.

pyright

.py, and .pyi

Ensure that Pyright has been installed.

gopls

.go

Ensure that the Go language environment and go commands are available and configured in the system environment variables.

Enabling Local LSP

  1. Enter the TUI development environment.

    1. Open the root directory of the target project.
    2. Right-click in the blank area and select Open Windows Terminal here.
    3. Enter /codearts in the terminal and press Enter to enter the TUI development environment.

  2. Enable local LSP.

    1. In the TUI dialog box, enter /lsp-toggle and press Enter to access the LSP Service Switch page.
      Figure 1 LSP Service Switch page
    2. Press Enter and click OK to enable the LSP service.
      Figure 2 Enabling the LSP service

  3. Restart the CodeArts Agent CLI to apply the change.

Related Documents

After the local LSP service is enabled, if a message indicating that the LSP service is unavailable is displayed during an agent session, locate and rectify the fault by referring to the operations in What Should I Do If the LSP Service Is Unavailable?.