Add a problemMatcher
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 215
- 派生
- 62
- PR 合并指标
- 30 天内没有已合并 PR
描述
### How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
### Which OS are you using?
MacOS
### What is the issue affecting?
Other
### Expected Behaviour
I am not sure how you normally run your Lua application. But I am used to use the tasks feature of VS code, so I created a tasks.json with this content:
```
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Run main",
"type": "shell",
"command": "./main.lua",
"problemMatcher": [
"$lua"
]
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
```
Normally such a task makes use of a `problemMatcher` which parses the tasks console output for problems and then highlight the code line that was affected. But there seems no problemMatcher to be defined by the plugin.
### Actual Behaviour
No problemMatcher provided.
### Reproduction steps
1. Create a tasks.json as given in "Expected Behaviour"
2. Crate a main.lua with an error such as "local i = 5 + "foo"
3. Run the task, the output shows something like
```
/usr/bin/lua: ./main.lua:3: attempt to add a 'number' with a 'string'
stack traceback:
[C]: in metamethod 'add'
./main.lua:3: in main chunk
[C]: in ?
```
See the main.lua, there is no highlight due to this error.
### Additional Notes
_No response_
### Log File
_No response_
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件或测试。使用提供的 tasks.json 和 main.lua 示例重现该问题,然后检查 VS Code 扩展如何参与任务集成和 problem matchers。完成的标准是:任务输出中的 Lua 运行时错误能够被解析,并且受影响的 main.lua 行被高亮显示。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua, vscode
- 领域
- tooling
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100