diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e5f1c22411b..2a567c8539f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,7 @@ Add to your `.vimrc` file: ```vim function! GnoFmt() - cexpr system('gofmt -e -w ' . expand('%')) "or replace with gofumpt + cexpr system('gofmt -e -w ' . expand('%')) "or replace with gofumpt, see below edit! endfunction command! GnoFmt call GnoFmt() @@ -90,6 +90,12 @@ augroup gno_autocmd augroup END ``` +To use *gofumpt* instead of *gofmt*, as hinted in the comment, you may either have `gofumpt` in your PATH or substitute the cexpr line above with the following (please make sure to replace `` with the path to your local gno repository): + +```vim +cexpr system('go run -modfile /misc/devdeps/go.mod mvdan.cc/gofumpt -w ' . expand('%')) +``` + #### Emacs Support 1. Install [go-mode.el](https://github.com/dominikh/go-mode.el).