LocalNest.nvim is a powerful, local-first AI coding assistant for Neovim. It brings state-of-the-art Large Language Model capabilities directly to your editor by connecting to your own local AI infrastructure.
This plugin is the IDE/Coding Assistant component of the LocalNest ecosystem.
- Fill-In-The-Middle (FIM): Dual-mode completions (Auto/Manual) that understand context before and after your cursor.
- Dynamic Ghost Text: Sleek, non-intrusive suggestions with custom high-priority highlighting (
LocalNestFimGhost) that won't conflict with other plugins. - Stateful Interactive Chat: A persistent, session-aware chat window. Ask follow-up questions and maintain deep context throughout your coding session.
- Interactive Chat Controls: In the chat buffer, use
rto respond/continue the thread andqto instantly close the window. - Slash Commands: Instant AI actions for selected code:
/explain: Get a concise breakdown of MUST-KNOW logic and performance./fix: Identify and resolve bugs with immediate corrected code blocks./refactor: Improve readability and efficiency with specific change logs./test: Generate comprehensive, edge-case unit tests.
- Context-Aware: Intelligently gathers buffer content and project context, now optimized with industry-standard PSM FIM formatting.
- Optimized for Qwen 2.5 & Qwen 2.5 Coder: Pre-tuned for elite local LLMs.
Using lazy.nvim:
{
'LocalNest/LocalNest.nvim',
config = function()
require('localnest').setup({
llama_server = {
host = "localhost", -- Or your local AI box
port = 8888,
}
})
end
}LocalNest uses which-key for easy discovery.
| Shortcut | Action |
|---|---|
Auto |
Suggestions appear after a pause (Auto-Mode) |
:LocalNestFimManual |
Trigger full FIM block generation (Manual-Mode) |
<C-x> |
Toggle FIM on/off |
<C-z> |
Accept suggestion |
<C-d> |
Dismiss suggestion |
| Shortcut | Action |
|---|---|
<leader>ae |
Explain code |
<leader>af |
Fix code |
<leader>ar |
Refactor code |
<leader>at |
Generate tests |
| Shortcut | Action |
|---|---|
<C-o>c |
Open Chat (Stateful History) |
<C-o>x |
Ask about Selection |
<C-o>f |
Analyze Full File |
<C-o>t |
Ask via @this block |
r (in buffer) |
Respond to the Assistant |
q (in buffer) |
Close Chat Window |
:LocalNestChatClear |
Reset Conversation History |
| Shortcut | Action |
|---|---|
<leader>db |
Toggle Breakpoint |
<leader>ds |
Debug Start/Continue |
<leader>dd |
Step Over |
<leader>du |
Toggle Debug UI |
<leader>tt |
Run Nearest Test |
<leader>tf |
Run Current File |
<leader>to |
Show Test Output |
<leader>o |
Toggle Code Outline |
| Shortcut | Action |
|---|---|
<S-h> |
Previous Buffer (Tab) |
<S-l> |
Next Buffer (Tab) |
<leader>bp |
Previous Buffer |
<leader>bn |
Next Buffer |
<leader>bc |
Close Buffer |
You can tune the AI's behavior in your setup function:
require('localnest').setup({
fim = {
enabled = true,
auto_trigger = true,
max_tokens = 128,
temperature = 0.0, -- Deterministic completions
top_p = 0.9,
},
chat = {
max_tokens = 2048,
temperature = 0.7,
system_prompt = "You are a concise coding assistant...",
}
})LocalNest is more than just an AI plugin; it's a fully-equipped IDE configured for high-performance engineering.
Full IDE capabilities for:
- Rust (via
rust-tools.nvim) - Go (via
go.nvim) - Python, TypeScript/JS, Lua, Bash, YAML, JSON, Docker
- Cap'n Proto (dedicated support)
- Modern UI:
tokyonighttheme,lualinestatus,bufferlinetabs, anddashboard-nvimsplash screen. - Search & Navigation:
telescope.nvimfor fuzzy search,aerial.nvimfor code outline. - Git Integration:
vim-fugitivefor management andgitsigns.nvimfor inline diffs. - Tool Management:
mason.nvimfor automated LSP, DAP, and linter installation. - Debugger:
nvim-dapwith full UI and virtual text support. - Test Runner:
neotestfor integrated testing in Go, Rust, and Python. - Productivity:
which-key.nvim: Interactive command discovery.toggleterm.nvim: Integrated terminal management.auto-session: Persistent workspace sessions.nvim-surround&Comment.nvim: Advanced text manipulation.
- Buffer Navigation: Fast tab switching with
<Shift-h/l>. - System Clipboard: Unified copy/paste with
Ctrl-candCtrl-v. - Smooth Interaction: Hardware-accelerated scrolling with
neoscroll.nvim. - Persistent History: Global undo history saved across restarts.
- Split Management: Intuitive split behavior (right/below).
- Neovim 0.10+
- llama-server (supporting
/infilland/v1/chat/completions) curlinstalled on your system
LocalNest.nvim is built with privacy and performance in mind. No code leaves your local environment, keeping your proprietary logic safe while giving you the speed and power of modern LLMs.