LuaLS / LuaLS/lua-language-server
Suggestion: Make `@param;@return` available as code action
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
One really nice feature of the lua-lsp is that by typing `---` above a function, we get the `@param;@return` suggestions which auto-inserts function annotation.
Would it be possible to make this feature available via code action as well? Right now, it takes a bit of repetitive work to get the annotations inserted. When at the function head: `up`, `-`. `-`, `-`, `enter`. By using a code action, this could be reduced to one hotkey (and depending on your editor, maybe one extra `enter`).
Another benefit would be that making this available as code action would increase the discoverability of this feature. For a while, I didn't know that this very useful feature even existed. By being a code action, it would be far easier to discover for new users.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先跟踪由 `---` 触发、用于插入 `@param` 和 `@return` 注解的现有建议,然后检查 language server 在哪里提供代码操作。完成的标准是:可以通过代码操作执行相同的注解插入,并且在函数头部仍然可以发现该功能。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- devtools
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100