Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions languages/lua/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ brackets = [
{ start = "'", end = "'", close = true, newline = false, not_in = ["string"] },
]
collapsed_placeholder = "--[ ... ]--"

# Fallback indent rules to complement tree-sitter.
# Handle incomplete structures (e.g. before typing `end`).
increase_indent_pattern = "^\\s*(if|elseif|else|do|while|for|repeat|((local|global)\\s+)?function|.+=\\s*function|.*[,(]\\s*function)\\b"

# Fallback outdent rules to complement tree-sitter.
# Fix `elseif` / `else` handling, and outdent `end` / `until` even when the structure is incomplete.
# Avoids relying on `valid_after` contexts, which depend on tree-sitter queries (`@start.*` captures).
decrease_indent_pattern = "^\\s*(elseif|else|end|until)\\b"