google / google/vim-codefmt

Support passing `--srcdir` to goimports

Offen
#79 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Vim Script
Sterne
1.1k
Forks
102
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When using goimports via our gofmt formatter as [suggested in the docs](https://github.com/google/vim-codefmt/blob/1025977/doc/codefmt.txt#L42), the goimports path-based inference doesn't work because we don't tell goimports about the path. It does support a `--srcdir` argument we could pass.

We'd have to make it conditional and detect `basename(gofmt_executable) == 'goimports'` or something like that because gofmt doesn't support any `--srcdir` arg.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.