A vim tool for fix goling warnings, which generate by vim-go or ale.
for vim-plug:
Add PlugAdd 'tenfyzhong/golint-fixer.vim'
to you .vimrc if you use .
- clone the repo.
git clone https://github.com/tenfyzhong/golint-fixer.vim.git ~/.vim/bundle
- add
rtp+=~/.vim/bundle/golint-fixer.vim
to you .vimrc
- Use vim-go or ale to lint check. It'll add the warning to the quickfix or loclist.
- Go to the warning line. Run command
:GoLintFix
or nmap<leader>lf
(if used).
:GoLintFix
Try to fix the warning.
<leader>lf
, if g:golint_fixer_use_default_mapping
equal 1.
Try to fix the warning.
Type: bool
Default: 1
Map <leader>lf
to fix warning.
let g:golint_fixer_use_default_mapping = 1
Type: bool
Default: 1
Use :GoRename
to rename identify if usable.
let g:golint_fixer_use_go_rename = 1