1
0
mirror of https://github.com/amix/vimrc synced 2025-08-07 22:35:01 +08:00

Updated plugins

This commit is contained in:
Amir Salihefendic
2018-11-01 11:03:42 +01:00
parent 44dca49794
commit d2d303593e
105 changed files with 2141 additions and 510 deletions

View File

@ -1,13 +1,13 @@
" Author: butlerx <butlerx@notthe,cloud>
" Description: Integration of Google-java-format with ALE.
call ale#Set('google_java_format_executable', 'google-java-format')
call ale#Set('google_java_format_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('google_java_format_options', '')
call ale#Set('java_google_java_format_executable', 'google-java-format')
call ale#Set('java_google_java_format_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('java_google_java_format_options', '')
function! ale#fixers#google_java_format#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'google_java_format_options')
let l:executable = ale#Var(a:buffer, 'google_java_format_executable')
let l:options = ale#Var(a:buffer, 'java_google_java_format_options')
let l:executable = ale#Var(a:buffer, 'java_google_java_format_executable')
if !executable(l:executable)
return 0

View File

@ -1,5 +1,6 @@
call ale#Set('json_jq_executable', 'jq')
call ale#Set('json_jq_options', '')
call ale#Set('json_jq_filters', '.')
function! ale#fixers#jq#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'json_jq_executable')
@ -7,9 +8,15 @@ endfunction
function! ale#fixers#jq#Fix(buffer) abort
let l:options = ale#Var(a:buffer, 'json_jq_options')
let l:filters = ale#Var(a:buffer, 'json_jq_filters')
if empty(l:filters)
return 0
endif
return {
\ 'command': ale#Escape(ale#fixers#jq#GetExecutable(a:buffer))
\ . ' . ' . l:options,
\ . ' ' . l:filters . ' '
\ . l:options,
\}
endfunction

View File

@ -9,7 +9,7 @@ function! ale#fixers#rubocop#GetCommand(buffer) abort
return ale#handlers#ruby#EscapeExecutable(l:executable, 'rubocop')
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
\ . (!empty(l:options) ? ' ' . l:options : '')
\ . ' --auto-correct %t'
\ . ' --auto-correct --force-exclusion %t'
endfunction
function! ale#fixers#rubocop#Fix(buffer) abort

View File

@ -0,0 +1,17 @@
" Author: dsifford <dereksifford@gmail.com>
" Description: Fixer for terraform and .hcl files
call ale#Set('terraform_fmt_executable', 'terraform')
call ale#Set('terraform_fmt_options', '')
function! ale#fixers#terraform#Fix(buffer) abort
let l:executable = ale#Var(a:buffer, 'terraform_fmt_executable')
let l:options = ale#Var(a:buffer, 'terraform_fmt_options')
return {
\ 'command': ale#Escape(l:executable)
\ . ' fmt'
\ . (empty(l:options) ? '' : ' ' . l:options)
\ . ' -'
\}
endfunction