chat.nvim
July 25, 2026 ยท View on GitHub
chat.nvim is a lightweight, extensible chat plugin for Neovim with AI integration.
Chat with AI assistants directly in your editor using a clean, floating window interface.
It supports 19+ AI providers, a three-tier memory system, 40+ built-in tools,
MCP protocol, IM integrations, and an HTTP API for external access.
Full documentation is available at nvim.chat.
- โจ Features
- ๐ฆ Installation
- ๐ง Configuration
- โ๏ธ Basic Usage
- ๐ง Memory System
- ๐ ๏ธ Tools
- ๐ MCP Support
- ๐ฌ IM Integration
- ๐ HTTP API
- ๐ฃ Self-Promotion
- ๐ฌ Feedback
- ๐ License
โจ Features
- ๐ค 19+ AI Providers - DeepSeek, OpenAI, Anthropic, GitHub AI, Gemini, Ollama, Baidu, Xiaomi, Alibaba Cloud, and more
- ๐ง Three-Tier Memory - Working, daily, and long-term memory with automatic extraction and priority-based retrieval
- ๐ ๏ธ 40+ Built-in Tools - File operations, Git integration, web search, memory management, scheduling, user profiles
- ๐ Parallel Sessions - Multiple conversations with different models simultaneously
- ๐ MCP Protocol - Native Model Context Protocol support via stdio and HTTP transports
- ๐ฌ IM Integration - Discord, Telegram, Slack, Lark, DingTalk, WeCom, WeChat
- ๐ HTTP API - Built-in server for external integration with API key authentication
- ๐ค User Profiles - Per-user preferences and skills for personalized assistance
- โฐ Scheduled Tasks - One-time or recurring tasks that persist across Neovim restarts
- ๐ Zettelkasten - Note-taking support via zettelkasten.nvim integration
- โก Streaming Responses - Real-time AI responses with cancellation and token tracking
๐ฆ Installation
chat.nvim works with all major Neovim plugin managers.
-
Using lazy.nvim
{ 'wsdjeg/chat.nvim', dependencies = { 'wsdjeg/job.nvim', -- Required 'wsdjeg/picker.nvim', -- Optional but recommended }, } -
Using nvim-plug
require('plug').add({ { 'wsdjeg/chat.nvim', depends = { 'wsdjeg/job.nvim', 'wsdjeg/picker.nvim', }, }, }) -
Using luarocks
luarocks install chat.nvim
๐ง Configuration
The following is the default configuration of chat.nvim. See the Configuration Guide for full details.
require('chat').setup({
-- window options
width = 0.8,
height = 0.8,
auto_scroll = true,
border = 'rounded',
-- default AI provider and model
provider = 'deepseek',
model = 'deepseek-v4-flash',
-- time display format
strftime = '%m-%d %H:%M:%S',
-- enable RenderMarkdown for result buffer
render_markdown = true,
-- default system prompt
system_prompt = '',
-- HTTP server for external integration
http = {
host = '127.0.0.1',
port = 7777,
api_key = '', -- set to non-empty to enable
},
-- API keys for providers
api_key = {
deepseek = 'your-deepseek-api-key',
openai = 'your-openai-api-key',
-- ...
},
})
โ๏ธ Basic Usage
Open the chat window:
:Chat
Switch provider or model with slash commands (in the prompt window):
/provider openai
/model gpt-4o
Or use picker.nvim keybindings (in the input window):
| Key Binding | Action |
|---|---|
<Leader>fp | Switch provider via picker |
<Leader>fm | Switch model via picker |
<Leader>fr | Browse session history via picker |
Navigate between sessions:
:Chat prev
:Chat next
See the Usage Guide for all commands and keybindings.
๐ง Memory System
chat.nvim implements a three-tier memory system:
| Type | Lifetime | Purpose |
|---|---|---|
| Working | Session | Current context, decisions, active tasks |
| Daily | 7-30 days | Tasks, reminders, schedules |
| Long-term | Permanent | Preferences, facts, skills |
Memories are automatically extracted during conversations and retrieved with priority-based ranking. See the Memory Guide for details.
๐ ๏ธ Tools
40+ built-in tools are available for AI assistants to interact with your environment:
- File Operations - Read, write, search files and directories
- Git Integration - Status, diff, commit, push, branch management
- Web Search - Search the web via Firecrawl, Google, or SerpAPI
- Memory Management - Extract and recall memories
- Scheduled Tasks - Create one-time or recurring tasks
- User Profiles - Manage per-user preferences and skills
- Office Documents - View Excel files with multiple modes
- Zettelkasten - Create and manage notes
See the Tools Guide for the full list and usage.
๐ MCP Support
Native Model Context Protocol support for extended tool capabilities:
require('chat').setup({
mcp = {
servers = {
-- stdio transport
filesystem = {
command = 'npx',
args = { '-y', '@modelcontextprotocol/server-filesystem', '/path/to/dir' },
},
-- HTTP transport
remote = {
url = 'http://localhost:3000/mcp',
},
},
},
})
See the MCP Guide for details.
๐ฌ IM Integration
Connect messaging platforms for remote AI interaction:
- Discord - Chat with AI via Discord bot
- Telegram - Send messages and receive AI responses
- Slack - Slash command integration
- Lark - Feishu/Lark bot support
- DingTalk - DingTalk robot integration
- WeCom - WeChat Work integration
- WeChat - WeChat official account support
See the Integrations Guide for setup instructions.
๐ HTTP API
The built-in HTTP server allows external applications to send messages to chat.nvim:
curl -X POST http://127.0.0.1:7777/ \
-H "Content-Type: application/json" \
-H "X-API-Key: your-secret-api-key" \
-d '{"content":"Hello","session":"default"}'
See the API Guide for all endpoints.
๐ฃ Self-Promotion
If you like this plugin, please star it on GitHub. Also check out my other Neovim plugins:
- nvim-plug - Asynchronous plugin manager
- picker.nvim - Fuzzy picker
- job.nvim - Async job execution
- flygrep.nvim - Asynchronous grep
๐ฌ Feedback
If you encounter any bugs or have suggestions, please file an issue in the issue tracker
๐ License
Licensed under GPL-3.0.