LuaLS / LuaLS/lua-language-server
[FEATURE REQUEST] Invoke code formatting from CLI
還沒有人認領這個 Issue。
- 主要語言
- Lua
- 星號
- 4.4k
- 分支
- 442
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I have a project with 3K+ Lua files I need to format. The problem is if I use something like [this](https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files) it takes forever. I disabled diagnostics like this:
```json
"Lua.diagnostics.enable": false,
"Lua.diagnostics.workspaceDelay": 10000,
"Lua.diagnostics.workspaceRate": 1,
"Lua.diagnostics.disableScheme": ["git", "."]
```
Yet for some reason `lua-language-server` triggers diagnostics all the time and it slows down the process.

So, it would be great to trigger code formatting from CLI without doing any diagnostics.
I tried [this tool](https://github.com/Koihik/LuaFormatter) but it has different styling by default so it was not really helpful, but it's blazing fast.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先追蹤 language server 既有的格式化入口與 CLI 引數處理;此 issue 未指定特定的檔案或測試。完成標準是:可以透過 CLI 為大型 Lua 專案呼叫格式化,不會觸發診斷,並保留 language server 的樣式。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- lua
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100