LuaLS / LuaLS/lua-language-server
Support for capturing function names
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
Similar to how you can capture class names in generics and annotate a function to then return that class it would be cool if you could do the same for functions. In a modloader we have a hooking function like this:
hook(object, "function_name", function(...) end)
which makes a function run after the hooked function on an object with the same parameters as the original function.
I understand if thats too much effort to implement but it would be nice if it was somehow possible to annotate the second argument of the hook function to be the name of a function on object.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪现有的支持,以了解如何捕获泛型中的类名并为函数参数添加注解。然后确定 hook 函数的第二个字符串参数如何解析为对象上的一个函数,同时保留原始函数参数。完成的标准是 language server 能够针对这种模式推断并公开被 hook 的函数名称。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- devtools
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100