{"id":30137594,"url":"https://github.com/nathom/delphi.nvim","last_synced_at":"2025-10-13T10:08:16.445Z","repository":{"id":306732111,"uuid":"1027054727","full_name":"nathom/delphi.nvim","owner":"nathom","description":"A simple LLM plugin for Neovim","archived":false,"fork":false,"pushed_at":"2025-09-02T06:33:14.000Z","size":330,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-29T17:47:06.826Z","etag":null,"topics":["llms","neovim"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-27T07:58:45.000Z","updated_at":"2025-09-02T06:25:09.000Z","dependencies_parsed_at":"2025-08-26T07:16:20.739Z","dependency_job_id":"25c9beeb-3b3b-4bdd-b0e0-0f8b38a9c93f","html_url":"https://github.com/nathom/delphi.nvim","commit_stats":null,"previous_names":["nathom/delphi.nvim"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/nathom/delphi.nvim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathom%2Fdelphi.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathom%2Fdelphi.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathom%2Fdelphi.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathom%2Fdelphi.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathom","download_url":"https://codeload.github.com/nathom/delphi.nvim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathom%2Fdelphi.nvim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014672,"owners_count":26085554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llms","neovim"],"created_at":"2025-08-11T00:52:49.193Z","updated_at":"2025-10-13T10:08:16.440Z","avatar_url":"https://github.com/nathom.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003edelphi.nvim\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/pythia.jpg\" alt=\"Pythia\" width=\"300\" style=\"border: 1px solid #ddd; border-radius: 4px; padding: 2px;\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\u003cem\u003ePriestess of Delphi\u003c/em\u003e, 1891\u003cbr\u003eJohn Collier\u003c/p\u003e\n\n\n## Features\n\n- Clean and snappy Vim buffer based chat interface\n- Local storage for chat history, with optional [Telescope](https://github.com/nvim-telescope/telescope.nvim) integration\n- Code rewrite and insert-at-cursor with live diff preview\n- Zero startup time cost (with lazy.nvim)\n- Pure Lua OpenAI client and diff algorithm\n\n\n## Setup \n\nYou'll need a plugin manager (such as [lazy](https://github.com/folke/lazy.nvim)), and an OpenAI compatible\nLLM API (such as [OpenRouter](https://openrouter.ai)). If you want the chat history picker, install Telescope and load the extension.\n\nExample configuration with lazy.nvim:\n\n```lua\n{\n  \"nathom/delphi.nvim\",\n  keys = {\n    { \"\u003cleader\u003e\u003ccr\u003e\", \"\u003cPlug\u003e(DelphiChatSend)\", desc = \"Delphi: send chat\" },\n    { \"\u003cC-i\u003e\", \"\u003cPlug\u003e(DelphiRewriteSelection)\", mode = { \"x\", \"s\" }, desc = \"Delphi: rewrite selection\" },\n    { \"\u003cC-i\u003e\", \"\u003cPlug\u003e(DelphiInsertAtCursor)\", mode = { \"n\", \"i\" }, desc = \"Delphi: insert at cursor\" },\n    { \"\u003cleader\u003ea\", \"\u003cPlug\u003e(DelphiRewriteAccept)\", desc = \"Delphi: accept rewrite\" },\n    { \"\u003cleader\u003eR\", \"\u003cPlug\u003e(DelphiRewriteReject)\", desc = \"Delphi: reject rewrite\" },\n  },\n  cmd = { \"Chat\", \"Rewrite\" },\n  opts = {\n    chat = { default_model = \"gemini_flash\", scroll_on_send = true },\n    rewrite = { default_model = \"gemini_flash\" },\n    models = {\n      gemini_flash = {\n        base_url = \"https://openrouter.ai/api/v1\",\n        api_key_env_var = \"OPENROUTER_API_KEY\",\n        model_name = \"google/gemini-2.5-flash\",\n      },\n    },\n  },\n  dependencies = { \"nvim-lua/plenary.nvim\", \"nvim-telescope/telescope.nvim\" },\n}\n```\n\nIn this case, delphi will expect your OpenRouter API keys under the environment variable `OPENROUTER_API_KEY`.\n\n## Usage\n\n### Chat\n\nType `:Chat` to open up a chat buffer. If one is already open\nin your Neovim instance, it will switch to that buffer. If you want to create a new chat regardless, use `:Chat new`.\n\nExample blank chat buffer:\n\n\n```md\n---\nmodel: kimi_k2\ntemperature: 0.7\n---\n\nSystem:\n\n\nUser:\n\n```\n\nTo send a message to the model, type text below `User:`, switch to normal mode, and trigger `\u003cPlug\u003e(DelphiChatSend)`.\n\n\n```md\n---\nmodel: kimi_k2\ntemperature: 0.7\n---\n\nSystem:\n\n\nUser:\nIs it worth switching to Neovim?\n```\n\nYou should see the model's response being streamed in live.\n\n```md\n---\nmodel: kimi_k2\ntemperature: 0.7\n---\n\nSystem:\n\n\nUser:\nIs it worth switching to Neovim?\n\nAssistant:\nShort answer  \nIf you already know Vim and are happy with it, you probably don’t *need* to switch—but if you enjoy experimenting,\nwant modern features without waiting for Bram to merge them, or are starting from scratch, Neovim is almost always the better choice today.\n\nBelow is a practical “decision matrix” so you can decide whether the switch is worth the one-time migration cost for *you*.\n...\n```\n\nThe system prompt can usually be left empty, as the provider will set a reasonable one for you.\n\n#### Chat history\n\nYou have two options:\n\n- Use `:Telescope delphi chats` (after loading the extension)\n- Run `:Chat list` to view the ids and titles of chats, and `:Chat go \u003cid\u003e` to open them\n\n### Rewrite\n\nThis command allows the LLM to rewrite a selected block of code or insert at the cursor.\nIt displays a live diff preview as tokens stream in.\n\nTo use it\n\n- open a buffer with some text\n- highlight a few lines in Visual Lines mode (shift-V)\n- press `\u003cC-i\u003e` (or use `\u003cPlug\u003e(DelphiRewriteSelection)`) to open the prompt\n- instruct the model, hit `ENTER`\n- accept or reject the changes via `\u003cPlug\u003e(DelphiRewriteAccept)` or `\u003cPlug\u003e(DelphiRewriteReject)`\n\nInsert at cursor\n\n- from Normal or Insert mode, press `\u003cC-i\u003e` (or use `\u003cPlug\u003e(DelphiInsertAtCursor)`) to insert at the current line\n- the diff preview shows only additions; accepting applies the generated lines at the cursor line\n- press `\u003cEsc\u003e\u003cEsc\u003e` inside the prompt popup to cancel (mapping is local to the popup only)\n\n### Configuration\n\nConfiguration schema:\n\n```lua\n---@class Model\n---@field base_url string\n---@field api_key_env_var string\n---@field model_name string\n---@field temperature number\n\n---@class Config\n---@field models table\u003cstring, Model\u003e\n---@field allow_env_var_config boolean\n---@field chat { system_prompt: string, default_model: string?, headers: { system: string, user: string, assistant: string }, scroll_on_send: boolean }\n---@field rewrite { default_model: string? }\n```\n\nDefault options:\n\n```lua\nopts = {\n  models = {},\n  allow_env_var_config = false,\n  chat = {\n    system_prompt = \"\",\n    default_model = nil,\n    headers = {\n      system = \"System:\",\n      user = \"User:\",\n      assistant = \"Assistant:\",\n    },\n    scroll_on_send = true,\n  },\n  rewrite = {\n    default_model = nil,\n  },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathom%2Fdelphi.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathom%2Fdelphi.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathom%2Fdelphi.nvim/lists"}