From a33d927da9c4172fb45759e6849f3217452bf7ef Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Mon, 16 Jan 2017 21:55:57 -0800 Subject: [PATCH 1/2] Fix go layer --- autoload/SpaceVim/default.vim | 2 +- autoload/SpaceVim/layers/lang/go.vim | 21 ++++++++++++++++++++- config/plugins_before/vim-go.vim | 20 -------------------- 3 files changed, 21 insertions(+), 22 deletions(-) delete mode 100644 config/plugins_before/vim-go.vim diff --git a/autoload/SpaceVim/default.vim b/autoload/SpaceVim/default.vim index 4d92fb2a2..4f4976b83 100644 --- a/autoload/SpaceVim/default.vim +++ b/autoload/SpaceVim/default.vim @@ -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') diff --git a/autoload/SpaceVim/layers/lang/go.vim b/autoload/SpaceVim/layers/lang/go.vim index 9895dbd62..d8bb92bfd 100644 --- a/autoload/SpaceVim/layers/lang/go.vim +++ b/autoload/SpaceVim/layers/lang/go.vim @@ -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 s (go-implements) + au FileType go nmap i (go-info) + au FileType go nmap e (go-rename) + au FileType go nmap r (go-run) + au FileType go nmap b (go-build) + au FileType go nmap t (go-test) + au FileType go nmap gd (go-doc) + au FileType go nmap gv (go-doc-vertical) + au FileType go nmap co (go-coverage) + augroup END endfunction diff --git a/config/plugins_before/vim-go.vim b/config/plugins_before/vim-go.vim deleted file mode 100644 index edaad6ca0..000000000 --- a/config/plugins_before/vim-go.vim +++ /dev/null @@ -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 s (go-implements) - au FileType go nmap i (go-info) - au FileType go nmap e (go-rename) - au FileType go nmap r (go-run) - au FileType go nmap b (go-build) - au FileType go nmap t (go-test) - au FileType go nmap gd (go-doc) - au FileType go nmap gv (go-doc-vertical) - au FileType go nmap co (go-coverage) -augroup END From 7900cba0cccdfd4e5416342bdbe4cc9aaae5525c Mon Sep 17 00:00:00 2001 From: Pierre Massat Date: Tue, 17 Jan 2017 09:52:30 -0800 Subject: [PATCH 2/2] Add buffer for all mappings --- autoload/SpaceVim/layers/lang/go.vim | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/autoload/SpaceVim/layers/lang/go.vim b/autoload/SpaceVim/layers/lang/go.vim index d8bb92bfd..365875ac4 100644 --- a/autoload/SpaceVim/layers/lang/go.vim +++ b/autoload/SpaceVim/layers/lang/go.vim @@ -18,14 +18,14 @@ function! SpaceVim#layers#lang#go#config() abort let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } augroup SpaceVim_go au! - au FileType go nmap s (go-implements) - au FileType go nmap i (go-info) - au FileType go nmap e (go-rename) - au FileType go nmap r (go-run) - au FileType go nmap b (go-build) - au FileType go nmap t (go-test) - au FileType go nmap gd (go-doc) - au FileType go nmap gv (go-doc-vertical) - au FileType go nmap co (go-coverage) + au FileType go nmap s (go-implements) + au FileType go nmap i (go-info) + au FileType go nmap e (go-rename) + au FileType go nmap r (go-run) + au FileType go nmap b (go-build) + au FileType go nmap t (go-test) + au FileType go nmap gd (go-doc) + au FileType go nmap gv (go-doc-vertical) + au FileType go nmap co (go-coverage) augroup END endfunction