LuaLS / LuaLS/lua-language-server

[FEATURE REQUEST] Invoke code formatting from CLI

Open
#1,240 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feat/formatter
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 it takes forever. I disabled diagnostics like this:

    "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.
image

So, it would be great to trigger code formatting from CLI without doing any diagnostics.

I tried this tool but it has different styling by default so it was not really helpful, but it's blazing fast.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.