Updated plugins
This commit is contained in:
parent
b41536726f
commit
765adb9da3
216 changed files with 4784 additions and 2112 deletions
|
@ -18,9 +18,30 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
|||
endif
|
||||
endfor
|
||||
|
||||
let l:version_group = ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' : '<5.0.0'
|
||||
let l:version_group = ale#semver#GTE(a:version, [6, 0, 0]) ? '>=6.0.0' :
|
||||
\ ale#semver#GTE(a:version, [5, 0, 0]) ? '>=5.0.0' :
|
||||
\ '<5.0.0'
|
||||
let l:output = []
|
||||
|
||||
if '>=6.0.0' is# l:version_group
|
||||
let l:error_codes = { 'blocker': 'E', 'critical': 'E', 'major': 'W', 'minor': 'W', 'info': 'I' }
|
||||
let l:linter_issues = json_decode(join(a:lines, ''))
|
||||
|
||||
for l:issue in l:linter_issues
|
||||
if ale#path#IsBufferPath(a:buffer, l:issue.location.path)
|
||||
call add(l:output, {
|
||||
\ 'lnum': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.line :
|
||||
\ l:issue.location.lines.begin,
|
||||
\ 'col': exists('l:issue.location.lines.begin.column') ? l:issue.location.lines.begin.column : 0,
|
||||
\ 'text': l:issue.check_name,
|
||||
\ 'detail': l:issue.description,
|
||||
\ 'code': l:issue.severity,
|
||||
\ 'type': l:error_codes[l:issue.severity],
|
||||
\})
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
||||
if '>=5.0.0' is# l:version_group
|
||||
" Matches patterns line the following:
|
||||
" test.yml:3:148: syntax-check 'var' is not a valid attribute for a Play
|
||||
|
@ -73,10 +94,13 @@ endfunction
|
|||
|
||||
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
|
||||
let l:commands = {
|
||||
\ '>=6.0.0': '%e --nocolor -f json -x yaml %s',
|
||||
\ '>=5.0.0': '%e --nocolor --parseable-severity -x yaml %s',
|
||||
\ '<5.0.0': '%e --nocolor -p %t'
|
||||
\}
|
||||
let l:command = ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] : l:commands['<5.0.0']
|
||||
let l:command = ale#semver#GTE(a:version, [6, 0]) ? l:commands['>=6.0.0'] :
|
||||
\ ale#semver#GTE(a:version, [5, 0]) ? l:commands['>=5.0.0'] :
|
||||
\ l:commands['<5.0.0']
|
||||
|
||||
return l:command
|
||||
endfunction
|
||||
|
|
|
@ -9,8 +9,9 @@ function! ale_linters#awk#gawk#GetCommand(buffer) abort
|
|||
" gawk from attempting to execute the body of the script
|
||||
" it is linting.
|
||||
return '%e --source ' . ale#Escape('BEGIN { exit } END { exit 1 }')
|
||||
\ . ' --lint'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'awk_gawk_options'))
|
||||
\ . ' -f %t --lint /dev/null'
|
||||
\ . ' -f %t /dev/null'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('awk', {
|
||||
|
|
|
@ -4,15 +4,16 @@
|
|||
call ale#Set('dart_analyze_executable', 'dart')
|
||||
|
||||
function! ale_linters#dart#dart_analyze#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^ ([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$'
|
||||
let l:pattern = '\v([a-z]+) - (.+):(\d+):(\d+) - (.+) - (.+)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
let [l:type, l:filename, l:lnum, l:col, l:message, l:code] = l:match[1:6]
|
||||
call add(l:output, {
|
||||
\ 'type': l:match[1] is# 'error' ? 'E' : 'W',
|
||||
\ 'text': l:match[6] . ': ' . l:match[5],
|
||||
\ 'lnum': str2nr(l:match[3]),
|
||||
\ 'col': str2nr(l:match[4]),
|
||||
\ 'type': l:type is# 'error' ? 'E' : l:type is# 'info' ? 'I' : 'W',
|
||||
\ 'text': l:code . ': ' . l:message,
|
||||
\ 'lnum': str2nr(l:lnum),
|
||||
\ 'col': str2nr(l:col),
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
@ -22,7 +23,7 @@ endfunction
|
|||
call ale#linter#Define('dart', {
|
||||
\ 'name': 'dart_analyze',
|
||||
\ 'executable': {b -> ale#Var(b, 'dart_analyze_executable')},
|
||||
\ 'command': '%e analyze %s',
|
||||
\ 'command': '%e analyze --fatal-infos %s',
|
||||
\ 'callback': 'ale_linters#dart#dart_analyze#Handle',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
" Author: w0rp <devw0rp@gmail.com>
|
||||
" Description: Check Dart files with dartanalyzer
|
||||
|
||||
call ale#Set('dart_dartanalyzer_executable', 'dartanalyzer')
|
||||
|
||||
function! ale_linters#dart#dartanalyzer#GetCommand(buffer) abort
|
||||
let l:path = ale#path#FindNearestFile(a:buffer, '.packages')
|
||||
|
||||
return '%e'
|
||||
\ . (!empty(l:path) ? ' --packages ' . ale#Escape(l:path) : '')
|
||||
\ . ' %s'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#dart#dartanalyzer#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^ ([a-z]+) . (.+) at (.+):(\d+):(\d+) . (.+)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'type': l:match[1] is# 'error' ? 'E' : 'W',
|
||||
\ 'text': l:match[6] . ': ' . l:match[2],
|
||||
\ 'lnum': str2nr(l:match[4]),
|
||||
\ 'col': str2nr(l:match[5]),
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('dart', {
|
||||
\ 'name': 'dartanalyzer',
|
||||
\ 'executable': {b -> ale#Var(b, 'dart_dartanalyzer_executable')},
|
||||
\ 'command': function('ale_linters#dart#dartanalyzer#GetCommand'),
|
||||
\ 'callback': 'ale_linters#dart#dartanalyzer#Handle',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
|
@ -12,6 +12,7 @@ function! ale_linters#erlang#elvis#Handle(buffer, lines) abort
|
|||
\ 'lnum': str2nr(l:match[1]),
|
||||
\ 'text': s:AbbreviateMessage(l:match[2]),
|
||||
\ 'type': 'W',
|
||||
\ 'sub_type': 'style',
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ function! ale_linters#go#golangci_lint#GetCommand(buffer) abort
|
|||
endfunction
|
||||
|
||||
function! ale_linters#go#golangci_lint#GetMatches(lines) abort
|
||||
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)$'
|
||||
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+):?(\d+)?:?:?:?\s\*?(.+)\s+\((.+)\)$'
|
||||
|
||||
return ale#util#GetMatches(a:lines, l:pattern)
|
||||
endfunction
|
||||
|
@ -34,14 +34,20 @@ function! ale_linters#go#golangci_lint#Handler(buffer, lines) abort
|
|||
let l:output = []
|
||||
|
||||
for l:match in ale_linters#go#golangci_lint#GetMatches(a:lines)
|
||||
if l:match[5] is# 'typecheck'
|
||||
let l:msg_type = 'E'
|
||||
else
|
||||
let l:msg_type = 'W'
|
||||
endif
|
||||
|
||||
" l:match[1] will already be an absolute path, output from
|
||||
" golangci_lint
|
||||
call add(l:output, {
|
||||
\ 'filename': ale#path#GetAbsPath(l:dir, l:match[1]),
|
||||
\ 'lnum': l:match[2] + 0,
|
||||
\ 'col': l:match[3] + 0,
|
||||
\ 'type': 'E',
|
||||
\ 'text': l:match[4],
|
||||
\ 'type': l:msg_type,
|
||||
\ 'text': l:match[4] . ' (' . l:match[5] . ')',
|
||||
\})
|
||||
endfor
|
||||
|
||||
|
|
|
@ -11,10 +11,17 @@ function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort
|
|||
endfunction
|
||||
|
||||
function! ale_linters#handlebars#embertemplatelint#GetCommand(buffer, version) abort
|
||||
" Reading from stdin was introduced in ember-template-lint@1.6.0
|
||||
return ale#semver#GTE(a:version, [1, 6, 0])
|
||||
\ ? '%e --json --filename %s'
|
||||
\ : '%e --json %t'
|
||||
if ale#semver#GTE(a:version, [4, 0, 0])
|
||||
" --json was removed in favor of --format=json in ember-template-lint@4.0.0
|
||||
return '%e --format=json --filename %s'
|
||||
endif
|
||||
|
||||
if ale#semver#GTE(a:version, [1, 6, 0])
|
||||
" Reading from stdin was introduced in ember-template-lint@1.6.0
|
||||
return '%e --json --filename %s'
|
||||
endif
|
||||
|
||||
return '%e --json %t'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#handlebars#embertemplatelint#GetCommandWithVersionCheck(buffer) abort
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
" <devildead13@gmail.com>). It search more project root files.
|
||||
"
|
||||
call ale#Set('haskell_hls_executable', 'haskell-language-server-wrapper')
|
||||
call ale#Set('haskell_hls_config', {})
|
||||
|
||||
function! ale_linters#haskell#hls#FindRootFile(buffer) abort
|
||||
let l:serach_root_files = [
|
||||
|
@ -60,4 +61,5 @@ call ale#linter#Define('haskell', {
|
|||
\ 'command': function('ale_linters#haskell#hls#GetCommand'),
|
||||
\ 'executable': {b -> ale#Var(b, 'haskell_hls_executable')},
|
||||
\ 'project_root': function('ale_linters#haskell#hls#GetProjectRoot'),
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'haskell_hls_config')},
|
||||
\})
|
||||
|
|
|
@ -11,10 +11,7 @@ function! ale_linters#html#angular#GetProjectRoot(buffer) abort
|
|||
endfunction
|
||||
|
||||
function! ale_linters#html#angular#GetExecutable(buffer) abort
|
||||
return ale#path#FindExecutable(a:buffer, 'html_angular', [
|
||||
\ 'node_modules/@angular/language-server/bin/ngserver',
|
||||
\ 'node_modules/@angular/language-server/index.js',
|
||||
\])
|
||||
return 'node'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#html#angular#GetCommand(buffer) abort
|
||||
|
@ -34,9 +31,16 @@ function! ale_linters#html#angular#GetCommand(buffer) abort
|
|||
\ fnamemodify(l:language_service_dir, ':h:h')
|
||||
\ . '/typescript'
|
||||
\)
|
||||
let l:executable = ale_linters#html#angular#GetExecutable(a:buffer)
|
||||
let l:script = ale#path#FindExecutable(a:buffer, 'html_angular', [
|
||||
\ 'node_modules/@angular/language-server/bin/ngserver',
|
||||
\ 'node_modules/@angular/language-server/index.js',
|
||||
\])
|
||||
|
||||
return ale#node#Executable(a:buffer, l:executable)
|
||||
if !filereadable(l:script)
|
||||
return ''
|
||||
endif
|
||||
|
||||
return ale#Escape('node') . ' ' . ale#Escape(l:script)
|
||||
\ . ' --ngProbeLocations ' . ale#Escape(l:language_service_dir)
|
||||
\ . ' --tsProbeLocations ' . ale#Escape(l:typescript_dir)
|
||||
\ . ' --stdio'
|
||||
|
|
|
@ -192,4 +192,9 @@ call ale#linter#Define('java', {
|
|||
\ 'command': function('ale_linters#java#eclipselsp#RunWithVersionCheck'),
|
||||
\ 'language': 'java',
|
||||
\ 'project_root': function('ale#java#FindProjectRoot'),
|
||||
\ 'initialization_options': {
|
||||
\ 'extendedClientCapabilities': {
|
||||
\ 'classFileContentsSupport': v:true
|
||||
\ }
|
||||
\ }
|
||||
\})
|
||||
|
|
|
@ -20,6 +20,6 @@ endfunction
|
|||
call ale#linter#Define('make', {
|
||||
\ 'name': 'checkmake',
|
||||
\ 'executable': 'checkmake',
|
||||
\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}"',
|
||||
\ 'command': 'checkmake %s --format="{{.LineNumber}}:{{.Rule}}:{{.Violation}}{{\"\r\n\"}}"',
|
||||
\ 'callback': 'ale_linters#make#checkmake#Handle',
|
||||
\})
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
function! ale_linters#nix#nix#Command(buffer, output, meta) abort
|
||||
let l:version = a:output[0][22:]
|
||||
|
||||
if l:version =~# '^\(2.4\|3\).*'
|
||||
if l:version =~# '^\(2.[4-9]\|3\).*'
|
||||
return 'nix-instantiate --log-format internal-json --parse -'
|
||||
else
|
||||
return 'nix-instantiate --parse -'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
" Author: medains <https://github.com/medains>, ardis <https://github.com/ardisdreelath>
|
||||
" Author: medains <https://github.com/medains>, ardis <https://github.com/ardisdreelath>, Arizard <https://github.com/Arizard>
|
||||
" Description: phpstan for PHP files
|
||||
|
||||
" Set to change the ruleset
|
||||
|
@ -6,6 +6,7 @@ let g:ale_php_phpstan_executable = get(g:, 'ale_php_phpstan_executable', 'phpsta
|
|||
let g:ale_php_phpstan_level = get(g:, 'ale_php_phpstan_level', '')
|
||||
let g:ale_php_phpstan_configuration = get(g:, 'ale_php_phpstan_configuration', '')
|
||||
let g:ale_php_phpstan_autoload = get(g:, 'ale_php_phpstan_autoload', '')
|
||||
let g:ale_php_phpstan_memory_limit = get(g:, 'ale_php_phpstan_memory_limit', '')
|
||||
call ale#Set('php_phpstan_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
||||
|
@ -19,6 +20,11 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
|||
\ ? ' -a ' . ale#Escape(l:autoload)
|
||||
\ : ''
|
||||
|
||||
let l:memory_limit = ale#Var(a:buffer, 'php_phpstan_memory_limit')
|
||||
let l:memory_limit_option = !empty(l:memory_limit)
|
||||
\ ? ' --memory-limit ' . ale#Escape(l:memory_limit)
|
||||
\ : ''
|
||||
|
||||
let l:level = ale#Var(a:buffer, 'php_phpstan_level')
|
||||
let l:config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon')
|
||||
let l:dist_config_file_exists = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist')
|
||||
|
@ -41,6 +47,7 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
|||
\ . l:configuration_option
|
||||
\ . l:autoload_option
|
||||
\ . l:level_option
|
||||
\ . l:memory_limit_option
|
||||
\ . ' %s'
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -6,6 +6,12 @@ call ale#Set('php_psalm_options', '')
|
|||
call ale#Set('php_psalm_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
|
||||
function! ale_linters#php#psalm#GetProjectRoot(buffer) abort
|
||||
let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json')
|
||||
|
||||
if (!empty(l:composer_path))
|
||||
return fnamemodify(l:composer_path, ':h')
|
||||
endif
|
||||
|
||||
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
|
||||
|
||||
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
|
||||
|
|
|
@ -29,7 +29,7 @@ function! ale_linters#python#pydocstyle#GetCommand(buffer) abort
|
|||
|
||||
return ale#Escape(l:executable) . l:exec_args
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'python_pydocstyle_options'))
|
||||
\ . ' %s:t'
|
||||
\ . ' %s'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pydocstyle#Handle(buffer, lines) abort
|
||||
|
|
|
@ -22,6 +22,22 @@ function! ale_linters#python#pylama#GetExecutable(buffer) abort
|
|||
return ale#python#FindExecutable(a:buffer, 'python_pylama', ['pylama'])
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pylama#RunWithVersionCheck(buffer) abort
|
||||
let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer)
|
||||
let l:exec_args = l:executable =~? 'pipenv\|poetry$'
|
||||
\ ? ' run pylama'
|
||||
\ : ''
|
||||
|
||||
let l:command = ale#Escape(l:executable) . l:exec_args . ' --version'
|
||||
|
||||
return ale#semver#RunWithVersionCheck(
|
||||
\ a:buffer,
|
||||
\ l:executable,
|
||||
\ l:command,
|
||||
\ function('ale_linters#python#pylama#GetCommand'),
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pylama#GetCwd(buffer) abort
|
||||
if ale#Var(a:buffer, 'python_pylama_change_directory')
|
||||
" Pylama loads its configuration from the current directory only, and
|
||||
|
@ -35,27 +51,33 @@ function! ale_linters#python#pylama#GetCwd(buffer) abort
|
|||
return ''
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pylama#GetCommand(buffer) abort
|
||||
function! ale_linters#python#pylama#GetCommand(buffer, version) abort
|
||||
let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer)
|
||||
let l:exec_args = l:executable =~? 'pipenv\|poetry$'
|
||||
\ ? ' run pylama'
|
||||
\ : ''
|
||||
|
||||
" json format is added in version 8.1.4
|
||||
" https://github.com/klen/pylama/blob/develop/Changelog
|
||||
let l:format_json_args = ale#semver#GTE(a:version, [8, 1, 4])
|
||||
\ ? ' --format json'
|
||||
\ : ''
|
||||
|
||||
" Note: Using %t to lint changes would be preferable, but many pylama
|
||||
" checks use surrounding paths (e.g. C0103 module name, E0402 relative
|
||||
" import beyond top, etc.). Neither is ideal.
|
||||
return ale#Escape(l:executable) . l:exec_args
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'python_pylama_options'))
|
||||
\ . l:format_json_args
|
||||
\ . ' %s'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pylama#Handle(buffer, lines) abort
|
||||
function! ale_linters#python#pylama#Handle(buffer, version, lines) abort
|
||||
if empty(a:lines)
|
||||
return []
|
||||
endif
|
||||
|
||||
let l:output = ale#python#HandleTraceback(a:lines, 1)
|
||||
let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$'
|
||||
|
||||
" First letter of error code is a pylint-compatible message type
|
||||
" http://pylint.pycqa.org/en/latest/user_guide/output.html#source-code-analysis-section
|
||||
|
@ -75,16 +97,41 @@ function! ale_linters#python#pylama#Handle(buffer, lines) abort
|
|||
\ 'D': 'style',
|
||||
\}
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'lnum': str2nr(l:match[1]),
|
||||
\ 'col': str2nr(l:match[2]),
|
||||
\ 'code': l:match[3],
|
||||
\ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'),
|
||||
\ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''),
|
||||
\ 'text': l:match[4],
|
||||
\})
|
||||
endfor
|
||||
if ale#semver#GTE(a:version, [8, 1, 4])
|
||||
try
|
||||
let l:errors = json_decode(join(a:lines, ''))
|
||||
catch
|
||||
return l:output
|
||||
endtry
|
||||
|
||||
if empty(l:errors)
|
||||
return l:output
|
||||
endif
|
||||
|
||||
for l:error in l:errors
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:error['lnum'],
|
||||
\ 'col': l:error['col'],
|
||||
\ 'code': l:error['number'],
|
||||
\ 'type': get(l:pylint_type_to_ale_type, l:error['etype'], 'W'),
|
||||
\ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:error['etype'], ''),
|
||||
\ 'text': printf('%s [%s]', l:error['message'], l:error['source']),
|
||||
\})
|
||||
endfor
|
||||
else
|
||||
let l:pattern = '\v^.{-}:([0-9]+):([0-9]+): +%(([A-Z][0-9]+):? +)?(.*)$'
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'lnum': str2nr(l:match[1]),
|
||||
\ 'col': str2nr(l:match[2]),
|
||||
\ 'code': l:match[3],
|
||||
\ 'type': get(l:pylint_type_to_ale_type, l:match[3][0], 'W'),
|
||||
\ 'sub_type': get(l:pylint_type_to_ale_sub_type, l:match[3][0], ''),
|
||||
\ 'text': l:match[4],
|
||||
\})
|
||||
endfor
|
||||
endif
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
@ -93,7 +140,15 @@ call ale#linter#Define('python', {
|
|||
\ 'name': 'pylama',
|
||||
\ 'executable': function('ale_linters#python#pylama#GetExecutable'),
|
||||
\ 'cwd': function('ale_linters#python#pylama#GetCwd'),
|
||||
\ 'command': function('ale_linters#python#pylama#GetCommand'),
|
||||
\ 'callback': 'ale_linters#python#pylama#Handle',
|
||||
\ 'command': function('ale_linters#python#pylama#RunWithVersionCheck'),
|
||||
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
|
||||
\ buffer,
|
||||
\ ale_linters#python#pylama#GetExecutable(buffer),
|
||||
\ '%e --version',
|
||||
\ {buffer, version -> ale_linters#python#pylama#Handle(
|
||||
\ buffer,
|
||||
\ l:version,
|
||||
\ lines)},
|
||||
\ )},
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
|
|
|
@ -19,6 +19,10 @@ function! ale_linters#ruby#reek#GetCommand(buffer, version) abort
|
|||
\ . l:display_name_args
|
||||
endfunction
|
||||
|
||||
function! s:GetDocumentationLink(error) abort
|
||||
return get(a:error, 'documentation_link', get(a:error, 'wiki_link', ''))
|
||||
endfunction
|
||||
|
||||
function! s:BuildText(buffer, error) abort
|
||||
let l:parts = []
|
||||
|
||||
|
@ -29,7 +33,7 @@ function! s:BuildText(buffer, error) abort
|
|||
call add(l:parts, a:error.message)
|
||||
|
||||
if ale#Var(a:buffer, 'ruby_reek_show_wiki_link')
|
||||
call add(l:parts, '[' . a:error.wiki_link . ']')
|
||||
call add(l:parts, '[' . s:GetDocumentationLink(a:error) . ']')
|
||||
endif
|
||||
|
||||
return join(l:parts, ' ')
|
||||
|
|
|
@ -9,9 +9,21 @@ function! ale_linters#rust#analyzer#GetCommand(buffer) abort
|
|||
endfunction
|
||||
|
||||
function! ale_linters#rust#analyzer#GetProjectRoot(buffer) abort
|
||||
" Try to find nearest Cargo.toml for cargo projects
|
||||
let l:cargo_file = ale#path#FindNearestFile(a:buffer, 'Cargo.toml')
|
||||
|
||||
return !empty(l:cargo_file) ? fnamemodify(l:cargo_file, ':h') : ''
|
||||
if !empty(l:cargo_file)
|
||||
return fnamemodify(l:cargo_file, ':h')
|
||||
endif
|
||||
|
||||
" Try to find nearest rust-project.json for non-cargo projects
|
||||
let l:rust_project = ale#path#FindNearestFile(a:buffer, 'rust-project.json')
|
||||
|
||||
if !empty(l:rust_project)
|
||||
return fnamemodify(l:rust_project, ':h')
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('rust', {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
" Author: Daniel Schemala <istjanichtzufassen@gmail.com>
|
||||
" Description: rustc for rust files
|
||||
|
||||
call ale#Set('rust_rustc_options', '-Z no-codegen')
|
||||
call ale#Set('rust_rustc_options', '--emit=mir -o /dev/null')
|
||||
|
||||
function! ale_linters#rust#rustc#RustcCommand(buffer) abort
|
||||
" Try to guess the library search path. If the project is managed by cargo,
|
||||
|
|
|
@ -21,7 +21,13 @@ function! ale_linters#terraform#terraform#GetType(severity) abort
|
|||
endfunction
|
||||
|
||||
function! ale_linters#terraform#terraform#GetDetail(error) abort
|
||||
return get(a:error, 'detail', get(a:error, 'summary', ''))
|
||||
let l:detail = get(a:error, 'detail', '')
|
||||
|
||||
if strlen(l:detail) > 0
|
||||
return l:detail
|
||||
else
|
||||
return get(a:error, 'summary', '')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale_linters#terraform#terraform#Handle(buffer, lines) abort
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
call ale#Set('tex_texlab_executable', 'texlab')
|
||||
call ale#Set('tex_texlab_options', '')
|
||||
call ale#Set('tex_texlab_config', {})
|
||||
|
||||
function! ale_linters#tex#texlab#GetProjectRoot(buffer) abort
|
||||
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
|
||||
|
@ -21,4 +22,5 @@ call ale#linter#Define('tex', {
|
|||
\ 'executable': {b -> ale#Var(b, 'tex_texlab_executable')},
|
||||
\ 'command': function('ale_linters#tex#texlab#GetCommand'),
|
||||
\ 'project_root': function('ale_linters#tex#texlab#GetProjectRoot'),
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'tex_texlab_config')},
|
||||
\})
|
||||
|
|
|
@ -157,7 +157,7 @@ function! ale#Queue(delay, ...) abort
|
|||
endif
|
||||
endfunction
|
||||
|
||||
let s:current_ale_version = [3, 1, 0]
|
||||
let s:current_ale_version = [3, 2, 0]
|
||||
|
||||
" A function used to check for ALE features in files outside of the project.
|
||||
function! ale#Has(feature) abort
|
||||
|
|
|
@ -16,13 +16,12 @@ endfunction
|
|||
function! ale#code_action#HandleCodeAction(code_action, options) abort
|
||||
let l:current_buffer = bufnr('')
|
||||
let l:changes = a:code_action.changes
|
||||
let l:should_save = get(a:options, 'should_save')
|
||||
|
||||
for l:file_code_edit in l:changes
|
||||
call ale#code_action#ApplyChanges(
|
||||
\ l:file_code_edit.fileName,
|
||||
\ l:file_code_edit.textChanges,
|
||||
\ l:should_save,
|
||||
\ a:options,
|
||||
\)
|
||||
endfor
|
||||
endfunction
|
||||
|
@ -63,29 +62,29 @@ function! s:ChangeCmp(left, right) abort
|
|||
return 0
|
||||
endfunction
|
||||
|
||||
function! ale#code_action#ApplyChanges(filename, changes, should_save) abort
|
||||
let l:current_buffer = bufnr('')
|
||||
function! ale#code_action#ApplyChanges(filename, changes, options) abort
|
||||
let l:should_save = get(a:options, 'should_save')
|
||||
let l:conn_id = get(a:options, 'conn_id')
|
||||
|
||||
let l:orig_buffer = bufnr('')
|
||||
|
||||
" The buffer is used to determine the fileformat, if available.
|
||||
let l:buffer = bufnr(a:filename)
|
||||
let l:is_current_buffer = l:buffer > 0 && l:buffer == l:current_buffer
|
||||
|
||||
if l:buffer > 0
|
||||
let l:lines = getbufline(l:buffer, 1, '$')
|
||||
|
||||
" Add empty line if there's trailing newline, like readfile() does.
|
||||
if getbufvar(l:buffer, '&eol')
|
||||
let l:lines += ['']
|
||||
endif
|
||||
else
|
||||
let l:lines = readfile(a:filename, 'b')
|
||||
if l:buffer != l:orig_buffer
|
||||
call ale#util#Execute('silent edit ' . a:filename)
|
||||
let l:buffer = bufnr('')
|
||||
endif
|
||||
|
||||
if l:is_current_buffer
|
||||
let l:pos = getpos('.')[1:2]
|
||||
else
|
||||
let l:pos = [1, 1]
|
||||
let l:lines = getbufline(l:buffer, 1, '$')
|
||||
|
||||
" Add empty line if there's trailing newline, like readfile() does.
|
||||
if getbufvar(l:buffer, '&eol')
|
||||
let l:lines += ['']
|
||||
endif
|
||||
|
||||
let l:pos = getpos('.')[1:2]
|
||||
|
||||
" Changes have to be sorted so we apply them from bottom-to-top
|
||||
for l:code_edit in reverse(sort(copy(a:changes), function('s:ChangeCmp')))
|
||||
let l:line = l:code_edit.start.line
|
||||
|
@ -155,46 +154,25 @@ function! ale#code_action#ApplyChanges(filename, changes, should_save) abort
|
|||
endif
|
||||
endfor
|
||||
|
||||
if l:buffer > 0
|
||||
" Make sure ale#util#{Writefile,SetBufferContents} add trailing
|
||||
" newline if and only if it should be added.
|
||||
if l:lines[-1] is# '' && getbufvar(l:buffer, '&eol')
|
||||
call remove(l:lines, -1)
|
||||
else
|
||||
call setbufvar(l:buffer, '&eol', 0)
|
||||
endif
|
||||
elseif exists('+fixeol') && &fixeol && l:lines[-1] is# ''
|
||||
" Not in buffer, ale#util#Writefile can't check &eol and always adds
|
||||
" newline if &fixeol: remove to prevent double trailing newline.
|
||||
" Make sure to add a trailing newline if and only if it should be added.
|
||||
if l:lines[-1] is# '' && getbufvar(l:buffer, '&eol')
|
||||
call remove(l:lines, -1)
|
||||
endif
|
||||
|
||||
if a:should_save || l:buffer < 0
|
||||
call ale#util#Writefile(l:buffer, l:lines, a:filename)
|
||||
else
|
||||
call ale#util#SetBufferContents(l:buffer, l:lines)
|
||||
call setbufvar(l:buffer, '&eol', 0)
|
||||
endif
|
||||
|
||||
if l:is_current_buffer
|
||||
if a:should_save
|
||||
call ale#util#Execute(':e!')
|
||||
endif
|
||||
call ale#util#SetBufferContents(l:buffer, l:lines)
|
||||
|
||||
call setpos('.', [0, l:pos[0], l:pos[1], 0])
|
||||
call ale#lsp#NotifyForChanges(l:conn_id, l:buffer)
|
||||
|
||||
if l:should_save
|
||||
call ale#util#Execute('silent w!')
|
||||
endif
|
||||
|
||||
if a:should_save && l:buffer > 0 && !l:is_current_buffer
|
||||
" Set up a one-time use event that will delete itself to reload the
|
||||
" buffer next time it's entered to view the changes made to it.
|
||||
execute 'augroup ALECodeActionReloadGroup' . l:buffer
|
||||
autocmd!
|
||||
call setpos('.', [0, l:pos[0], l:pos[1], 0])
|
||||
|
||||
execute printf(
|
||||
\ 'autocmd BufEnter <buffer=%d>'
|
||||
\ . ' call ale#code_action#ReloadBuffer()',
|
||||
\ l:buffer
|
||||
\)
|
||||
augroup END
|
||||
if l:orig_buffer != l:buffer && bufexists(l:orig_buffer)
|
||||
call ale#util#Execute('silent buf ' . string(l:orig_buffer))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
@ -300,7 +278,7 @@ function! ale#code_action#BuildChangesList(changes_map) abort
|
|||
endfor
|
||||
|
||||
call add(l:changes, {
|
||||
\ 'fileName': ale#path#FromURI(l:file_name),
|
||||
\ 'fileName': ale#util#ToResource(l:file_name),
|
||||
\ 'textChanges': l:text_changes,
|
||||
\})
|
||||
endfor
|
||||
|
|
|
@ -391,8 +391,8 @@ function! s:OnReady(
|
|||
\ 'character': l:nearest_error.col - 1,
|
||||
\ },
|
||||
\ 'end': {
|
||||
\ 'line': l:nearest_error.end_lnum - 1,
|
||||
\ 'character': l:nearest_error.end_col,
|
||||
\ 'line': get(l:nearest_error, 'end_lnum', 1) - 1,
|
||||
\ 'character': get(l:nearest_error, 'end_col', 0)
|
||||
\ },
|
||||
\ },
|
||||
\ },
|
||||
|
@ -457,7 +457,7 @@ function! s:ExecuteGetCodeFix(linter, range, MenuCallback) abort
|
|||
let [l:end_line, l:end_column] = getpos("'>")[1:2]
|
||||
endif
|
||||
|
||||
let l:column = min([l:column, len(getline(l:line))])
|
||||
let l:column = max([min([l:column, len(getline(l:line))]), 1])
|
||||
let l:end_column = min([l:end_column, len(getline(l:end_line))])
|
||||
|
||||
let l:Callback = function(
|
||||
|
|
|
@ -16,7 +16,7 @@ onoremap <silent> <Plug>(ale_show_completion_menu) <Nop>
|
|||
let g:ale_completion_delay = get(g:, 'ale_completion_delay', 100)
|
||||
let g:ale_completion_excluded_words = get(g:, 'ale_completion_excluded_words', [])
|
||||
let g:ale_completion_max_suggestions = get(g:, 'ale_completion_max_suggestions', 50)
|
||||
let g:ale_completion_autoimport = get(g:, 'ale_completion_autoimport', 0)
|
||||
let g:ale_completion_autoimport = get(g:, 'ale_completion_autoimport', 1)
|
||||
let g:ale_completion_tsserver_remove_warnings = get(g:, 'ale_completion_tsserver_remove_warnings', 0)
|
||||
|
||||
let s:timer_id = -1
|
||||
|
@ -133,11 +133,13 @@ let s:should_complete_map = {
|
|||
\ 'typescript': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|''$|"$',
|
||||
\ 'rust': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$',
|
||||
\ 'cpp': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|::$|-\>$',
|
||||
\ 'c': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$|\.$|-\>$',
|
||||
\}
|
||||
|
||||
" Regular expressions for finding the start column to replace with completion.
|
||||
let s:omni_start_map = {
|
||||
\ '<default>': '\v[a-zA-Z$_][a-zA-Z$_0-9]*$',
|
||||
\ 'racket': '\k\+',
|
||||
\}
|
||||
|
||||
" A map of exact characters for triggering LSP completions. Do not forget to
|
||||
|
@ -147,6 +149,7 @@ let s:trigger_character_map = {
|
|||
\ 'typescript': ['.', '''', '"'],
|
||||
\ 'rust': ['.', '::'],
|
||||
\ 'cpp': ['.', '::', '->'],
|
||||
\ 'c': ['.', '->'],
|
||||
\}
|
||||
|
||||
function! s:GetFiletypeValue(map, filetype) abort
|
||||
|
@ -581,7 +584,7 @@ function! ale#completion#ParseLSPCompletions(response) abort
|
|||
continue
|
||||
endif
|
||||
|
||||
if get(l:item, 'insertTextFormat') is s:LSP_INSERT_TEXT_FORMAT_PLAIN
|
||||
if get(l:item, 'insertTextFormat', s:LSP_INSERT_TEXT_FORMAT_PLAIN) is s:LSP_INSERT_TEXT_FORMAT_PLAIN
|
||||
\&& type(get(l:item, 'textEdit')) is v:t_dict
|
||||
let l:text = l:item.textEdit.newText
|
||||
elseif type(get(l:item, 'insertText')) is v:t_string
|
||||
|
@ -776,7 +779,8 @@ function! s:OnReady(linter, lsp_details) abort
|
|||
|
||||
if a:linter.lsp is# 'tsserver'
|
||||
if get(g:, 'ale_completion_tsserver_autoimport') is 1
|
||||
execute 'echom `g:ale_completion_tsserver_autoimport` is deprecated. Use `g:ale_completion_autoimport` instead.'''
|
||||
" no-custom-checks
|
||||
echom '`g:ale_completion_tsserver_autoimport` is deprecated. Use `g:ale_completion_autoimport` instead.'
|
||||
endif
|
||||
|
||||
let l:message = ale#lsp#tsserver_message#Completions(
|
||||
|
@ -911,7 +915,8 @@ function! ale#completion#Import() abort
|
|||
endif
|
||||
|
||||
let [l:line, l:column] = getpos('.')[1:2]
|
||||
let l:column = searchpos('\V' . escape(l:word, '/\'), 'bn', l:line)[1]
|
||||
let l:column = searchpos('\V' . escape(l:word, '/\'), 'bnc', l:line)[1]
|
||||
let l:column = l:column + len(l:word) - 1
|
||||
|
||||
if l:column isnot 0
|
||||
let l:started = ale#completion#GetCompletions('ale-import', {
|
||||
|
|
|
@ -10,12 +10,21 @@ let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%code: %%s')
|
|||
|
||||
let s:cursor_timer = -1
|
||||
|
||||
" A wrapper for echon so we can test messages we echo in Vader tests.
|
||||
function! ale#cursor#Echom(message) abort
|
||||
" no-custom-checks
|
||||
exec "norm! :echom a:message\n"
|
||||
endfunction
|
||||
|
||||
function! ale#cursor#TruncatedEcho(original_message) abort
|
||||
let l:message = a:original_message
|
||||
" Change tabs to spaces.
|
||||
let l:message = substitute(l:message, "\t", ' ', 'g')
|
||||
" Remove any newlines in the message.
|
||||
let l:message = substitute(l:message, "\n", '', 'g')
|
||||
" Convert indentation groups into single spaces for better legibility when
|
||||
" put on a single line
|
||||
let l:message = substitute(l:message, ' \+', ' ', 'g')
|
||||
|
||||
" We need to remember the setting for shortmess and reset it again.
|
||||
let l:shortmess_options = &l:shortmess
|
||||
|
@ -27,7 +36,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
|
|||
silent! setlocal shortmess+=T
|
||||
|
||||
try
|
||||
exec "norm! :echomsg l:message\n"
|
||||
call ale#cursor#Echom(l:message)
|
||||
catch /^Vim\%((\a\+)\)\=:E523/
|
||||
" Fallback into manual truncate (#1987)
|
||||
let l:winwidth = winwidth(0)
|
||||
|
@ -87,7 +96,9 @@ function! ale#cursor#EchoCursorWarning(...) abort
|
|||
elseif get(l:info, 'echoed')
|
||||
" We'll only clear the echoed message when moving off errors once,
|
||||
" so we don't continually clear the echo line.
|
||||
execute 'echo'
|
||||
"
|
||||
" no-custom-checks
|
||||
echo
|
||||
let l:info.echoed = 0
|
||||
endif
|
||||
endif
|
||||
|
@ -150,7 +161,8 @@ function! s:ShowCursorDetailForItem(loc, options) abort
|
|||
|
||||
" Clear the echo message if we manually displayed details.
|
||||
if !l:stay_here
|
||||
execute 'echo'
|
||||
" no-custom-checks
|
||||
echo
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
|
|
@ -62,7 +62,8 @@ let s:global_variable_list = [
|
|||
\]
|
||||
|
||||
function! s:Echo(message) abort
|
||||
execute 'echo a:message'
|
||||
" no-custom-checks
|
||||
echo a:message
|
||||
endfunction
|
||||
|
||||
function! s:GetLinterVariables(filetype, exclude_linter_names) abort
|
||||
|
|
|
@ -68,18 +68,27 @@ function! ale#definition#HandleLSPResponse(conn_id, response) abort
|
|||
for l:item in l:result
|
||||
if has_key(l:item, 'targetUri')
|
||||
" LocationLink items use targetUri
|
||||
let l:filename = ale#path#FromURI(l:item.targetUri)
|
||||
let l:uri = l:item.targetUri
|
||||
let l:line = l:item.targetRange.start.line + 1
|
||||
let l:column = l:item.targetRange.start.character + 1
|
||||
else
|
||||
" LocationLink items use uri
|
||||
let l:filename = ale#path#FromURI(l:item.uri)
|
||||
let l:uri = l:item.uri
|
||||
let l:line = l:item.range.start.line + 1
|
||||
let l:column = l:item.range.start.character + 1
|
||||
endif
|
||||
|
||||
call ale#definition#UpdateTagStack()
|
||||
call ale#util#Open(l:filename, l:line, l:column, l:options)
|
||||
|
||||
let l:uri_handler = ale#uri#GetURIHandler(l:uri)
|
||||
|
||||
if l:uri_handler is# v:null
|
||||
let l:filename = ale#path#FromFileURI(l:uri)
|
||||
call ale#util#Open(l:filename, l:line, l:column, l:options)
|
||||
else
|
||||
call l:uri_handler.OpenURILink(l:uri, l:line, l:column, l:options, a:conn_id)
|
||||
endif
|
||||
|
||||
break
|
||||
endfor
|
||||
endif
|
||||
|
@ -112,6 +121,12 @@ function! s:OnReady(line, column, options, capability, linter, lsp_details) abor
|
|||
\ a:line,
|
||||
\ a:column
|
||||
\)
|
||||
elseif a:capability is# 'implementation'
|
||||
let l:message = ale#lsp#tsserver_message#Implementation(
|
||||
\ l:buffer,
|
||||
\ a:line,
|
||||
\ a:column
|
||||
\)
|
||||
endif
|
||||
else
|
||||
" Send a message saying the buffer has changed first, or the
|
||||
|
@ -125,6 +140,8 @@ function! s:OnReady(line, column, options, capability, linter, lsp_details) abor
|
|||
let l:message = ale#lsp#message#Definition(l:buffer, a:line, a:column)
|
||||
elseif a:capability is# 'typeDefinition'
|
||||
let l:message = ale#lsp#message#TypeDefinition(l:buffer, a:line, a:column)
|
||||
elseif a:capability is# 'implementation'
|
||||
let l:message = ale#lsp#message#Implementation(l:buffer, a:line, a:column)
|
||||
else
|
||||
" XXX: log here?
|
||||
return
|
||||
|
@ -166,6 +183,14 @@ function! ale#definition#GoToType(options) abort
|
|||
endfor
|
||||
endfunction
|
||||
|
||||
function! ale#definition#GoToImpl(options) abort
|
||||
for l:linter in ale#linter#Get(&filetype)
|
||||
if !empty(l:linter.lsp)
|
||||
call s:GoToLSPDefinition(l:linter, a:options, 'implementation')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! ale#definition#GoToCommandHandler(command, ...) abort
|
||||
let l:options = {}
|
||||
|
||||
|
@ -191,6 +216,8 @@ function! ale#definition#GoToCommandHandler(command, ...) abort
|
|||
|
||||
if a:command is# 'type'
|
||||
call ale#definition#GoToType(l:options)
|
||||
elseif a:command is# 'implementation'
|
||||
call ale#definition#GoToImpl(l:options)
|
||||
else
|
||||
call ale#definition#GoTo(l:options)
|
||||
endif
|
||||
|
|
|
@ -347,6 +347,12 @@ function! ale#engine#FixLocList(buffer, linter_name, from_other_source, loclist)
|
|||
|
||||
if has_key(l:old_item, 'end_lnum')
|
||||
let l:item.end_lnum = str2nr(l:old_item.end_lnum)
|
||||
|
||||
" When the error ends after the end of the file, put it at the
|
||||
" end. This is only done for the current buffer.
|
||||
if l:item.bufnr == a:buffer && l:item.end_lnum > l:last_line_number
|
||||
let l:item.end_lnum = l:last_line_number
|
||||
endif
|
||||
endif
|
||||
|
||||
if has_key(l:old_item, 'sub_type')
|
||||
|
|
|
@ -156,4 +156,10 @@ function! ale#events#Init() abort
|
|||
endif
|
||||
endif
|
||||
augroup END
|
||||
|
||||
augroup AleURISchemes
|
||||
autocmd!
|
||||
|
||||
autocmd BufNewFile,BufReadPre jdt://** call ale#uri#jdt#ReadJDTLink(expand('<amatch>'))
|
||||
augroup END
|
||||
endfunction
|
||||
|
|
|
@ -77,7 +77,8 @@ function! ale#fix#ApplyFixes(buffer, output) abort
|
|||
call remove(g:ale_fix_buffer_data, a:buffer)
|
||||
|
||||
if !l:data.ignore_file_changed_errors
|
||||
execute 'echoerr ''The file was changed before fixing finished'''
|
||||
" no-custom-checks
|
||||
echoerr 'The file was changed before fixing finished'
|
||||
endif
|
||||
|
||||
return
|
||||
|
@ -358,7 +359,8 @@ function! ale#fix#Fix(buffer, fixing_flag, ...) abort
|
|||
\ 'There is no fixer named `%s`. Check :ALEFixSuggest',
|
||||
\ l:function_name,
|
||||
\)
|
||||
execute 'echom l:echo_message'
|
||||
" no-custom-checks
|
||||
echom l:echo_message
|
||||
endif
|
||||
|
||||
return 0
|
||||
|
@ -366,7 +368,8 @@ function! ale#fix#Fix(buffer, fixing_flag, ...) abort
|
|||
|
||||
if empty(l:callback_list)
|
||||
if a:fixing_flag is# ''
|
||||
execute 'echom ''No fixers have been defined. Try :ALEFixSuggest'''
|
||||
" no-custom-checks
|
||||
echom 'No fixers have been defined. Try :ALEFixSuggest'
|
||||
endif
|
||||
|
||||
return 0
|
||||
|
|
|
@ -37,6 +37,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['python'],
|
||||
\ 'description': 'Fix PEP8 issues with black.',
|
||||
\ },
|
||||
\ 'buf-format': {
|
||||
\ 'function': 'ale#fixers#buf_format#Fix',
|
||||
\ 'suggested_filetypes': ['proto'],
|
||||
\ 'description': 'Fix .proto files with buf format.',
|
||||
\ },
|
||||
\ 'buildifier': {
|
||||
\ 'function': 'ale#fixers#buildifier#Fix',
|
||||
\ 'suggested_filetypes': ['bzl'],
|
||||
|
@ -73,6 +78,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['dhall'],
|
||||
\ 'description': 'Standard code formatter for the Dhall language and removing dead code',
|
||||
\ },
|
||||
\ 'dune': {
|
||||
\ 'function': 'ale#fixers#dune#Fix',
|
||||
\ 'suggested_filetypes': ['dune'],
|
||||
\ 'description': 'Fix dune files with dune format',
|
||||
\ },
|
||||
\ 'fecs': {
|
||||
\ 'function': 'ale#fixers#fecs#Fix',
|
||||
\ 'suggested_filetypes': ['javascript', 'css', 'html'],
|
||||
|
@ -131,6 +141,11 @@ let s:default_registry = {
|
|||
\ 'description': 'Apply prettier-eslint to a file.',
|
||||
\ 'aliases': ['prettier-eslint'],
|
||||
\ },
|
||||
\ 'pyflyby': {
|
||||
\ 'function': 'ale#fixers#pyflyby#Fix',
|
||||
\ 'suggested_filetypes': ['python'],
|
||||
\ 'description': 'Tidy Python imports with pyflyby.',
|
||||
\ },
|
||||
\ 'importjs': {
|
||||
\ 'function': 'ale#fixers#importjs#Fix',
|
||||
\ 'suggested_filetypes': ['javascript'],
|
||||
|
@ -191,6 +206,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['ruby'],
|
||||
\ 'description': 'Fix ruby files with standardrb --fix',
|
||||
\ },
|
||||
\ 'statix': {
|
||||
\ 'function': 'ale#fixers#statix#Fix',
|
||||
\ 'suggested_filetypes': ['nix'],
|
||||
\ 'description': 'Fix common Nix antipatterns with statix fix',
|
||||
\ },
|
||||
\ 'stylelint': {
|
||||
\ 'function': 'ale#fixers#stylelint#Fix',
|
||||
\ 'suggested_filetypes': ['css', 'sass', 'scss', 'sugarss', 'stylus'],
|
||||
|
@ -216,6 +236,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['php'],
|
||||
\ 'description': 'Fix PHP files with php-cs-fixer.',
|
||||
\ },
|
||||
\ 'pint': {
|
||||
\ 'function': 'ale#fixers#pint#Fix',
|
||||
\ 'suggested_filetypes': ['php'],
|
||||
\ 'description': 'Fix PHP files with Laravel Pint.',
|
||||
\ },
|
||||
\ 'astyle': {
|
||||
\ 'function': 'ale#fixers#astyle#Fix',
|
||||
\ 'suggested_filetypes': ['c', 'cpp'],
|
||||
|
@ -246,6 +271,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['go'],
|
||||
\ 'description': 'Fix Go files with go fmt.',
|
||||
\ },
|
||||
\ 'gofumpt': {
|
||||
\ 'function': 'ale#fixers#gofumpt#Fix',
|
||||
\ 'suggested_filetypes': ['go'],
|
||||
\ 'description': 'Fix Go files with gofumpt, a stricter go fmt.',
|
||||
\ },
|
||||
\ 'goimports': {
|
||||
\ 'function': 'ale#fixers#goimports#Fix',
|
||||
\ 'suggested_filetypes': ['go'],
|
||||
|
@ -421,6 +451,16 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['hcl', 'terraform'],
|
||||
\ 'description': 'Fix tf and hcl files with terraform fmt.',
|
||||
\ },
|
||||
\ 'packer': {
|
||||
\ 'function': 'ale#fixers#packer#Fix',
|
||||
\ 'suggested_filetypes': ['hcl', 'packer'],
|
||||
\ 'description': 'Fix Packer HCL files with packer fmt.',
|
||||
\ },
|
||||
\ 'crystal': {
|
||||
\ 'function': 'ale#fixers#crystal#Fix',
|
||||
\ 'suggested_filetypes': ['cr'],
|
||||
\ 'description': 'Fix cr (crystal).',
|
||||
\ },
|
||||
\ 'ktlint': {
|
||||
\ 'function': 'ale#fixers#ktlint#Fix',
|
||||
\ 'suggested_filetypes': ['kt', 'kotlin'],
|
||||
|
@ -481,6 +521,11 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['lua'],
|
||||
\ 'description': 'Fix Lua files with luafmt.',
|
||||
\ },
|
||||
\ 'dprint': {
|
||||
\ 'function': 'ale#fixers#dprint#Fix',
|
||||
\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'markdown'],
|
||||
\ 'description': 'Pluggable and configurable code formatting platform',
|
||||
\ },
|
||||
\ 'stylua': {
|
||||
\ 'function': 'ale#fixers#stylua#Fix',
|
||||
\ 'suggested_filetypes': ['lua'],
|
||||
|
@ -501,10 +546,20 @@ let s:default_registry = {
|
|||
\ 'suggested_filetypes': ['pascal'],
|
||||
\ 'description': 'Fix Pascal files with ptop.',
|
||||
\ },
|
||||
\ 'opafmt': {
|
||||
\ 'function': 'ale#fixers#opafmt#Fix',
|
||||
\ 'suggested_filetypes': ['rego'],
|
||||
\ 'description': 'Fix rego files with opa fmt.',
|
||||
\ },
|
||||
\ 'vfmt': {
|
||||
\ 'function': 'ale#fixers#vfmt#Fix',
|
||||
\ 'suggested_filetypes': ['v'],
|
||||
\ 'description': 'A formatter for V source code.',
|
||||
\ },
|
||||
\ 'zigfmt': {
|
||||
\ 'function': 'ale#fixers#zigfmt#Fix',
|
||||
\ 'suggested_filetypes': ['zig'],
|
||||
\ 'description': 'Official formatter for Zig',
|
||||
\ }
|
||||
\}
|
||||
|
||||
|
|
|
@ -5,27 +5,13 @@ scriptencoding utf-8
|
|||
call ale#Set('sh_shfmt_executable', 'shfmt')
|
||||
call ale#Set('sh_shfmt_options', '')
|
||||
|
||||
function! s:DefaultOption(buffer) abort
|
||||
if getbufvar(a:buffer, '&expandtab') == 0
|
||||
" Tab is used by default
|
||||
return ''
|
||||
endif
|
||||
|
||||
let l:tabsize = getbufvar(a:buffer, '&shiftwidth')
|
||||
|
||||
if l:tabsize == 0
|
||||
let l:tabsize = getbufvar(a:buffer, '&tabstop')
|
||||
endif
|
||||
|
||||
return ' -i ' . l:tabsize
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#shfmt#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'sh_shfmt_executable')
|
||||
let l:options = ale#Var(a:buffer, 'sh_shfmt_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . (empty(l:options) ? s:DefaultOption(a:buffer) : ' ' . l:options)
|
||||
\ . ' -filename=%s'
|
||||
\ . (empty(l:options) ? '' : ' ' . l:options)
|
||||
\}
|
||||
endfunction
|
||||
|
|
|
@ -4,13 +4,30 @@
|
|||
call ale#Set('c_uncrustify_executable', 'uncrustify')
|
||||
call ale#Set('c_uncrustify_options', '')
|
||||
|
||||
let s:languages = {
|
||||
\ 'c': 'C',
|
||||
\ 'cpp': 'CPP',
|
||||
\ 'cs': 'CS',
|
||||
\ 'objc': 'OC',
|
||||
\ 'objcpp': 'OC+',
|
||||
\ 'd': 'D',
|
||||
\ 'java': 'JAVA',
|
||||
\ 'vala': 'VALA',
|
||||
\ 'p': 'PAWN',
|
||||
\}
|
||||
|
||||
function! ale#fixers#uncrustify#Language(buffer) abort
|
||||
return get(s:languages, &filetype, 'C')
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#uncrustify#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'c_uncrustify_executable')
|
||||
let l:options = ale#Var(a:buffer, 'c_uncrustify_options')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . ' --no-backup'
|
||||
\ . (empty(l:options) ? '' : ' ' . l:options)
|
||||
\ . ' --no-backup '
|
||||
\ . '-l' . ale#Pad(ale#fixers#uncrustify#Language(a:buffer))
|
||||
\ . ale#Pad(l:options)
|
||||
\}
|
||||
endfunction
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
|
||||
function! ale#floating_preview#Show(lines, ...) abort
|
||||
if !exists('*nvim_open_win') && !has('popupwin')
|
||||
execute 'echom ''Floating windows not supported in this vim instance.'''
|
||||
" no-custom-checks
|
||||
echom 'Floating windows not supported in this vim instance.'
|
||||
|
||||
return
|
||||
endif
|
||||
|
@ -105,18 +106,20 @@ function! s:NvimPrepareWindowContent(lines) abort
|
|||
let l:width += 2
|
||||
let l:height += 2
|
||||
|
||||
let l:hor = g:ale_floating_window_border[0]
|
||||
let l:top = g:ale_floating_window_border[1]
|
||||
let l:top_left = g:ale_floating_window_border[2]
|
||||
let l:top_right = g:ale_floating_window_border[3]
|
||||
let l:bottom_right = g:ale_floating_window_border[4]
|
||||
let l:bottom_left = g:ale_floating_window_border[5]
|
||||
let l:left = get(g:ale_floating_window_border, 0, '|')
|
||||
let l:top = get(g:ale_floating_window_border, 1, '-')
|
||||
let l:top_left = get(g:ale_floating_window_border, 2, '+')
|
||||
let l:top_right = get(g:ale_floating_window_border, 3, '+')
|
||||
let l:bottom_right = get(g:ale_floating_window_border, 4, '+')
|
||||
let l:bottom_left = get(g:ale_floating_window_border, 5, '+')
|
||||
let l:right = get(g:ale_floating_window_border, 6, l:left)
|
||||
let l:bottom = get(g:ale_floating_window_border, 7, l:top)
|
||||
|
||||
let l:lines = [l:top_left . repeat(l:top, l:width - 2) . l:top_right]
|
||||
|
||||
for l:line in a:lines
|
||||
let l:line_width = strchars(l:line)
|
||||
let l:lines = add(l:lines, l:hor . l:line . repeat(' ', l:width - l:line_width - 2). l:hor)
|
||||
let l:lines = add(l:lines, l:left . l:line . repeat(' ', l:width - l:line_width - 2). l:right)
|
||||
endfor
|
||||
|
||||
" Truncate the lines
|
||||
|
@ -124,7 +127,7 @@ function! s:NvimPrepareWindowContent(lines) abort
|
|||
let l:lines = l:lines[0:l:max_height]
|
||||
endif
|
||||
|
||||
let l:lines = add(l:lines, l:bottom_left . repeat(l:top, l:width - 2) . l:bottom_right)
|
||||
let l:lines = add(l:lines, l:bottom_left . repeat(l:bottom, l:width - 2) . l:bottom_right)
|
||||
|
||||
return [l:lines, l:width, l:height]
|
||||
endfunction
|
||||
|
@ -157,14 +160,14 @@ function! s:VimCreate(options) abort
|
|||
\ 'padding': [0, 1, 0, 1],
|
||||
\ 'border': [],
|
||||
\ 'borderchars': empty(g:ale_floating_window_border) ? [' '] : [
|
||||
\ g:ale_floating_window_border[1],
|
||||
\ g:ale_floating_window_border[0],
|
||||
\ g:ale_floating_window_border[1],
|
||||
\ g:ale_floating_window_border[0],
|
||||
\ g:ale_floating_window_border[2],
|
||||
\ g:ale_floating_window_border[3],
|
||||
\ g:ale_floating_window_border[4],
|
||||
\ g:ale_floating_window_border[5],
|
||||
\ get(g:ale_floating_window_border, 1, '-'),
|
||||
\ get(g:ale_floating_window_border, 6, '|'),
|
||||
\ get(g:ale_floating_window_border, 7, '-'),
|
||||
\ get(g:ale_floating_window_border, 0, '|'),
|
||||
\ get(g:ale_floating_window_border, 2, '+'),
|
||||
\ get(g:ale_floating_window_border, 3, '+'),
|
||||
\ get(g:ale_floating_window_border, 4, '+'),
|
||||
\ get(g:ale_floating_window_border, 5, '+'),
|
||||
\ ],
|
||||
\ 'moved': 'any',
|
||||
\ })
|
||||
|
|
|
@ -11,8 +11,9 @@ endfunction
|
|||
|
||||
function! ale#handlers#alex#CreateCommandCallback(flags) abort
|
||||
return {b -> ale#node#Executable(b, ale#handlers#alex#GetExecutable(b))
|
||||
\ . ' %s '
|
||||
\ . a:flags}
|
||||
\ . ' --stdin '
|
||||
\ . a:flags
|
||||
\}
|
||||
endfunction
|
||||
|
||||
function! ale#handlers#alex#Handle(buffer, lines) abort
|
||||
|
@ -38,6 +39,7 @@ endfunction
|
|||
" Define a linter for a specific filetype. Accept flags to adapt to the filetype.
|
||||
" no flags treat input as markdown
|
||||
" --html treat input as HTML
|
||||
" --mdx treat input as MDX
|
||||
" --text treat input as plaintext
|
||||
function! ale#handlers#alex#DefineLinter(filetype, flags) abort
|
||||
call ale#Set('alex_executable', 'alex')
|
||||
|
@ -49,6 +51,5 @@ function! ale#handlers#alex#DefineLinter(filetype, flags) abort
|
|||
\ 'command': ale#handlers#alex#CreateCommandCallback(a:flags),
|
||||
\ 'output_stream': 'stderr',
|
||||
\ 'callback': 'ale#handlers#alex#Handle',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
endfunction
|
||||
|
|
|
@ -19,6 +19,18 @@ function! ale#handlers#cppcheck#GetBufferPathIncludeOptions(buffer) abort
|
|||
endfunction
|
||||
|
||||
function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort
|
||||
" The compile_commands.json doesn't apply to headers and cppheck will
|
||||
" bail out if it cannot find a file matching the filter, below. Skip out
|
||||
" now, for headers. Also, suppress FPs; cppcheck is not meant to
|
||||
" process lone header files.
|
||||
let b:buffer_name = bufname(a:buffer)
|
||||
let b:file_extension = fnamemodify(b:buffer_name, ':e')
|
||||
|
||||
if b:file_extension is# 'h' || b:file_extension is# 'hpp'
|
||||
return ale#handlers#cppcheck#GetBufferPathIncludeOptions(a:buffer)
|
||||
\ . ' --suppress=unusedStructMember'
|
||||
endif
|
||||
|
||||
" If the current buffer is modified, using compile_commands.json does no
|
||||
" good, so include the file's directory instead. It's not quite as good as
|
||||
" using --project, but is at least equivalent to running cppcheck on this
|
||||
|
@ -35,8 +47,10 @@ function! ale#handlers#cppcheck#GetCompileCommandsOptions(buffer) abort
|
|||
" then use the file to set up import paths, etc.
|
||||
let [l:dir, l:json_path] = ale#c#FindCompileCommands(a:buffer)
|
||||
|
||||
" By default, cppcheck processes every config in compile_commands.json.
|
||||
" Use --file-filter to limit to just the buffer file.
|
||||
return !empty(l:json_path)
|
||||
\ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ])
|
||||
\ ? '--project=' . ale#Escape(l:json_path[len(l:dir) + 1: ]) . ' --file-filter=' . ale#Escape(bufname(a:buffer))
|
||||
\ : ''
|
||||
endfunction
|
||||
|
||||
|
@ -50,7 +64,12 @@ function! ale#handlers#cppcheck#HandleCppCheckFormat(buffer, lines) abort
|
|||
"test.cpp:974:{column}: error:{inconclusive:inconclusive} Array 'n[3]' accessed at index 3, which is out of bounds. [arrayIndexOutOfBounds]\
|
||||
" n[3]=3;
|
||||
" ^
|
||||
let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(\w+)\]\'
|
||||
"
|
||||
"" OR if using the misra addon:
|
||||
"test.c:1:16: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.7]\'
|
||||
"void test( int parm ) {}
|
||||
" ^
|
||||
let l:pattern = '\v(\f+):(\d+):(\d+|\{column\}): (\w+):(\{inconclusive:inconclusive\})? ?(.*) \[(%(\w[-.]?)+)\]\'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
|
|
|
@ -19,6 +19,16 @@ let s:temp_regex_prefix =
|
|||
\ . substitute(s:temp_dir, '\\', '\\\\', 'g')
|
||||
\ . '\.\{-}'
|
||||
|
||||
function! s:PanicOutput(lines) abort
|
||||
return [{
|
||||
\ 'lnum': 1,
|
||||
\ 'col': 1,
|
||||
\ 'text': 'ghc panic!',
|
||||
\ 'type': 'E',
|
||||
\ 'detail' : join(a:lines, "\n"),
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#handlers#haskell#HandleGHCFormat(buffer, lines) abort
|
||||
" Look for lines like the following.
|
||||
"
|
||||
|
@ -34,6 +44,14 @@ function! ale#handlers#haskell#HandleGHCFormat(buffer, lines) abort
|
|||
|
||||
let l:corrected_lines = []
|
||||
|
||||
" If ghc panic error, put the whole message in details and exit.
|
||||
let l:panic_position = match(a:lines,'ghc: panic!')
|
||||
let l:panic_end = match(a:lines,'Please report this as a GHC bug:')
|
||||
|
||||
if l:panic_position >= 0
|
||||
return s:PanicOutput(a:lines[l:panic_position : l:panic_end])
|
||||
endif
|
||||
|
||||
" Group the lines into smaller lists.
|
||||
for l:line in a:lines
|
||||
if len(matchlist(l:line, l:pattern)) > 0
|
||||
|
|
|
@ -63,26 +63,35 @@ function! ale#handlers#sml#Handle(buffer, lines) abort
|
|||
let l:match2 = matchlist(l:line, l:pattern2)
|
||||
|
||||
if len(l:match2) != 0
|
||||
call add(l:out, {
|
||||
\ 'filename': l:match2[1],
|
||||
if l:match2[1] =~# 'stdIn$'
|
||||
let l:loc = {'bufnr': a:buffer}
|
||||
else
|
||||
let l:loc = {'filename': l:match2[1]}
|
||||
endif
|
||||
|
||||
call add(l:out, extend(l:loc, {
|
||||
\ 'lnum': l:match2[2] + 0,
|
||||
\ 'col' : l:match2[3] - 1,
|
||||
\ 'text': l:match2[4],
|
||||
\ 'type': l:match2[4] =~# '^Warning' ? 'W' : 'E',
|
||||
\})
|
||||
|
||||
\}))
|
||||
continue
|
||||
endif
|
||||
|
||||
let l:match = matchlist(l:line, l:pattern)
|
||||
|
||||
if len(l:match) != 0
|
||||
call add(l:out, {
|
||||
\ 'filename': l:match[1],
|
||||
if l:match[1] =~# 'stdIn$'
|
||||
let l:loc = {'bufnr': a:buffer}
|
||||
else
|
||||
let l:loc = {'filename': l:match[1]}
|
||||
endif
|
||||
|
||||
call add(l:out, extend(l:loc, {
|
||||
\ 'lnum': l:match[2] + 0,
|
||||
\ 'text': l:match[3] . ': ' . l:match[4],
|
||||
\ 'type': l:match[3] is# 'error' ? 'E' : 'W',
|
||||
\})
|
||||
\}))
|
||||
continue
|
||||
endif
|
||||
endfor
|
||||
|
|
|
@ -22,6 +22,26 @@ if !hlexists('ALEInfo')
|
|||
highlight link ALEInfo ALEWarning
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextError')
|
||||
highlight link ALEVirtualTextError ALEError
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextStyleError')
|
||||
highlight link ALEVirtualTextStyleError ALEVirtualTextError
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextWarning')
|
||||
highlight link ALEVirtualTextWarning ALEWarning
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextStyleWarning')
|
||||
highlight link ALEVirtualTextStyleWarning ALEVirtualTextWarning
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextInfo')
|
||||
highlight link ALEVirtualTextInfo ALEVirtualTextWarning
|
||||
endif
|
||||
|
||||
" The maximum number of items for the second argument of matchaddpos()
|
||||
let s:MAX_POS_VALUES = 8
|
||||
let s:MAX_COL_SIZE = 1073741824 " pow(2, 30)
|
||||
|
|
|
@ -46,7 +46,7 @@ function! ale#hover#HandleTSServerResponse(conn_id, response) abort
|
|||
call balloon_show(a:response.body.displayString)
|
||||
elseif get(l:options, 'truncated_echo', 0)
|
||||
if !empty(a:response.body.displayString)
|
||||
call ale#cursor#TruncatedEcho(split(a:response.body.displayString, "\n")[0])
|
||||
call ale#cursor#TruncatedEcho(a:response.body.displayString)
|
||||
endif
|
||||
elseif g:ale_hover_to_floating_preview || g:ale_floating_preview
|
||||
call ale#floating_preview#Show(split(a:response.body.displayString, "\n"), {
|
||||
|
@ -231,7 +231,11 @@ function! ale#hover#HandleLSPResponse(conn_id, response) abort
|
|||
\&& (l:set_balloons is 1 || l:set_balloons is# 'hover')
|
||||
call balloon_show(join(l:lines, "\n"))
|
||||
elseif get(l:options, 'truncated_echo', 0)
|
||||
call ale#cursor#TruncatedEcho(l:lines[0])
|
||||
if type(l:lines[0]) is# v:t_list
|
||||
call ale#cursor#TruncatedEcho(join(l:lines[0], '\n'))
|
||||
else
|
||||
call ale#cursor#TruncatedEcho(l:lines[0])
|
||||
endif
|
||||
elseif g:ale_hover_to_floating_preview || g:ale_floating_preview
|
||||
call ale#floating_preview#Show(l:lines, {
|
||||
\ 'filetype': 'ale-preview.message',
|
||||
|
|
|
@ -187,10 +187,16 @@ function! ale#job#PrepareCommand(buffer, command) abort
|
|||
\ : a:command
|
||||
|
||||
" If a custom shell is specified, use that.
|
||||
if exists('g:ale_shell')
|
||||
let l:shell_arguments = get(g:, 'ale_shell_arguments', &shellcmdflag)
|
||||
if exists('b:ale_shell')
|
||||
let l:ale_shell = b:ale_shell
|
||||
elseif exists('g:ale_shell')
|
||||
let l:ale_shell = g:ale_shell
|
||||
endif
|
||||
|
||||
return split(g:ale_shell) + split(l:shell_arguments) + [l:command]
|
||||
if exists('l:ale_shell')
|
||||
let l:shell_arguments = get(b:, 'ale_shell_arguments', get(g:, 'ale_shell_arguments', &shellcmdflag))
|
||||
|
||||
return split(l:ale_shell) + split(l:shell_arguments) + [l:command]
|
||||
endif
|
||||
|
||||
if has('win32')
|
||||
|
@ -244,10 +250,16 @@ function! ale#job#Start(command, options) abort
|
|||
|
||||
if has_key(a:options, 'out_cb')
|
||||
let l:job_options.out_cb = function('s:VimOutputCallback')
|
||||
else
|
||||
" prevent buffering of output and excessive polling in case close_cb is set
|
||||
let l:job_options.out_cb = {->0}
|
||||
endif
|
||||
|
||||
if has_key(a:options, 'err_cb')
|
||||
let l:job_options.err_cb = function('s:VimErrorCallback')
|
||||
else
|
||||
" prevent buffering of output and excessive polling in case close_cb is set
|
||||
let l:job_options.err_cb = {->0}
|
||||
endif
|
||||
|
||||
if has_key(a:options, 'exit_cb')
|
||||
|
|
|
@ -19,6 +19,7 @@ let s:default_ale_linter_aliases = {
|
|||
\ 'rmd': 'r',
|
||||
\ 'systemverilog': 'verilog',
|
||||
\ 'typescriptreact': ['typescript', 'tsx'],
|
||||
\ 'vader': ['vim', 'vader'],
|
||||
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
|
||||
\ 'vimwiki': 'markdown',
|
||||
\ 'vue': ['vue', 'javascript'],
|
||||
|
@ -45,15 +46,20 @@ let s:default_ale_linters = {
|
|||
\ 'hack': ['hack'],
|
||||
\ 'help': [],
|
||||
\ 'inko': ['inko'],
|
||||
\ 'json': ['jsonlint', 'spectral', 'vscodejson'],
|
||||
\ 'json5': [],
|
||||
\ 'jsonc': [],
|
||||
\ 'perl': ['perlcritic'],
|
||||
\ 'perl6': [],
|
||||
\ 'python': ['flake8', 'mypy', 'pylint', 'pyright'],
|
||||
\ 'rust': ['cargo', 'rls'],
|
||||
\ 'spec': [],
|
||||
\ 'text': [],
|
||||
\ 'vader': ['vimls'],
|
||||
\ 'vue': ['eslint', 'vls'],
|
||||
\ 'zsh': ['shell'],
|
||||
\ 'v': ['v'],
|
||||
\ 'yaml': ['spectral', 'yaml-language-server', 'yamllint'],
|
||||
\}
|
||||
|
||||
" Testing/debugging helper to unload all linters.
|
||||
|
|
|
@ -36,12 +36,22 @@ function! ale#list#IsQuickfixOpen() abort
|
|||
endfunction
|
||||
|
||||
" Check if we should open the list, based on the save event being fired, and
|
||||
" that setting being on, or the setting just being set to `1`.
|
||||
function! s:ShouldOpen(buffer) abort
|
||||
" that setting being on, or that the error count is at least as high as the
|
||||
" setting when set to an integer value.
|
||||
function! s:ShouldOpen(buffer, loclist_len) abort
|
||||
let l:val = ale#Var(a:buffer, 'open_list')
|
||||
let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0)
|
||||
|
||||
return l:val is 1 || (l:val is# 'on_save' && l:saved)
|
||||
return l:val > 0 ? a:loclist_len >= l:val : l:val is# 'on_save' && l:saved
|
||||
endfunction
|
||||
|
||||
" Check if we should close the list, based on the save event being fired, and
|
||||
" that setting being on, or the setting just being set to an integer value.
|
||||
function! s:ShouldClose(buffer) abort
|
||||
let l:val = ale#Var(a:buffer, 'open_list')
|
||||
let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0)
|
||||
|
||||
return !((l:val >= 1) || (l:val is# 'on_save' && l:saved))
|
||||
endfunction
|
||||
|
||||
function! s:Deduplicate(list) abort
|
||||
|
@ -122,9 +132,9 @@ function! s:SetListsImpl(timer_id, buffer, loclist) abort
|
|||
|
||||
" Open a window to show the problems if we need to.
|
||||
"
|
||||
" We'll check if the current buffer's List is not empty here, so the
|
||||
" window will only be opened if the current buffer has problems.
|
||||
if s:ShouldOpen(a:buffer) && !empty(a:loclist)
|
||||
" ShouldOpen() checks if the current buffer has enough problems to be
|
||||
" opened.
|
||||
if s:ShouldOpen(a:buffer, len(a:loclist))
|
||||
let l:winnr = winnr()
|
||||
let l:mode = mode()
|
||||
|
||||
|
@ -212,8 +222,25 @@ function! ale#list#SetLists(buffer, loclist) abort
|
|||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#list#ForcePopulateErrorList(populate_quickfix) abort
|
||||
let l:quickfix_bak = g:ale_set_quickfix
|
||||
let g:ale_set_quickfix = a:populate_quickfix
|
||||
let l:loclist_bak = g:ale_set_loclist
|
||||
let g:ale_set_loclist = !a:populate_quickfix
|
||||
let l:open_list_bak = g:ale_open_list
|
||||
let g:ale_open_list = 1
|
||||
|
||||
let l:buffer = bufnr('')
|
||||
let l:loclist = get(g:ale_buffer_info, l:buffer, {'loclist': []}).loclist
|
||||
call s:SetListsImpl(-1, l:buffer, l:loclist)
|
||||
|
||||
let g:ale_open_list = l:open_list_bak
|
||||
let g:ale_set_loclist = l:loclist_bak
|
||||
let g:ale_set_quickfix = l:quickfix_bak
|
||||
endfunction
|
||||
|
||||
function! s:CloseWindowIfNeeded(buffer) abort
|
||||
if ale#Var(a:buffer, 'keep_list_window_open') || !s:ShouldOpen(a:buffer)
|
||||
if ale#Var(a:buffer, 'keep_list_window_open') || s:ShouldClose(a:buffer)
|
||||
return
|
||||
endif
|
||||
|
||||
|
|
|
@ -38,11 +38,13 @@ function! ale#lsp#Register(executable_or_address, project, init_options) abort
|
|||
\ 'capabilities': {
|
||||
\ 'hover': 0,
|
||||
\ 'rename': 0,
|
||||
\ 'filerename': 0,
|
||||
\ 'references': 0,
|
||||
\ 'completion': 0,
|
||||
\ 'completion_trigger_characters': [],
|
||||
\ 'definition': 0,
|
||||
\ 'typeDefinition': 0,
|
||||
\ 'implementation': 0,
|
||||
\ 'symbol_search': 0,
|
||||
\ 'code_actions': 0,
|
||||
\ 'did_save': 0,
|
||||
|
@ -258,6 +260,14 @@ function! s:UpdateCapabilities(conn, capabilities) abort
|
|||
let a:conn.capabilities.typeDefinition = 1
|
||||
endif
|
||||
|
||||
if get(a:capabilities, 'implementationProvider') is v:true
|
||||
let a:conn.capabilities.implementation = 1
|
||||
endif
|
||||
|
||||
if type(get(a:capabilities, 'implementationProvider')) is v:t_dict
|
||||
let a:conn.capabilities.implementation = 1
|
||||
endif
|
||||
|
||||
if get(a:capabilities, 'workspaceSymbolProvider') is v:true
|
||||
let a:conn.capabilities.symbol_search = 1
|
||||
endif
|
||||
|
@ -378,8 +388,10 @@ function! ale#lsp#MarkConnectionAsTsserver(conn_id) abort
|
|||
let l:conn.capabilities.completion_trigger_characters = ['.']
|
||||
let l:conn.capabilities.definition = 1
|
||||
let l:conn.capabilities.typeDefinition = 1
|
||||
let l:conn.capabilities.implementation = 1
|
||||
let l:conn.capabilities.symbol_search = 1
|
||||
let l:conn.capabilities.rename = 1
|
||||
let l:conn.capabilities.filerename = 1
|
||||
let l:conn.capabilities.code_actions = 1
|
||||
endfunction
|
||||
|
||||
|
@ -436,11 +448,20 @@ function! s:SendInitMessage(conn) abort
|
|||
\ 'typeDefinition': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
\ },
|
||||
\ 'implementation': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
\ 'linkSupport': v:false,
|
||||
\ },
|
||||
\ 'publishDiagnostics': {
|
||||
\ 'relatedInformation': v:true,
|
||||
\ },
|
||||
\ 'codeAction': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
\ 'codeActionLiteralSupport': {
|
||||
\ 'codeActionKind': {
|
||||
\ 'valueSet': []
|
||||
\ }
|
||||
\ }
|
||||
\ },
|
||||
\ 'rename': {
|
||||
\ 'dynamicRegistration': v:false,
|
||||
|
@ -465,6 +486,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort
|
|||
let l:options = {
|
||||
\ 'mode': 'raw',
|
||||
\ 'out_cb': {_, message -> ale#lsp#HandleMessage(a:conn_id, message)},
|
||||
\ 'exit_cb': { -> ale#lsp#Stop(a:conn_id) },
|
||||
\}
|
||||
|
||||
if has('win32')
|
||||
|
|
|
@ -35,7 +35,7 @@ function! ale#lsp#message#Initialize(root_path, options, capabilities) abort
|
|||
\ 'rootPath': a:root_path,
|
||||
\ 'capabilities': a:capabilities,
|
||||
\ 'initializationOptions': a:options,
|
||||
\ 'rootUri': ale#path#ToURI(a:root_path),
|
||||
\ 'rootUri': ale#util#ToURI(a:root_path),
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
|
@ -56,7 +56,7 @@ function! ale#lsp#message#DidOpen(buffer, language_id) abort
|
|||
|
||||
return [1, 'textDocument/didOpen', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'languageId': a:language_id,
|
||||
\ 'version': ale#lsp#message#GetNextVersionID(),
|
||||
\ 'text': join(l:lines, "\n") . "\n",
|
||||
|
@ -70,21 +70,21 @@ function! ale#lsp#message#DidChange(buffer) abort
|
|||
" For changes, we simply send the full text of the document to the server.
|
||||
return [1, 'textDocument/didChange', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'version': ale#lsp#message#GetNextVersionID(),
|
||||
\ },
|
||||
\ 'contentChanges': [{'text': join(l:lines, "\n") . "\n"}]
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#message#DidSave(buffer, includeText) abort
|
||||
function! ale#lsp#message#DidSave(buffer, include_text) abort
|
||||
let l:response = [1, 'textDocument/didSave', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\}]
|
||||
|
||||
if a:includeText
|
||||
if a:include_text
|
||||
let l:response[2].textDocument.version = ale#lsp#message#GetNextVersionID()
|
||||
let l:response[2].text = ale#util#GetBufferContents(a:buffer)
|
||||
endif
|
||||
|
@ -95,7 +95,7 @@ endfunction
|
|||
function! ale#lsp#message#DidClose(buffer) abort
|
||||
return [1, 'textDocument/didClose', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\}]
|
||||
endfunction
|
||||
|
@ -106,7 +106,7 @@ let s:COMPLETION_TRIGGER_CHARACTER = 2
|
|||
function! ale#lsp#message#Completion(buffer, line, column, trigger_character) abort
|
||||
let l:message = [0, 'textDocument/completion', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\}]
|
||||
|
@ -124,7 +124,7 @@ endfunction
|
|||
function! ale#lsp#message#Definition(buffer, line, column) abort
|
||||
return [0, 'textDocument/definition', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\}]
|
||||
|
@ -133,7 +133,16 @@ endfunction
|
|||
function! ale#lsp#message#TypeDefinition(buffer, line, column) abort
|
||||
return [0, 'textDocument/typeDefinition', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#message#Implementation(buffer, line, column) abort
|
||||
return [0, 'textDocument/implementation', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\}]
|
||||
|
@ -142,7 +151,7 @@ endfunction
|
|||
function! ale#lsp#message#References(buffer, line, column) abort
|
||||
return [0, 'textDocument/references', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\ 'context': {'includeDeclaration': v:false},
|
||||
|
@ -158,7 +167,7 @@ endfunction
|
|||
function! ale#lsp#message#Hover(buffer, line, column) abort
|
||||
return [0, 'textDocument/hover', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\}]
|
||||
|
@ -173,7 +182,7 @@ endfunction
|
|||
function! ale#lsp#message#Rename(buffer, line, column, new_name) abort
|
||||
return [0, 'textDocument/rename', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'position': {'line': a:line - 1, 'character': a:column - 1},
|
||||
\ 'newName': a:new_name,
|
||||
|
@ -183,7 +192,7 @@ endfunction
|
|||
function! ale#lsp#message#CodeAction(buffer, line, column, end_line, end_column, diagnostics) abort
|
||||
return [0, 'textDocument/codeAction', {
|
||||
\ 'textDocument': {
|
||||
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ 'uri': ale#util#ToURI(expand('#' . a:buffer . ':p')),
|
||||
\ },
|
||||
\ 'range': {
|
||||
\ 'start': {'line': a:line - 1, 'character': a:column - 1},
|
||||
|
|
|
@ -59,7 +59,7 @@ function! ale#lsp#response#ReadDiagnostics(response) abort
|
|||
\ && l:diagnostic.relatedInformation isnot v:null
|
||||
let l:related = deepcopy(l:diagnostic.relatedInformation)
|
||||
call map(l:related, {key, val ->
|
||||
\ ale#path#FromURI(val.location.uri) .
|
||||
\ ale#util#ToResource(val.location.uri) .
|
||||
\ ':' . (val.location.range.start.line + 1) .
|
||||
\ ':' . (val.location.range.start.character + 1) .
|
||||
\ ":\n\t" . val.message
|
||||
|
|
|
@ -72,6 +72,14 @@ function! ale#lsp#tsserver_message#TypeDefinition(buffer, line, column) abort
|
|||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#tsserver_message#Implementation(buffer, line, column) abort
|
||||
return [0, 'ts@implementation', {
|
||||
\ 'line': a:line,
|
||||
\ 'offset': a:column,
|
||||
\ 'file': expand('#' . a:buffer . ':p'),
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#tsserver_message#References(buffer, line, column) abort
|
||||
return [0, 'ts@references', {
|
||||
\ 'line': a:line,
|
||||
|
@ -101,6 +109,14 @@ function! ale#lsp#tsserver_message#Rename(
|
|||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#tsserver_message#GetEditsForFileRename(
|
||||
\ oldFilePath, newFilePath) abort
|
||||
return [0, 'ts@getEditsForFileRename', {
|
||||
\ 'oldFilePath': a:oldFilePath,
|
||||
\ 'newFilePath': a:newFilePath,
|
||||
\}]
|
||||
endfunction
|
||||
|
||||
function! ale#lsp#tsserver_message#OrganizeImports(buffer) abort
|
||||
return [0, 'ts@organizeImports', {
|
||||
\ 'scope': {
|
||||
|
|
|
@ -11,6 +11,22 @@ endif
|
|||
" A Dictionary to track one-shot handlers for custom LSP requests
|
||||
let s:custom_handlers_map = get(s:, 'custom_handlers_map', {})
|
||||
|
||||
" Clear LSP linter data for the linting engine.
|
||||
function! ale#lsp_linter#ClearLSPData() abort
|
||||
let s:lsp_linter_map = {}
|
||||
let s:custom_handlers_map = {}
|
||||
endfunction
|
||||
|
||||
" Only for internal use.
|
||||
function! ale#lsp_linter#GetLSPLinterMap() abort
|
||||
return s:lsp_linter_map
|
||||
endfunction
|
||||
|
||||
" Just for tests.
|
||||
function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort
|
||||
let s:lsp_linter_map = a:replacement_map
|
||||
endfunction
|
||||
|
||||
" Check if diagnostics for a particular linter should be ignored.
|
||||
function! s:ShouldIgnore(buffer, linter_name) abort
|
||||
" Ignore all diagnostics if LSP integration is disabled.
|
||||
|
@ -33,7 +49,7 @@ endfunction
|
|||
|
||||
function! s:HandleLSPDiagnostics(conn_id, response) abort
|
||||
let l:linter_name = s:lsp_linter_map[a:conn_id]
|
||||
let l:filename = ale#path#FromURI(a:response.params.uri)
|
||||
let l:filename = ale#util#ToResource(a:response.params.uri)
|
||||
let l:escaped_name = escape(
|
||||
\ fnameescape(l:filename),
|
||||
\ has('win32') ? '^' : '^,}]'
|
||||
|
@ -466,8 +482,8 @@ function! s:CheckWithLSP(linter, details) abort
|
|||
" If this was a file save event, also notify the server of that.
|
||||
if a:linter.lsp isnot# 'tsserver'
|
||||
\&& getbufvar(l:buffer, 'ale_save_event_fired', 0)
|
||||
\&& ale#lsp#HasCapability(l:buffer, 'did_save')
|
||||
let l:include_text = ale#lsp#HasCapability(l:buffer, 'includeText')
|
||||
\&& ale#lsp#HasCapability(l:id, 'did_save')
|
||||
let l:include_text = ale#lsp#HasCapability(l:id, 'includeText')
|
||||
let l:save_message = ale#lsp#message#DidSave(l:buffer, l:include_text)
|
||||
let l:notified = ale#lsp#Send(l:id, l:save_message) != 0
|
||||
endif
|
||||
|
@ -477,17 +493,6 @@ function! ale#lsp_linter#CheckWithLSP(buffer, linter) abort
|
|||
return ale#lsp_linter#StartLSP(a:buffer, a:linter, function('s:CheckWithLSP'))
|
||||
endfunction
|
||||
|
||||
" Clear LSP linter data for the linting engine.
|
||||
function! ale#lsp_linter#ClearLSPData() abort
|
||||
let s:lsp_linter_map = {}
|
||||
let s:custom_handlers_map = {}
|
||||
endfunction
|
||||
|
||||
" Just for tests.
|
||||
function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort
|
||||
let s:lsp_linter_map = a:replacement_map
|
||||
endfunction
|
||||
|
||||
function! s:HandleLSPResponseToCustomRequests(conn_id, response) abort
|
||||
if has_key(a:response, 'id')
|
||||
\&& has_key(s:custom_handlers_map, a:response.id)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
" Author: Jerko Steiner <jerko.steiner@gmail.com>
|
||||
" Description: Organize imports support for tsserver
|
||||
"
|
||||
|
||||
function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort
|
||||
if get(a:response, 'command', '') isnot# 'organizeImports'
|
||||
return
|
||||
|
@ -17,7 +17,10 @@ function! ale#organize_imports#HandleTSServerResponse(conn_id, response) abort
|
|||
\ 'description': 'Organize Imports',
|
||||
\ 'changes': l:file_code_edits,
|
||||
\ },
|
||||
\ {}
|
||||
\ {
|
||||
\ 'conn_id': a:conn_id,
|
||||
\ 'should_save': !&hidden,
|
||||
\ },
|
||||
\)
|
||||
endfunction
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ endfunction
|
|||
" Convert a filesystem path to a file:// URI
|
||||
" relatives paths will not be prefixed with the protocol.
|
||||
" For Windows paths, the `:` in C:\ etc. will not be percent-encoded.
|
||||
function! ale#path#ToURI(path) abort
|
||||
function! ale#path#ToFileURI(path) abort
|
||||
let l:has_drive_letter = a:path[1:2] is# ':\'
|
||||
|
||||
return substitute(
|
||||
|
@ -231,7 +231,7 @@ function! ale#path#ToURI(path) abort
|
|||
\)
|
||||
endfunction
|
||||
|
||||
function! ale#path#FromURI(uri) abort
|
||||
function! ale#path#FromFileURI(uri) abort
|
||||
if a:uri[:6] is? 'file://'
|
||||
let l:encoded_path = a:uri[7:]
|
||||
elseif a:uri[:4] is? 'file:'
|
||||
|
|
|
@ -26,6 +26,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
|||
\|| filereadable(l:path . '/tox.ini')
|
||||
\|| filereadable(l:path . '/.pyre_configuration.local')
|
||||
\|| filereadable(l:path . '/mypy.ini')
|
||||
\|| filereadable(l:path . '/.mypy.ini')
|
||||
\|| filereadable(l:path . '/pycodestyle.cfg')
|
||||
\|| filereadable(l:path . '/.flake8')
|
||||
\|| filereadable(l:path . '/.flake8rc')
|
||||
|
|
|
@ -16,6 +16,23 @@ function! ale#references#ClearLSPData() abort
|
|||
let s:references_map = {}
|
||||
endfunction
|
||||
|
||||
function! ale#references#FormatTSResponseItem(response_item, options) abort
|
||||
if get(a:options, 'open_in') is# 'quickfix'
|
||||
return {
|
||||
\ 'filename': a:response_item.file,
|
||||
\ 'lnum': a:response_item.start.line,
|
||||
\ 'col': a:response_item.start.offset,
|
||||
\}
|
||||
else
|
||||
return {
|
||||
\ 'filename': a:response_item.file,
|
||||
\ 'line': a:response_item.start.line,
|
||||
\ 'column': a:response_item.start.offset,
|
||||
\ 'match': substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''),
|
||||
\}
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#references#HandleTSServerResponse(conn_id, response) abort
|
||||
if get(a:response, 'command', '') is# 'references'
|
||||
\&& has_key(s:references_map, a:response.request_seq)
|
||||
|
@ -25,23 +42,43 @@ function! ale#references#HandleTSServerResponse(conn_id, response) abort
|
|||
let l:item_list = []
|
||||
|
||||
for l:response_item in a:response.body.refs
|
||||
call add(l:item_list, {
|
||||
\ 'filename': l:response_item.file,
|
||||
\ 'line': l:response_item.start.line,
|
||||
\ 'column': l:response_item.start.offset,
|
||||
\ 'match': substitute(l:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''),
|
||||
\})
|
||||
call add(
|
||||
\ l:item_list,
|
||||
\ ale#references#FormatTSResponseItem(l:response_item, l:options)
|
||||
\)
|
||||
endfor
|
||||
|
||||
if empty(l:item_list)
|
||||
call ale#util#Execute('echom ''No references found.''')
|
||||
else
|
||||
call ale#preview#ShowSelection(l:item_list, l:options)
|
||||
if get(l:options, 'open_in') is# 'quickfix'
|
||||
call setqflist([], 'r')
|
||||
call setqflist(l:item_list, 'a')
|
||||
call ale#util#Execute('cc 1')
|
||||
else
|
||||
call ale#preview#ShowSelection(l:item_list, l:options)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#references#FormatLSPResponseItem(response_item, options) abort
|
||||
if get(a:options, 'open_in') is# 'quickfix'
|
||||
return {
|
||||
\ 'filename': ale#util#ToResource(a:response_item.uri),
|
||||
\ 'lnum': a:response_item.range.start.line + 1,
|
||||
\ 'col': a:response_item.range.start.character + 1,
|
||||
\}
|
||||
else
|
||||
return {
|
||||
\ 'filename': ale#util#ToResource(a:response_item.uri),
|
||||
\ 'line': a:response_item.range.start.line + 1,
|
||||
\ 'column': a:response_item.range.start.character + 1,
|
||||
\}
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#references#HandleLSPResponse(conn_id, response) abort
|
||||
if has_key(a:response, 'id')
|
||||
\&& has_key(s:references_map, a:response.id)
|
||||
|
@ -53,18 +90,22 @@ function! ale#references#HandleLSPResponse(conn_id, response) abort
|
|||
|
||||
if type(l:result) is v:t_list
|
||||
for l:response_item in l:result
|
||||
call add(l:item_list, {
|
||||
\ 'filename': ale#path#FromURI(l:response_item.uri),
|
||||
\ 'line': l:response_item.range.start.line + 1,
|
||||
\ 'column': l:response_item.range.start.character + 1,
|
||||
\})
|
||||
call add(l:item_list,
|
||||
\ ale#references#FormatLSPResponseItem(l:response_item, l:options)
|
||||
\)
|
||||
endfor
|
||||
endif
|
||||
|
||||
if empty(l:item_list)
|
||||
call ale#util#Execute('echom ''No references found.''')
|
||||
else
|
||||
call ale#preview#ShowSelection(l:item_list, l:options)
|
||||
if get(l:options, 'open_in') is# 'quickfix'
|
||||
call setqflist([], 'r')
|
||||
call setqflist(l:item_list, 'a')
|
||||
call ale#util#Execute('cc 1')
|
||||
else
|
||||
call ale#preview#ShowSelection(l:item_list, l:options)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
@ -119,6 +160,8 @@ function! ale#references#Find(...) abort
|
|||
let l:options.open_in = 'split'
|
||||
elseif l:option is? '-vsplit'
|
||||
let l:options.open_in = 'vsplit'
|
||||
elseif l:option is? '-quickfix'
|
||||
let l:options.open_in = 'quickfix'
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
|
|
|
@ -84,7 +84,8 @@ function! ale#rename#HandleTSServerResponse(conn_id, response) abort
|
|||
\ 'changes': l:changes,
|
||||
\ },
|
||||
\ {
|
||||
\ 'should_save': 1,
|
||||
\ 'conn_id': a:conn_id,
|
||||
\ 'should_save': !&hidden,
|
||||
\ },
|
||||
\)
|
||||
endfunction
|
||||
|
@ -116,7 +117,8 @@ function! ale#rename#HandleLSPResponse(conn_id, response) abort
|
|||
\ 'changes': l:changes,
|
||||
\ },
|
||||
\ {
|
||||
\ 'should_save': 1,
|
||||
\ 'conn_id': a:conn_id,
|
||||
\ 'should_save': !&hidden,
|
||||
\ },
|
||||
\)
|
||||
endif
|
||||
|
|
|
@ -41,7 +41,7 @@ function! ale#symbol#HandleLSPResponse(conn_id, response) abort
|
|||
let l:location = l:response_item.location
|
||||
|
||||
call add(l:item_list, {
|
||||
\ 'filename': ale#path#FromURI(l:location.uri),
|
||||
\ 'filename': ale#util#ToResource(l:location.uri),
|
||||
\ 'line': l:location.range.start.line + 1,
|
||||
\ 'column': l:location.range.start.character + 1,
|
||||
\ 'match': l:response_item.name,
|
||||
|
|
|
@ -62,25 +62,34 @@ function! ale#test#SetFilename(path) abort
|
|||
silent! noautocmd execute 'file ' . fnameescape(l:full_path)
|
||||
endfunction
|
||||
|
||||
function! s:RemoveModule(results) abort
|
||||
function! RemoveNewerKeys(results) abort
|
||||
for l:item in a:results
|
||||
if has_key(l:item, 'module')
|
||||
call remove(l:item, 'module')
|
||||
endif
|
||||
|
||||
if has_key(l:item, 'end_col')
|
||||
call remove(l:item, 'end_col')
|
||||
endif
|
||||
|
||||
if has_key(l:item, 'end_lnum')
|
||||
call remove(l:item, 'end_lnum')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
" Return loclist data without the module string, only in newer Vim versions.
|
||||
function! ale#test#GetLoclistWithoutModule() abort
|
||||
" Return loclist data with only the keys supported by the lowest Vim versions.
|
||||
function! ale#test#GetLoclistWithoutNewerKeys() abort
|
||||
let l:results = getloclist(0)
|
||||
call s:RemoveModule(l:results)
|
||||
call RemoveNewerKeys(l:results)
|
||||
|
||||
return l:results
|
||||
endfunction
|
||||
|
||||
function! ale#test#GetQflistWithoutModule() abort
|
||||
" Return quickfix data with only the keys supported by the lowest Vim versions.
|
||||
function! ale#test#GetQflistWithoutNewerKeys() abort
|
||||
let l:results = getqflist()
|
||||
call s:RemoveModule(l:results)
|
||||
call RemoveNewerKeys(l:results)
|
||||
|
||||
return l:results
|
||||
endfunction
|
||||
|
|
|
@ -64,7 +64,8 @@ function! ale#toggle#ToggleBuffer(buffer) abort
|
|||
" Disabling ALE globally removes autocmd events, so we cannot enable
|
||||
" linting locally when linting is disabled globally
|
||||
if l:enabled && !g:ale_enabled
|
||||
execute 'echom ''ALE cannot be enabled locally when disabled globally'''
|
||||
" no-custom-checks
|
||||
echom 'ALE cannot be enabled locally when disabled globally'
|
||||
|
||||
return
|
||||
endif
|
||||
|
|
|
@ -25,3 +25,19 @@ function! ale#uri#Decode(value) abort
|
|||
\ 'g'
|
||||
\)
|
||||
endfunction
|
||||
|
||||
let s:uri_handlers = {
|
||||
\ 'jdt': {
|
||||
\ 'OpenURILink': function('ale#uri#jdt#OpenJDTLink'),
|
||||
\ }
|
||||
\}
|
||||
|
||||
function! ale#uri#GetURIHandler(uri) abort
|
||||
for l:scheme in keys(s:uri_handlers)
|
||||
if a:uri =~# '^'.l:scheme.'://'
|
||||
return s:uri_handlers[scheme]
|
||||
endif
|
||||
endfor
|
||||
|
||||
return v:null
|
||||
endfunction
|
||||
|
|
|
@ -25,7 +25,8 @@ function! ale#util#ShowMessage(string, ...) abort
|
|||
|
||||
" We have to assume the user is using a monospace font.
|
||||
if has('nvim') || (a:string !~? "\n" && len(a:string) < &columns)
|
||||
execute 'echo a:string'
|
||||
" no-custom-checks
|
||||
echo a:string
|
||||
else
|
||||
call ale#preview#Show(split(a:string, "\n"), extend(
|
||||
\ {
|
||||
|
@ -491,8 +492,12 @@ function! ale#util#FindItemAtCursor(buffer) abort
|
|||
return [l:info, l:loc]
|
||||
endfunction
|
||||
|
||||
function! ale#util#Input(message, value) abort
|
||||
return input(a:message, a:value)
|
||||
function! ale#util#Input(message, value, ...) abort
|
||||
if a:0 > 0
|
||||
return input(a:message, a:value, a:1)
|
||||
else
|
||||
return input(a:message, a:value)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#util#HasBuflineApi() abort
|
||||
|
@ -539,3 +544,31 @@ endfunction
|
|||
function! ale#util#GetBufferContents(buffer) abort
|
||||
return join(getbufline(a:buffer, 1, '$'), '\n') . '\n'
|
||||
endfunction
|
||||
|
||||
function! ale#util#ToURI(resource) abort
|
||||
let l:uri_handler = ale#uri#GetURIHandler(a:resource)
|
||||
|
||||
if l:uri_handler is# v:null
|
||||
" resource is a filesystem path
|
||||
let l:uri = ale#path#ToFileURI(a:resource)
|
||||
else
|
||||
" resource is a URI
|
||||
let l:uri = a:resource
|
||||
endif
|
||||
|
||||
return l:uri
|
||||
endfunction
|
||||
|
||||
function! ale#util#ToResource(uri) abort
|
||||
let l:uri_handler = ale#uri#GetURIHandler(a:uri)
|
||||
|
||||
if l:uri_handler is# v:null
|
||||
" resource is a filesystem path
|
||||
let l:resource = ale#path#FromFileURI(a:uri)
|
||||
else
|
||||
" resource is a URI
|
||||
let l:resource = a:uri
|
||||
endif
|
||||
|
||||
return l:resource
|
||||
endfunction
|
||||
|
|
|
@ -18,26 +18,6 @@ elseif has('textprop') && has('popupwin')
|
|||
let s:has_virt_text = 1
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextError')
|
||||
highlight link ALEVirtualTextError ALEError
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextStyleError')
|
||||
highlight link ALEVirtualTextStyleError ALEVirtualTextError
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextWarning')
|
||||
highlight link ALEVirtualTextWarning ALEWarning
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextStyleWarning')
|
||||
highlight link ALEVirtualTextStyleWarning ALEVirtualTextWarning
|
||||
endif
|
||||
|
||||
if !hlexists('ALEVirtualTextInfo')
|
||||
highlight link ALEVirtualTextInfo ALEVirtualTextWarning
|
||||
endif
|
||||
|
||||
function! ale#virtualtext#Clear() abort
|
||||
if !s:has_virt_text
|
||||
return
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
ALE Ada Integration *ale-ada-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-ada-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
===============================================================================
|
||||
gcc *ale-ada-gcc*
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE AsciiDoc Integration *ale-asciidoc-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-asciidoc-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
write-good *ale-asciidoc-write-good*
|
||||
|
||||
|
|
|
@ -352,6 +352,12 @@ g:ale_cpp_cquery_cache_directory *g:ale_c_cquery_cache_directory*
|
|||
cache.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-c-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
flawfinder *ale-c-flawfinder*
|
||||
|
||||
|
|
|
@ -21,6 +21,25 @@ g:ale_cmake_cmakelint_options *g:ale_cmake_cmakelint_options*
|
|||
This variable can be set to pass additional options to cmakelint.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cmake-lint *ale-cmake-cmake-lint*
|
||||
|
||||
g:ale_cmake_cmake_lint_executable *g:ale_cmake_cmake_lint_executable*
|
||||
*b:ale_cmake_cmake_lint_executable*
|
||||
Type: |String|
|
||||
Default: `'cmake-lint'`
|
||||
|
||||
This variable can be set to change the path the cmake-lint.
|
||||
|
||||
|
||||
g:ale_cmake_cmake_lint_options *g:ale_cmake_cmake_lint_options*
|
||||
*b:ale_cmake_cmake_lint_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to cmake-lint.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cmake-format *ale-cmake-cmakeformat*
|
||||
|
||||
|
|
|
@ -287,6 +287,21 @@ g:ale_cpp_cpplint_options *g:ale_cpp_cpplint_options*
|
|||
|
||||
This variable can be changed to modify flags given to cpplint.
|
||||
|
||||
g:ale_c_cpplint_executable *g:ale_c_cpplint_executable*
|
||||
*b:ale_c_cpplint_executable*
|
||||
Type: |String|
|
||||
Default: `'cpplint'`
|
||||
|
||||
This variable can be changed to use a different executable for cpplint.
|
||||
|
||||
|
||||
g:ale_c_cpplint_options *g:ale_c_cpplint_options*
|
||||
*b:ale_c_cpplint_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to modify flags given to cpplint.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cquery *ale-cpp-cquery*
|
||||
|
@ -308,6 +323,12 @@ g:ale_cpp_cquery_cache_directory *g:ale_cpp_cquery_cache_directory*
|
|||
cache.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-cpp-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
flawfinder *ale-cpp-flawfinder*
|
||||
|
||||
|
|
|
@ -90,6 +90,12 @@ g:ale_cs_csc_assemblies *g:ale_cs_csc_assemblies*
|
|||
\]
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-cs-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
dotnet-format *ale-cs-dotnet-format*
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE CSS Integration *ale-css-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-css-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
fecs *ale-css-fecs*
|
||||
|
||||
|
@ -43,5 +49,18 @@ g:ale_css_stylelint_use_global *g:ale_css_stylelint_use_global*
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vscodecss *ale-css-vscode*
|
||||
|
||||
Website: https://github.com/hrsh7th/vscode-langservers-extracted
|
||||
|
||||
Installation
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Install VSCode css language server either globally or locally: >
|
||||
|
||||
npm install -g vscode-langservers-extracted
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -87,39 +87,6 @@ g:ale_dart_format_options *g:ale_dart_format_options*
|
|||
This variable can be set to pass additional options to the dart format fixer.
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
dartanalyzer *ale-dart-dartanalyzer*
|
||||
|
||||
Installation
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Install Dart via whatever means. `dartanalyzer` will be included in the SDK.
|
||||
|
||||
You can add the SDK to `$PATH`, as described here:
|
||||
https://www.dartlang.org/tools/sdk
|
||||
|
||||
If you have installed Dart on Linux, you can also try the following: >
|
||||
" Set the executable path for dartanalyzer to the absolute path to it.
|
||||
let g:ale_dart_dartanalyzer_executable = '/usr/lib/dart/bin/dartanalyzer'
|
||||
<
|
||||
... or similarly for wherever your Dart SDK lives. This should work without
|
||||
having to modify `$PATH`.
|
||||
|
||||
ALE can only check for problems with `dartanalyzer` with the file on disk.
|
||||
See |ale-lint-file-linters|
|
||||
|
||||
Options
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
g:ale_dart_dartanalyzer_executable *g:ale_dart_dartanalyzer_executable*
|
||||
*b:ale_dart_dartanalyzer_executable*
|
||||
Type: |String|
|
||||
Default: `'dartanalyzer'`
|
||||
|
||||
This variable can be set to change the path to dartanalyzer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
dartfmt *ale-dart-dartfmt*
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ CONTENTS *ale-development-contents*
|
|||
4.1. Writing Linter Tests.............|ale-development-linter-tests|
|
||||
4.2. Writing Fixer Tests..............|ale-development-fixer-tests|
|
||||
4.3. Running Tests in a Windows VM....|ale-development-windows-tests|
|
||||
5. Contributing.........................|ale-development-contributing|
|
||||
|
||||
===============================================================================
|
||||
1. Introduction *ale-development-introduction*
|
||||
|
@ -97,8 +98,8 @@ should also follow some additional rules designed to prevent mistakes. Some of
|
|||
these are reported with ALE's `custom-linting-rules` script. See
|
||||
|ale-development-tests|.
|
||||
|
||||
* Don't leave stray `:echo` lines in code. Use `execute 'echo' ...` if you must
|
||||
echo something.
|
||||
* Don't leave stray `:echo` lines in code. Write `" no-custom-checks` above
|
||||
the line if you must echo something.
|
||||
* For strings use |is#| instead of |==#|, `is?` instead of `==?`, `isnot#`
|
||||
instead of `!=#`, and `isnot?` instead of `!=?`. This is because `'x' ==# 0`
|
||||
returns 1, while `'x' is# 0` returns 0, so you will experience fewer issues
|
||||
|
@ -153,10 +154,9 @@ ALE runs tests with the following versions of Vim in the following
|
|||
environments.
|
||||
|
||||
1. Vim 8.0.0027 on Linux via GitHub Actions.
|
||||
2. Vim 8.2.2401 on Linux via GitHub Actions.
|
||||
2. Vim 8.2.4693 on Linux via GitHub Actions.
|
||||
3. NeoVim 0.2.0 on Linux via GitHub Actions.
|
||||
4. NeoVim 0.4.4 on Linux via GitHub Actions.
|
||||
5. NeoVim 0.5.0 on Linux via GitHub Actions.
|
||||
4. NeoVim 0.7.0 on Linux via GitHub Actions.
|
||||
6. Vim 8 (stable builds) on Windows via AppVeyor.
|
||||
|
||||
If you are developing ALE code on Linux, Mac OSX, or BSD, you can run ALEs
|
||||
|
@ -444,5 +444,23 @@ You can run a specific test by passing the filename as an argument to the
|
|||
batch file, for example: `run-tests test/test_c_flag_parsing.vader` . This will
|
||||
give you results much more quickly.
|
||||
|
||||
===============================================================================
|
||||
5. Contributing *ale-development-contributing*
|
||||
|
||||
All integration of new code into ALE is done through GitHub pull requests.
|
||||
Using that tool streamlines the process and minimizes the time and effort
|
||||
required to e.g. ensure test suites are run for every change.
|
||||
|
||||
As for any project hosted by GitHub, the choice of platform demands every
|
||||
contributor to take care to setup an account and configure it accordingly.
|
||||
|
||||
Due to details of our process, a difference to many other GitHub hosted
|
||||
projects is that contributors who wish to keep the author fields for their
|
||||
commits unaltered need to configure a public email address in their account
|
||||
and profile settings. See: https://docs.github.com/en/account-and-profile/
|
||||
|
||||
Unless configuring GitHub to expose contact details, commits will be rewritten
|
||||
to appear by `USERNAME <RANDOM_NUMBER+USERNAME@users.noreply.github.com>` .
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -25,6 +25,12 @@ g:ale_dockerfile_dockerfile_lint_options
|
|||
the dockerfile lint invocation - like custom rule file definitions.
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-dockerfile-dprint*
|
||||
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/dockerfile
|
||||
|
||||
|
||||
===============================================================================
|
||||
hadolint *ale-dockerfile-hadolint*
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ ALE Elixir Integration *ale-elixir-options*
|
|||
===============================================================================
|
||||
mix *ale-elixir-mix*
|
||||
|
||||
|
||||
The `mix` linter is disabled by default, as it can be too expensive to run.
|
||||
See `:help g:ale_linters`
|
||||
|
||||
|
@ -18,6 +17,7 @@ g:ale_elixir_mix_options *g:ale_elixir_mix_options*
|
|||
|
||||
This variable can be changed to specify the mix executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
mix_format *ale-elixir-mix-format*
|
||||
|
||||
|
@ -30,6 +30,7 @@ g:ale_elixir_mix_format_options *g:ale_elixir_mix_format_options*
|
|||
This variable can be changed to specify the mix options passed to the
|
||||
mix_format fixer
|
||||
|
||||
|
||||
===============================================================================
|
||||
dialyxir *ale-elixir-dialyxir*
|
||||
|
||||
|
@ -45,6 +46,7 @@ configured on your project's `mix.exs`.
|
|||
See https://github.com/jeremyjh/dialyxir#with-explaining-stuff for more
|
||||
information.
|
||||
|
||||
|
||||
===============================================================================
|
||||
elixir-ls *ale-elixir-elixir-ls*
|
||||
|
||||
|
@ -72,6 +74,8 @@ g:ale_elixir_elixir_ls_config *g:ale_elixir_elixir_ls_config*
|
|||
\ }
|
||||
<
|
||||
Consult the ElixirLS documentation for more information about settings.
|
||||
|
||||
|
||||
===============================================================================
|
||||
credo *ale-elixir-credo*
|
||||
|
||||
|
@ -79,18 +83,26 @@ Credo (https://github.com/rrrene/credo)
|
|||
|
||||
g:ale_elixir_credo_strict *g:ale_elixir_credo_strict*
|
||||
|
||||
Type: Integer
|
||||
Default: 0
|
||||
Type: |Integer|
|
||||
Default: `0`
|
||||
|
||||
Tells credo to run in strict mode or suggest mode. Set variable to 1 to
|
||||
enable --strict mode.
|
||||
|
||||
g:ale_elixir_credo_config_file g:ale_elixir_credo_config_file
|
||||
|
||||
Type: String
|
||||
Default: ''
|
||||
g:ale_elixir_credo_config_file *g:ale_elixir_credo_config_file*
|
||||
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
Tells credo to use a custom configuration file.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-elixir-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -39,7 +39,6 @@ g:ale_go_go111module *g:ale_go_go111module*
|
|||
golang tools.
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
bingo *ale-go-bingo*
|
||||
|
||||
|
@ -57,6 +56,11 @@ g:ale_go_bingo_options *g:ale_go_bingo_options*
|
|||
Default: `''`
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-go-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
===============================================================================
|
||||
gobuild *ale-go-gobuild*
|
||||
|
||||
|
@ -80,6 +84,24 @@ g:ale_go_gofmt_options *g:ale_go_gofmt_options*
|
|||
This variable can be set to pass additional options to the gofmt fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
gofumpt *ale-go-gofumpt*
|
||||
|
||||
g:ale_go_gofumpt_executable *g:ale_go_gofumpt_executable*
|
||||
*b:ale_go_gofumpt_executable*
|
||||
Type: |String|
|
||||
Default: `'gofumpt'`
|
||||
|
||||
Executable to run to use as the gofumpt fixer.
|
||||
|
||||
g:ale_go_gofumpt_options *g:ale_go_gofumpt_options*
|
||||
*b:ale_go_gofumpt_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
Options to pass to the gofumpt fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
golangci-lint *ale-go-golangci-lint*
|
||||
|
||||
|
@ -133,6 +155,7 @@ g:ale_go_langserver_options *g:ale_go_langserver_options*
|
|||
`-gocodecompletion` option is ignored because it is handled automatically
|
||||
by the |g:ale_completion_enabled| variable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
golines *ale-go-golines*
|
||||
|
||||
|
@ -148,9 +171,10 @@ g:ale_go_golines_options *g:ale_go_golines_options*
|
|||
Type: |String|
|
||||
Default: ''
|
||||
|
||||
Additional options passed to the golines command. By default golines has
|
||||
Additional options passed to the golines command. By default golines has
|
||||
--max-length=100 (lines above 100 characters will be wrapped)
|
||||
|
||||
|
||||
===============================================================================
|
||||
golint *ale-go-golint*
|
||||
|
||||
|
@ -330,7 +354,7 @@ g:ale_go_staticcheck_options *g:ale_go_staticcheck_options*
|
|||
g:ale_go_staticcheck_lint_package *g:ale_go_staticcheck_lint_package*
|
||||
*b:ale_go_staticcheck_lint_package*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
Default: `1`
|
||||
|
||||
When set to `1`, the whole Go package will be checked instead of only the
|
||||
current file.
|
||||
|
|
|
@ -13,6 +13,12 @@ g:ale_haskell_brittany_executable *g:ale_haskell_brittany_executable*
|
|||
This variable can be changed to use a different executable for brittany.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-haskell-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
floskell *ale-haskell-floskell*
|
||||
|
||||
|
@ -128,7 +134,7 @@ g:ale_haskell_hlint_options g:ale_haskell_hlint_options
|
|||
hls *ale-haskell-hls*
|
||||
|
||||
g:ale_haskell_hls_executable *g:ale_haskell_hls_executable*
|
||||
*b:ale_haskell_his_executable*
|
||||
*b:ale_haskell_hls_executable*
|
||||
Type: |String|
|
||||
Default: `'haskell-language-server-wrapper'`
|
||||
|
||||
|
@ -136,6 +142,20 @@ g:ale_haskell_hls_executable *g:ale_haskell_hls_executable*
|
|||
language server.
|
||||
|
||||
|
||||
g:ale_haskell_hls_config *g:ale_haskell_hls_config*
|
||||
*b:ale_haskell_hls_config*
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary with configuration settings for HLS. For example, to see more
|
||||
completions:
|
||||
>
|
||||
let g:ale_haskell_hls_config = {'haskell': {'maxCompletions': 250}}
|
||||
<
|
||||
Refer to HLS documentation for possible settings:
|
||||
https://haskell-language-server.readthedocs.io/en/latest/configuration.html#language-specific-server-options
|
||||
|
||||
|
||||
===============================================================================
|
||||
stack-build *ale-haskell-stack-build*
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
ALE HCL Integration *ale-hcl-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
packer-fmt *ale-hcl-packer-fmt*
|
||||
|
||||
See |ale-packer-fmt-fixer| for information about the available options.
|
||||
|
||||
===============================================================================
|
||||
terraform-fmt *ale-hcl-terraform-fmt*
|
||||
|
||||
|
|
|
@ -28,6 +28,11 @@ g:ale_html_angular_use_global *g:ale_html_angular_use_global*
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-html-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
===============================================================================
|
||||
fecs *ale-html-fecs*
|
||||
|
||||
|
@ -159,6 +164,19 @@ g:ale_html_tidy_use_global *g:html_tidy_use_global*
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vscodehtml *ale-html-vscode*
|
||||
|
||||
Website: https://github.com/hrsh7th/vscode-langservers-extracted
|
||||
|
||||
Installation
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Install VSCode html language server either globally or locally: >
|
||||
|
||||
npm install -g vscode-langservers-extracted
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
write-good *ale-html-write-good*
|
||||
|
||||
|
|
|
@ -41,6 +41,12 @@ g:ale_java_checkstyle_options *g:ale_java_checkstyle_options*
|
|||
configuration files set with |g:ale_java_checkstyle_config|.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-java-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
javac *ale-java-javac*
|
||||
|
||||
|
@ -91,7 +97,6 @@ List type:
|
|||
\ ]
|
||||
<
|
||||
|
||||
|
||||
===============================================================================
|
||||
google-java-format *ale-java-google-java-format*
|
||||
|
||||
|
@ -190,6 +195,7 @@ The Java language server will look for the dependencies you specify in
|
|||
`externalDependencies` array in your Maven and Gradle caches ~/.m2 and
|
||||
~/.gradle.
|
||||
|
||||
|
||||
===============================================================================
|
||||
eclipselsp *ale-java-eclipselsp*
|
||||
|
||||
|
@ -218,8 +224,9 @@ g:ale_java_eclipselsp_path *g:ale_java_eclipselsp_path*
|
|||
Default: `'$HOME/eclipse.jdt.ls'`
|
||||
|
||||
Absolute path to the location of the eclipse.jdt.ls repository folder. Or if
|
||||
you have VSCode extension installed the absolute path to the VSCode extensions
|
||||
folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in Linux).
|
||||
you have VSCode extension installed the absolute path to the VSCode
|
||||
extensions folder (e.g. $HOME/.vscode/extensions/redhat.java-0.4x.0 in
|
||||
Linux).
|
||||
|
||||
|
||||
g:ale_java_eclipselsp_executable *g:ale_java_eclipse_executable*
|
||||
|
@ -261,7 +268,8 @@ g:ale_java_eclipselsp_javaagent *g:ale_java_eclipselsp_javaagent*
|
|||
Default: `''`
|
||||
|
||||
A variable to add java agent for annotation processing such as Lombok.
|
||||
If you have multiple java agent files, use space to separate them. For example:
|
||||
If you have multiple java agent files, use space to separate them.
|
||||
For example:
|
||||
>
|
||||
let g:ale_java_eclipselsp_javaagent='/eclipse/lombok.jar /eclipse/jacoco.jar'
|
||||
<
|
||||
|
|
|
@ -23,11 +23,24 @@ To this: >
|
|||
/path/foo/bar/.eslintrc.js # extends: ["/path/foo/.base-eslintrc.js"]
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-javascript-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
deno *ale-javascript-deno*
|
||||
|
||||
Check the docs over at |ale-typescript-deno|.
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-javascript-dprint*
|
||||
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/typescript
|
||||
|
||||
|
||||
===============================================================================
|
||||
eslint *ale-javascript-eslint*
|
||||
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
ALE JSON Integration *ale-json-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-json-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-json-dprint*
|
||||
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/json
|
||||
|
||||
|
||||
===============================================================================
|
||||
eslint *ale-json-eslint*
|
||||
|
||||
|
@ -141,6 +153,18 @@ g:ale_json_spectral_use_global *g:ale_json_spectral_use_global*
|
|||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
===============================================================================
|
||||
vscodejson *ale-json-vscode*
|
||||
|
||||
Website: https://github.com/hrsh7th/vscode-langservers-extracted
|
||||
|
||||
Installation
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Install VSCode json language server either globally or locally: >
|
||||
|
||||
npm install -g vscode-langservers-extracted
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
ALE LaTeX Integration *ale-latex-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-latex-cspell*
|
||||
|
||||
===============================================================================
|
||||
write-good *ale-latex-write-good*
|
||||
|
||||
|
@ -9,10 +12,10 @@ See |ale-write-good-options|
|
|||
|
||||
|
||||
===============================================================================
|
||||
textlint *ale-latex-textlint*
|
||||
textlint *ale-latex-textlint*
|
||||
|
||||
See |ale-text-textlint|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
===============================================================================
|
||||
ALE Lua Integration *ale-lua-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-lua-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
lua-format *ale-lua-lua-format*
|
||||
|
||||
|
@ -11,6 +18,7 @@ g:ale_lua_lua_format_executable *g:ale_lua_lua_format_executable*
|
|||
|
||||
This variable can be changed to change the path to lua-format.
|
||||
|
||||
|
||||
g:ale_lua_lua_format_options *g:ale_lua_lua_format_options*
|
||||
*b:ale_lua_lua_format_options*
|
||||
Type: |String|
|
||||
|
@ -29,6 +37,7 @@ g:ale_lua_luac_executable *g:ale_lua_luac_executable*
|
|||
|
||||
This variable can be changed to change the path to luac.
|
||||
|
||||
|
||||
===============================================================================
|
||||
luacheck *ale-lua-luacheck*
|
||||
|
||||
|
@ -58,6 +67,7 @@ g:ale_lua_luafmt_executable *g:ale_lua_luafmt_executable*
|
|||
|
||||
This variable can be set to use a different executable for luafmt.
|
||||
|
||||
|
||||
g:ale_lua_luafmt_options *g:ale_lua_luafmt_options*
|
||||
*b:ale_lua_luafmt_options*
|
||||
Type: |String|
|
||||
|
@ -66,6 +76,25 @@ g:ale_lua_luafmt_options *g:ale_lua_luafmt_options*
|
|||
This variable can be set to pass additional options to the luafmt fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
selene *ale-lua-selene*
|
||||
|
||||
g:ale_lua_selene_executable *g:ale_lua_selene_executable*
|
||||
*b:ale_lua_selene_executable*
|
||||
Type: |String|
|
||||
Default: `'selene'`
|
||||
|
||||
This variable can be set to use a different executable for selene.
|
||||
|
||||
|
||||
g:ale_lua_selene_options *g:ale_lua_selene_options*
|
||||
*b:ale_lua_selene_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to selene.
|
||||
|
||||
|
||||
===============================================================================
|
||||
stylua *ale-lua-stylua*
|
||||
|
||||
|
@ -76,6 +105,7 @@ g:ale_lua_stylua_executable *g:ale_lua_stylua_executable*
|
|||
|
||||
This variable can be set to use a different executable for stylua.
|
||||
|
||||
|
||||
g:ale_lua_stylua_options *g:ale_lua_stylua_options*
|
||||
*b:ale_lua_stylua_options*
|
||||
Type: |String|
|
||||
|
|
|
@ -2,6 +2,18 @@
|
|||
ALE Markdown Integration *ale-markdown-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-markdown-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-markdown-dprint*
|
||||
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/markdown
|
||||
|
||||
|
||||
===============================================================================
|
||||
markdownlint *ale-markdown-markdownlint*
|
||||
|
||||
|
@ -98,4 +110,4 @@ See |ale-write-good-options|
|
|||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -7,24 +7,24 @@ nixfmt *ale-nix-nixfmt*
|
|||
|
||||
g:ale_nix_nixfmt_executable *g:ale_nix_nixfmt_executable*
|
||||
*b:ale_nix_nixfmt_executable*
|
||||
Type: String
|
||||
Default: 'nixfmt'
|
||||
Type: |String|
|
||||
Default: `'nixfmt'`
|
||||
|
||||
This variable sets the executable used for nixfmt.
|
||||
|
||||
g:ale_nix_nixfmt_options *g:ale_nix_nixfmt_options*
|
||||
*b:ale_nix_nixfmt_options*
|
||||
Type: String
|
||||
Default: ''
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to the nixfmt fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
nixpkgs-fmt *ale-nix-nixpkgs-fmt*
|
||||
nixpkgs-fmt *ale-nix-nixpkgs-fmt*
|
||||
|
||||
g:ale_nix_nixpkgsfmt_executable *g:ale_nix_nixpkgsfmt_executable*
|
||||
*b:ale_nix_nixpkgsfmt_executable*
|
||||
g:ale_nix_nixpkgsfmt_executable *g:ale_nix_nixpkgsfmt_executable*
|
||||
*b:ale_nix_nixpkgsfmt_executable*
|
||||
Type: |String|
|
||||
Default: `'nixpkgs-fmt'`
|
||||
|
||||
|
@ -35,7 +35,44 @@ g:ale_nix_nixpkgsfmt_options *g:ale_nix_nixpkgsfmt_options*
|
|||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to the nixpkgs-fmt fixer.
|
||||
This variable can be set to pass additional options to the nixpkgs-fmt
|
||||
fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
statix *ale-nix-statix*
|
||||
|
||||
g:ale_nix_statix_check_executable *g:ale_nix_statix_check_executable*
|
||||
*b:ale_nix_statix_check_executable*
|
||||
Type: |String|
|
||||
Default: `'statix'`
|
||||
|
||||
This variable sets the executable used for statix when running it as a
|
||||
linter.
|
||||
|
||||
g:ale_nix_statix_check_options *g:ale_nix_statix_check_options*
|
||||
*b:ale_nix_statix_check_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be used to pass additional options to statix when running
|
||||
it as a linter.
|
||||
|
||||
g:ale_nix_statix_fix_executable *g:ale_nix_fix_check_executable*
|
||||
*b:ale_nix_fix_check_executable*
|
||||
Type: |String|
|
||||
Default: `'statix'`
|
||||
|
||||
This variable sets the executable used for statix when running it as a
|
||||
fixer.
|
||||
|
||||
g:ale_nix_statix_fix_options *g:ale_nix_statix_fix_options*
|
||||
*b:ale_nix_statix_fix_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be used to pass additional options to statix when running
|
||||
it as a fixer.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
|
|
@ -2,6 +2,26 @@
|
|||
ALE OCaml Integration *ale-ocaml-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
dune *ale-ocaml-dune*
|
||||
|
||||
Dune is a build system for OCaml projects. The `dune format` command is
|
||||
supported for automatically formatting `dune` and `dune-project` files.
|
||||
|
||||
g:ale_ocaml_dune_executable *g:ale_ocaml_dune_executable*
|
||||
*b:ale_ocaml_dune_executable*
|
||||
Type: |String|
|
||||
Default: `'dune'`
|
||||
|
||||
This variable can be set to pass the path to dune.
|
||||
|
||||
g:ale_ocaml_dune_options *g:ale_ocaml_dune_options*
|
||||
*b:ale_ocaml_dune_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to the dune fixer.
|
||||
|
||||
===============================================================================
|
||||
merlin *ale-ocaml-merlin*
|
||||
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
===============================================================================
|
||||
ALE PHP Integration *ale-php-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-php-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
langserver *ale-php-langserver*
|
||||
|
||||
|
@ -41,6 +48,7 @@ g:ale_php_phan_minimum_severity *g:ale_php_phan_minimum_severity*
|
|||
|
||||
This variable defines the minimum severity level.
|
||||
|
||||
|
||||
g:ale_php_phan_executable *g:ale_php_phan_executable*
|
||||
*b:ale_php_phan_executable*
|
||||
Type: |String|
|
||||
|
@ -48,6 +56,7 @@ g:ale_php_phan_executable *g:ale_php_phan_executable*
|
|||
|
||||
This variable sets executable used for phan or phan_client.
|
||||
|
||||
|
||||
g:ale_php_phan_use_client *g:ale_php_phan_use_client*
|
||||
*b:ale_php_phan_use_client*
|
||||
Type: |Number|
|
||||
|
@ -56,6 +65,7 @@ g:ale_php_phan_use_client *g:ale_php_phan_use_client*
|
|||
This variable can be set to 1 to use the phan_client with phan daemon mode
|
||||
instead of the phan standalone.
|
||||
|
||||
|
||||
===============================================================================
|
||||
phpcbf *ale-php-phpcbf*
|
||||
|
||||
|
@ -129,6 +139,7 @@ g:ale_php_phpcs_options *g:ale_php_phpcs_options*
|
|||
|
||||
This variable can be set to pass additional options to php-cs
|
||||
|
||||
|
||||
===============================================================================
|
||||
phpmd *ale-php-phpmd*
|
||||
|
||||
|
@ -187,6 +198,15 @@ g:ale_php_phpstan_autoload *g:ale_php_phpstan_autoload*
|
|||
This variable sets path to phpstan autoload file.
|
||||
|
||||
|
||||
g:ale_php_phpstan_memory_limit *g:ale_php_phpstan_memory-limit*
|
||||
*b:ale_php_phpstan_memory-limit*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable sets the memory limit for phpstan analysis. This is a string
|
||||
in the same format as `php.ini` accepts, e.g. `128M`, `1G`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
psalm *ale-php-psalm*
|
||||
|
||||
|
@ -252,6 +272,33 @@ g:ale_php_php_executable *g:ale_php_php_executable*
|
|||
This variable sets the executable used for php.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pint *ale-php-pint*
|
||||
|
||||
g:ale_php_pint_executable *g:ale_php_pint_executable*
|
||||
*b:ale_php_pint_executable*
|
||||
Type: |String|
|
||||
Default: `'pint'`
|
||||
|
||||
This variable sets the executable used for pint.
|
||||
|
||||
|
||||
g:ale_php_pint_options *g:ale_php_pint_options*
|
||||
*b:ale_php_pint_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to pint.
|
||||
|
||||
|
||||
g:ale_php_pint_use_global *g:ale_php_pint_use_global*
|
||||
*b:ale_php_pint_use_global*
|
||||
Type: |Boolean|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
tlint *ale-php-tlint*
|
||||
|
||||
|
|
|
@ -2,11 +2,17 @@
|
|||
ALE PowerShell Integration *ale-powershell-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-powershell-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
powershell *ale-powershell-powershell*
|
||||
|
||||
g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable*
|
||||
*b:ale_powershell_powershell_executable*
|
||||
g:ale_powershell_powershell_executable *g:ale_powershell_powershell_executable*
|
||||
*b:ale_powershell_powershell_executable*
|
||||
Type: String
|
||||
Default: `'pwsh'`
|
||||
|
||||
|
@ -33,7 +39,7 @@ g:ale_powershell_psscriptanalyzer_executable
|
|||
Default: `'pwsh'`
|
||||
|
||||
This variable sets executable used for powershell.
|
||||
|
||||
|
||||
For example, on Windows you could set powershell to be Windows Powershell:
|
||||
>
|
||||
let g:ale_powershell_psscriptanalyzer_executable = 'powershell.exe'
|
||||
|
@ -49,7 +55,7 @@ g:ale_powershell_psscriptanalyzer_module
|
|||
for psscriptanalyzer invocation.
|
||||
|
||||
|
||||
g:ale_powershell_psscriptanalyzer_exclusions
|
||||
g:ale_powershell_psscriptanalyzer_exclusions
|
||||
*g:ale_powershell_psscriptanalyzer_exclusions*
|
||||
*b:ale_powershell_psscriptanalyzer_exclusions*
|
||||
Type: |String|
|
||||
|
@ -65,6 +71,5 @@ g:ale_powershell_psscriptanalyzer_exclusions
|
|||
\ 'PSAvoidUsingWriteHost,PSAvoidGlobalVars'
|
||||
<
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -8,13 +8,51 @@ Integration Information
|
|||
To enable `.proto` file linting, update |g:ale_linters| as appropriate:
|
||||
>
|
||||
" Enable linter for .proto files
|
||||
let g:ale_linters = {'proto': ['protoc-gen-lint', 'protolint']}
|
||||
let g:ale_linters = {'proto': ['buf-lint', 'protoc-gen-lint', 'protolint']}
|
||||
|
||||
To enable `.proto` file fixing, update |g:ale_fixers| as appropriate:
|
||||
>
|
||||
" Enable linter for .proto files
|
||||
let b:ale_fixers = {'proto': ['protolint']}
|
||||
let b:ale_fixers = {'proto': ['buf-format', 'protolint']}
|
||||
<
|
||||
===============================================================================
|
||||
buf-format *ale-proto-buf-format*
|
||||
|
||||
The formatter uses `buf`, a fully-featured Protobuf compiler that doesn't depend
|
||||
on `protoc`. Make sure the `buf` binary is available in the system path, or
|
||||
set ale_proto_buf_format_executable.
|
||||
|
||||
g:ale_proto_buf_format_executable *g:ale_proto_buf_format_executable*
|
||||
|
||||
Type: |String|
|
||||
Default: 'buf'
|
||||
|
||||
This variable can be changed to modify the executable used for buf.
|
||||
|
||||
===============================================================================
|
||||
buf-lint *ale-proto-buf-lint*
|
||||
|
||||
The linter uses `buf`, a fully-featured Protobuf compiler that doesn't depend
|
||||
on `protoc`. Make sure the `buf` binary is available in the system path, or
|
||||
set ale_proto_buf_lint_executable.
|
||||
|
||||
g:ale_proto_buf_lint_executable *g:ale_proto_buf_lint_executable*
|
||||
|
||||
Type: |String|
|
||||
Default: 'buf'
|
||||
|
||||
This variable can be changed to modify the executable used for buf.
|
||||
|
||||
g:ale_proto_buf_lint_config *g:ale_proto_buf_lint_config*
|
||||
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
A path to a buf configuration file.
|
||||
|
||||
The path to the configuration file can be an absolute path or a relative
|
||||
path. ALE will search for the relative path in parent directories.
|
||||
|
||||
===============================================================================
|
||||
protoc-gen-lint *ale-proto-protoc-gen-lint*
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ g:ale_python_auto_pipenv *g:ale_python_auto_pipenv*
|
|||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_auto_poetry *g:ale_python_auto_poetry*
|
||||
*b:ale_python_auto_poetry*
|
||||
Type: |Number|
|
||||
|
@ -18,6 +19,7 @@ g:ale_python_auto_poetry *g:ale_python_auto_poetry*
|
|||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
ALE Python Project Root Behavior *ale-python-root*
|
||||
|
||||
|
@ -37,6 +39,7 @@ ALE will look for configuration files with the following filenames. >
|
|||
tox.ini
|
||||
.pyre_configuration.local
|
||||
mypy.ini
|
||||
.mypy.ini
|
||||
pycodestyle.cfg
|
||||
.flake8
|
||||
.flake8rc
|
||||
|
@ -229,6 +232,7 @@ g:ale_python_black_auto_pipenv *g:ale_python_black_auto_pipenv*
|
|||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry*
|
||||
*b:ale_python_black_auto_poetry*
|
||||
Type: |Number|
|
||||
|
@ -237,6 +241,7 @@ g:ale_python_black_auto_poetry *g:ale_python_black_auto_poetry*
|
|||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_black_change_directory *g:ale_python_black_change_directory*
|
||||
*b:ale_python_black_change_directory*
|
||||
Type: |Number|
|
||||
|
@ -248,17 +253,23 @@ g:ale_python_black_change_directory *g:ale_python_black_change_directory*
|
|||
to control the directory Python is executed from yourself.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-python-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
flake8 *ale-python-flake8*
|
||||
|
||||
g:ale_python_flake8_change_directory *g:ale_python_flake8_change_directory*
|
||||
*b:ale_python_flake8_change_directory*
|
||||
Type: |String|
|
||||
Default: `project`
|
||||
Default: `'project'`
|
||||
|
||||
If set to `project`, ALE will switch to the project root before checking file.
|
||||
If set to `file`, ALE will switch to directory the Python file being
|
||||
checked with `flake8` is in before checking it.
|
||||
If set to `file`, ALE will first switch to the directory containing the
|
||||
Python file being checked with `flake8` before checking it.
|
||||
You can turn it off with `off` option if you want to control the directory
|
||||
Python is executed from yourself.
|
||||
|
||||
|
@ -320,6 +331,7 @@ g:ale_python_flake8_auto_poetry *g:ale_python_flake8_auto_poetry*
|
|||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
flakehell *ale-python-flakehell*
|
||||
|
||||
|
@ -384,6 +396,7 @@ g:ale_python_flakehell_auto_poetry *g:ale_python_flakehell_auto_poetry*
|
|||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
isort *ale-python-isort*
|
||||
|
||||
|
@ -504,7 +517,6 @@ g:ale_python_mypy_use_global *g:ale_python_mypy_use_global*
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
prospector *ale-python-prospector*
|
||||
|
||||
|
@ -569,7 +581,6 @@ g:ale_python_prospector_auto_poetry *g:ale_python_prospector_auto_poetry*
|
|||
===============================================================================
|
||||
pycodestyle *ale-python-pycodestyle*
|
||||
|
||||
|
||||
g:ale_python_pycodestyle_executable *g:ale_python_pycodestyle_executable*
|
||||
*b:ale_python_pycodestyle_executable*
|
||||
Type: |String|
|
||||
|
@ -619,7 +630,6 @@ g:ale_python_pycodestyle_auto_poetry *g:ale_python_pycodestyle_auto_poetry*
|
|||
===============================================================================
|
||||
pydocstyle *ale-python-pydocstyle*
|
||||
|
||||
|
||||
g:ale_python_pydocstyle_executable *g:ale_python_pydocstyle_executable*
|
||||
*b:ale_python_pydocstyle_executable*
|
||||
Type: |String|
|
||||
|
@ -669,7 +679,6 @@ g:ale_python_pydocstyle_auto_poetry *g:ale_python_pydocstyle_auto_poetry*
|
|||
===============================================================================
|
||||
pyflakes *ale-python-pyflakes*
|
||||
|
||||
|
||||
g:ale_python_pyflakes_executable *g:ale_python_pyflakes_executable*
|
||||
*b:ale_python_pyflakes_executable*
|
||||
Type: |String|
|
||||
|
@ -699,6 +708,52 @@ g:ale_python_pyflakes_auto_poetry *g:ale_python_pyflakes_auto_poetry*
|
|||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyflyby *ale-python-pyflyby*
|
||||
|
||||
g:ale_python_pyflyby_executable *g:ale_python_pyflyby_executable*
|
||||
*b:ale_python_pyflyby_executable*
|
||||
Type: |String|
|
||||
Default: `'tidy-imports'`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
g:ale_python_pyflyby_options *g:ale_python_pyflyby_options*
|
||||
*b:ale_python_pyflyby_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to add command-line arguments to the pyflyby
|
||||
tidy-imports invocation.
|
||||
|
||||
|
||||
g:ale_python_pyflyby_use_global *g:ale_python_pyflyby_use_global*
|
||||
*b:ale_python_pyflyby_use_global*
|
||||
Type: |Number|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
g:ale_python_pyflyby_auto_pipenv *g:ale_python_pyflyby_auto_pipenv*
|
||||
*b:ale_python_pyflyby_auto_pipenv*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_pyflyby_auto_poetry *g:ale_python_pyflyby_auto_poetry*
|
||||
*b:ale_python_pyflyby_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pylama *ale-python-pylama*
|
||||
|
||||
|
@ -925,6 +980,7 @@ g:ale_python_pylsp_options *g:ale_python_pylsp_options
|
|||
An example stragety for installing `pylsp`:
|
||||
`python3 -m pip install --user pylsp`
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyre *ale-python-pyre*
|
||||
|
||||
|
@ -1057,6 +1113,58 @@ g:ale_python_reorder_python_imports_use_global
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
unimport *ale-python-unimport*
|
||||
|
||||
`unimport` will be run from a detected project root, per |ale-python-root|.
|
||||
|
||||
|
||||
g:ale_python_unimport_auto_pipenv *g:ale_python_unimport_auto_pipenv*
|
||||
*b:ale_python_unimport_auto_pipenv*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a pipenv, and set the executable to `pipenv`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_unimport_auto_poetry *g:ale_python_unimport_auto_poetry*
|
||||
*b:ale_python_unimport_auto_poetry*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Detect whether the file is inside a poetry, and set the executable to `poetry`
|
||||
if true. This is overridden by a manually-set executable.
|
||||
|
||||
|
||||
g:ale_python_unimport_executable *g:ale_python_unimport_executable*
|
||||
*b:ale_python_unimport_executable*
|
||||
Type: |String|
|
||||
Default: `'unimport'`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `unimport'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `unimport'`.
|
||||
|
||||
|
||||
g:ale_python_unimport_options *g:ale_python_unimport_options*
|
||||
*b:ale_python_unimport_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to add command-line arguments to the unimport
|
||||
invocation.
|
||||
|
||||
|
||||
g:ale_python_unimport_use_global *g:ale_python_unimport_use_global*
|
||||
*b:ale_python_unimport_use_global*
|
||||
Type: |Number|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vulture *ale-python-vulture*
|
||||
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE reStructuredText Integration *ale-restructuredtext-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-restructuredtext-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
textlint *ale-restructuredtext-textlint*
|
||||
|
||||
|
@ -16,6 +22,7 @@ See: https://github.com/jimo1001/docutils-ast-writer
|
|||
|
||||
See |ale-text-textlint|
|
||||
|
||||
|
||||
===============================================================================
|
||||
write-good *ale-restructuredtext-write-good*
|
||||
|
||||
|
@ -23,4 +30,4 @@ See |ale-write-good-options|
|
|||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -21,6 +21,13 @@ g:ale_ruby_brakeman_options *g:ale_ruby_brakeman_options*
|
|||
|
||||
The contents of this variable will be passed through to brakeman.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-ruby-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
debride *ale-ruby-debride*
|
||||
|
||||
|
@ -212,7 +219,5 @@ g:ale_ruby_standardrb_options *g:ale_ruby_standardrb_options*
|
|||
This variable can be changed to modify flags given to standardrb.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -26,8 +26,10 @@ Integration Information
|
|||
4. analyzer -- If you have rust-analyzer installed, you might prefer using
|
||||
this linter over cargo and rls. rust-analyzer also implements the
|
||||
Language Server Protocol for incremental compilation of Rust code, and is
|
||||
the next iteration of rls. rust-analyzer, like rls, requires Rust files
|
||||
to be contained in Cargo projects.
|
||||
the next iteration of rls. rust-analyzer either requires Rust files to be
|
||||
contained in Cargo projects or requires the project to be described in
|
||||
the rust-project.json format:
|
||||
https://rust-analyzer.github.io/manual.html#non-cargo-based-projects
|
||||
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
||||
consistently reformat your Rust code.
|
||||
|
||||
|
@ -38,7 +40,7 @@ Integration Information
|
|||
let g:ale_linters = {'rust': ['rustc', 'rls']}
|
||||
<
|
||||
|
||||
Also note that rustc 1.12. or later is needed.
|
||||
Also note that rustc 1.18. or later is needed.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
@ -145,8 +147,7 @@ g:ale_rust_cargo_avoid_whole_workspace *g:ale_rust_cargo_avoid_whole_workspace*
|
|||
in the crate's directory. Otherwise, behave as usual.
|
||||
|
||||
|
||||
g:ale_rust_cargo_use_clippy
|
||||
*g:ale_rust_cargo_use_clippy*
|
||||
g:ale_rust_cargo_use_clippy *g:ale_rust_cargo_use_clippy*
|
||||
*b:ale_rust_cargo_use_clippy*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
@ -163,8 +164,7 @@ g:ale_rust_cargo_use_clippy
|
|||
let g:ale_rust_cargo_use_clippy = executable('cargo-clippy')
|
||||
<
|
||||
|
||||
g:ale_rust_cargo_clippy_options
|
||||
*g:ale_rust_cargo_clippy_options*
|
||||
g:ale_rust_cargo_clippy_options *g:ale_rust_cargo_clippy_options*
|
||||
*b:ale_rust_cargo_clippy_options*
|
||||
|
||||
Type: |String|
|
||||
|
@ -175,8 +175,7 @@ g:ale_rust_cargo_clippy_options
|
|||
only `cargo clippy` supports (e.g. `--deny`).
|
||||
|
||||
|
||||
g:ale_rust_cargo_target_dir
|
||||
*g:ale_rust_cargo_target_dir*
|
||||
g:ale_rust_cargo_target_dir *g:ale_rust_cargo_target_dir*
|
||||
*b:ale_rust_cargo_target_dir*
|
||||
|
||||
Type: |String|
|
||||
|
@ -187,6 +186,12 @@ g:ale_rust_cargo_target_dir
|
|||
running `cargo` commands manually while ALE is performing its checks.
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-rust-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
rls *ale-rust-rls*
|
||||
|
||||
|
@ -234,13 +239,13 @@ rustc *ale-rust-rustc*
|
|||
g:ale_rust_rustc_options *g:ale_rust_rustc_options*
|
||||
*b:ale_rust_rustc_options*
|
||||
Type: |String|
|
||||
Default: `'-Z no-codegen'`
|
||||
Default: `'--emit=mir -o /dev/null'`
|
||||
|
||||
The variable can be used to change the options passed to `rustc`.
|
||||
|
||||
`-Z no-codegen` should only work with nightly builds of Rust. Be careful when
|
||||
setting the options, as running `rustc` could execute code or generate
|
||||
binary files.
|
||||
Users of nightly builds of Rust might want to use `-Z no-codegen` instead.
|
||||
Be careful when setting the options, as running `rustc` could execute code
|
||||
or generate binary files.
|
||||
|
||||
|
||||
g:ale_rust_ignore_error_codes *g:ale_rust_ignore_error_codes*
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE Scala Integration *ale-scala-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-scala-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
metals *ale-scala-metals*
|
||||
|
||||
|
|
|
@ -25,6 +25,12 @@ g:ale_sh_bashate_options *g:ale_sh_bashate_options*
|
|||
let g:ale_sh_bashate_options = '-i E003'
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-sh-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
sh-language-server *ale-sh-language-server*
|
||||
|
||||
|
|
|
@ -2,6 +2,13 @@
|
|||
ALE SQL Integration *ale-sql-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-sql-dprint*
|
||||
|
||||
See |ale-dprint-options|
|
||||
and https://github.com/dprint/dprint-plugin-sql/releases
|
||||
|
||||
|
||||
===============================================================================
|
||||
pgformatter *ale-sql-pgformatter*
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ Notes:
|
|||
|
||||
* Ada
|
||||
* `ada_language_server`
|
||||
* `cspell`
|
||||
* `gcc`
|
||||
* `gnatpp`
|
||||
* Ansible
|
||||
|
@ -24,7 +25,8 @@ Notes:
|
|||
* `apkbuild-lint`
|
||||
* `secfixes-check`
|
||||
* AsciiDoc
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `languagetool`!!
|
||||
* `proselint`
|
||||
* `redpen`
|
||||
|
@ -33,10 +35,13 @@ Notes:
|
|||
* `write-good`
|
||||
* ASM
|
||||
* `gcc`
|
||||
* AVRA
|
||||
* `avra`
|
||||
* Awk
|
||||
* `gawk`
|
||||
* Bash
|
||||
* `bashate`
|
||||
* `cspell`
|
||||
* `language-server`
|
||||
* `shell` (-n flag)
|
||||
* `shellcheck`
|
||||
|
@ -47,6 +52,8 @@ Notes:
|
|||
* `buildifier`
|
||||
* BibTeX
|
||||
* `bibclean`
|
||||
* BitBake
|
||||
* `oelint-adv`
|
||||
* Bourne Shell
|
||||
* `shell` (-n flag)
|
||||
* `shellcheck`
|
||||
|
@ -61,11 +68,13 @@ Notes:
|
|||
* `cppcheck`
|
||||
* `cpplint`!!
|
||||
* `cquery`
|
||||
* `cspell`
|
||||
* `flawfinder`
|
||||
* `gcc` (`cc`)
|
||||
* `uncrustify`
|
||||
* C#
|
||||
* `csc`!!
|
||||
* `cspell`
|
||||
* `dotnet-format`
|
||||
* `mcs`
|
||||
* `mcsc`!!
|
||||
|
@ -82,9 +91,12 @@ Notes:
|
|||
* `cppcheck`
|
||||
* `cpplint`!!
|
||||
* `cquery`
|
||||
* `cspell`
|
||||
* `flawfinder`
|
||||
* `gcc` (`cc`)
|
||||
* `uncrustify`
|
||||
* Cairo
|
||||
* `starknet`
|
||||
* Chef
|
||||
* `cookstyle`
|
||||
* `foodcritic`!!
|
||||
|
@ -95,6 +107,7 @@ Notes:
|
|||
* `cfn-python-lint`
|
||||
* CMake
|
||||
* `cmake-format`
|
||||
* `cmake-lint`
|
||||
* `cmakelint`
|
||||
* CoffeeScript
|
||||
* `coffee`
|
||||
|
@ -103,6 +116,8 @@ Notes:
|
|||
* `ameba`!!
|
||||
* `crystal`!!
|
||||
* CSS
|
||||
* `VSCode CSS language server`
|
||||
* `cspell`
|
||||
* `csslint`
|
||||
* `fecs`
|
||||
* `prettier`
|
||||
|
@ -127,7 +142,6 @@ Notes:
|
|||
* `analysis_server`
|
||||
* `dart-analyze`!!
|
||||
* `dart-format`!!
|
||||
* `dartanalyzer`!!
|
||||
* `dartfmt`!!
|
||||
* `language_server`
|
||||
* desktop
|
||||
|
@ -138,9 +152,11 @@ Notes:
|
|||
* `dhall-lint`
|
||||
* Dockerfile
|
||||
* `dockerfile_lint`
|
||||
* `dprint`
|
||||
* `hadolint`
|
||||
* Elixir
|
||||
* `credo`
|
||||
* `cspell`
|
||||
* `dialyxir`
|
||||
* `dogma`!!
|
||||
* `elixir-ls`
|
||||
|
@ -178,10 +194,12 @@ Notes:
|
|||
* `glslls`
|
||||
* Go
|
||||
* `bingo`
|
||||
* `cspell`
|
||||
* `go build`!!
|
||||
* `go mod`!!
|
||||
* `go vet`!!
|
||||
* `gofmt`
|
||||
* `gofumpt`
|
||||
* `goimports`
|
||||
* `golangci-lint`!!
|
||||
* `golangserver`
|
||||
|
@ -208,6 +226,7 @@ Notes:
|
|||
* Haskell
|
||||
* `brittany`
|
||||
* `cabal-ghc`
|
||||
* `cspell`
|
||||
* `floskell`
|
||||
* `ghc`
|
||||
* `ghc-mod`
|
||||
|
@ -222,10 +241,13 @@ Notes:
|
|||
* `stack-ghc`
|
||||
* `stylish-haskell`
|
||||
* HCL
|
||||
* `packer-fmt`
|
||||
* `terraform-fmt`
|
||||
* HTML
|
||||
* `alex`!!
|
||||
* `VSCode HTML language server`
|
||||
* `alex`
|
||||
* `angular`
|
||||
* `cspell`
|
||||
* `fecs`
|
||||
* `html-beautify`
|
||||
* `htmlhint`
|
||||
|
@ -244,13 +266,16 @@ Notes:
|
|||
* Java
|
||||
* `PMD`
|
||||
* `checkstyle`!!
|
||||
* `cspell`
|
||||
* `eclipselsp`
|
||||
* `google-java-format`
|
||||
* `javac`
|
||||
* `javalsp`
|
||||
* `uncrustify`
|
||||
* JavaScript
|
||||
* `cspell`
|
||||
* `deno`
|
||||
* `dprint`
|
||||
* `eslint`
|
||||
* `fecs`
|
||||
* `flow`
|
||||
|
@ -263,6 +288,9 @@ Notes:
|
|||
* `tsserver`
|
||||
* `xo`
|
||||
* JSON
|
||||
* `VSCode JSON language server`
|
||||
* `cspell`
|
||||
* `dprint`
|
||||
* `eslint`
|
||||
* `fixjson`
|
||||
* `jq`
|
||||
|
@ -283,8 +311,9 @@ Notes:
|
|||
* `ktlint`
|
||||
* `languageserver`
|
||||
* LaTeX (tex)
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `chktex`
|
||||
* `cspell`
|
||||
* `lacheck`
|
||||
* `proselint`
|
||||
* `redpen`
|
||||
|
@ -299,20 +328,23 @@ Notes:
|
|||
* LLVM
|
||||
* `llc`
|
||||
* Lua
|
||||
* `cspell`
|
||||
* `lua-format`
|
||||
* `luac`
|
||||
* `luacheck`
|
||||
* `luafmt`
|
||||
* `selene`
|
||||
* `stylua`
|
||||
* Mail
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `languagetool`!!
|
||||
* `proselint`
|
||||
* `vale`
|
||||
* Make
|
||||
* `checkmake`
|
||||
* Markdown
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `languagetool`!!
|
||||
* `markdownlint`!!
|
||||
* `mdl`
|
||||
|
@ -339,8 +371,9 @@ Notes:
|
|||
* `nixfmt`
|
||||
* `nixpkgs-fmt`
|
||||
* `rnix-lsp`
|
||||
* `statix`
|
||||
* nroff
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* Objective-C
|
||||
|
@ -353,6 +386,7 @@ Notes:
|
|||
* `clangd`
|
||||
* `uncrustify`
|
||||
* OCaml
|
||||
* `dune`
|
||||
* `merlin` (see |ale-ocaml-merlin|)
|
||||
* `ocamlformat`
|
||||
* `ocamllsp`
|
||||
|
@ -362,6 +396,10 @@ Notes:
|
|||
* `ibm_validator`
|
||||
* `prettier`
|
||||
* `yamllint`
|
||||
* OpenSCAD
|
||||
* `SCA2D`
|
||||
* Packer
|
||||
* `packer-fmt-fixer`
|
||||
* Pascal
|
||||
* `ptop`
|
||||
* Pawn
|
||||
|
@ -373,34 +411,40 @@ Notes:
|
|||
* Perl6
|
||||
* `perl6 -c`
|
||||
* PHP
|
||||
* `cspell`
|
||||
* `intelephense`
|
||||
* `langserver`
|
||||
* `phan`
|
||||
* `php -l`
|
||||
* `php-cs-fixer`
|
||||
* `phpactor`
|
||||
* `phpcbf`
|
||||
* `phpcs`
|
||||
* `phpmd`
|
||||
* `phpstan`
|
||||
* `pint`
|
||||
* `psalm`!!
|
||||
* `tlint`
|
||||
* PO
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `msgfmt`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* Pod
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* Pony
|
||||
* `ponyc`
|
||||
* PowerShell
|
||||
* `cspell`
|
||||
* `powershell`
|
||||
* `psscriptanalyzer`
|
||||
* Prolog
|
||||
* `swipl`
|
||||
* proto
|
||||
* `buf-format`!!
|
||||
* `buf-lint`!!
|
||||
* `protoc-gen-lint`!!
|
||||
* `protolint`!!
|
||||
* Pug
|
||||
|
@ -419,6 +463,7 @@ Notes:
|
|||
* `autopep8`
|
||||
* `bandit`
|
||||
* `black`
|
||||
* `cspell`
|
||||
* `flake8`
|
||||
* `flakehell`
|
||||
* `isort`
|
||||
|
@ -427,12 +472,14 @@ Notes:
|
|||
* `pycodestyle`
|
||||
* `pydocstyle`
|
||||
* `pyflakes`
|
||||
* `pyflyby`
|
||||
* `pylama`!!
|
||||
* `pylint`!!
|
||||
* `pylsp`
|
||||
* `pyre`
|
||||
* `pyright`
|
||||
* `reorder-python-imports`
|
||||
* `unimport`
|
||||
* `vulture`!!
|
||||
* `yapf`
|
||||
* QML
|
||||
|
@ -452,8 +499,13 @@ Notes:
|
|||
* `ols`
|
||||
* `reason-language-server`
|
||||
* `refmt`
|
||||
* Rego
|
||||
* `cspell`
|
||||
* `opacheck`
|
||||
* `opafmt`
|
||||
* reStructuredText
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `proselint`
|
||||
* `redpen`
|
||||
* `rstcheck`
|
||||
|
@ -466,6 +518,7 @@ Notes:
|
|||
* `rpmlint`
|
||||
* Ruby
|
||||
* `brakeman`!!
|
||||
* `cspell`
|
||||
* `debride`
|
||||
* `prettier`
|
||||
* `rails_best_practices`!!
|
||||
|
@ -478,6 +531,7 @@ Notes:
|
|||
* `standardrb`
|
||||
* Rust
|
||||
* `cargo`!!
|
||||
* `cspell`
|
||||
* `rls`
|
||||
* `rust-analyzer`
|
||||
* `rustc` (see |ale-integration-rust|)
|
||||
|
@ -488,6 +542,7 @@ Notes:
|
|||
* `sass-lint`
|
||||
* `stylelint`
|
||||
* Scala
|
||||
* `cspell`
|
||||
* `fsc`
|
||||
* `metals`
|
||||
* `sbtserver`
|
||||
|
@ -508,6 +563,7 @@ Notes:
|
|||
* `solhint`
|
||||
* `solium`
|
||||
* SQL
|
||||
* `dprint`
|
||||
* `pgformatter`
|
||||
* `sql-lint`
|
||||
* `sqlfmt`
|
||||
|
@ -522,6 +578,7 @@ Notes:
|
|||
* `svelteserver`
|
||||
* Swift
|
||||
* Apple `swift-format`
|
||||
* `cspell`
|
||||
* `sourcekit-lsp`
|
||||
* `swiftformat`
|
||||
* `swiftlint`
|
||||
|
@ -530,17 +587,20 @@ Notes:
|
|||
* Tcl
|
||||
* `nagelfar`!!
|
||||
* Terraform
|
||||
* `checkov`
|
||||
* `terraform`
|
||||
* `terraform-fmt-fixer`
|
||||
* `terraform-ls`
|
||||
* `terraform-lsp`
|
||||
* `tflint`
|
||||
* Texinfo
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* Text^
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `languagetool`!!
|
||||
* `proselint`
|
||||
* `redpen`
|
||||
|
@ -550,8 +610,12 @@ Notes:
|
|||
* Thrift
|
||||
* `thrift`
|
||||
* `thriftcheck`
|
||||
* TOML
|
||||
* `dprint`
|
||||
* TypeScript
|
||||
* `cspell`
|
||||
* `deno`
|
||||
* `dprint`
|
||||
* `eslint`
|
||||
* `fecs`
|
||||
* `prettier`
|
||||
|
@ -580,23 +644,30 @@ Notes:
|
|||
* `vimls`
|
||||
* `vint`
|
||||
* Vim help^
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* Vue
|
||||
* `cspell`
|
||||
* `prettier`
|
||||
* `vls`
|
||||
* `volar`
|
||||
* WGSL
|
||||
* `naga`
|
||||
* XHTML
|
||||
* `alex`!!
|
||||
* `alex`
|
||||
* `cspell`
|
||||
* `proselint`
|
||||
* `write-good`
|
||||
* XML
|
||||
* `xmllint`
|
||||
* YAML
|
||||
* `actionlint`
|
||||
* `circleci`!!
|
||||
* `prettier`
|
||||
* `spectral`
|
||||
* `swaglint`
|
||||
* `yaml-language-server`
|
||||
* `yamlfix`
|
||||
* `yamllint`
|
||||
* YANG
|
||||
|
@ -604,6 +675,7 @@ Notes:
|
|||
* Zeek
|
||||
* `zeek`!!
|
||||
* Zig
|
||||
* `zigfmt`
|
||||
* `zls`
|
||||
|
||||
===============================================================================
|
||||
|
|
|
@ -19,7 +19,8 @@ Additionally, ALE tries to locate and use the nearest existing `.swift-format`
|
|||
configuration file.
|
||||
|
||||
|
||||
g:ale_swift_appleswiftformat_executable *g:ale_swift_appleswiftformat_executable*
|
||||
g:ale_swift_appleswiftformat_executable
|
||||
*g:ale_swift_appleswiftformat_executable*
|
||||
*b:ale_swift_appleswiftformat_executable*
|
||||
Type: |String|
|
||||
Default: `'swift-format'`
|
||||
|
@ -28,7 +29,8 @@ g:ale_swift_appleswiftformat_executable *g:ale_swift_appleswiftformat_executable
|
|||
`swift-format`.
|
||||
|
||||
|
||||
g:ale_swift_appleswiftformat_use_swiftpm *g:ale_swift_appleswiftformat_use_swiftpm*
|
||||
g:ale_swift_appleswiftformat_use_swiftpm
|
||||
*g:ale_swift_appleswiftformat_use_swiftpm*
|
||||
*b:ale_swift_appleswiftformat_use_swiftpm*
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
@ -40,6 +42,12 @@ g:ale_swift_appleswiftformat_use_swiftpm *g:ale_swift_appleswiftformat_use_swift
|
|||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-swift-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
sourcekitlsp *ale-swift-sourcekitlsp*
|
||||
|
||||
|
@ -57,4 +65,3 @@ g:ale_sourcekit_lsp_executable *g:ale_sourcekit_lsp_executable*
|
|||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
|
|
|
@ -2,6 +2,25 @@
|
|||
ALE Terraform Integration *ale-terraform-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
checkov *ale-terraform-checkov*
|
||||
|
||||
g:ale_terraform_checkov_executable *g:ale_terraform_checkov_executable*
|
||||
*b:ale_terraform_checkov_executable*
|
||||
|
||||
Type: |String|
|
||||
Default: `'checkov'`
|
||||
|
||||
This variable can be changed to use a different executable for checkov.
|
||||
|
||||
|
||||
g:ale_terraform_checkov_options *g:ale_terraform_checkov_options*
|
||||
*b:ale_terraform_checkov_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to set additional options for checkov.
|
||||
|
||||
===============================================================================
|
||||
terraform-fmt-fixer *ale-terraform-fmt-fixer*
|
||||
|
||||
|
|
|
@ -21,7 +21,13 @@ g:ale_tex_chktex_options *g:ale_tex_chktex_options*
|
|||
This variable can be changed to modify flags given to chktex.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
===============================================================================
|
||||
cspell *ale-tex-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
lacheck *ale-tex-lacheck*
|
||||
|
||||
g:ale_lacheck_executable *g:ale_lacheck_executable*
|
||||
|
@ -32,12 +38,11 @@ g:ale_lacheck_executable *g:ale_lacheck_executable*
|
|||
This variable can be changed to change the path to lacheck.
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
latexindent *ale-tex-latexindent*
|
||||
latexindent *ale-tex-latexindent*
|
||||
|
||||
g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable*
|
||||
*b:ale_tex_latexindent_executable*
|
||||
g:ale_tex_latexindent_executable *g:ale_tex_latexindent_executable*
|
||||
*b:ale_tex_latexindent_executable*
|
||||
Type: |String|
|
||||
Default: `'latexindent'`
|
||||
|
||||
|
@ -52,26 +57,39 @@ g:ale_tex_latexindent_options *g:ale_tex_latexindent_options*
|
|||
This variable can be changed to modify flags given to latexindent.
|
||||
|
||||
|
||||
|
||||
===============================================================================
|
||||
texlab *ale-tex-texlab*
|
||||
texlab *ale-tex-texlab*
|
||||
|
||||
g:ale_tex_texlab_executable *g:ale_tex_texlab_executable*
|
||||
*b:ale_tex_texlab_executable*
|
||||
g:ale_tex_texlab_executable *g:ale_tex_texlab_executable*
|
||||
*b:ale_tex_texlab_executable*
|
||||
Type: |String|
|
||||
Default: `'texlab'`
|
||||
|
||||
This variable can be changed to change the path to texlab.
|
||||
|
||||
|
||||
g:ale_tex_texlab_options *g:ale_tex_texlab_options*
|
||||
*b:ale_tex_texlab_options*
|
||||
g:ale_tex_texlab_options *g:ale_tex_texlab_options*
|
||||
*b:ale_tex_texlab_options*
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to modify flags given to texlab.
|
||||
This variable can be changed to modify flags given to texlab command.
|
||||
|
||||
g:ale_tex_texlab_config *g:ale_tex_texlab_config*
|
||||
*b:ale_tex_texlab_config*
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary containing LSP configuration settings used to initialize texlab
|
||||
language server. Refer to texlab documentation for possible settings:
|
||||
|
||||
https://github.com/latex-lsp/texlab/blob/master/docs/options.md
|
||||
|
||||
For example to set build onSave initialization setting:
|
||||
|
||||
>
|
||||
let g:ale_tex_texlab_config = {"build":{"onSave":v:true}}
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE Texinfo Integration *ale-texinfo-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-texinfo-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
write-good *ale-texinfo-write-good*
|
||||
|
||||
|
@ -9,4 +15,4 @@ See |ale-write-good-options|
|
|||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE Text Integration *ale-text-options*
|
||||
|
||||
|
||||
==============================================================================
|
||||
cspell *ale-text-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
textlint *ale-text-textlint*
|
||||
|
||||
|
@ -39,4 +45,4 @@ See |ale-write-good-options|
|
|||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
ALE TypeScript Integration *ale-typescript-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
cspell *ale-typescript-cspell*
|
||||
|
||||
See |ale-cspell-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
deno *ale-typescript-deno*
|
||||
|
||||
|
@ -27,6 +33,7 @@ g:ale_deno_lsp_project_root *g:ale_deno_lsp_project_root*
|
|||
3. Use the directory of the current buffer (if the buffer was opened from
|
||||
a file).
|
||||
|
||||
|
||||
g:ale_deno_unstable *g:ale_deno_unstable*
|
||||
*b:ale_deno_unstable*
|
||||
Type: |Number|
|
||||
|
@ -34,13 +41,21 @@ g:ale_deno_unstable *g:ale_deno_unstable*
|
|||
|
||||
Enable or disable unstable Deno features and APIs.
|
||||
|
||||
g:ale_deno_importMap *g:ale_deno_importMap*
|
||||
*b:ale_deno_importMap*
|
||||
|
||||
g:ale_deno_importMap *g:ale_deno_importMap*
|
||||
*b:ale_deno_importMap*
|
||||
Type: |String|
|
||||
Default: `'import_map.json'`
|
||||
|
||||
Specify the import map filename to load url maps in a deno project.
|
||||
|
||||
|
||||
===============================================================================
|
||||
dprint *ale-typescript-dprint*
|
||||
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/typescript
|
||||
|
||||
|
||||
===============================================================================
|
||||
eslint *ale-typescript-eslint*
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue