1
0
mirror of https://github.com/amix/vimrc synced 2025-07-27 23:45:00 +08:00

plugin updates

plugin updates
This commit is contained in:
Geezus
2019-05-16 14:44:54 -05:00
parent e73d906a54
commit 8649b3bf27
163 changed files with 1376 additions and 3542 deletions

View File

@ -101,11 +101,11 @@ function! s:GoInstallBinaries(updateBinaries, ...)
" change $GOBIN so go get can automatically install to it
let $GOBIN = go_bin_path
" vim's executable path is looking in PATH so add our go_bin path to it
let Restore_path = go#util#SetEnv('PATH', go_bin_path . go#util#PathListSep() . $PATH)
" old_path is used to restore users own path
let old_path = $PATH
" GO111MODULE must be off to install golanci-lint and gometalinter
let Restore_modules = go#util#SetEnv('GO111MODULE', 'off')
" vim's executable path is looking in PATH so add our go_bin path to it
let $PATH = go_bin_path . go#util#PathListSep() . $PATH
" when shellslash is set on MS-* systems, shellescape puts single quotes
" around the output string. cmd on Windows does not handle single quotes
@ -185,9 +185,7 @@ function! s:GoInstallBinaries(updateBinaries, ...)
endfor
" restore back!
call call(Restore_path, [])
call call(Restore_modules, [])
let $PATH = old_path
if resetshellslash
set shellslash
endif
@ -236,22 +234,6 @@ function! s:gofiletype_post()
let &g:fileencodings = s:current_fileencodings
endfunction
function! s:register()
if !(&modifiable && expand('<amatch>') ==# 'go')
return
endif
let l:RestoreGopath = function('s:noop')
if go#config#AutodetectGopath()
let l:RestoreGopath = go#util#SetEnv('GOPATH', go#path#Detect())
endif
call go#lsp#DidOpen(expand('<afile>:p'))
call call(l:RestoreGopath, [])
endfunction
function! s:noop(...) abort
endfunction
augroup vim-go
autocmd!
@ -263,10 +245,6 @@ augroup vim-go
autocmd BufNewFile *.s if &modifiable | setlocal fileencoding=utf-8 fileformat=unix | endif
autocmd BufRead *.s call s:gofiletype_pre()
autocmd BufReadPost *.s call s:gofiletype_post()
if go#util#has_job()
autocmd FileType * call s:register()
endif
augroup end
" restore Vi compatibility settings