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 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.
Constraints
This function can be used only in agent mode.
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
- Switch to the agent mode.
- Log in to CodeArts Agent IDE as instructed in Quick Start.
- At the bottom of the input box on the chat panel, choose Built-in > Agent to switch to the agent mode. The selected model is displayed on the right. You can select a model as required from the drop-down list.
If the chat panel of CodeArts Agent is not displayed, click
(Expand AI Sidebar) in the upper right corner of the top menu bar to open it.
- Enable local LSP.
- Click
in the upper right corner of CodeArts Agent IDE to open the settings page. - In the navigation pane on the left, choose Lab Features.
- Enable local LSP.
- Click
- Restart the IDE for the change to take effect.
After CodeArts Agent IDE is restarted, LSP service running is displayed in the lower right corner of the page.
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 Service Is Unavailable After Enabling the Local LSP Function?
Feedback
Was this page helpful?
Provide feedbackThank 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
