mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:00:05 +08:00
Move vim-go config to plugins_before, add augroup
This commit is contained in:
parent
675cfce9af
commit
b6a81d1d6f
@ -191,7 +191,7 @@ let s:plugins.lang = [
|
|||||||
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
|
||||||
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
|
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
|
||||||
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
|
||||||
\ ['fatih/vim-go', { 'on_ft' : 'go', 'loadconf' : 1}],
|
\ ['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}],
|
||||||
\ ]
|
\ ]
|
||||||
if g:spacevim_enable_javacomplete2_py
|
if g:spacevim_enable_javacomplete2_py
|
||||||
call add(s:plugins.lang , ['wsdjeg/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
call add(s:plugins.lang , ['wsdjeg/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
scriptencoding utf-8
|
|
||||||
let g:go_highlight_functions = 1
|
|
||||||
let g:go_highlight_methods = 1
|
|
||||||
let g:go_highlight_structs = 1
|
|
||||||
let g:go_highlight_operators = 1
|
|
||||||
let g:go_highlight_build_constraints = 1
|
|
||||||
let g:go_fmt_command = "goimports"
|
|
||||||
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
|
|
||||||
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
|
||||||
au FileType go nmap <Leader>s <Plug>(go-implements)
|
|
||||||
au FileType go nmap <Leader>i <Plug>(go-info)
|
|
||||||
au FileType go nmap <Leader>e <Plug>(go-rename)
|
|
||||||
au FileType go nmap <leader>r <Plug>(go-run)
|
|
||||||
au FileType go nmap <leader>b <Plug>(go-build)
|
|
||||||
au FileType go nmap <leader>t <Plug>(go-test)
|
|
||||||
au FileType go nmap <Leader>gd <Plug>(go-doc)
|
|
||||||
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
|
|
||||||
au FileType go nmap <leader>co <Plug>(go-coverage)
|
|
20
config/plugins_before/vim-go.vim
Normal file
20
config/plugins_before/vim-go.vim
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
let g:go_highlight_functions = 1
|
||||||
|
let g:go_highlight_methods = 1
|
||||||
|
let g:go_highlight_structs = 1
|
||||||
|
let g:go_highlight_operators = 1
|
||||||
|
let g:go_highlight_build_constraints = 1
|
||||||
|
let g:go_fmt_command = 'goimports'
|
||||||
|
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
|
||||||
|
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
||||||
|
augroup SpaceVim_go
|
||||||
|
au!
|
||||||
|
au FileType go nmap <Leader>s <Plug>(go-implements)
|
||||||
|
au FileType go nmap <Leader>i <Plug>(go-info)
|
||||||
|
au FileType go nmap <Leader>e <Plug>(go-rename)
|
||||||
|
au FileType go nmap <leader>r <Plug>(go-run)
|
||||||
|
au FileType go nmap <leader>b <Plug>(go-build)
|
||||||
|
au FileType go nmap <leader>t <Plug>(go-test)
|
||||||
|
au FileType go nmap <Leader>gd <Plug>(go-doc)
|
||||||
|
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
|
||||||
|
au FileType go nmap <leader>co <Plug>(go-coverage)
|
||||||
|
augroup END
|
Loading…
Reference in New Issue
Block a user