LSP
Language Server Protocol (LSP) is a standardized protocol for providing language services. By decoupling language services from CodeArts Agent CLI, LSP enables an independent language server process to deliver core capabilities such as code analysis, fast navigation, and symbol search.
CodeArts Agent CLI now 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
| 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
- Enter the TUI development environment.
- Open the root directory of the target project.
- Right-click in the blank area and select Open Windows Terminal here.
- In the terminal, enter codearts and press Enter to enter the TUI environment.
- Enable local LSP.
- In the TUI dialog box, enter /lsp-toggle and press Enter to access the LSP Service Switch page. Figure 1 LSP Service Switch page
- Press Enter and click OK to enable the LSP service. Figure 2 Enabling the LSP service
- In the TUI dialog box, enter /lsp-toggle and press Enter to access the LSP Service Switch page.
- Restart the CodeArts Agent CLI to apply the change.
Related Documents
After enabling the local LSP service, if you receive a message indicating that the LSP service is unavailable when starting an agent session, troubleshoot and resolve the issue by referring to What Should I Do If the LSP Service Is Unavailable?
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot