1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:20:04 +08:00

Merge pull request #119 from phacops/pm-go-default-layer

Fix #118
This commit is contained in:
Wang Shidong 2017-01-18 08:03:19 +08:00 committed by GitHub
commit 675ce6bd6e
3 changed files with 21 additions and 22 deletions

View File

@ -111,7 +111,7 @@ function! SpaceVim#default#SetPlugins() abort
call add(g:spacevim_plugin_groups, 'ruby')
call add(g:spacevim_plugin_groups, 'python')
call add(g:spacevim_plugin_groups, 'scala')
call add(g:spacevim_plugin_groups, 'go')
call add(g:spacevim_plugin_groups, 'lang#go')
call add(g:spacevim_plugin_groups, 'scm')
call add(g:spacevim_plugin_groups, 'editing')
call add(g:spacevim_plugin_groups, 'indents')

View File

@ -8,5 +8,24 @@ endfunction
function! SpaceVim#layers#lang#go#config() abort
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 <Buffer><Leader>s <Plug>(go-implements)
au FileType go nmap <Buffer><Leader>i <Plug>(go-info)
au FileType go nmap <Buffer><Leader>e <Plug>(go-rename)
au FileType go nmap <Buffer><Leader>r <Plug>(go-run)
au FileType go nmap <Buffer><Leader>b <Plug>(go-build)
au FileType go nmap <Buffer><Leader>t <Plug>(go-test)
au FileType go nmap <Buffer><Leader>gd <Plug>(go-doc)
au FileType go nmap <Buffer><Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Buffer><Leader>co <Plug>(go-coverage)
augroup END
endfunction

View File

@ -1,20 +0,0 @@
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