1 line
19 KiB
JSON
1 line
19 KiB
JSON
{"repo": "bdathe-lb/code-scribe", "files": {"doc/code-scribe.txt": {"9d7b6cf4aa044a04bbef3d5320ba794a4eccd1bb": {"t": 1785746481.0218515, "n": 6907, "h": "8438111640cccad4", "c": "*code-scribe.txt* AI documentation assistant for Neovim\n\nAuthor: bdathe\nLicense: MIT\n\n==============================================================================\nCONTENTS *code-scribe-contents*\n\n 1. Introduction ........................... |code-scribe-introduction|\n 2. Requirements ........................... |code-scribe-requirements|\n 3. Setup .................................. |code-scribe-setup|\n 4. Commands ............................... |code-scribe-commands|\n 5. Keymaps ................................ |code-scribe-keymaps|\n 6. Configuration .......................... |code-scribe-config|\n\n==============================================================================\n1. INTRODUCTION *code-scribe-introduction*\n\ncode-scribe.nvim is an AI-powered documentation assistant focused on C++ and\nPython. It improves comment quality rather than completing code: comment\ntranslation, grammar fixing, comment/docstring generation, code explanation,\nfile summaries, commit messages and context-aware naming suggestions, backed by\nthe LLM provider of your choice.\n\nRewrite and generation actions show a diff preview before changing the buffer.\nRename actions ask you to select a suggested name first. They use LSP rename\nwhen available; otherwise a diff limits replacement to the enclosing function.\n\n==============================================================================\n2. REQUIREMENTS *code-scribe-requirements*\n\n- Neovim >= 0.10\n- `curl` in $PATH\n- Tree-sitter parsers for `cpp` and `python` (function-based features)\n- A provider API key in an environment variable, or a local Ollama\n\nRun `:checkhealth code-scribe` to verify.\n\n==============================================================================\n3. SETUP *code-scribe-setup*\n\n>lua\n require(\"code-scribe\").setup({\n provider = \"openai\",\n })\n<\n\n`require(\"code-scribe\").run({feature})` triggers a feature programmatically.\n\n==============================================================================\n4. COMMANDS *code-scribe-commands*\n\n *:CodeScribe*\n:CodeScribe {feature}\n:'<,'>CodeScribe {feature}\n\nAvailable features (tab-completed):\n\n translate Translate a Chinese comment into English.\n Normal mode: comment block at the cursor (adjacent\n same-indent comment lines are merged). Visual mode: the\n selected comment lines.\n grammar Fix grammar/spelling/style in an English comment.\n improve Improve comment wording without changing its meaning.\n gen_comment Generate a Doxygen comment for the function at (or below)\n the cursor. In Python buffers this generates a docstring.\n docstring Generate or update a Python docstring in the configured\n style (google/numpy/sphinx).\n rename_var Suggest names for the identifier at the cursor, then rename it.\n Uses LSP when available; otherwise replaces same-name\n identifiers in the enclosing function only.\n rename_func Suggest names for the function at (or below) the cursor, then\n rename it with the same LSP/function-scope behavior.\n explain Explain the visually selected code in a floating window.\n commit_msg Generate a Conventional Commits message from the staged\n (or unstaged) git diff. Press `y` in the window to yank it.\n summarize Summarize the current file in a floating window.\n\n==============================================================================\n5. KEYMAPS *code-scribe-keymaps*\n\nDefault keymaps (disable all with `keymaps = false`):\n\n <leader>ct translate <leader>cd docstring\n <leader>cf grammar <leader>ce explain (visual)\n <leader>ci improve <leader>cm commit_msg\n <leader>cg gen_comment <leader>cs summarize\n <leader>cr rename_var <leader>cR rename_func\n\nIn the diff preview window: <CR>/a applies the change, q/<Esc> dismisses it.\nIn result windows: q/<Esc> closes.\nRename candidates are shown through `vim.ui.select`, so installed UI providers\nsuch as Telescope, fzf-lua or dressing.nvim are used automatically.\n\n==============================================================================\n6. CONFIGURATION *code-scribe-config*\n\nDefaults: >lua\n require(\"code-scribe\").setup({\n provider = \"openai\", -- openai|anthropic|gemini|deepseek|qwen|ollama\n providers = {\n -- api_key is the NAME of an environment variable, or a function\n -- returning the key. Never write a plaintext key in your config.\n openai = { model = \"gpt-4o-mini\", api_key = \"OPENAI_API_KEY\" },\n anthropic = { model = \"claude-sonnet-5\", api_key = \"ANTHROPIC_API_KEY\" },\n gemini = { model = \"gemini-2.0-flash\", api_key = \"GEMINI_API_KEY\" },\n deepseek = { model = \"deepseek-chat\", api_key = \"DEEPSEEK_API_KEY\" },\n qwen = { model = \"qwen-plus\", api_key = \"DASHSCOPE_API_KEY\" },\n ollama = { model = \"qwen2.5:7b\", base_url = \"http://localhost:11434\" },\n },\n -- Task tiering: map feature name → provider. Unlisted features use\n -- the global `provider`.\n feature_providers = {\n -- translate = \"ollama\",\n -- grammar = \"ollama\",\n },\n request = { timeout_ms = 30000, max_retries = 1 },\n docstring_style = \"google\", -- google|numpy|sphinx\n keymaps = { ... }, -- table of feature → lhs, or false\n ui = {\n diff = { auto_apply = false }, -- true skips the diff confirmation\n float = { border = \"rounded\", max_width = 80, max_height = 20 },\n },\n log_level = \"warn\", -- trace|debug|info|warn|error\n })\n<\n\nProvider resolution order:\n 1. Explicit `provider` argument to the internal request API (tests)\n 2. `feature_providers[feature]`\n 3. Global `provider`\n\nRecommended hybrid setup (fast local drafts + cloud quality): >lua\n require(\"code-scribe\").setup({\n provider = \"deepseek\",\n providers = {\n deepseek = { model = \"deepseek-chat\", api_key = \"DEEPSEEK_API_KEY\" },\n ollama = { model = \"qwen2.5-coder:7b\", base_url = \"http://localhost:11434\" },\n },\n feature_providers = {\n translate = \"ollama\",\n grammar = \"ollama\",\n },\n })\n<\n\nLazyVim note: default <leader>c* maps collide with LazyVim code keymaps\n(cr = LSP rename, cf = format, cd = diagnostics, cm = Mason, cs = symbols).\nRemap via `keymaps` (e.g. whole group under <leader>S).\n\nLogs are written to `stdpath(\"log\")/code-scribe.log`. API keys are never\nlogged.\n\nvim:tw=78:ts=8:noet:ft=help:norl:\n"}, "1b81aeb28fb1e5049fd2873d9c2d35c1a1119d76": {"t": 1785764787.7222738, "n": 5938, "h": "76a68da17f5078be", "c": "*code-scribe.txt* AI documentation assistant for Neovim\n\nAuthor: bdathe\nLicense: MIT\n\n==============================================================================\nCONTENTS *code-scribe-contents*\n\n 1. Introduction ........................... |code-scribe-introduction|\n 2. Requirements ........................... |code-scribe-requirements|\n 3. Setup .................................. |code-scribe-setup|\n 4. Commands ............................... |code-scribe-commands|\n 5. Keymaps ................................ |code-scribe-keymaps|\n 6. Configuration .......................... |code-scribe-config|\n\n==============================================================================\n1. INTRODUCTION *code-scribe-introduction*\n\ncode-scribe.nvim is an AI-powered documentation assistant focused on C++ and\nPython. It improves comment quality rather than completing code: comment\ntranslation, grammar fixing, comment/docstring generation, code explanation,\nfile summaries, commit messages and context-aware naming suggestions, backed by\nthe LLM provider of your choice.\n\nRewrite and generation actions show a diff preview before changing the buffer.\nRename actions ask you to select a suggested name first. They use LSP rename\nwhen available; otherwise a diff limits replacement to the enclosing function.\n\n==============================================================================\n2. REQUIREMENTS *code-scribe-requirements*\n\n- Neovim >= 0.10\n- `curl` in $PATH\n- Tree-sitter parsers for `cpp` and `python` (function-based features)\n- A provider API key in an environment variable, or a local Ollama\n\nRun `:checkhealth code-scribe` to verify.\n\n==============================================================================\n3. SETUP *code-scribe-setup*\n\n>lua\n require(\"code-scribe\").setup({\n provider = \"openai\",\n })\n<\n\n`require(\"code-scribe\").run({feature})` triggers a feature programmatically.\n\n==============================================================================\n4. COMMANDS *code-scribe-commands*\n\n *:CodeScribe*\n:CodeScribe {feature}\n:'<,'>CodeScribe {feature}\n\nAvailable features (tab-completed):\n\n translate Translate a Chinese comment into English.\n Normal mode: comment block at the cursor (adjacent\n same-indent comment lines are merged). Visual mode: the\n selected comment lines.\n grammar Fix grammar/spelling/style in an English comment.\n improve Improve comment wording without changing its meaning.\n gen_comment Generate a Doxygen comment for the function at (or below)\n the cursor. In Python buffers this generates a docstring.\n docstring Generate or update a Python docstring in the configured\n style (google/numpy/sphinx).\n rename_var Suggest names for the identifier at the cursor, then rename it.\n Uses LSP when available; otherwise replaces same-name\n identifiers in the enclosing function only.\n rename_func Suggest names for the function at (or below) the cursor, then\n rename it with the same LSP/function-scope behavior.\n explain Explain the visually selected code in a floating window.\n commit_msg Generate a Conventional Commits message from the staged\n (or unstaged) git diff. Press `y` in the window to yank it.\n summarize Summarize the current file in a floating window.\n\n==============================================================================\n5. KEYMAPS *code-scribe-keymaps*\n\nDefault keymaps (disable all with `keymaps = false`):\n\n <leader>ct translate <leader>cd docstring\n <leader>cf grammar <leader>ce explain (visual)\n <leader>ci improve <leader>cm commit_msg\n <leader>cg gen_comment <leader>cs summarize\n <leader>cr rename_var <leader>cR rename_func\n\nIn the diff preview window: <CR>/a applies the change, q/<Esc> dismisses it.\nIn result windows: q/<Esc> closes.\nRename candidates are shown through `vim.ui.select`, so installed UI providers\nsuch as Telescope, fzf-lua or dressing.nvim are used automatically.\n\n==============================================================================\n6. CONFIGURATION *code-scribe-config*\n\nDefaults: >lua\n require(\"code-scribe\").setup({\n provider = \"openai\", -- openai|anthropic|gemini|deepseek|qwen|ollama\n providers = {\n -- api_key is the NAME of an environment variable, or a function\n -- returning the key. Never write a plaintext key in your config.\n openai = { model = \"gpt-4o-mini\", api_key = \"OPENAI_API_KEY\" },\n anthropic = { model = \"claude-sonnet-5\", api_key = \"ANTHROPIC_API_KEY\" },\n gemini = { model = \"gemini-2.0-flash\", api_key = \"GEMINI_API_KEY\" },\n deepseek = { model = \"deepseek-chat\", api_key = \"DEEPSEEK_API_KEY\" },\n qwen = { model = \"qwen-plus\", api_key = \"DASHSCOPE_API_KEY\" },\n ollama = { model = \"qwen2.5:7b\", base_url = \"http://localhost:11434\" },\n },\n request = { timeout_ms = 30000, max_retries = 1 },\n docstring_style = \"google\", -- google|numpy|sphinx\n keymaps = { ... }, -- table of feature → lhs, or false\n ui = {\n diff = { auto_apply = false }, -- true skips the diff confirmation\n float = { border = \"rounded\", max_width = 80, max_height = 20 },\n },\n log_level = \"warn\", -- trace|debug|info|warn|error\n })\n<\nLogs are written to `stdpath(\"log\")/code-scribe.log`. API keys are never\nlogged.\n\nvim:tw=78:ts=8:noet:ft=help:norl:\n"}, "8ad288aec187dbc87dee0ae2457292be4f67b3d9": {"t": 1785764789.037498, "n": 5223, "h": "697555393319c09a", "c": "*code-scribe.txt* AI documentation assistant for Neovim\n\nAuthor: bdathe\nLicense: MIT\n\n==============================================================================\nCONTENTS *code-scribe-contents*\n\n 1. Introduction ........................... |code-scribe-introduction|\n 2. Requirements ........................... |code-scribe-requirements|\n 3. Setup .................................. |code-scribe-setup|\n 4. Commands ............................... |code-scribe-commands|\n 5. Keymaps ................................ |code-scribe-keymaps|\n 6. Configuration .......................... |code-scribe-config|\n\n==============================================================================\n1. INTRODUCTION *code-scribe-introduction*\n\ncode-scribe.nvim is an AI-powered documentation assistant focused on C++ and\nPython. It improves comment quality rather than completing code: comment\ntranslation, grammar fixing, comment/docstring generation, code explanation,\nfile summaries and commit messages, backed by the LLM provider of your choice.\n\nEvery buffer-modifying action shows a diff preview first; nothing is written\nuntil you confirm with <CR> or `a`.\n\n==============================================================================\n2. REQUIREMENTS *code-scribe-requirements*\n\n- Neovim >= 0.10\n- `curl` in $PATH\n- Tree-sitter parsers for `cpp` and `python` (function-based features)\n- A provider API key in an environment variable, or a local Ollama\n\nRun `:checkhealth code-scribe` to verify.\n\n==============================================================================\n3. SETUP *code-scribe-setup*\n\n>lua\n require(\"code-scribe\").setup({\n provider = \"openai\",\n })\n<\n\n`require(\"code-scribe\").run({feature})` triggers a feature programmatically.\n\n==============================================================================\n4. COMMANDS *code-scribe-commands*\n\n *:CodeScribe*\n:CodeScribe {feature}\n:'<,'>CodeScribe {feature}\n\nAvailable features (tab-completed):\n\n translate Translate a Chinese comment into English.\n Normal mode: comment block at the cursor (adjacent\n same-indent comment lines are merged). Visual mode: the\n selected comment lines.\n grammar Fix grammar/spelling/style in an English comment.\n improve Improve comment wording without changing its meaning.\n gen_comment Generate a Doxygen comment for the function at (or below)\n the cursor. In Python buffers this generates a docstring.\n docstring Generate or update a Python docstring in the configured\n style (google/numpy/sphinx).\n explain Explain the visually selected code in a floating window.\n commit_msg Generate a Conventional Commits message from the staged\n (or unstaged) git diff. Press `y` in the window to yank it.\n summarize Summarize the current file in a floating window.\n\n==============================================================================\n5. KEYMAPS *code-scribe-keymaps*\n\nDefault keymaps (disable all with `keymaps = false`):\n\n <leader>ct translate <leader>cd docstring\n <leader>cf grammar <leader>ce explain (visual)\n <leader>ci improve <leader>cm commit_msg\n <leader>cg gen_comment <leader>cs summarize\n\nIn the diff preview window: <CR>/a applies the change, q/<Esc> dismisses it.\nIn result windows: q/<Esc> closes.\n\n==============================================================================\n6. CONFIGURATION *code-scribe-config*\n\nDefaults: >lua\n require(\"code-scribe\").setup({\n provider = \"openai\", -- openai|anthropic|gemini|deepseek|qwen|ollama\n providers = {\n -- api_key is the NAME of an environment variable, or a function\n -- returning the key. Never write a plaintext key in your config.\n openai = { model = \"gpt-4o-mini\", api_key = \"OPENAI_API_KEY\" },\n anthropic = { model = \"claude-sonnet-5\", api_key = \"ANTHROPIC_API_KEY\" },\n gemini = { model = \"gemini-2.0-flash\", api_key = \"GEMINI_API_KEY\" },\n deepseek = { model = \"deepseek-chat\", api_key = \"DEEPSEEK_API_KEY\" },\n qwen = { model = \"qwen-plus\", api_key = \"DASHSCOPE_API_KEY\" },\n ollama = { model = \"qwen2.5:7b\", base_url = \"http://localhost:11434\" },\n },\n request = { timeout_ms = 30000, max_retries = 1 },\n docstring_style = \"google\", -- google|numpy|sphinx\n keymaps = { ... }, -- table of feature → lhs, or false\n ui = {\n diff = { auto_apply = false }, -- true skips the diff confirmation\n float = { border = \"rounded\", max_width = 80, max_height = 20 },\n },\n log_level = \"warn\", -- trace|debug|info|warn|error\n })\n<\nLogs are written to `stdpath(\"log\")/code-scribe.log`. API keys are never\nlogged.\n\nvim:tw=78:ts=8:noet:ft=help:norl:\n"}}}} |