Don't overwrite user config

Aperta
#517 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
vim
Ambito
tooling

Direzione di ricerca

Start by locating the Rust ftplugin setting for g:rust_recommended_style and checking how its default affects user options such as textwidth. Review the linked rust.vim issue for context. Done means the default behavior matches the requested opt-in setting, with user configuration preserved.

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

Descrizione

I have vim.opt.textwidth = 80 in my config but opening rust files it is always set to 99. Initially, I was confused, but then found out that the rust ftplugin has some default values it sets. I can always set rust_recommended_style to false but I think it should rather be opt-in than opt-out.

For example PHP has in it's coding style reference that it must use 4 spaces for indentation^1, but the ftplugin doesn't impose any such restrictions.

Also, as I said, it's very confusing to users when suddenly their settings are overridden. I had to look into neovims source code to find the culprit.

Consider changing the behavior to opt-in, by having the g:rust_recommended_style default to 0.

Lingua principale
Vim Script
Stelle
4.2k
Fork
323
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 rust-lang/rust.vim

Tutte le issue di rust-lang/rust.vim

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.