go.vim (544B) - raw


      1 " Go deoplete
      2 let g:deoplete#sources#go#gocode_binary = '$GOPATH/bin/gocode'
      3 " GoRun Split Reuse
      4 function! ReuseVimGoTerm(cmd) abort
      5     for w in nvim_list_wins()
      6         if "goterm" == nvim_buf_get_option(nvim_win_get_buf(w), 'filetype')
      7             call nvim_win_close(w, v:true)
      8             break
      9         endif
     10     endfor
     11     execute a:cmd
     12 endfunction
     13 let g:go_term_enabled = 1
     14 let g:go_term_mode = "silent keepalt rightbelow 35 vsplit"
     15 let g:go_def_reuse_buffer = 1
     16 autocmd FileType go nmap <leader>r :call ReuseVimGoTerm('GoRun')<Return>
     17