[FEATURE]: Allow compound words composed of known dictionary words

Aperta
#314 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
54/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

Start by reading the config handling for min_word_length, dictionary lookup, and the camelCase splitter; the issue does not name specific files or tests. Check how configuration is documented and tested, then define completion as an opt-in setting that accepts exactly two dictionary words after a direct lookup miss, with both parts respecting min_word_length.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Labels: enhancement

Lowercase identifiers made of two ordinary English words (gettop,
setflag, runloop) aren't split by the camelCase splitter, so they're
checked as one word and flagged as misspelled. The only workarounds are
literal words entries for each one, or a regex ignore_patterns
workaround that hides part of the word instead of validating it.

Hunspell has COMPOUNDRULE/COMPOUNDMIN for exactly this, but the
bundled en_us rules are too narrow and users can't add their own.

Proposal

An opt-in config key:

allow_compound_words = true

When a word fails direct dictionary lookup, also accept it if it splits
into exactly two parts that are both dictionary words (gettop →
get + top), each respecting min_word_length. Checked only after a
dictionary miss, so the happy path is unaffected.

Deliberate trade-off: some typos pass (gettops if tops is a word) —
the standard compound-word trade-off, hence opt-in. Could also be scoped
per-path via [[overrides]].

Alternative: user-defined word rules

If a simple boolean feels too coarse, the same mechanism could be exposed
as template patterns where {term} matches any word accepted by the
active dictionaries or the words allowlist:

word_patterns = ["{term}{term}", "{term}s"]

This would additionally cover inflected forms of project jargon
(words = ["allowlist"] would then accept allowlists). Happy with
either shape — the boolean is the minimal version, the patterns the more
flexible one.


Lingua principale
Rust
Stelle
925
Fork
59
Merge medio
53m
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di blopker/codebook

Tutte le issue di blopker/codebook

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.