Neovim plugin for chatting with MiniMax AI models via the mmx CLI.
- Neovim >= 0.8
- mmx CLI installed (
npm install -g mmx-cli) - MiniMax API key configured (
mmx auth login)
Using lazy.nvim:
{
"user/minimax-chat.nvim",
config = function()
require("minimax-chat").setup({
model = "MiniMax-M2.7",
})
end,
}require("minimax-chat").setup({
model = "MiniMax-M2.7", -- default model
stream = true, -- stream responses
timeout = 60, -- job timeout in seconds
search_enabled = true, -- enable [SEARCH] marker support (legacy)
tools = { -- native tool calling (recommended)
{
name = "web_search",
description = "Search the web for current information",
input_schema = {
type = "object",
properties = {
query = {
type = "string",
description = "The search query"
}
},
required = {"query"}
}
}
}
})Write your conversation in any buffer using markers:
[SYSTEM]
You are a helpful assistant.
[USER]
What is Lua?
[ASSISTANT]
(model response appears here after sending)
Press Shift+Enter in normal mode or run :MmxSend to send the entire
buffer content to MiniMax. The response is streamed to the buffer.
| Command | Description |
|---|---|
:MmxSend |
Send buffer to MiniMax |
:MmxChatNew |
Create new chat buffer with template |
| Marker | Description |
|---|---|
[SYSTEM] |
System prompt (optional, at top) |
[USER] |
User message |
[ASSISTANT] |
Assistant response |
[THINKING] |
Model reasoning (auto-generated) |
[TOOL_CALL] |
Tool call invocation (auto-generated) |
[TOOL_RESULT] |
Tool result content (auto-generated) |
The plugin supports native tool calling via the MiniMax API. When tools are configured, the model can autonomously decide to call a tool (like web_search) to gather information before responding.
How it works:
- Press Shift+Enter → buffer is parsed and sent to
mmx text chatwith tool definitions - If the model decides to call a tool (e.g.,
web_search), the plugin executesmmx search query --q "..." --output json - Search results are returned to the model via a follow-up message
- The model generates a final response with the tool results as context
Configuration:
- By default,
web_searchtool is enabled iftoolsis not explicitly set - Set
tools = nilto disable tool calling - Set
tools = {...}with custom tool definitions to enable specific tools
Note: The legacy [SEARCH]<query> marker system is still supported via search_enabled = true but native tool calling is the recommended approach.
User message → mmx text chat (with tools)
↓
Model decides to call web_search
↓
Plugin executes: mmx search query --q "..." --output json
↓
Results sent back to model in follow-up message
↓
Final response displayed with [ASSISTANT] marker
MIT