summaryrefslogtreecommitdiffstats
path: root/autoload/go
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2019-03-29 20:30:36 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2019-03-29 20:30:36 +0100
commita55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5 (patch)
tree0ec7670cabfdf1b5fa3545cee9ee9d6ca7c8ad32 /autoload/go
parent1d45a6d4f094127b113470d7710695b280224933 (diff)
downloadvim-polyglot-a55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5.tar.gz
vim-polyglot-a55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5.zip
Remove grapqhl, fixes #387v3.7.1
Diffstat (limited to 'autoload/go')
-rw-r--r--autoload/go/config.vim25
1 files changed, 21 insertions, 4 deletions
diff --git a/autoload/go/config.vim b/autoload/go/config.vim
index 7cb7f05e..7c840c53 100644
--- a/autoload/go/config.vim
+++ b/autoload/go/config.vim
@@ -214,6 +214,12 @@ function! go#config#DebugCommands() abort
return g:go_debug_commands
endfunction
+function! go#config#LspLog() abort
+ " make sure g:go_lsp_log is set so that it can be added to easily.
+ let g:go_lsp_log = get(g:, 'go_lsp_log', [])
+ return g:go_lsp_log
+endfunction
+
function! go#config#SetDebugDiag(value) abort
let g:go_debug_diag = a:value
endfunction
@@ -239,15 +245,27 @@ function! go#config#SetTemplateAutocreate(value) abort
endfunction
function! go#config#MetalinterCommand() abort
- return get(g:, "go_metalinter_command", "")
+ return get(g:, "go_metalinter_command", "gometalinter")
endfunction
function! go#config#MetalinterAutosaveEnabled() abort
- return get(g:, 'go_metalinter_autosave_enabled', ['vet', 'golint'])
+ let l:default_enabled = ["vet", "golint"]
+
+ if go#config#MetalinterCommand() == "golangci-lint"
+ let l:default_enabled = ["govet", "golint"]
+ endif
+
+ return get(g:, "go_metalinter_autosave_enabled", default_enabled)
endfunction
function! go#config#MetalinterEnabled() abort
- return get(g:, "go_metalinter_enabled", ['vet', 'golint', 'errcheck'])
+ let l:default_enabled = ["vet", "golint", "errcheck"]
+
+ if go#config#MetalinterCommand() == "golangci-lint"
+ let l:default_enabled = ["govet", "golint"]
+ endif
+
+ return get(g:, "go_metalinter_enabled", default_enabled)
endfunction
function! go#config#MetalinterDisabled() abort
@@ -448,7 +466,6 @@ function! go#config#EchoGoInfo() abort
return get(g:, "go_echo_go_info", 1)
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