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.

Run Tests GitHub License GitHub Issues or Pull Requests GitHub commit activity GitHub Release luarocks

chat-nvim

โœจ 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 BindingAction
<Leader>fpSwitch provider via picker
<Leader>fmSwitch model via picker
<Leader>frBrowse 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:

TypeLifetimePurpose
WorkingSessionCurrent context, decisions, active tasks
Daily7-30 daysTasks, reminders, schedules
Long-termPermanentPreferences, 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:

๐Ÿ’ฌ Feedback

If you encounter any bugs or have suggestions, please file an issue in the issue tracker

๐Ÿ“„ License

Licensed under GPL-3.0.