LuaLS / LuaLS/lua-language-server
Setting up `codestyle-check` precisely?
还没有人认领这个 Issue。
- 主要语言
- Lua
- 星标
- 4.4k
- 派生
- 442
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi there!
Is there any way to set up (disable) exact checks for `codestyle-check`?
`.stylua.toml` and `.editorconfig` syntax doesn't have much parameters, and doesn't cover such usecases like "spaces before single argument".
For example, when I type `local a = require"foo".moo`, and I don't want that codestyle checker triggered on missing space (or anything) here, and I want this "globally" (to don't place comments `---@diagnostic` comments here and there and everywhere everytime).
Or, say, I have function, that takes a table as argument, and place `table` global in metadate, to allow OOP-like calls on tables.
So, as syntactig sugar I have variable `T` set to this function.
So, I'm initializing tables with `local mytable = T{}`.
And I don't want that codestyle-checker blame on missing space here too.
And so on...
So, it would be nice, if there was a possibility to configure (enable/disable) exact checks per-project **and** globally (default settings, that per-project ones would override).
And I digged all around lua_ls and emmylua docs and didn't find a way to do that.
Can you advice me, please?
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查 codestyle-check 与 .stylua.toml 和 .editorconfig 的关系,然后查看 issue 中提到的 lua_ls 和 emmylua 文档。完整的更改应定义项目级和全局设置,以启用或禁用单个检查,其中项目设置会覆盖默认值。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- lua
- 领域
- developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100