Konfiguracja

Plik konfiguracji projektu

Snapper szuka pliku .snapperrc.toml począwszy od bieżącego katalogu w górę aż do korzenia systemu plików. Przesłoń wyszukiwanie za pomocą --config path/to/config.toml.

Or generate one with snapper init.

Format konfiguracji

# Language for abbreviation sets (en, de, fr, is, pl)
lang = "en"

# Extra abbreviations (merged with built-in list for the selected language)
extra_abbreviations = ["GROMACS", "LAMMPS", "DFT"]

# File patterns to ignore (glob syntax)
ignore = ["*.bib", "*.cls", "*.sty"]

# Default format (overridden by --format flag)
format = "org"

# Maximum line width (0 = unlimited, overridden by --max-width flag)
max_width = 0

# Per-format overrides
[org]
extra_abbreviations = ["PROPERTIES", "DEADLINE"]

[latex]
extra_abbreviations = ["Thm", "Lem"]
max_width = 100

Pola

lang

String. Language code for the built-in abbreviation set used by the rule-based splitter. One of: en (default), de, fr, is, pl. Also selectable via --lang CLI flag.

extraabbreviations

String array. Each entry names an abbreviation that should not trigger a sentence break when followed by a period. Merged with the built-in list for the selected language. Useful for domain-specific terms your papers use frequently.

ignore

Tablica ciągów znaków ze wzorcami glob. Pliki pasujące do tych wzorców są pomijane podczas operacji --in-place i --check. Nie wpływa na tryb stdin/stdout.

format

String. Default format when auto-detection from file extension does not apply. One of: org, latex, markdown, rst, plaintext.

maxwidth

Integer. Sentences exceeding this width get wrapped at word boundaries. Set to 0 for unlimited (the default). Also respects max_line_length from .editorconfig if present.

Per-format sections

Add [org], [latex], [markdown], [rst], or [plaintext] sections to override settings for specific formats.

Per-format extra_abbreviations merge with the top-level list. Per-format max_width overrides the top-level value.

Kolejność priorytetów

CLI flags override config file values. Per-format sections override top-level config values. Config file values override .editorconfig values. .editorconfig overrides built-in defaults.