LuaLS / LuaLS/lua-language-server
[FEATURE REQUEST] Invoke code formatting from CLI
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the language server's existing formatting entry point and CLI argument handling; the issue does not name specific files or tests. The work is done when formatting can be invoked from the CLI for large Lua projects without triggering diagnostics and preserves the language server's styling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100