[vim] fix golangci-lint in ALE and set it to remote
This commit is contained in:
parent
28266990bf
commit
b8904f6cb3
2 changed files with 26 additions and 2 deletions
22
bin/.local/bin/golangci-lintw
Executable file
22
bin/.local/bin/golangci-lintw
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
#set fish_trace 1
|
||||
|
||||
set file $argv[-1]
|
||||
#golangci-lint $argv[1..-2] | sed -n "/$file/,+2p"
|
||||
|
||||
set capture false
|
||||
|
||||
golangci-lint $argv[1..-2] | while read --local --line line
|
||||
if string match --quiet --regex '^.+:[0-9]+:' $line
|
||||
if test $file = (string match --regex '[^:]+' $line)
|
||||
set capture true
|
||||
else
|
||||
set capture false
|
||||
end
|
||||
end
|
||||
|
||||
if test $capture = true
|
||||
echo $line
|
||||
end
|
||||
end
|
|
@ -136,9 +136,11 @@ let g:indentLine_char = '▏'
|
|||
let g:ale_completion_enabled = 0
|
||||
let g:ale_open_list = 1
|
||||
let g:ale_linters = {
|
||||
\ 'go': ['gofmt', 'golint', 'golangci-lint']
|
||||
\ 'go': ['gofmt', 'golint', 'gopls', 'golangci-lint']
|
||||
\}
|
||||
"let g:ale_go_golangci_lint_options = '--enable-all --disable unused'
|
||||
let g:ale_go_golangci_lint_options = ''
|
||||
let g:ale_go_golangci_lint_executable = 'golangci-lintw'
|
||||
let g:ale_go_gopls_options = "-remote=auto"
|
||||
let g:ale_fix_on_save = 0
|
||||
let g:ale_sign_error = '🔴'
|
||||
let g:ale_sign_info = '🔵'
|
||||
|
|
Loading…
Add table
Reference in a new issue