style: add .stylua.toml and format the codebase#25
Merged
Conversation
Introduce a StyLua config and apply it repo-wide in one pass so future diffs stay formatting-clean. Config: 2-space indent, 120 column width, double quotes, no_call_parentheses, collapse_simple_statement = "ConditionalOnly" (keeps one-line guard clauses like `if x then break end`, the existing hand-written style). syntax = "LuaJIT" is required so goto/label syntax (::continue::, ::finalize::) parses unambiguously. No behavior change — formatting only. `make test` fully passes and `stylua --check` is clean (idempotent). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
StyLua の設定ファイルを導入し、リポジトリ全体を一度きりで整形しました。以降の差分はフォーマット起因のノイズが入らなくなります。
挙動の変更はありません(整形のみ)。
.stylua.tomlcollapse_simple_statement = "ConditionalOnly"—if x then break endのような 1 行ガード節を維持(既存の手書きスタイルに合わせる)。関数本体は展開する。syntax = "LuaJIT"— Neovim は LuaJIT 上で動くため明示。これが無いとgoto/ラベル構文 (::continue::/::finalize::) が Luau のラベル構文と衝突して parse できない。確認
stylua --check lua/ tests/ plugin/がクリーン(冪等)。make test全パス(回帰なし)。🤖 Generated with Claude Code