Skip to content

style: add .stylua.toml and format the codebase#25

Merged
delphinus merged 1 commit into
mainfrom
add-stylua-config
Jun 21, 2026
Merged

style: add .stylua.toml and format the codebase#25
delphinus merged 1 commit into
mainfrom
add-stylua-config

Conversation

@delphinus

Copy link
Copy Markdown
Owner

StyLua の設定ファイルを導入し、リポジトリ全体を一度きりで整形しました。以降の差分はフォーマット起因のノイズが入らなくなります。

挙動の変更はありません(整形のみ)。

.stylua.toml

column_width = 120
line_endings = "Unix"
syntax = "LuaJIT"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = true
collapse_simple_statement = "ConditionalOnly"
  • collapse_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

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>
@delphinus delphinus merged commit 6596cec into main Jun 21, 2026
4 checks passed
@delphinus delphinus deleted the add-stylua-config branch June 21, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant