[FEATURE]: Per-language `words`

Aperta
#297 4 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
49/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
rust
Ambito
tooling

Direzione di ricerca

Start by reading the configuration handling for dictionaries and words, then trace how the active language is selected when checking a document. The issue proposes language-specific word lists but does not name files or tests; find the relevant configuration and spell-checking tests first. Done means global words remain available and language-specific words apply only to their matching active language.

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

Descrizione

enhancement workaround
Feature Description

Thanks to all who've worked on this project, it's a big part of making it practical to work on LaTeX or Typst documents in Zed!

The ability to have multiple dictionaries active at the same time is very useful, but there's no way to add words to the dictionary only for a specific language – it would be great to have this.

Currently, the words list unfortunately ends up being a mixture of different languages:

dictionaries = ["en_gb", "de"]

words = ["redox", "upstreamed", "quelloffen"]

Unless I'm mistaken this means that "quelloffen" becomes an acceptable (and presumably also suggested) word when writing in English, even if there's a project configuration file that sets the dictionary for the project to be exclusively English, or even if an LSP overrides the dictionary setting based on a markup tag in the file.

Use Case

I feel that for people who regularly work in more than one language this is fairly essential, to avoid false negatives and incorrect suggestions.

Proposed Solution

words could, rather than being a list, simply be a table with the applicable language tag as keys, and the correct one is selected based on the active language:

dictionaries = ["en_gb", "de"]

words.global = ["redox"]
words.en_gb = ["upstreamed"]
words.de = ["quelloffen"]
Alternative Solutions

You could just rely on per-project configuration, but that loses the convenience of the global configuration.

Examples

No response

Additional Context

No response

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.