Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[FEATURE] Define Custom Tools

未关闭
#149 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
lua, neovim
领域
tooling

调研方向

首先跟踪 plugin 如何读取其配置,以及基于 WebSocket 的 Claude 集成如何公开工具。定义受支持的 custom_tools 结构,包括 schema 和 callback,并验证 Claude 能否在 Neovim 中调用已配置的 Lua 函数。

由索引模型根据 Issue 内容生成。

描述

Feature Description

I'd like to be able to define custom MCP tools in the plugin's config.

Use Case

Users would be able to define any function that can be run by Claude within neovim. The use cases are basically infinite. Anything you can imagine as a Lua function could be run by Claude.

Proposed Solution

I Imagine the function definition to look somewhat like this:

{
  "coder/claudecode.nvim",
  dependencies = { "folke/snacks.nvim" },
  -- ...
  custom_tools = {
    {
      "tool_name",
      title = "The tool's title",
      desc = "Does something",
      input_schema = {
        -- ...
      },
      output_schema = {
        -- ...
      },
      annotations = {
        -- ...
      },
      callback = function(arg1, arg2)
        -- ...
      end
    },
  },
}

Alternatives Considered

  • Letting claude execute arbitrary vim commands. That's not very Neovimy and more risky though. And this feature could still be implemented using the proposed solution.
  • Making my own plugin. Though the power of claudecode.nvim is its WebSocket based integration, which I'd have to replicate (or I'd have to use a local http transport).
主要语言
Lua
星标
3.1k
派生
220
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/claudecode.nvim 的其他 Issue

查看 coder/claudecode.nvim 的全部 Issue

相似的 Issue

更多 Lua Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。