AI-powered inline code completion for IntelliJ IDEA using a local Ollama LLM model.
This plugin generates smart Java code suggestions directly in your editor using the IntelliJ Inline Completion API and a locally running model like codellama
, deepseek-coder
, or any other supported by Ollama.
- ✨ Inline gray-text completions while typing
- ⚡ Works fully offline (no external API calls)
- 🧠 AI-based completions from Ollama
- 🧾 Efficient caching mechanism to avoid duplicate requests
To improve performance and reduce redundant model queries, a windowed cache is used:
- Caches full prefix → suggestion mappings
- Stores partial prefix/postfix variants (based on a token window); see examples below
- Evicts old entries using an LRU strategy
- Install Ollama and make sure the application is running:
- Download and run the model in your terminal:
ollama pull deepseek-coder:6.7b
- Download this file
- In your IDE, go to Settings → Plugins → ⚙️ → Install Plugin from Disk…, and select downloaded file: OllamaCompletionPlugin--0.0.1.zip
- ⭕️ Make sure Ollama is running in the background, open your Java project, and enjoy coding with your new AI assistant!
- Install Ollama and run the application:
- Download and run the model in your terminal:
ollama pull deepseek-coder:6.7b
- Clone and run the plugin:
git clone https://github.com/your-name/OllamaCompletionPlugin.git
cd OllamaCompletionPlugin
./gradlew runIde
This launches a sandbox instance of IntelliJ with the plugin enabled.