summaryrefslogtreecommitdiffstats
path: root/autoload/go
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-12-31 14:05:09 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-12-31 14:05:09 +0100
commitb8a5504021e0d21310bc603855ac8107828b5759 (patch)
tree2f2bf182b686597e7cc4c4f1b7d35881f9993f55 /autoload/go
parentcea0d08a062478503814e51aa21c6486a0dd1b21 (diff)
downloadvim-polyglot-b8a5504021e0d21310bc603855ac8107828b5759.tar.gz
vim-polyglot-b8a5504021e0d21310bc603855ac8107828b5759.zip
Update
Diffstat (limited to 'autoload/go')
-rw-r--r--autoload/go/config.vim21
1 files changed, 20 insertions, 1 deletions
diff --git a/autoload/go/config.vim b/autoload/go/config.vim
index 3dc4422f..d4ba03e4 100644
--- a/autoload/go/config.vim
+++ b/autoload/go/config.vim
@@ -84,7 +84,18 @@ function! go#config#StatuslineDuration() abort
endfunction
function! go#config#SnippetEngine() abort
- return get(g:, 'go_snippet_engine', 'automatic')
+ let l:engine = get(g:, 'go_snippet_engine', 'automatic')
+ if l:engine is? "automatic"
+ if get(g:, 'did_plugin_ultisnips') is 1
+ let l:engine = 'ultisnips'
+ elseif get(g:, 'loaded_neosnippet') is 1
+ let l:engine = 'neosnippet'
+ elseif get(g:, 'loaded_minisnip') is 1
+ let l:engine = 'minisnip'
+ endif
+ endif
+
+ return l:engine
endfunction
function! go#config#PlayBrowserCommand() abort
@@ -516,6 +527,10 @@ function! go#config#GoplsFuzzyMatching() abort
return get(g:, 'go_gopls_fuzzy_matching', 1)
endfunction
+function! go#config#GoplsStaticCheck() abort
+ return get(g:, 'go_gopls_staticcheck', 0)
+endfunction
+
function! go#config#GoplsUsePlaceholders() abort
return get(g:, 'go_gopls_use_placeholders', 0)
endfunction
@@ -524,6 +539,10 @@ function! go#config#GoplsEnabled() abort
return get(g:, 'go_gopls_enabled', 1)
endfunction
+function! go#config#DiagnosticsEnabled() abort
+ return get(g:, 'go_diagnostics_enabled', 0)
+endfunction
+
" Set the default value. A value of "1" is a shortcut for this, for
" compatibility reasons.
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1