An AI-powered completion source for nvim-cmp that integrates with multiple AI backends for code suggestions.
cmp-ai is a plugin for the Neovim completion engine nvim-cmp that provides AI-driven code completions. It acts as a general-purpose source, easily adaptable to any REST API supporting remote code completion, enhancing developer productivity with intelligent suggestions.
Neovim users who utilize the nvim-cmp completion engine and want to integrate AI-powered code suggestions directly into their editor workflow.
Developers choose cmp-ai for its provider-agnostic design, supporting multiple AI backends like HuggingFace, OpenAI, Ollama, and Google Bard within a unified Neovim interface, and for its customizable context and real-time triggering options.
cmp-ai is a plugin for the Neovim completion engine nvim-cmp that provides AI-driven code completions. It acts as a general-purpose source, easily adaptable to any REST API supporting remote code completion, enhancing developer productivity with intelligent suggestions.
The plugin is designed to be extensible and provider-agnostic, allowing users to leverage various AI models while maintaining a simple, unified interface within Neovim's ecosystem.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports HuggingFace, OpenAI, Codestral, Ollama, Google Bard, and Tabby, allowing easy switching between AI backends as shown in the setup examples, enhancing adaptability.
Configurable max_lines and ignored_file_types let users fine-tune buffer context usage and prevent unwanted suggestions, such as ignoring HTML files for cleaner completions.
Offers run_on_every_keystroke for instant completions or key bindings for on-demand use, balancing responsiveness with performance based on user preference.
Includes raw_response_cb to inspect raw backend responses, providing insights into token counts and generation speeds for optimization, as detailed in the debugging section.
Requires setting up API keys and environment variables for each provider, and for Google Bard, an external library (Bard-API) is needed, increasing setup complexity and potential points of failure.
AI completions can be slow, as acknowledged with the notify feature for slow sources, which might disrupt workflow in fast-paced coding environments or with limited internet connectivity.
Each provider has specific setup requirements, such as model selection and prompt tuning for Ollama, which can be cumbersome and require familiarity with AI APIs and Neovim scripting.