mirror of
https://github.com/amix/vimrc
synced 2025-07-12 06:05:01 +08:00
.
This commit is contained in:
10
sources_non_forked/ale/autoload/ale.vim
Normal file → Executable file
10
sources_non_forked/ale/autoload/ale.vim
Normal file → Executable file
@ -157,15 +157,7 @@ function! ale#Queue(delay, ...) abort
|
||||
endif
|
||||
endfunction
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
let s:current_ale_version = [2, 5, 0]
|
||||
=======
|
||||
let s:current_ale_version = [2, 6, 0]
|
||||
>>>>>>> 27ad0d07862847896f691309a544a206783c94d6
|
||||
=======
|
||||
let s:current_ale_version = [3, 0, 0]
|
||||
>>>>>>> master
|
||||
let s:current_ale_version = [3, 1, 0]
|
||||
|
||||
" A function used to check for ALE features in files outside of the project.
|
||||
function! ale#Has(feature) abort
|
||||
|
0
sources_non_forked/ale/autoload/ale/ant.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/ant.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/args.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/args.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/assert.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/assert.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/balloon.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/balloon.vim
Normal file → Executable file
7
sources_non_forked/ale/autoload/ale/c.vim
Normal file → Executable file
7
sources_non_forked/ale/autoload/ale/c.vim
Normal file → Executable file
@ -152,6 +152,7 @@ function! ale#c#ParseCFlags(path_prefix, should_quote, raw_arguments) abort
|
||||
\ || stridx(l:option, '-idirafter') == 0
|
||||
\ || stridx(l:option, '-iframework') == 0
|
||||
\ || stridx(l:option, '-include') == 0
|
||||
\ || stridx(l:option, '-imacros') == 0
|
||||
if stridx(l:option, '-I') == 0 && l:option isnot# '-I'
|
||||
let l:arg = join(split(l:option, '\zs')[2:], '')
|
||||
let l:option = '-I'
|
||||
@ -490,7 +491,7 @@ function! ale#c#GetCFlags(buffer, output) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:CanParseMakefile(a:buffer) && !empty(a:output) && !empty(l:cflags)
|
||||
if empty(l:cflags) && s:CanParseMakefile(a:buffer) && !empty(a:output)
|
||||
let l:cflags = ale#c#ParseCFlagsFromMakeOutput(a:buffer, a:output)
|
||||
endif
|
||||
|
||||
@ -505,6 +506,10 @@ function! ale#c#GetMakeCommand(buffer) abort
|
||||
if s:CanParseMakefile(a:buffer)
|
||||
let l:path = ale#path#FindNearestFile(a:buffer, 'Makefile')
|
||||
|
||||
if empty(l:path)
|
||||
let l:path = ale#path#FindNearestFile(a:buffer, 'GNUmakefile')
|
||||
endif
|
||||
|
||||
if !empty(l:path)
|
||||
let l:always_make = ale#Var(a:buffer, 'c_always_make')
|
||||
|
||||
|
0
sources_non_forked/ale/autoload/ale/code_action.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/code_action.vim
Normal file → Executable file
5
sources_non_forked/ale/autoload/ale/codefix.vim
Normal file → Executable file
5
sources_non_forked/ale/autoload/ale/codefix.vim
Normal file → Executable file
@ -261,7 +261,10 @@ function! ale#codefix#HandleLSPResponse(conn_id, response) abort
|
||||
|
||||
" Send the results to the menu callback, if set.
|
||||
if l:MenuCallback isnot v:null
|
||||
call l:MenuCallback(map(copy(l:result), '[''lsp'', v:val]'))
|
||||
call l:MenuCallback(
|
||||
\ l:data,
|
||||
\ map(copy(l:result), '[''lsp'', v:val]')
|
||||
\)
|
||||
|
||||
return
|
||||
endif
|
||||
|
0
sources_non_forked/ale/autoload/ale/command.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/command.vim
Normal file → Executable file
2
sources_non_forked/ale/autoload/ale/completion.vim
Normal file → Executable file
2
sources_non_forked/ale/autoload/ale/completion.vim
Normal file → Executable file
@ -614,6 +614,8 @@ function! ale#completion#ParseLSPCompletions(response) abort
|
||||
\ 'kind': ale#completion#GetCompletionSymbols(get(l:item, 'kind', '')),
|
||||
\ 'icase': 1,
|
||||
\ 'menu': l:detail,
|
||||
\ 'dup': get(l:info, 'additional_edits_only', 0)
|
||||
\ || g:ale_completion_autoimport,
|
||||
\ 'info': (type(l:doc) is v:t_string ? l:doc : ''),
|
||||
\}
|
||||
" This flag is used to tell if this completion came from ALE or not.
|
||||
|
0
sources_non_forked/ale/autoload/ale/completion/python.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/completion/python.vim
Normal file → Executable file
22
sources_non_forked/ale/autoload/ale/cursor.vim
Normal file → Executable file
22
sources_non_forked/ale/autoload/ale/cursor.vim
Normal file → Executable file
@ -9,7 +9,6 @@ let g:ale_echo_delay = get(g:, 'ale_echo_delay', 10)
|
||||
let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%code: %%s')
|
||||
|
||||
let s:cursor_timer = -1
|
||||
let s:last_pos = [0, 0, 0]
|
||||
|
||||
function! ale#cursor#TruncatedEcho(original_message) abort
|
||||
let l:message = a:original_message
|
||||
@ -118,14 +117,18 @@ function! ale#cursor#EchoCursorWarningWithDelay() abort
|
||||
|
||||
let l:pos = getpos('.')[0:2]
|
||||
|
||||
if !exists('w:last_pos')
|
||||
let w:last_pos = [0, 0, 0]
|
||||
endif
|
||||
|
||||
" Check the current buffer, line, and column number against the last
|
||||
" recorded position. If the position has actually changed, *then*
|
||||
" we should echo something. Otherwise we can end up doing processing
|
||||
" the echo message far too frequently.
|
||||
if l:pos != s:last_pos
|
||||
if l:pos != w:last_pos
|
||||
let l:delay = ale#Var(l:buffer, 'echo_delay')
|
||||
|
||||
let s:last_pos = l:pos
|
||||
let w:last_pos = l:pos
|
||||
let s:cursor_timer = timer_start(
|
||||
\ l:delay,
|
||||
\ function('ale#cursor#EchoCursorWarning')
|
||||
@ -139,11 +142,16 @@ function! s:ShowCursorDetailForItem(loc, options) abort
|
||||
let s:last_detailed_line = line('.')
|
||||
let l:message = get(a:loc, 'detail', a:loc.text)
|
||||
let l:lines = split(l:message, "\n")
|
||||
call ale#preview#Show(l:lines, {'stay_here': l:stay_here})
|
||||
|
||||
" Clear the echo message if we manually displayed details.
|
||||
if !l:stay_here
|
||||
execute 'echo'
|
||||
if g:ale_floating_preview || g:ale_detail_to_floating_preview
|
||||
call ale#floating_preview#Show(l:lines)
|
||||
else
|
||||
call ale#preview#Show(l:lines, {'stay_here': l:stay_here})
|
||||
|
||||
" Clear the echo message if we manually displayed details.
|
||||
if !l:stay_here
|
||||
execute 'echo'
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
0
sources_non_forked/ale/autoload/ale/d.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/d.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/debugging.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/debugging.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/definition.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/definition.vim
Normal file → Executable file
24
sources_non_forked/ale/autoload/ale/dhall.vim
Executable file
24
sources_non_forked/ale/autoload/ale/dhall.vim
Executable file
@ -0,0 +1,24 @@
|
||||
" Author: Pat Brisbin <pbrisbin@gmail.com>, toastal <toastal@protonmail.com>
|
||||
" Description: Functions for working with Dhall’s executable
|
||||
|
||||
call ale#Set('dhall_executable', 'dhall')
|
||||
call ale#Set('dhall_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('dhall_options', '')
|
||||
|
||||
function! ale#dhall#GetExecutable(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'dhall_executable')
|
||||
|
||||
" Dhall is written in Haskell and commonly installed with Stack
|
||||
return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'dhall')
|
||||
endfunction
|
||||
|
||||
function! ale#dhall#GetExecutableWithOptions(buffer) abort
|
||||
let l:executable = ale#dhall#GetExecutable(a:buffer)
|
||||
|
||||
return l:executable
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'dhall_options'))
|
||||
endfunction
|
||||
|
||||
function! ale#dhall#GetCommand(buffer) abort
|
||||
return '%e ' . ale#Pad(ale#Var(a:buffer, 'dhall_options'))
|
||||
endfunction
|
0
sources_non_forked/ale/autoload/ale/engine.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/engine.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/engine/ignore.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/engine/ignore.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/events.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/events.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/filename_mapping.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/filename_mapping.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/filetypes.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/filetypes.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fix.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fix.vim
Normal file → Executable file
44
sources_non_forked/ale/autoload/ale/fix/registry.vim
Normal file → Executable file
44
sources_non_forked/ale/autoload/ale/fix/registry.vim
Normal file → Executable file
@ -32,11 +32,37 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['python'],
|
||||
\ 'description': 'Fix PEP8 issues with black.',
|
||||
\ },
|
||||
\ 'deno': {
|
||||
\ 'function': 'ale#fixers#deno#Fix',
|
||||
\ 'suggested_filetypes': ['typescript'],
|
||||
\ 'description': 'Fix TypeScript using deno fmt.',
|
||||
\ },
|
||||
\ 'dfmt': {
|
||||
\ 'function': 'ale#fixers#dfmt#Fix',
|
||||
\ 'suggested_filetypes': ['d'],
|
||||
\ 'description': 'Fix D files with dfmt.',
|
||||
\ },
|
||||
\ 'dhall': {
|
||||
\ 'function': 'ale#fixers#dhall#Fix',
|
||||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Fix Dhall files with dhall-format.',
|
||||
\ },
|
||||
\ 'dhall-format': {
|
||||
\ 'function': 'ale#fixers#dhall_format#Fix',
|
||||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Standard code formatter for the Dhall language',
|
||||
\ 'aliases': ['dhall'],
|
||||
\ },
|
||||
\ 'dhall-freeze': {
|
||||
\ 'function': 'ale#fixers#dhall_freeze#Freeze',
|
||||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Add integrity checks to remote import statements of an expression for the Dhall language',
|
||||
\ },
|
||||
\ 'dhall-lint': {
|
||||
\ 'function': 'ale#fixers#dhall_lint#Fix',
|
||||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Standard code formatter for the Dhall language and removing dead code',
|
||||
\ },
|
||||
\ 'fecs': {
|
||||
\ 'function': 'ale#fixers#fecs#Fix',
|
||||
\ 'suggested_filetypes': ['javascript', 'css', 'html'],
|
||||
@ -81,7 +107,7 @@ let s:default_registry = {
|
||||
\ },
|
||||
\ 'prettier': {
|
||||
\ 'function': 'ale#fixers#prettier#Fix',
|
||||
\ 'suggested_filetypes': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'json5', 'graphql', 'markdown', 'vue', 'html', 'yaml'],
|
||||
\ 'suggested_filetypes': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'json5', 'graphql', 'markdown', 'vue', 'html', 'yaml', 'openapi', 'ruby'],
|
||||
\ 'description': 'Apply prettier to a file.',
|
||||
\ },
|
||||
\ 'prettier_eslint': {
|
||||
@ -132,7 +158,7 @@ let s:default_registry = {
|
||||
\ },
|
||||
\ 'scalafmt': {
|
||||
\ 'function': 'ale#fixers#scalafmt#Fix',
|
||||
\ 'suggested_filetypes': ['scala'],
|
||||
\ 'suggested_filetypes': ['sbt', 'scala'],
|
||||
\ 'description': 'Fix Scala files using scalafmt',
|
||||
\ },
|
||||
\ 'sorbet': {
|
||||
@ -190,6 +216,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['cmake'],
|
||||
\ 'description': 'Fix CMake files with cmake-format.',
|
||||
\ },
|
||||
\ 'fish_indent': {
|
||||
\ 'function': 'ale#fixers#fish_indent#Fix',
|
||||
\ 'suggested_filetypes': ['fish'],
|
||||
\ 'description': 'Format fish scripts using fish_indent.',
|
||||
\ },
|
||||
\ 'gofmt': {
|
||||
\ 'function': 'ale#fixers#gofmt#Fix',
|
||||
\ 'suggested_filetypes': ['go'],
|
||||
@ -342,7 +373,7 @@ let s:default_registry = {
|
||||
\ },
|
||||
\ 'ktlint': {
|
||||
\ 'function': 'ale#fixers#ktlint#Fix',
|
||||
\ 'suggested_filetypes': ['kt'],
|
||||
\ 'suggested_filetypes': ['kt', 'kotlin'],
|
||||
\ 'description': 'Fix Kotlin files with ktlint.',
|
||||
\ },
|
||||
\ 'styler': {
|
||||
@ -390,16 +421,11 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['lua'],
|
||||
\ 'description': 'Fix Lua files with luafmt.',
|
||||
\ },
|
||||
\ 'dhall': {
|
||||
\ 'function': 'ale#fixers#dhall#Fix',
|
||||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Fix Dhall files with dhall-format.',
|
||||
\ },
|
||||
\ 'ormolu': {
|
||||
\ 'function': 'ale#fixers#ormolu#Fix',
|
||||
\ 'suggested_filetypes': ['haskell'],
|
||||
\ 'description': 'A formatter for Haskell source code.',
|
||||
\ },
|
||||
\ }
|
||||
\}
|
||||
|
||||
" Reset the function registry to the default entries.
|
||||
|
0
sources_non_forked/ale/autoload/ale/fixers/astyle.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/astyle.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/autoimport.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/autoimport.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/autopep8.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/autopep8.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/bibclean.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/bibclean.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/black.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/black.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/brittany.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/brittany.vim
Normal file → Executable file
20
sources_non_forked/ale/autoload/ale/fixers/clangformat.vim
Normal file → Executable file
20
sources_non_forked/ale/autoload/ale/fixers/clangformat.vim
Normal file → Executable file
@ -5,6 +5,8 @@ scriptencoding utf-8
|
||||
call ale#Set('c_clangformat_executable', 'clang-format')
|
||||
call ale#Set('c_clangformat_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('c_clangformat_options', '')
|
||||
call ale#Set('c_clangformat_style_option', '')
|
||||
call ale#Set('c_clangformat_use_local_file', 0)
|
||||
|
||||
function! ale#fixers#clangformat#GetExecutable(buffer) abort
|
||||
return ale#node#FindExecutable(a:buffer, 'c_clangformat', [
|
||||
@ -16,6 +18,24 @@ function! ale#fixers#clangformat#Fix(buffer) abort
|
||||
let l:executable = ale#Escape(ale#fixers#clangformat#GetExecutable(a:buffer))
|
||||
let l:filename = ale#Escape(bufname(a:buffer))
|
||||
let l:options = ale#Var(a:buffer, 'c_clangformat_options')
|
||||
let l:style_option = ale#Var(a:buffer, 'c_clangformat_style_option')
|
||||
let l:use_local_file = ale#Var(a:buffer, 'c_clangformat_use_local_file')
|
||||
|
||||
if l:style_option isnot# ''
|
||||
let l:style_option = '-style=' . "'" . l:style_option . "'"
|
||||
endif
|
||||
|
||||
if l:use_local_file
|
||||
let l:config = ale#path#FindNearestFile(a:buffer, '.clang-format')
|
||||
|
||||
if !empty(l:config)
|
||||
let l:style_option = '-style=file'
|
||||
endif
|
||||
endif
|
||||
|
||||
if l:style_option isnot# ''
|
||||
let l:options .= ' ' . l:style_option
|
||||
endif
|
||||
|
||||
let l:command = l:executable . ' --assume-filename=' . l:filename
|
||||
|
||||
|
0
sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/clangtidy.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/cmakeformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/cmakeformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/dartfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/dartfmt.vim
Normal file → Executable file
17
sources_non_forked/ale/autoload/ale/fixers/deno.vim
Executable file
17
sources_non_forked/ale/autoload/ale/fixers/deno.vim
Executable file
@ -0,0 +1,17 @@
|
||||
function! ale#fixers#deno#Fix(buffer) abort
|
||||
let l:executable = ale#handlers#deno#GetExecutable(a:buffer)
|
||||
|
||||
if !executable(l:executable)
|
||||
return 0
|
||||
endif
|
||||
|
||||
let l:options = ' fmt -'
|
||||
|
||||
if ale#Var(a:buffer, 'deno_unstable')
|
||||
let l:options = l:options . ' --unstable'
|
||||
endif
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable) . l:options
|
||||
\}
|
||||
endfunction
|
0
sources_non_forked/ale/autoload/ale/fixers/dfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/dfmt.vim
Normal file → Executable file
@ -1,23 +0,0 @@
|
||||
" Author: Pat Brisbin <pbrisbin@gmail.com>
|
||||
" Description: Integration of dhall-format with ALE.
|
||||
|
||||
call ale#Set('dhall_format_executable', 'dhall')
|
||||
|
||||
function! ale#fixers#dhall#GetExecutable(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'dhall_format_executable')
|
||||
|
||||
" Dhall is written in Haskell and commonly installed with Stack
|
||||
return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'dhall')
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#dhall#Fix(buffer) abort
|
||||
let l:executable = ale#fixers#dhall#GetExecutable(a:buffer)
|
||||
|
||||
return {
|
||||
\ 'command': l:executable
|
||||
\ . ' format'
|
||||
\ . ' --inplace'
|
||||
\ . ' %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
14
sources_non_forked/ale/autoload/ale/fixers/dhall_format.vim
Executable file
14
sources_non_forked/ale/autoload/ale/fixers/dhall_format.vim
Executable file
@ -0,0 +1,14 @@
|
||||
" Author: toastal <toastal@protonmail.com>
|
||||
" Description: Dhall’s built-in formatter
|
||||
"
|
||||
function! ale#fixers#dhall_format#Fix(buffer) abort
|
||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||
let l:command = l:executable
|
||||
\ . ' format'
|
||||
\ . ' --inplace %t'
|
||||
|
||||
return {
|
||||
\ 'command': l:command,
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
18
sources_non_forked/ale/autoload/ale/fixers/dhall_freeze.vim
Executable file
18
sources_non_forked/ale/autoload/ale/fixers/dhall_freeze.vim
Executable file
@ -0,0 +1,18 @@
|
||||
" Author: toastal <toastal@protonmail.com>
|
||||
" Description: Dhall’s package freezing
|
||||
|
||||
call ale#Set('dhall_freeze_options', '')
|
||||
|
||||
function! ale#fixers#dhall_freeze#Freeze(buffer) abort
|
||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||
let l:command = l:executable
|
||||
\ . ' freeze'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'dhall_freeze_options'))
|
||||
\ . ' --inplace %t'
|
||||
|
||||
|
||||
return {
|
||||
\ 'command': l:command,
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
14
sources_non_forked/ale/autoload/ale/fixers/dhall_lint.vim
Executable file
14
sources_non_forked/ale/autoload/ale/fixers/dhall_lint.vim
Executable file
@ -0,0 +1,14 @@
|
||||
" Author: toastal <toastal@protonmail.com>
|
||||
" Description: Dhall’s built-in linter/formatter
|
||||
|
||||
function! ale#fixers#dhall_lint#Fix(buffer) abort
|
||||
let l:executable = ale#dhall#GetExecutableWithOptions(a:buffer)
|
||||
let l:command = l:executable
|
||||
\ . ' lint'
|
||||
\ . ' --inplace %t'
|
||||
|
||||
return {
|
||||
\ 'command': l:command,
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
0
sources_non_forked/ale/autoload/ale/fixers/elm_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/elm_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/eslint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/eslint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/fecs.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/fecs.vim
Normal file → Executable file
19
sources_non_forked/ale/autoload/ale/fixers/fish_indent.vim
Executable file
19
sources_non_forked/ale/autoload/ale/fixers/fish_indent.vim
Executable file
@ -0,0 +1,19 @@
|
||||
" Author: Chen YuanYuan <cyyever@outlook.com>
|
||||
" Description: Integration of fish_indent with ALE.
|
||||
|
||||
call ale#Set('fish_fish_indent_executable', 'fish_indent')
|
||||
call ale#Set('fish_fish_indent_options', '')
|
||||
|
||||
function! ale#fixers#fish_indent#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'fish_fish_indent_executable')
|
||||
let l:options = ale#Var(a:buffer, 'fish_fish_indent_options')
|
||||
let l:filename = ale#Escape(bufname(a:buffer))
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . ' -w '
|
||||
\ . (empty(l:options) ? '' : ' ' . l:options)
|
||||
\ . ' %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
0
sources_non_forked/ale/autoload/ale/fixers/fixjson.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/fixjson.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/floskell.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/floskell.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/generic.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/generic.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/generic_python.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/generic_python.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gnatpp.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gofmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gofmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/goimports.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/goimports.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gomod.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/gomod.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/google_java_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/google_java_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hackfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hackfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/help.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/help.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hindent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hindent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/hlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/html_beautify.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/html_beautify.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/importjs.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/importjs.vim
Normal file → Executable file
27
sources_non_forked/ale/autoload/ale/fixers/isort.vim
Normal file → Executable file
27
sources_non_forked/ale/autoload/ale/fixers/isort.vim
Normal file → Executable file
@ -2,24 +2,35 @@
|
||||
" Description: Fixing Python imports with isort.
|
||||
|
||||
call ale#Set('python_isort_executable', 'isort')
|
||||
call ale#Set('python_isort_options', '')
|
||||
call ale#Set('python_isort_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('python_isort_options', '')
|
||||
call ale#Set('python_isort_auto_pipenv', 0)
|
||||
|
||||
function! ale#fixers#isort#GetExecutable(buffer) abort
|
||||
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_isort_auto_pipenv'))
|
||||
\ && ale#python#PipenvPresent(a:buffer)
|
||||
return 'pipenv'
|
||||
endif
|
||||
|
||||
return ale#python#FindExecutable(a:buffer, 'python_isort', ['isort'])
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#isort#Fix(buffer) abort
|
||||
let l:options = ale#Var(a:buffer, 'python_isort_options')
|
||||
|
||||
let l:executable = ale#python#FindExecutable(
|
||||
\ a:buffer,
|
||||
\ 'python_isort',
|
||||
\ ['isort'],
|
||||
\)
|
||||
let l:executable = ale#fixers#isort#GetExecutable(a:buffer)
|
||||
|
||||
if !executable(l:executable)
|
||||
let l:exec_args = l:executable =~? 'pipenv$'
|
||||
\ ? ' run isort'
|
||||
\ : ''
|
||||
|
||||
if !executable(l:executable) && l:executable isnot# 'pipenv'
|
||||
return 0
|
||||
endif
|
||||
|
||||
return {
|
||||
\ 'command': ale#path#BufferCdString(a:buffer)
|
||||
\ . ale#Escape(l:executable) . (!empty(l:options) ? ' ' . l:options : '') . ' -',
|
||||
\ . ale#Escape(l:executable) . l:exec_args
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '') . ' -',
|
||||
\}
|
||||
endfunction
|
||||
|
0
sources_non_forked/ale/autoload/ale/fixers/jq.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/jq.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ktlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ktlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/latexindent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/latexindent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/luafmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/luafmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/mix_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/mix_format.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/nimpretty.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/nimpretty.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/nixpkgsfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/nixpkgsfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ocamlformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ocamlformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ocp_indent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ocp_indent.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ormolu.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/ormolu.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/perltidy.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/perltidy.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/pgformatter.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/php_cs_fixer.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/php_cs_fixer.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/phpcbf.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/phpcbf.vim
Normal file → Executable file
2
sources_non_forked/ale/autoload/ale/fixers/prettier.vim
Normal file → Executable file
2
sources_non_forked/ale/autoload/ale/fixers/prettier.vim
Normal file → Executable file
@ -83,7 +83,9 @@ function! ale#fixers#prettier#ApplyFixForVersion(buffer, version) abort
|
||||
\ 'markdown': 'markdown',
|
||||
\ 'vue': 'vue',
|
||||
\ 'yaml': 'yaml',
|
||||
\ 'openapi': 'yaml',
|
||||
\ 'html': 'html',
|
||||
\ 'ruby': 'ruby',
|
||||
\}
|
||||
|
||||
for l:filetype in l:filetypes
|
||||
|
0
sources_non_forked/ale/autoload/ale/fixers/prettier_eslint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/prettier_eslint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/prettier_standard.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/prettier_standard.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/puppetlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/puppetlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/purty.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/purty.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/qmlfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/qmlfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/refmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/refmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/remark_lint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/remark_lint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rubocop.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rubocop.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rufo.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rufo.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rustfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/rustfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/scalafmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/scalafmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/shfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/shfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sorbet.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sorbet.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sqlfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sqlfmt.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sqlformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/sqlformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/standard.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/standard.vim
Normal file → Executable file
4
sources_non_forked/ale/autoload/ale/fixers/standardrb.vim
Normal file → Executable file
4
sources_non_forked/ale/autoload/ale/fixers/standardrb.vim
Normal file → Executable file
@ -12,12 +12,12 @@ function! ale#fixers#standardrb#GetCommand(buffer) abort
|
||||
return ale#ruby#EscapeExecutable(l:executable, 'standardrb')
|
||||
\ . (!empty(l:config) ? ' --config ' . ale#Escape(l:config) : '')
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||
\ . ' --fix --force-exclusion %t'
|
||||
\ . ' --fix --force-exclusion --stdin %s'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#standardrb#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#fixers#standardrb#GetCommand(a:buffer),
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
||||
\}
|
||||
endfunction
|
||||
|
0
sources_non_forked/ale/autoload/ale/fixers/stylelint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/stylelint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/styler.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/styler.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/stylish_haskell.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/stylish_haskell.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/swiftformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/swiftformat.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/terraform.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/terraform.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/textlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/textlint.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/tidy.vim
Normal file → Executable file
0
sources_non_forked/ale/autoload/ale/fixers/tidy.vim
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user