Tongyi Lingma
Alibaba's free AI programming tool is based on the generalized large model.
标签:AI CodeAI programming toolsWhat is Tongyi Lingma?
Tongyi Lingma is a free AI programming tool launched by Alibaba . Based on the Tongyi large model, it helps developers improve programming efficiency and quality. It boasts a variety of practical functions, such as intelligent code continuation, which generates code in real-time based on context; natural language code generation, where users only need to describe their requirements in natural language to quickly generate corresponding code; automatic generation of code comments, explanations of code logic, and assistance in troubleshooting errors. Tongyi Lingma supports offline single-line completion, allowing continued use of some functions when network access is limited; and provides technical documentation and code snippet search, facilitating quick access to resources for developers in mainstream IDEs.
The main functions of Tongyi Lingma
- Line/function-level real-time continuation : During the coding process, based on the context and current syntax, it automatically predicts and generates suggested code for you, which you can simply adopt by clicking the Tab key.
- Natural Language Code Generation : In the editor, describe the functionality you want using natural language. Based on your description and context, the editor supports direct generation of code and related comments, allowing for uninterrupted coding flow.
- Code optimization generation : Helps you identify problems in your code and provides code optimization suggestions.
- Unit test generation : Supports generating unit tests and related code explanations based on frameworks such as JUnit, Mockito, Spring Test, unit test, and pytest.
- Image-based multimodal Q&A: Supports selecting, dragging, or pasting images to add as context, automatically analyzes image content, and generates code suggestions or problem-solving suggestions based on the requirements.
- Code comment generation : Generate method comments and inline comments with one click, saving you time in writing code comments and effectively improving code readability and comment coverage.
- Code Explanation : Supports recognition of over 30 languages. After selecting code, it automatically identifies the programming language and generates a code explanation. Transcending language boundaries, it allows you to quickly understand code logic and functional design.
- Intelligent Q&A for R&D : Based on massive amounts of R&D documents, product documents, general R&D knowledge, Alibaba Cloud’s cloud service documents and SDK/OpenAPI documents, etc., it trains its Q&A capabilities to answer your questions and help you easily solve R&D problems.
- Local project Q&A: Through Q&A, you can quickly understand the project and search the code in the current repository. At the same time, you can describe the requirements in natural language and generate overall repair suggestions and suggested code for simple requirements or defects in the current project.
- Enterprise knowledge base Q&A: Leveraging enterprise knowledge and data to conduct Q&A, quickly build an enterprise R&D knowledge Q&A assistant to improve team work efficiency and collaboration capabilities.
- Error and exception troubleshooting : Assists developers in troubleshooting exceptions and errors in their code. When errors occur in the code, TongyiLingcode can provide possible solutions to help developers quickly locate and resolve problems.
- Offline single-line completion : In environments with limited or no network access, developers can switch to local completion mode. Tongyi Lingma will provide single-line code suggestions to ensure that development work is not interrupted due to network issues.
- Technical documentation and code snippet search : In supported IDEs (such as IntelliJ IDEA, PyCharm, etc.), developers can directly search for technical documentation and code snippets to quickly find the information they need and improve development efficiency.
- Project Rules Configuration : Developers can customize code generation rules according to project needs, such as coding style, technology stack constraints, and security rules. This helps ensure consistent coding style across the team and reduces communication costs and code maintenance difficulties caused by differences in individual styles.
- Unified authorization management: Supports unified addition of usage permissions for developers within the enterprise and unified management of enterprise member permissions.
- Statistical reports: Provide statistical data such as developer activity, AI code generation rate, and Q&A usage rate to help companies quickly understand the effectiveness of usage.
- RepoWik : Supports automatically generating a structured knowledge document for the codebase that covers module relationships, interface definitions, and implementation logic, allowing AI to truly understand the project architecture rather than just looking at a single file.
How to use Tongyi Lingma
- Install Tongyi Ling Code
-
Install from the plugin marketplace :
- Install in JetBrains IDEs
- Download and install a compatible JetBrains IDE 2020.3 or later.
- Open the IntelliJ IDEA settings window, search for Lingma in the plugin marketplace, find Lingma , and click to install.
- After installation, please restart IntelliJ IDEA.
- Install in Visual Studio Code
- Download and install Visual Studio Code version 1.68.0 or later.
- Open the Visual Studio Code extension window, search for Lingma, find Lingma , and click to install.
- After installation, please restart Visual Studio Code.
- Install in Visual Studio
- Download and install Visual Studio 2022 version 17.3.0 or later, or Visual Studio 2019 version 16.3.0 or later .
- Open the Visual Studio top Extensions – Manage Extensions window, search for Lingma, find Lingma , and click Install.
- After installation, please restart Visual Studio.
- Install in JetBrains IDEs
-
Download and install : Visit the official website of Tongyi Lingma and download the JetBrains IDEs zip installation package. After downloading, open IntelliJ IDEA, go to the plugin management settings, select “Install plugins locally,” locate and select the downloaded zip file to install, and restart IntelliJ IDEA after installation.
-
- Login and initialization : After restarting IDEA, click the Tongyi Lingma icon in the right toolbar to enter the plugin interface. The first time you use it, you need to log in to your Alibaba Cloud account. After clicking the login button, your browser will automatically open the Alibaba Cloud login page. After logging in, return to IDEA.
- The main functions of using Tongyi Lingma
-
Intelligent code completion : When writing code, TongyiLingma provides intelligent code completion suggestions based on the context, helping you complete the code quickly. You can also manually trigger code suggestions via keyboard shortcuts
Alt + P(Windows) or (macOS).Option + P -
Code Explanation : Select the code snippet, right-click, and choose
通义灵码->解释代码to get a detailed explanation of the code. Alternatively, select the code in the IDE editor area and click the Tongyi Lingma code explanation button; the AI will generate the corresponding explanation based on the code. -
Generate unit tests : Right-click the Tongyi Lingma icon in the code, select
生成单元测试the function, and Tongyi Lingma will automatically generate the corresponding test code. The generated test code can be directly copied into the test file and modified and debugged as needed. -
Code optimization and refactoring : Tongyi Lingma can analyze code and provide optimization suggestions to help improve code quality and performance.
-
Natural Language Code Generation : You can describe your requirements in natural language (such as “generate a function to log in as a user”), and Tongyi Lingma will attempt to convert them into code.
-
Code comment generation : Select a code snippet, right-click, and choose
通义灵码->生成注释to quickly add comments. You can also use a keyboard shortcutShift+Alt+Vor select the code comment function from the right-click menu.
-
- Usage Recommendations
-
Plugin configuration : After installation, it is recommended to go to the settings page of Tongyi Lingma and adjust options such as auto-completion delay and language preference.
-
Make full use of its features : Tongyi Lingma supports multiple programming languages. It is recommended to try its features in different projects to familiarize yourself with how it works.
-
Regular updates : Keep your plugins and IDEA up to date to get the latest features and improvements.
-
- Adding context : In smart conversations, context can be added in the following ways:
-
Click the Add Context button in the input box to trigger the context selection window.
-
Entering text in the input box
#triggers a context selection window, allowing for file retrieval while continuing to type. -
For code files and images, you can drag and drop or copy and paste to add the corresponding content as context (JetBrains IDEs only).
-
- Supported context types : Tongyi Lingma provides a variety of context options, including
file,folder,image,codebase,teamDocs, ,codeChanges,gitCommitetc.
Tongyi Lingma’s compatibility with IDEs and systems
- JetBrains IDEs :
- IDE versions: IntelliJ IDEA, PyCharm, GoLand, WebStorm, Android Studio, HUAWEI DevEco Studio, etc., 2020.3 and above.
- Operating systems: Windows 7 and above, macOS, Linux
- Visual Studio Code
- IDE version: 1.68.0 and above
- Operating systems: Windows 7 and above, macOS, Linux
- Visual Studio
- IDE version: Visual Studio 2022 17.3.0 or later, or Visual Studio 2019 16.3.0 or later.
- Operating System: Windows 10 and above
Application scenarios of Tongyi Lingma
- For individual development : Tongyi Lingma can intelligently predict and complete code based on context, reducing coding volume and improving coding speed.
- Team collaboration : Teams can integrate knowledge such as coding standards, security standards, and code documentation into Tongyi Lingma’s enterprise knowledge base, enabling members to better align code generation and optimization with business needs.
-
Code refactoring and technical architecture adjustment : In enterprise technical architecture adjustment, Tongyi Lingma can help to efficiently complete component replacement and ensure system quality and consistency.
-
Enterprise Customer Service : Tongyi Lingma can help enterprises automate intelligent customer service and answer users’ common questions.