A starter template for LazyVim. Refer to the documentation to get started.
There are two approaches for installing the prerquisites. You may pick either or a combination of both
Please see installation requirements for LazyVim here. For installation of Neovim (>= version 0.9.0) refer to their installation guide
- nvim
- lazygit
- rustup
- [Optional for Rust] Run
rustup component add rust-analyzer
- [Optional for Rust] Run
- go
- pipx
- fd
- [Optional: if you want to avoid errors having images in Markdown files] imagemagick
- [Optional: for Scala] NeoVm will configure
metalsfor you, but you will have to manually installmetalswhen on a*.scalafile with:MetalsInstall - [Optional: for Protocol-Buffers] install protols plugin.
Make sure that you have
cargoversion1.88.0installed. This plugin requiresedition2024. I usedrustup's `nightly toolchain'. - [Optional: for Go] Install Go CI linter to avoid anoying warnings:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest- [Optional: for SQL] Install SQL tooling for PostgreSQL-aware formatting and database connections:
# PostgreSQL-aware SQL formatter and linter
pipx install sqlfluff
# PostgreSQL client for database connections
sudo apt install postgresql-client
# Optional: SQL LSP server for enhanced intelligence
go install github.com/sqls-server/sqls@latest- [Optional: for Ruby] Install Ruby via rbenv and required gems:
# Install rbenv and ruby-build (don't use apt install rbenv - it's outdated)
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
# Add to ~/.zshrc (or ~/.bashrc)
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(rbenv init - zsh)"' >> ~/.zshrc
source ~/.zshrc
# Install Ruby (check latest 3.4.x version with: rbenv install -l | grep ^3.4)
rbenv install 3.4.8
rbenv global 3.4.8
# Install required gems
gem install rubocop sonargraphMake sure that you have your prerequistes and then follow the steps from this page.
This LazyVim configuration integrates with CodeCompanion.nvim to provide AI-powered coding assistance. By default, it is configured to use Ollama with the qwen3:14b model, which is a cost-efficient (free) solution for local AI inference.
To use CodeCompanion with Ollama, you need to install Ollama and download the qwen3:14b model.
For Linux (Debian-based):
-
Install Ollama:
curl -fsSL https://ollama.com/install.sh | sh -
Download the qwen3 model:
ollama pull qwen3:14b
For macOS:
-
Install Ollama: Download the macOS application from ollama.com/download and follow the installation instructions.
-
Download the qwen3 model:
ollama pull qwen3:14b
Which adapter and model CodeCompanion uses is a per-machine choice, so it is kept out of version control. Copy the tracked template and edit your copy:
cp .env.sample .env.env is gitignored and loaded at startup by lua/config/env.lua. It is a plain KEY=VALUE file; anything already exported by your shell takes precedence over it. The main knobs (all optional — see .env.sample for the full list):
| Variable | Purpose |
|---|---|
CC_DEFAULT_ADAPTER |
Adapter for chat + inline (e.g. deepseek, openai, ollama_qwen, claude_code) |
CC_DEFAULT_MODEL |
Model within that adapter |
CC_TITLE_ADAPTER / CC_TITLE_MODEL |
Adapter/model for chat-history title generation |
Leaving them unset keeps the defaults defined in lua/plugins/codecompanion.lua. Adapters that talk to a paid API still need their key exported (e.g. DEEPSEEK_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY) — keep those in your shell (e.g. ~/.zshrc), not in the repo.
CodeCompanion can also talk to Claude models through the Agent Client Protocol, driving the Claude Code CLI as a subprocess instead of calling an HTTP endpoint. The appeal: it runs against a Claude Pro/Max subscription rather than consuming pay-as-you-go API credits.
This is an optional dependency — only needed if you want to use the claude_code adapter. Everything else works without it.
npm i -g @agentclientprotocol/claude-agent-acpRequirements and caveats:
- Requires the Claude Code CLI, already logged in (
claude). - Claude Code treats
ANTHROPIC_API_KEYas taking precedence over your claude.ai login. If that variable is exported in your shell, Neovim passes it down and the agent bills pay-as-you-go API credits instead of the subscription (failing withCredit balance is too lowwhen the API account is empty). The adapter therefore launches the bridge with that key stripped from its environment; the HTTP adapters still receive it. - The bridge is a Node script (
#!/usr/bin/env node, Node >= 22), so Node must be on thePATHthat Neovim inherits. If it is not (a common surprise withnvm), setCC_CLAUDE_ACP_CMDin.envto an absolute path or a wrapper script. - ACP drives the chat interaction only. CodeCompanion's inline interaction and title generation both require an HTTP adapter. If you set
CC_DEFAULT_ADAPTER=claude_code, those fall back to an HTTP adapter automatically; useCC_INLINE_ADAPTER/CC_TITLE_ADAPTERto point them at a provider you have credit with.
You do not have to make it the default: leave CC_DEFAULT_ADAPTER as-is and simply switch to Claude Code from the adapter picker inside a chat buffer.