LSP-AI: Bringing AI to Your Code Editor
LSP-AI is an open-source language server designed to integrate AI-powered features into popular code editors. It's not about replacing software engineers but empowering them by enhancing the tools they already use. Supporting a variety of editors such as VS Code, NeoVim, Emacs, Helix, and Sublime, LSP-AI aims to make AI functionalities accessible to every coder.
Key Features
In-Editor Chatting
One of the standout features of LSP-AI is the ability to chat directly within your codebase. Whether you choose local or hosted models, this feature enables you to interact in real-time with large language models (LLMs), facilitating an engaging and informative coding experience.
Example of in-editor chat with Claude Sonnet in Helix
Custom Actions
LSP-AI allows users to create custom actions, enhancing productivity with tools for code refactoring, code completions, and more. This feature empowers developers to tailor their coding environment to meet specific needs.
Performing refactoring using Claude Sonnet in Helix
Code Completions
With LSP-AI, developers have an alternative to GitHub Copilot. It provides code completions that speed up the coding process. The completion speed depends on the backend being used, with small local models or Groq being recommended for faster results.
https://github.com/SilasMarvin/lsp-ai/assets/19626586/59430558-da23-4991-939d-57495061c21b
Demonstration showing VS Code using Mistral Codestral and Helix using stabilityai/stable-code-3b
Why Choose LSP-AI?
The introduction of AI-powered assistants into editors is reshaping the way developers work. LSP-AI stands out by providing a centralized language server that can be used across different platforms. Below are reasons why LSP-AI is a significant tool for developers:
-
Centralized AI Features:
- This provides a singular backend that reduces redundant development work across various editors, ensuring every supported editor benefits equally.
-
Simplified Plugin Development:
- LSP-AI simplifies the complexities of setting up LLM backends and developing intricate prompts, allowing plugin developers to focus more on their specific editor.
-
Collaborative Environment:
- By offering a shared backend, developers can collectively add new functionalities, boosting innovation and preventing redundancy.
-
Wide Compatibility:
- If an editor supports the Language Server Protocol (LSP), it can utilize LSP-AI's capabilities, broadening the reach of AI functionalities in coding.
-
Flexible Backend Support:
- Current supported backends include llama.cpp, Ollama, OpenAI-compatible APIs, and more, allowing for diverse and preferred working environments.
-
Future-Proofing:
- LSP-AI remains updated with the latest in LLM-driven development, ensuring it stays relevant with technological advances.
Looking Ahead: The LSP-AI Roadmap
The journey of integrating LSP-AI into our coding environment is filled with exciting possibilities, with daily advancements in research and technology. Here are some of the exciting future features in the works:
- Semantic search-powered context building using Tree-sitter for correct code segmentation.
- Increased backend support to widen user flexibility.
- Exploration of agent-based systems to enhance functionality.
LSP-AI invites contributions and discussions, making it a community-driven project, as it propels AI capabilities further into the landscape of software development.