google / google/vim-codefmt

Support passing `--srcdir` to goimports

Open
#79 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
1.1k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.