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

Merge pull request #113 from SpaceVim/lang/go

Add lang/go layer
This commit is contained in:
Wang Shidong 2017-01-16 22:04:07 +08:00 committed by GitHub
commit 33c07fcad4
4 changed files with 15 additions and 4 deletions

View File

@ -240,9 +240,7 @@ endfunction
""
" Load the {layer} you want :
" autocompletion : Make SpaceVim support autocompletion.
" unite : Unite centric work-flow
" Load the {layer} you want, for more info see `:h SpaceVim-layers`.
function! SpaceVim#Layer(layer) abort
if index(g:spacevim_plugin_groups, a:layer) == -1
call add(g:spacevim_plugin_groups, a:layer)

View File

@ -28,7 +28,6 @@ function! SpaceVim#layers#lang#plugins() abort
\ ['isundil/vim-irssi-syntax', { 'on_ft' : 'irssi'}],
\ ['lervag/vimtex', { 'on_ft' : 'tex'}],
\ ['vimperator/vimperator.vim', { 'on_ft' : 'vimperator'}],
\ ['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}],
\ ['rust-lang/rust.vim', {'merged' : 1}],
\ ]
" python

View File

@ -0,0 +1,12 @@
function! SpaceVim#layers#lang#go#plugins() abort
let plugins = [['fatih/vim-go', { 'on_ft' : 'go', 'loadconf_before' : 1}]]
if has('nvim')
call add(plugins, ['zchee/deoplete-go', {'on_ft' : 'go', 'build': 'make'}])
endif
return plugins
endfunction
function! SpaceVim#layers#lang#go#config() abort
endfunction

View File

@ -14,6 +14,8 @@ let g:deoplete#omni#input_patterns.java = [
let g:deoplete#omni#input_patterns.jsp = ['[^. \t0-9]\.\w*']
let g:deoplete#omni#input_patterns.php = '\h\w*\|[^. \t]->\%(\h\w*\)\?\|\h\w*::\%(\h\w*\)\?'
let g:deoplete#ignore_sources = {}
let g:deoplete#ignore_sources.go = ['omni']
call deoplete#custom#set('go', 'mark', '')
if g:spacevim_enable_javacomplete2_py
let g:deoplete#ignore_sources.java = ['omni']
call deoplete#custom#set('javacomplete2', 'mark', '')