From 3f1ea261205e22b64949ccd1bb1b08e7092cfb54 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Wed, 27 Sep 2023 15:31:26 -0700 Subject: [PATCH] Set golangci-lint to lint package in vim instead of file --- dot_config/vim/settings.vim.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dot_config/vim/settings.vim.tmpl b/dot_config/vim/settings.vim.tmpl index 76f2659..aa2b506 100644 --- a/dot_config/vim/settings.vim.tmpl +++ b/dot_config/vim/settings.vim.tmpl @@ -30,13 +30,16 @@ let g:ale_sign_warning = '‽' let g:ale_echo_msg_format = '%s [%severity%] [%linter%]' let g:ale_set_loclist = 0 let g:ale_set_quickfix = 1 +"{{- if lookPath "golangci-lint" }} +let g:ale_go_golangci_lint_package = 1 +"{{- end }} augroup linters autocmd! autocmd FileType javascript let g:ale_linters['javascript'] = ['eslint'] -"{{ if lookPath "golangci-lint" }} +"{{- if lookPath "golangci-lint" }} autocmd FileType go let g:ale_linters['go'] = ['golangci-lint'] -"{{ end }} +"{{- end }} augroup END "{{ end }}