mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 15:26:52 +08:00
Compare commits
19 Commits
d2f4090c33
...
lsp-diagno
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1c8d665d6 | ||
|
|
fe50a711cb | ||
|
|
19e1b5a9d3 | ||
|
|
33a902f489 | ||
|
|
a1c57918ef | ||
|
|
1aae83497d | ||
|
|
f4af0dc84b | ||
|
|
7f43666fb3 | ||
|
|
bcd1a12949 | ||
|
|
53f036fe9f | ||
|
|
3dfebe45c6 | ||
|
|
964e0a2e39 | ||
|
|
ee975196ff | ||
|
|
3f7ea86ae1 | ||
|
|
dd8d7cb4b4 | ||
|
|
8216ee4a65 | ||
|
|
9a251b2865 | ||
|
|
61a1fcc92f | ||
|
|
c9eb8f9d15 |
@@ -41,10 +41,10 @@ install:
|
||||
- ps: >-
|
||||
if (!(Test-Path -Path C:\vim)){
|
||||
Add-Type -A System.IO.Compression.FileSystem
|
||||
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip `
|
||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip `
|
||||
-OutFile C:\vim.zip
|
||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
||||
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip `
|
||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip `
|
||||
-OutFile C:\rt.zip
|
||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
||||
}
|
||||
|
||||
1
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
1
.github/ISSUE_TEMPLATE/report-a-bug.md
vendored
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: Report a bug
|
||||
labels: bug
|
||||
type: Bug
|
||||
about: Report a bug with ALE.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: Suggest a new linter or fixer
|
||||
labels: new tool
|
||||
type: Task
|
||||
about: Suggest a new tool ALE can officially integrate with.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: Suggest an improvement
|
||||
labels: enhancement
|
||||
type: Feature
|
||||
about: Suggest some way to improve ALE, or add a new feature.
|
||||
|
||||
---
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
"test"
|
||||
],
|
||||
"workspace.library": [
|
||||
"/usr/share/nvim/runtime/lua",
|
||||
"/opt/homebrew/share/nvim/runtime/lua"
|
||||
"/usr/share/nvim/runtime/lua"
|
||||
],
|
||||
"runtime.pathStrict": true,
|
||||
"runtime.path": [
|
||||
|
||||
@@ -61,14 +61,6 @@ linting and fixing of code in Vim. ALE offers the following.
|
||||
* Windows support
|
||||
* Well-integrated with other plugins
|
||||
|
||||
## Sponsorship
|
||||
|
||||
If you would like to donate to Dense Analysis to say thank you for ALE, please
|
||||
consider visiting our [Sponsorship page](https://denseanalysis.org/sponsors/).
|
||||
Funds will be used to pay for our hosting fees and research. Whilst visiting our
|
||||
site, please feel free to make use of our educational resources and other
|
||||
recommended tools.
|
||||
|
||||
## Supported Languages and Tools
|
||||
|
||||
ALE supports a wide variety of languages and tools. See the
|
||||
|
||||
@@ -2,44 +2,11 @@
|
||||
" Description: ansible-lint for ansible-yaml files
|
||||
|
||||
call ale#Set('ansible_ansible_lint_executable', 'ansible-lint')
|
||||
call ale#Set('ansible_ansible_lint_auto_pipenv', 0)
|
||||
call ale#Set('ansible_ansible_lint_auto_poetry', 0)
|
||||
call ale#Set('ansible_ansible_lint_auto_uv', 0)
|
||||
call ale#Set('ansible_ansible_lint_change_directory', 1)
|
||||
|
||||
function! ale_linters#ansible#ansible_lint#GetExecutable(buffer) abort
|
||||
if (ale#Var(a:buffer, 'python_auto_pipenv')
|
||||
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_pipenv'))
|
||||
\ && ale#python#PipenvPresent(a:buffer)
|
||||
return 'pipenv'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_poetry')
|
||||
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_poetry'))
|
||||
\ && ale#python#PoetryPresent(a:buffer)
|
||||
return 'poetry'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_uv')
|
||||
\ || ale#Var(a:buffer, 'ansible_ansible_lint_auto_uv'))
|
||||
\ && ale#python#UvPresent(a:buffer)
|
||||
return 'uv'
|
||||
endif
|
||||
|
||||
return ale#Var(a:buffer, 'ansible_ansible_lint_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#ansible#ansible_lint#GetCwd(buffer) abort
|
||||
if ale#Var(a:buffer, 'ansible_ansible_lint_change_directory')
|
||||
" Run from project root if found, else from buffer dir.
|
||||
let l:project_root = ale#python#FindProjectRoot(a:buffer)
|
||||
|
||||
return !empty(l:project_root) ? l:project_root : '%s:h'
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
||||
for l:line in a:lines[:10]
|
||||
if match(l:line, '^Traceback') >= 0
|
||||
@@ -136,50 +103,28 @@ function! ale_linters#ansible#ansible_lint#Handle(buffer, version, lines) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#ansible#ansible_lint#GetCommand(buffer, version) abort
|
||||
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)
|
||||
|
||||
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||
\ ? ' run ansible-lint'
|
||||
\ : ''
|
||||
|
||||
let l:opts_map = {
|
||||
\ '>=6.0.0': ' --nocolor -f json -x yaml %s',
|
||||
\ '>=5.0.0': ' --nocolor --parseable-severity -x yaml %s',
|
||||
\ '<5.0.0': ' --nocolor -p %t'
|
||||
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:cmd_opts = ale#semver#GTE(a:version, [6, 0]) ? l:opts_map['>=6.0.0'] :
|
||||
\ ale#semver#GTE(a:version, [5, 0]) ? l:opts_map['>=5.0.0'] :
|
||||
\ l:opts_map['<5.0.0']
|
||||
|
||||
let l:command = ale#Escape(l:executable) . l:exec_args . l:cmd_opts
|
||||
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
|
||||
|
||||
function! ale_linters#ansible#ansible_lint#RunWithVersionCheck(buffer) abort
|
||||
let l:executable = ale_linters#ansible#ansible_lint#GetExecutable(a:buffer)
|
||||
|
||||
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||
\ ? ' run ansible-lint'
|
||||
\ : ''
|
||||
|
||||
let l:command = ale#Escape(l:executable) . l:exec_args . ' --version'
|
||||
|
||||
return ale#semver#RunWithVersionCheck(
|
||||
\ a:buffer,
|
||||
\ l:executable,
|
||||
\ l:command,
|
||||
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
|
||||
\)
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('ansible', {
|
||||
\ 'name': 'ansible_lint',
|
||||
\ 'aliases': ['ansible', 'ansible-lint'],
|
||||
\ 'executable': function('ale_linters#ansible#ansible_lint#GetExecutable'),
|
||||
\ 'cwd': function('ale_linters#ansible#ansible_lint#GetCwd'),
|
||||
\ 'command': function('ale_linters#ansible#ansible_lint#RunWithVersionCheck'),
|
||||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
|
||||
\ buffer,
|
||||
\ ale_linters#ansible#ansible_lint#GetExecutable(buffer),
|
||||
\ '%e --version',
|
||||
\ function('ale_linters#ansible#ansible_lint#GetCommand'),
|
||||
\ )},
|
||||
\ 'lint_file': 1,
|
||||
\ 'callback': {buffer, lines -> ale#semver#RunWithVersionCheck(
|
||||
\ buffer,
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('asciidoc')
|
||||
call ale#linter#Define('asciidoc', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f asciidoc -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
" Description: named-checkzone for bindzone
|
||||
|
||||
call ale#Set('bindzone_checkzone_executable', 'named-checkzone')
|
||||
call ale#Set('bindzone_checkzone_options', '-c IN')
|
||||
|
||||
function! ale_linters#bindzone#checkzone#GetCommand(buffer) abort
|
||||
return '%e' . ale#Pad(ale#Var(a:buffer, 'bindzone_checkzone_options'))
|
||||
\ . ' example.com %t'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#bindzone#checkzone#Handle(buffer, lines) abort
|
||||
let l:warning_pattern = '\vzone example.com/IN: (.+)$'
|
||||
let l:error_pattern = '\v:(\d+): (.+)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:error_pattern)
|
||||
let l:lnum = l:match[1]
|
||||
let l:text = l:match[2]
|
||||
|
||||
call add(l:output, {'text': l:text, 'lnum': l:lnum + 0, 'type': 'E'})
|
||||
endfor
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:warning_pattern)
|
||||
let l:text = l:match[1]
|
||||
|
||||
" Ignore information messages
|
||||
let l:scrub_match = matchlist(l:text, '\v(loaded serial|not loaded due to) ')
|
||||
|
||||
if empty(l:scrub_match)
|
||||
call add(l:output, {'text': l:text, 'lnum': 0, 'type': 'W'})
|
||||
endif
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('bindzone', {
|
||||
\ 'name': 'checkzone',
|
||||
\ 'executable': {b -> ale#Var(b, 'bindzone_checkzone_executable')},
|
||||
\ 'command': function('ale_linters#bindzone#checkzone#GetCommand'),
|
||||
\ 'callback': 'ale_linters#bindzone#checkzone#Handle',
|
||||
\ 'read_buffer': 0,
|
||||
\})
|
||||
@@ -5,14 +5,6 @@ call ale#Set('bitbake_oelint_adv_executable', 'oelint-adv')
|
||||
call ale#Set('bitbake_oelint_adv_options', '')
|
||||
call ale#Set('bitbake_oelint_adv_config', '.oelint.cfg')
|
||||
|
||||
function! ale_linters#bitbake#oelint_adv#StripAnsiCodes(line) abort
|
||||
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#bitbake#oelint_adv#RemoveBranch(line) abort
|
||||
return substitute(a:line, ' \[branch:.*', '', 'g')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
|
||||
let l:config_file = ale#path#FindNearestFile(a:buffer,
|
||||
\ ale#Var(a:buffer, 'bitbake_oelint_adv_config'))
|
||||
@@ -25,25 +17,26 @@ function! ale_linters#bitbake#oelint_adv#Command(buffer) abort
|
||||
endfunction
|
||||
|
||||
function! ale_linters#bitbake#oelint_adv#Handle(buffer, lines) abort
|
||||
let l:pattern = '\v^(.{-}):(.{-}):(.{-}):(.{-}):(.{-})$'
|
||||
let l:pattern = '\v^(.+):(.+):(.+):(.+):(.+)$'
|
||||
let l:output = []
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
call add(l:output, {
|
||||
\ 'lnum': str2nr(l:match[2]),
|
||||
\ 'type': l:match[3] is# 'error'
|
||||
\ ? 'E'
|
||||
\ : (l:match[3] is# 'warning' ? 'W' : 'I'),
|
||||
\ 'text': ale_linters#bitbake#oelint_adv#RemoveBranch(
|
||||
\ ale_linters#bitbake#oelint_adv#StripAnsiCodes(l:match[5])
|
||||
\ ),
|
||||
\ 'code': l:match[4],
|
||||
\})
|
||||
\ 'lnum': str2nr(l:match[2]),
|
||||
\ 'type': l:match[3] is# 'error'
|
||||
\ ? 'E' : (l:match[3] is# 'warning' ? 'W' : 'I'),
|
||||
\ 'text': StripAnsiCodes(l:match[5]),
|
||||
\ 'code': l:match[4]
|
||||
\ })
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
function! StripAnsiCodes(line) abort
|
||||
return substitute(a:line, '\e\[[0-9;]\+[mK]', '', 'g')
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('bitbake', {
|
||||
\ 'name': 'oelint_adv',
|
||||
\ 'output_stream': 'both',
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
" Author: J. Handsel <jennpbc@posteo.net>, Thyme-87 <thyme-87@posteo.me>
|
||||
" Description: use checkov for providing warnings for cloudformation via ale
|
||||
|
||||
call ale#Set('cloudformation_checkov_executable', 'checkov')
|
||||
call ale#Set('cloudformation_checkov_options', '')
|
||||
|
||||
function! ale_linters#cloudformation#checkov#GetExecutable(buffer) abort
|
||||
return ale#Var(a:buffer, 'cloudformation_checkov_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#cloudformation#checkov#GetCommand(buffer) abort
|
||||
return '%e ' . '-f %t -o json --quiet --framework cloudformation ' . ale#Var(a:buffer, 'cloudformation_checkov_options')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#cloudformation#checkov#Handle(buffer, lines) abort
|
||||
let l:output = []
|
||||
|
||||
let l:results = get(get(ale#util#FuzzyJSONDecode(a:lines, {}), 'results', []), 'failed_checks', [])
|
||||
|
||||
for l:violation in l:results
|
||||
call add(l:output, {
|
||||
\ 'filename': l:violation['file_path'],
|
||||
\ 'lnum': l:violation['file_line_range'][0],
|
||||
\ 'end_lnum': l:violation['file_line_range'][1],
|
||||
\ 'text': l:violation['check_name'] . ' [' . l:violation['check_id'] . ']',
|
||||
\ 'detail': l:violation['check_id'] . ': ' . l:violation['check_name'] . "\n" .
|
||||
\ 'For more information, see: '. l:violation['guideline'],
|
||||
\ 'type': 'W',
|
||||
\ })
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('cloudformation', {
|
||||
\ 'name': 'checkov',
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable': function('ale_linters#cloudformation#checkov#GetExecutable'),
|
||||
\ 'command': function('ale_linters#cloudformation#checkov#GetCommand'),
|
||||
\ 'callback': 'ale_linters#cloudformation#checkov#Handle',
|
||||
\})
|
||||
@@ -49,6 +49,7 @@ function! ale_linters#dockerfile#hadolint#Handle(buffer, lines) abort
|
||||
if l:match[5] isnot# ''
|
||||
let l:code = l:match[4] . l:match[5]
|
||||
let l:link = ' ( ' . l:domain . l:code . ' )'
|
||||
let l:text = l:code . ': ' . l:detail
|
||||
let l:detail = l:code . l:link . "\n\n" . l:detail
|
||||
else
|
||||
let l:type = 'E'
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
" Author: gomfol12
|
||||
" Desciption: A linter for fortran using fortitude.
|
||||
|
||||
call ale#Set('fortran_fortitude_executable', 'fortitude')
|
||||
call ale#Set('fortran_fortitude_options', '')
|
||||
|
||||
let s:severity_map = {
|
||||
\ 'E': 'E',
|
||||
\ 'C': 'W',
|
||||
\ 'OB': 'I',
|
||||
\ 'MOD': 'I',
|
||||
\ 'S': 'I',
|
||||
\ 'PORT': 'I',
|
||||
\ 'FORT': 'I',
|
||||
\}
|
||||
|
||||
function! ale_linters#fortran#fortitude#Handle(buffer, lines) abort
|
||||
let l:output = []
|
||||
|
||||
for l:error in ale#util#FuzzyJSONDecode(a:lines, [])
|
||||
let l:prefix = matchstr(l:error['code'], '^\a\+')
|
||||
let l:type = get(s:severity_map, l:prefix, 'I')
|
||||
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:error['location']['row'],
|
||||
\ 'end_lnum': l:error['end_location']['row'],
|
||||
\ 'col': l:error['location']['column'],
|
||||
\ 'end_col': l:error['end_location']['column'],
|
||||
\ 'text': l:error['message'],
|
||||
\ 'type': l:type,
|
||||
\ 'code': l:error['code'],
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('fortran', {
|
||||
\ 'name': 'fortitude',
|
||||
\ 'output_stream': 'stdout',
|
||||
\ 'executable': {b -> ale#Var(b, 'fortran_fortitude_executable')},
|
||||
\ 'command': {b ->
|
||||
\ '%e' . ' check --output-format json' . ale#Pad(ale#Var(b, 'fortran_fortitude_options')) . ' %s'
|
||||
\ },
|
||||
\ 'callback': 'ale_linters#fortran#fortitude#Handle',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
@@ -5,38 +5,26 @@ call ale#Set('go_golangci_lint_options', '')
|
||||
call ale#Set('go_golangci_lint_executable', 'golangci-lint')
|
||||
call ale#Set('go_golangci_lint_package', 1)
|
||||
|
||||
function! ale_linters#go#golangci_lint#GetExecutable(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'go_golangci_lint_executable')
|
||||
|
||||
return l:executable
|
||||
endfunction
|
||||
|
||||
function! ale_linters#go#golangci_lint#GetCommand(buffer, version) abort
|
||||
function! ale_linters#go#golangci_lint#GetCommand(buffer) abort
|
||||
let l:filename = expand('#' . a:buffer . ':t')
|
||||
let l:options = ale#Var(a:buffer, 'go_golangci_lint_options')
|
||||
let l:lint_package = ale#Var(a:buffer, 'go_golangci_lint_package')
|
||||
|
||||
if ale#semver#GTE(a:version, [2, 0, 0])
|
||||
let l:options = l:options
|
||||
\ . ' --output.json.path stdout'
|
||||
\ . ' --output.text.path stderr'
|
||||
\ . ' --show-stats=0'
|
||||
else
|
||||
let l:options = l:options
|
||||
\ . ' --out-format=json'
|
||||
\ . ' --show-stats=0'
|
||||
endif
|
||||
|
||||
if l:lint_package
|
||||
return ale#go#EnvString(a:buffer)
|
||||
\ . '%e run '
|
||||
\ . l:options
|
||||
\ . ' --out-format=json'
|
||||
\ . ' --show-stats=0'
|
||||
endif
|
||||
|
||||
return ale#go#EnvString(a:buffer)
|
||||
\ . '%e run '
|
||||
\ . ale#Escape(l:filename)
|
||||
\ . ' ' . l:options
|
||||
\ . ' --out-format=json'
|
||||
\ . ' --show-stats=0'
|
||||
endfunction
|
||||
|
||||
function! ale_linters#go#golangci_lint#Handler(buffer, lines) abort
|
||||
@@ -70,14 +58,9 @@ endfunction
|
||||
|
||||
call ale#linter#Define('go', {
|
||||
\ 'name': 'golangci-lint',
|
||||
\ 'executable': function('ale_linters#go#golangci_lint#GetExecutable'),
|
||||
\ 'executable': {b -> ale#Var(b, 'go_golangci_lint_executable')},
|
||||
\ 'cwd': '%s:h',
|
||||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
|
||||
\ buffer,
|
||||
\ ale_linters#go#golangci_lint#GetExecutable(buffer),
|
||||
\ '%e --version',
|
||||
\ function('ale_linters#go#golangci_lint#GetCommand'),
|
||||
\ )},
|
||||
\ 'command': function('ale_linters#go#golangci_lint#GetCommand'),
|
||||
\ 'callback': 'ale_linters#go#golangci_lint#Handler',
|
||||
\ 'lint_file': 1,
|
||||
\})
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
" Description: linter for jinja using j2lint
|
||||
|
||||
call ale#Set('jinja_j2lint_executable', 'j2lint')
|
||||
call ale#Set('jinja_j2lint_options', '')
|
||||
call ale#Set('jinja_j2lint_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('jinja_j2lint_auto_pipenv', 0)
|
||||
call ale#Set('jinja_j2lint_auto_poetry', 0)
|
||||
call ale#Set('jinja_j2lint_auto_uv', 0)
|
||||
|
||||
function! ale_linters#jinja#j2lint#GetExecutable(buffer) abort
|
||||
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'jinja_j2lint_auto_pipenv'))
|
||||
\ && ale#python#PipenvPresent(a:buffer)
|
||||
return 'pipenv'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'jinja_j2lint_auto_poetry'))
|
||||
\ && ale#python#PoetryPresent(a:buffer)
|
||||
return 'poetry'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'jinja_j2lint_auto_uv'))
|
||||
\ && ale#python#UvPresent(a:buffer)
|
||||
return 'uv'
|
||||
endif
|
||||
|
||||
return ale#python#FindExecutable(a:buffer, 'jinja_j2lint', ['j2lint'])
|
||||
endfunction
|
||||
|
||||
function! ale_linters#jinja#j2lint#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#jinja#j2lint#GetExecutable(a:buffer)
|
||||
|
||||
let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$'
|
||||
\ ? ' run j2lint'
|
||||
\ : ''
|
||||
|
||||
return ale#Escape(l:executable) . l:exec_args
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'jinja_j2lint_options'))
|
||||
\ . ' %t'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('jinja', {
|
||||
\ 'name': 'j2lint',
|
||||
\ 'executable': function('ale_linters#jinja#j2lint#GetExecutable'),
|
||||
\ 'command': function('ale_linters#jinja#j2lint#GetCommand'),
|
||||
\ 'callback': 'ale#handlers#unix#HandleAsError',
|
||||
\})
|
||||
@@ -1,28 +0,0 @@
|
||||
" Author: Benjamin Block <https://github.com/benjamindblock>
|
||||
" Description: A language server for Lean 4.
|
||||
|
||||
function! ale_linters#lean#lake#GetProjectRoot(buffer) abort
|
||||
let l:lakefile_toml = ale#path#FindNearestFile(a:buffer, 'lakefile.toml')
|
||||
let l:lakefile_lean = ale#path#FindNearestFile(a:buffer, 'lakefile.lean')
|
||||
|
||||
if !empty(l:lakefile_toml)
|
||||
return fnamemodify(l:lakefile_toml, ':p:h')
|
||||
elseif !empty(l:lakefile_lean)
|
||||
return fnamemodify(l:lakefile_lean, ':p:h')
|
||||
else
|
||||
return fnamemodify('', ':h')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call ale#Set('lean_lake_executable', 'lake')
|
||||
call ale#Set('lean_lake_config', {})
|
||||
|
||||
call ale#linter#Define('lean', {
|
||||
\ 'name': 'lake',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'language': 'lean',
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'lean_lake_config')},
|
||||
\ 'executable': {b -> ale#Var(b, 'lean_lake_executable')},
|
||||
\ 'command': '%e serve',
|
||||
\ 'project_root': function('ale_linters#lean#lake#GetProjectRoot'),
|
||||
\})
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('markdown')
|
||||
call ale#linter#Define('markdown', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f markdown -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -29,7 +29,7 @@ function! ale_linters#nix#nix#Handle(buffer, lines) abort
|
||||
\ 'type': 'E',
|
||||
\ 'lnum': l:result.line,
|
||||
\ 'col': l:result.column,
|
||||
\ 'text': substitute(l:result.raw_msg, '\e\[[0-9;]*m', '', 'g'),
|
||||
\ 'text': l:result.raw_msg
|
||||
\})
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
" Authors: ophirr33 <coghlan.ty@gmail.com>, rymdbar <https://rymdbar.x20.se/>
|
||||
" Description: Perl::LanguageServer for perl, from cpan.org
|
||||
|
||||
" This should have the same value as in perl.vim
|
||||
call ale#Set('perl_perl_executable', 'perl')
|
||||
" Please note that perl_perl_options does not exist here.
|
||||
|
||||
function! ale_linters#perl#languageserver#GetProjectRoot(buffer) abort
|
||||
" Makefile.PL, https://perldoc.perl.org/ExtUtils::MakeMaker
|
||||
" Build.PL, https://metacpan.org/pod/Module::Build
|
||||
" dist.ini, https://metacpan.org/pod/Dist::Zilla
|
||||
let l:potential_roots = [ 'Makefile.PL', 'Build.PL', 'dist.ini', '.git' ]
|
||||
|
||||
for l:root in l:potential_roots
|
||||
let l:project_root = ale#path#FindNearestFile(a:buffer, l:root)
|
||||
|
||||
if !empty(l:project_root)
|
||||
return fnamemodify(l:project_root . '/', ':p:h:h')
|
||||
endif
|
||||
endfor
|
||||
|
||||
return fnamemodify(expand('#' . a:buffer . ':p:h'), ':p:h')
|
||||
endfunction
|
||||
|
||||
call ale#Set('perl_languageserver_config', {})
|
||||
|
||||
function! s:get_lsp_config(buffer) abort
|
||||
" This tool doesn't kick in unless workspace/didChangeConfiguration is
|
||||
" called, thus this function returning a fallback dict when there is no
|
||||
" config.
|
||||
let l:lsp_config = ale#Var(a:buffer, 'perl_languageserver_config')
|
||||
|
||||
return empty(l:lsp_config) ? { 'perl': { 'enable': 1 } } : l:lsp_config
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('perl', {
|
||||
\ 'name': 'languageserver',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'perl_perl_executable')},
|
||||
\ 'command': '%e -MPerl::LanguageServer -ePerl::LanguageServer::run',
|
||||
\ 'lsp_config': {b -> s:get_lsp_config(b)},
|
||||
\ 'project_root': function('ale_linters#perl#languageserver#GetProjectRoot'),
|
||||
\ })
|
||||
@@ -1,9 +1,6 @@
|
||||
" Author: Arizard <https://github.com/Arizard>
|
||||
" Description: PHPactor integration for ALE
|
||||
|
||||
call ale#Set('php_phpactor_executable', 'phpactor')
|
||||
call ale#Set('php_phpactor_init_options', {})
|
||||
|
||||
" Copied from langserver.vim
|
||||
function! ale_linters#php#phpactor#GetProjectRoot(buffer) abort
|
||||
let l:composer_path = ale#path#FindNearestFile(a:buffer, 'composer.json')
|
||||
@@ -20,8 +17,7 @@ endfunction
|
||||
call ale#linter#Define('php', {
|
||||
\ 'name': 'phpactor',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'php_phpactor_executable')},
|
||||
\ 'executable': 'phpactor',
|
||||
\ 'command': '%e language-server',
|
||||
\ 'initialization_options': {b -> ale#Var(b, 'php_phpactor_init_options')},
|
||||
\ 'project_root': function('ale_linters#php#phpactor#GetProjectRoot'),
|
||||
\})
|
||||
|
||||
@@ -27,10 +27,6 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
|
||||
|
||||
let l:level = ale#Var(a:buffer, 'php_phpstan_level')
|
||||
|
||||
if type(l:level) is v:t_number
|
||||
let l:level = string(l:level)
|
||||
endif
|
||||
|
||||
if empty(l:level) && empty(ale_linters#php#phpstan#FindConfigFile(a:buffer))
|
||||
" if no configuration file is found, then use 4 as a default level
|
||||
let l:level = '4'
|
||||
@@ -87,10 +83,6 @@ function! ale_linters#php#phpstan#FindConfigFile(buffer) abort
|
||||
let l:result = ale#path#FindNearestFile(a:buffer, 'phpstan.neon.dist')
|
||||
endif
|
||||
|
||||
if empty(l:result)
|
||||
let l:result = ale#path#FindNearestFile(a:buffer, 'phpstan.dist.neon')
|
||||
endif
|
||||
|
||||
return l:result
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
" Author: oliverralbertini <oliver.albertini@gmail.com>
|
||||
" Description: A performant type-checker supporting LSP for Python 3 created by Facebook
|
||||
|
||||
call ale#Set('python_pyrefly_executable', 'pyrefly')
|
||||
call ale#Set('python_pyrefly_use_global', get(g:, 'ale_use_global_executables', 0))
|
||||
call ale#Set('python_pyrefly_auto_pipenv', 0)
|
||||
call ale#Set('python_pyrefly_auto_poetry', 0)
|
||||
call ale#Set('python_pyrefly_auto_uv', 0)
|
||||
|
||||
function! ale_linters#python#pyrefly#GetExecutable(buffer) abort
|
||||
if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_pyrefly_auto_pipenv'))
|
||||
\ && ale#python#PipenvPresent(a:buffer)
|
||||
return 'pipenv'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_poetry') || ale#Var(a:buffer, 'python_pyrefly_auto_poetry'))
|
||||
\ && ale#python#PoetryPresent(a:buffer)
|
||||
return 'poetry'
|
||||
endif
|
||||
|
||||
if (ale#Var(a:buffer, 'python_auto_uv') || ale#Var(a:buffer, 'python_pyrefly_auto_uv'))
|
||||
\ && ale#python#UvPresent(a:buffer)
|
||||
return 'uv'
|
||||
endif
|
||||
|
||||
return ale#python#FindExecutable(a:buffer, 'python_pyrefly', ['pyrefly'])
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pyrefly#GetCommand(buffer) abort
|
||||
let l:executable = ale_linters#python#pyrefly#GetExecutable(a:buffer)
|
||||
let l:exec_args = [
|
||||
\ ale#Escape(l:executable)
|
||||
\ ]
|
||||
\ + (l:executable =~? '\(pipenv\|poetry\|uv\)$' ? ['run', 'pyrefly'] : [])
|
||||
\ + [
|
||||
\ 'lsp',
|
||||
\ ]
|
||||
|
||||
return join(l:exec_args, ' ')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#pyrefly#GetCwd(buffer) abort
|
||||
" Run from project root if found, else from buffer dir.
|
||||
let l:project_root = ale#python#FindProjectRoot(a:buffer)
|
||||
|
||||
return !empty(l:project_root) ? l:project_root : '%s:h'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('python', {
|
||||
\ 'name': 'pyrefly',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': function('ale_linters#python#pyrefly#GetExecutable'),
|
||||
\ 'command': function('ale_linters#python#pyrefly#GetCommand'),
|
||||
\ 'project_root': function('ale#python#FindProjectRoot'),
|
||||
\ 'completion_filter': 'ale#completion#python#CompletionItemFilter',
|
||||
\ 'cwd': function('ale_linters#python#pyrefly#GetCwd'),
|
||||
\})
|
||||
@@ -34,22 +34,6 @@ function! ale_linters#python#ruff#GetExecutable(buffer) abort
|
||||
return ale#python#FindExecutable(a:buffer, 'python_ruff', ['ruff'])
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#ruff#RunWithVersionCheck(buffer) abort
|
||||
let l:executable = ale_linters#python#ruff#GetExecutable(a:buffer)
|
||||
let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$'
|
||||
\ ? ' run ruff'
|
||||
\ : ''
|
||||
|
||||
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#ruff#GetCommand'),
|
||||
\)
|
||||
endfunction
|
||||
|
||||
function! ale_linters#python#ruff#GetCwd(buffer) abort
|
||||
if ale#Var(a:buffer, 'python_ruff_change_directory')
|
||||
" Run from project root if found, else from buffer dir.
|
||||
@@ -88,35 +72,20 @@ function! ale_linters#python#ruff#Handle(buffer, lines) abort
|
||||
try
|
||||
let l:item = json_decode(l:line)
|
||||
catch
|
||||
" If we can't decode a line, skip it.
|
||||
continue
|
||||
let l:item = v:null
|
||||
endtry
|
||||
|
||||
if empty(l:item)
|
||||
continue
|
||||
if !empty(l:item)
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:item.location.row,
|
||||
\ 'col': l:item.location.column,
|
||||
\ 'end_lnum': l:item.end_location.row,
|
||||
\ 'end_col': l:item.end_location.column - 1,
|
||||
\ 'code': l:item.code,
|
||||
\ 'text': l:item.message,
|
||||
\ 'type': l:item.code =~? '\vE\d+' ? 'E' : 'W',
|
||||
\})
|
||||
endif
|
||||
|
||||
if (l:item.code is# 'W291' || l:item.code is# 'W293')
|
||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||
" Skip warnings for trailing whitespace if the option is off.
|
||||
continue
|
||||
endif
|
||||
|
||||
if l:item.code is# 'W391'
|
||||
\&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines')
|
||||
" Skip warnings for trailing blank lines if the option is off
|
||||
continue
|
||||
endif
|
||||
|
||||
call add(l:output, {
|
||||
\ 'lnum': l:item.location.row,
|
||||
\ 'col': l:item.location.column,
|
||||
\ 'end_lnum': l:item.end_location.row,
|
||||
\ 'end_col': l:item.end_location.column - 1,
|
||||
\ 'code': l:item.code,
|
||||
\ 'text': l:item.message,
|
||||
\ 'type': l:item.code =~? '\vE\d+' ? 'E' : 'W',
|
||||
\})
|
||||
endfor
|
||||
|
||||
return l:output
|
||||
@@ -126,7 +95,12 @@ call ale#linter#Define('python', {
|
||||
\ 'name': 'ruff',
|
||||
\ 'executable': function('ale_linters#python#ruff#GetExecutable'),
|
||||
\ 'cwd': function('ale_linters#python#ruff#GetCwd'),
|
||||
\ 'command': function('ale_linters#python#ruff#RunWithVersionCheck'),
|
||||
\ 'command': {buffer -> ale#semver#RunWithVersionCheck(
|
||||
\ buffer,
|
||||
\ ale_linters#python#ruff#GetExecutable(buffer),
|
||||
\ '%e --version',
|
||||
\ function('ale_linters#python#ruff#GetCommand'),
|
||||
\ )},
|
||||
\ 'callback': 'ale_linters#python#ruff#Handle',
|
||||
\ 'output_stream': 'both',
|
||||
\ 'read_buffer': 1,
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('review')
|
||||
call ale#linter#Define('review', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f review -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
" Author: Benjamin Block <https://github.com/benjamindblock>
|
||||
" Description: A language server for Roc.
|
||||
|
||||
function! ale_linters#roc#roc_language_server#GetProjectRoot(buffer) abort
|
||||
let l:roc_main_file = ale#path#FindNearestFile(a:buffer, 'main.roc')
|
||||
|
||||
if !empty(l:roc_main_file)
|
||||
return fnamemodify(l:roc_main_file, ':p:h')
|
||||
else
|
||||
return fnamemodify('', ':h')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
call ale#Set('roc_roc_language_server_executable', 'roc_language_server')
|
||||
call ale#Set('roc_roc_language_server_config', {})
|
||||
|
||||
call ale#linter#Define('roc', {
|
||||
\ 'name': 'roc_language_server',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'language': 'roc',
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'roc_roc_language_server_config')},
|
||||
\ 'executable': {b -> ale#Var(b, 'roc_roc_language_server_executable')},
|
||||
\ 'command': '%e',
|
||||
\ 'project_root': function('ale_linters#roc#roc_language_server#GetProjectRoot'),
|
||||
\})
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('rst')
|
||||
call ale#linter#Define('rst', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f rest -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
call ale#Set('ruby_sorbet_executable', 'srb')
|
||||
call ale#Set('ruby_sorbet_options', '')
|
||||
call ale#Set('ruby_sorbet_enable_watchman', 0)
|
||||
call ale#Set('ruby_sorbet_initialization_options', { 'highlightUntyped': v:false })
|
||||
|
||||
function! ale_linters#ruby#sorbet#GetCommand(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'ruby_sorbet_executable')
|
||||
@@ -22,6 +21,6 @@ call ale#linter#Define('ruby', {
|
||||
\ 'language': 'ruby',
|
||||
\ 'executable': {b -> ale#Var(b, 'ruby_sorbet_executable')},
|
||||
\ 'command': function('ale_linters#ruby#sorbet#GetCommand'),
|
||||
\ 'project_root': function('ale#ruby#FindProjectRoot'),
|
||||
\ 'initialization_options': {b -> ale#Var(b, 'ruby_sorbet_initialization_options')}
|
||||
\ 'project_root': function('ale#ruby#FindProjectRoot')
|
||||
\})
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ function! ale_linters#scala#metals#GetProjectRoot(buffer) abort
|
||||
|
||||
let l:potential_roots = [
|
||||
\ 'build.sc',
|
||||
\ 'build.mill',
|
||||
\ 'build.sbt',
|
||||
\ '.bloop',
|
||||
\ '.metals',
|
||||
|
||||
@@ -25,7 +25,6 @@ endfunction
|
||||
|
||||
call ale#linter#Define('sh', {
|
||||
\ 'name': 'language_server',
|
||||
\ 'aliases': ['bash-language-server'],
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': function('ale_linters#sh#language_server#GetExecutable'),
|
||||
\ 'command': function('ale_linters#sh#language_server#GetCommand'),
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('tex')
|
||||
call ale#linter#Define('tex', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f latex -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#handlers#redpen#DefineLinter('text')
|
||||
call ale#linter#Define('text', {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': 'redpen -f plain -r json %t',
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
" Author: Ben Boeckel <github@me.benboeckel.net>
|
||||
" Description: TOML Formatter / Linter / Language Server
|
||||
|
||||
call ale#Set('toml_tombi_executable', 'tombi')
|
||||
call ale#Set('toml_tombi_lsp_options', '')
|
||||
|
||||
function! ale_linters#toml#tombi#GetProjectRoot(buffer) abort
|
||||
" Try to find nearest tombi.toml
|
||||
let l:tombiconfig_file = ale#path#FindNearestFile(a:buffer, 'tombi.toml')
|
||||
|
||||
if !empty(l:tombiconfig_file)
|
||||
return fnamemodify(l:tombiconfig_file . '/', ':p:h:h')
|
||||
endif
|
||||
|
||||
" Try to find nearest pyproject.toml
|
||||
let l:pyproject_file = ale#path#FindNearestFile(a:buffer, 'pyproject.toml')
|
||||
|
||||
if !empty(l:pyproject_file)
|
||||
return fnamemodify(l:pyproject_file . '/', ':p:h:h')
|
||||
endif
|
||||
|
||||
" Try to find nearest `git` directory
|
||||
let l:gitdir = ale#path#FindNearestFile(a:buffer, '.git')
|
||||
|
||||
if !empty(l:gitdir)
|
||||
return fnamemodify(l:gitdir . '/', ':p:h:h')
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('toml', {
|
||||
\ 'name': 'tombi',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'executable': {b -> ale#Var(b, 'toml_tombi_executable')},
|
||||
\ 'command': {b -> '%e lsp' . ale#Pad(ale#Var(b, 'toml_tombi_lsp_options'))},
|
||||
\ 'project_root': function('ale_linters#toml#tombi#GetProjectRoot'),
|
||||
\})
|
||||
@@ -9,9 +9,7 @@ endif
|
||||
" --lint-only
|
||||
function! ale_linters#verilog#slang#GetCommand(buffer) abort
|
||||
return 'slang -Weverything '
|
||||
\ . '--diag-abs-paths '
|
||||
\ . '-I%s:h '
|
||||
\ . '-y%s:h '
|
||||
\ . ale#Var(a:buffer, 'verilog_slang_options') .' '
|
||||
\ . '%t'
|
||||
endfunction
|
||||
@@ -30,7 +28,6 @@ function! ale_linters#verilog#slang#Handle(buffer, lines) abort
|
||||
|
||||
for l:match in ale#util#GetMatches(a:lines, l:pattern)
|
||||
let l:item = {
|
||||
\ 'filename': l:match[1],
|
||||
\ 'lnum': str2nr(l:match[2]),
|
||||
\ 'type': (l:match[4] is# 'error') ? 'E' : 'W',
|
||||
\ 'text': s:RemoveUnicodeQuotes(l:match[5]),
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
" Author: Nicolas Derumigny <https://github.com/nicolasderumigny>
|
||||
" Description: Verible LSP for verilog
|
||||
|
||||
call ale#Set('verilog_verible_ls_options', '--rules_config_search')
|
||||
call ale#Set('verilog_verible_ls_rules', '')
|
||||
call ale#Set('verilog_verible_ls_executable', 'verible-verilog-ls')
|
||||
call ale#Set('verilog_verible_ls_config', {})
|
||||
|
||||
function! ale_linters#verilog#verible_ls#GetProjectRoot(buffer) abort
|
||||
let l:git_dir = ale#path#FindNearestFile(a:buffer, 'verible.filelist')
|
||||
|
||||
if !empty(l:git_dir)
|
||||
return fnamemodify(l:git_dir, ':p:h')
|
||||
else
|
||||
return fnamemodify('', ':h')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale_linters#verilog#verible_ls#GetCommand(buffer) abort
|
||||
let l:command = ale#Escape(ale#Var(a:buffer, 'verilog_verible_ls_executable'))
|
||||
let l:options = ale#Var(a:buffer, 'verilog_verible_ls_options')
|
||||
let l:rules = ale#Var(a:buffer, 'verilog_verible_ls_rules')
|
||||
|
||||
if l:options isnot# ''
|
||||
let l:command .= ' ' . l:options
|
||||
endif
|
||||
|
||||
if l:rules isnot# ''
|
||||
let l:command .= ' --rules=' . l:rules
|
||||
endif
|
||||
|
||||
return l:command
|
||||
endfunction
|
||||
|
||||
|
||||
call ale#linter#Define('verilog', {
|
||||
\ 'name': 'verible_ls',
|
||||
\ 'lsp': 'stdio',
|
||||
\ 'lsp_config': {b -> ale#Var(b, 'verilog_verible_ls_config')},
|
||||
\ 'executable': {b -> ale#Var(b, 'verilog_verible_ls_executable')},
|
||||
\ 'command': function('ale_linters#verilog#verible_ls#GetCommand') ,
|
||||
\ 'project_root': function('ale_linters#verilog#verible_ls#GetProjectRoot'),
|
||||
\})
|
||||
@@ -10,7 +10,6 @@ function! ale_linters#verilog#verilator#GetCommand(buffer) abort
|
||||
" the path to the current file is systematically added to the search path
|
||||
return 'verilator --lint-only -Wall -Wno-DECLFILENAME '
|
||||
\ . '-I%s:h '
|
||||
\ . '-y %s:h '
|
||||
\ . ale#Var(a:buffer, 'verilog_verilator_options') .' '
|
||||
\ . '%t'
|
||||
endfunction
|
||||
|
||||
@@ -12,8 +12,6 @@ let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeL
|
||||
|
||||
let g:ale_c_build_dir_names = get(g:, 'ale_c_build_dir_names', [
|
||||
\ 'build',
|
||||
\ 'build/Debug',
|
||||
\ 'build/Release',
|
||||
\ 'bin',
|
||||
\])
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ function! ale#cursor#TruncatedEcho(original_message) abort
|
||||
" 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')
|
||||
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')
|
||||
@@ -93,7 +93,6 @@ function! ale#cursor#EchoCursorWarning(...) abort
|
||||
if !empty(l:loc)
|
||||
let l:format = ale#Var(l:buffer, 'echo_msg_format')
|
||||
let l:msg = ale#GetLocItemMessage(l:loc, l:format)
|
||||
|
||||
call ale#cursor#TruncatedEcho(l:msg)
|
||||
let l:info.echoed = 1
|
||||
elseif get(l:info, 'echoed')
|
||||
|
||||
@@ -78,7 +78,7 @@ function! ale#fix#ApplyFixes(buffer, output) abort
|
||||
|
||||
if !l:data.ignore_file_changed_errors
|
||||
" no-custom-checks
|
||||
echom 'The file was changed before fixing finished'
|
||||
echoerr 'The file was changed before fixing finished'
|
||||
endif
|
||||
|
||||
return
|
||||
|
||||
@@ -722,31 +722,6 @@ let s:default_registry = {
|
||||
\ 'suggested_filetypes': ['typst'],
|
||||
\ 'description': 'A formatter for Typst files',
|
||||
\ },
|
||||
\ 'roc_format': {
|
||||
\ 'function': 'ale#fixers#roc_format#Fix',
|
||||
\ 'suggested_filetypes': ['roc'],
|
||||
\ 'description': 'Formats Roc files.',
|
||||
\ },
|
||||
\ 'roc_annotate': {
|
||||
\ 'function': 'ale#fixers#roc_annotate#Fix',
|
||||
\ 'suggested_filetypes': ['roc'],
|
||||
\ 'description': 'Annotates all top-level definitions in Roc files.',
|
||||
\ },
|
||||
\ 'tombi_format': {
|
||||
\ 'function': 'ale#fixers#tombi_format#Fix',
|
||||
\ 'suggested_filetypes': ['toml'],
|
||||
\ 'description': 'Formats TOML files',
|
||||
\ },
|
||||
\ 'tombi_lint': {
|
||||
\ 'function': 'ale#fixers#tombi_lint#Fix',
|
||||
\ 'suggested_filetypes': ['toml'],
|
||||
\ 'description': 'Lints TOML files',
|
||||
\ },
|
||||
\ 'verible_format': {
|
||||
\ 'function': 'ale#fixers#verible_format#Fix',
|
||||
\ 'suggested_filetypes': ['verilog'],
|
||||
\ 'description': 'Formats verilog files using verible.',
|
||||
\ },
|
||||
\}
|
||||
|
||||
" Reset the function registry to the default entries.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function! ale#fixers#biome#Fix(buffer) abort
|
||||
let l:executable = ale#handlers#biome#GetExecutable(a:buffer)
|
||||
let l:options = ale#Var(a:buffer, 'biome_options')
|
||||
let l:apply = ale#Var(a:buffer, 'biome_fixer_apply_unsafe') ? '--write --unsafe' : '--write'
|
||||
let l:apply = ale#Var(a:buffer, 'biome_fixer_apply_unsafe') ? '--apply-unsafe' : '--apply'
|
||||
|
||||
return {
|
||||
\ 'read_temporary_file': 1,
|
||||
|
||||
@@ -22,7 +22,7 @@ function! ale#fixers#clangformat#Fix(buffer) abort
|
||||
let l:use_local_file = ale#Var(a:buffer, 'c_clangformat_use_local_file')
|
||||
|
||||
if l:style_option isnot# ''
|
||||
let l:style_option = '-style=' . ale#Escape(l:style_option)
|
||||
let l:style_option = '-style=' . "'" . l:style_option . "'"
|
||||
endif
|
||||
|
||||
if l:use_local_file
|
||||
|
||||
@@ -17,11 +17,10 @@ let s:variables = {
|
||||
\}
|
||||
|
||||
function! ale#fixers#erlang_mode#Fix(buffer) abort
|
||||
let l:emacs_executable =
|
||||
let emacs_executable =
|
||||
\ ale#Var(a:buffer, 'erlang_erlang_mode_emacs_executable')
|
||||
|
||||
let l:exprs = [
|
||||
\ '(setq enable-local-variables :safe)',
|
||||
\ s:SetqDefault(a:buffer, s:variables),
|
||||
\ '(erlang-mode)',
|
||||
\ '(font-lock-fontify-region (point-min) (point-max))',
|
||||
|
||||
@@ -1,48 +1,32 @@
|
||||
" Author: Ian Stapleton Cordasco <graffatcolmingov@gmail.com>
|
||||
" Description: Run golangci-lint with the --fix flag to autofix some issues
|
||||
|
||||
call ale#Set('go_golangci_formatter_options', '')
|
||||
call ale#Set('go_golangci_formatter_executable', 'golangci-lint')
|
||||
call ale#Set('go_golangci_lint_options', '')
|
||||
call ale#Set('go_golangci_lint_executable', 'golangci-lint')
|
||||
call ale#Set('go_golangci_lint_package', 1)
|
||||
|
||||
function! ale#fixers#golangci_lint#GetExecutable(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'go_golangci_formatter_executable')
|
||||
|
||||
return l:executable
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#golangci_lint#GetCommand(buffer, version) abort
|
||||
function! ale#fixers#golangci_lint#GetCommand(buffer) abort
|
||||
let l:filename = expand('#' . a:buffer . ':t')
|
||||
let l:executable = ale#fixers#golangci_lint#GetExecutable(a:buffer)
|
||||
let l:options = ale#Var(a:buffer, 'go_golangci_formatter_options')
|
||||
let l:executable = ale#Var(a:buffer, 'go_golangci_lint_executable')
|
||||
let l:options = ale#Var(a:buffer, 'go_golangci_lint_options') . ' --fix'
|
||||
let l:package_mode = ale#Var(a:buffer, 'go_golangci_lint_package')
|
||||
let l:env = ale#go#EnvString(a:buffer)
|
||||
|
||||
if ale#semver#GTE(a:version, [2, 0, 0])
|
||||
return l:env . ale#Escape(l:executable)
|
||||
\ . ' fmt --stdin '
|
||||
\ . l:options
|
||||
else
|
||||
return l:env . ale#Escape(l:executable)
|
||||
\ . ' run --fix '
|
||||
\ . l:options
|
||||
\ . ' '
|
||||
\ . ale#Escape(l:filename)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#golangci_lint#GetCommandForVersion(buffer, version) abort
|
||||
return {
|
||||
\ 'command': ale#fixers#golangci_lint#GetCommand(a:buffer, a:version)
|
||||
\}
|
||||
if l:package_mode
|
||||
return l:env . ale#Escape(l:executable)
|
||||
\ . ' run '
|
||||
\ . l:options
|
||||
endif
|
||||
|
||||
return l:env . ale#Escape(l:executable)
|
||||
\ . ' run '
|
||||
\ . l:options
|
||||
\ . ' ' . ale#Escape(l:filename)
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#golangci_lint#Fix(buffer) abort
|
||||
let l:executable = ale#fixers#golangci_lint#GetExecutable(a:buffer)
|
||||
let l:command = ale#fixers#golangci_lint#GetExecutable(a:buffer) . ale#Pad('--version')
|
||||
|
||||
return ale#semver#RunWithVersionCheck(
|
||||
\ a:buffer,
|
||||
\ l:executable,
|
||||
\ l:command,
|
||||
\ function('ale#fixers#golangci_lint#GetCommandForVersion'),
|
||||
\)
|
||||
return {
|
||||
\ 'command': ale#fixers#golangci_lint#GetCommand(a:buffer),
|
||||
\}
|
||||
endfunction
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
" Author: Benjamin Block <https://github.com/benjamindblock>
|
||||
" Description: Official type annotation tool for Roc.
|
||||
|
||||
call ale#Set('roc_roc_annotate_executable', 'roc')
|
||||
call ale#Set('roc_roc_annotate_options', '')
|
||||
|
||||
function! ale#fixers#roc_annotate#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'roc_roc_annotate_executable')
|
||||
let l:command = l:executable . ' format annotate'
|
||||
let l:options = ale#Var(a:buffer, 'roc_roc_annotate_options')
|
||||
|
||||
if l:options isnot# ''
|
||||
let l:command .= ' ' . l:options
|
||||
endif
|
||||
|
||||
return {
|
||||
\ 'command': l:command . ' %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
" Author: Benjamin Block <https://github.com/benjamindblock>
|
||||
" Description: Official formatter for Roc.
|
||||
|
||||
call ale#Set('roc_roc_format_executable', 'roc')
|
||||
call ale#Set('roc_roc_format_options', '')
|
||||
|
||||
function! ale#fixers#roc_format#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'roc_roc_format_executable')
|
||||
let l:command = l:executable . ' format'
|
||||
let l:options = ale#Var(a:buffer, 'roc_roc_format_options')
|
||||
|
||||
if l:options isnot# ''
|
||||
let l:command .= ' ' . l:options
|
||||
endif
|
||||
|
||||
return {
|
||||
\ 'command': l:command . ' %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
endfunction
|
||||
@@ -19,34 +19,20 @@ function! ale#fixers#rubocop#PostProcess(buffer, output) abort
|
||||
return a:output[l:line :]
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#rubocop#GetCommand(buffer, version) abort
|
||||
function! ale#fixers#rubocop#GetCommand(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||
let l:options = ale#Var(a:buffer, 'ruby_rubocop_options')
|
||||
let l:auto_correct_all = ale#Var(a:buffer, 'ruby_rubocop_auto_correct_all')
|
||||
let l:editor_mode = ale#semver#GTE(a:version, [1, 61, 0])
|
||||
|
||||
return ale#ruby#EscapeExecutable(l:executable, 'rubocop')
|
||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||
\ . (l:auto_correct_all ? ' --auto-correct-all' : ' --auto-correct')
|
||||
\ . (l:editor_mode ? ' --editor-mode' : '')
|
||||
\ . ' --force-exclusion --stdin %s'
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#rubocop#GetCommandForVersion(buffer, version) abort
|
||||
function! ale#fixers#rubocop#Fix(buffer) abort
|
||||
return {
|
||||
\ 'command': ale#fixers#rubocop#GetCommand(a:buffer, a:version),
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
||||
\ 'command': ale#fixers#rubocop#GetCommand(a:buffer),
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess'
|
||||
\}
|
||||
endfunction
|
||||
|
||||
function! ale#fixers#rubocop#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'ruby_rubocop_executable')
|
||||
let l:command = l:executable . ale#Pad('--version')
|
||||
|
||||
return ale#semver#RunWithVersionCheck(
|
||||
\ a:buffer,
|
||||
\ l:executable,
|
||||
\ l:command,
|
||||
\ function('ale#fixers#rubocop#GetCommandForVersion'),
|
||||
\)
|
||||
endfunction
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
" Author: Ben Boeckel <github@me.benboeckel.net>
|
||||
" Description: Integration of tombi formatting with ALE.
|
||||
|
||||
call ale#Set('toml_tombi_executable', 'tombi')
|
||||
call ale#Set('toml_tombi_format_options', '')
|
||||
|
||||
function! ale#fixers#tombi_format#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . ' format'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_format_options')),
|
||||
\}
|
||||
endfunction
|
||||
@@ -1,15 +0,0 @@
|
||||
" Author: Ben Boeckel <github@me.benboeckel.net>
|
||||
" Description: Integration of tombi linting with ALE.
|
||||
|
||||
call ale#Set('toml_tombi_executable', 'tombi')
|
||||
call ale#Set('toml_tombi_lint_options', '')
|
||||
|
||||
function! ale#fixers#tombi_lint#Fix(buffer) abort
|
||||
let l:executable = ale#Var(a:buffer, 'toml_tombi_executable')
|
||||
|
||||
return {
|
||||
\ 'command': ale#Escape(l:executable)
|
||||
\ . ' lint'
|
||||
\ . ale#Pad(ale#Var(a:buffer, 'toml_tombi_lint_options')),
|
||||
\}
|
||||
endfunction
|
||||
@@ -1,17 +0,0 @@
|
||||
" Author: Nicolas Derumigny <https://github.com/nicolasderumigny>
|
||||
" Description: verible formatter for verilog.
|
||||
|
||||
call ale#Set('verilog_verible_format_executable', 'verible-verilog-format')
|
||||
call ale#Set('verilog_verible_format_options', '')
|
||||
|
||||
function! ale#fixers#verible_format#Fix(buffer) abort
|
||||
let l:executable = ale#Escape(ale#Var(a:buffer, 'verilog_verible_format_executable'))
|
||||
let l:command = l:executable
|
||||
let l:options = ale#Var(a:buffer, 'verilog_verible_format_options')
|
||||
|
||||
if l:options isnot# ''
|
||||
let l:command .= ' ' . l:options
|
||||
endif
|
||||
|
||||
return {'command': l:command . ' -'}
|
||||
endfunction
|
||||
@@ -1,8 +1,6 @@
|
||||
" Author: rhysd https://rhysd.github.io
|
||||
" Description: Redpen, a proofreading tool (http://redpen.cc)
|
||||
|
||||
call ale#Set('redpen_options', '')
|
||||
|
||||
function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
|
||||
" Only one file was passed to redpen. So response array has only one
|
||||
" element.
|
||||
@@ -65,14 +63,3 @@ function! ale#handlers#redpen#HandleRedpenOutput(buffer, lines) abort
|
||||
|
||||
return l:output
|
||||
endfunction
|
||||
|
||||
|
||||
" Define the redpen linter for a given filetype.
|
||||
function! ale#handlers#redpen#DefineLinter(filetype) abort
|
||||
call ale#linter#Define(a:filetype, {
|
||||
\ 'name': 'redpen',
|
||||
\ 'executable': 'redpen',
|
||||
\ 'command': {b -> 'redpen -f ' . a:filetype . ' -r json' . ale#Pad(ale#Var(b, 'redpen_options')) . ' %t'},
|
||||
\ 'callback': 'ale#handlers#redpen#HandleRedpenOutput',
|
||||
\})
|
||||
endfunction
|
||||
|
||||
@@ -63,12 +63,6 @@ function! ale#handlers#shellcheck#GetCommand(buffer, version) abort
|
||||
\ . ' -f ' . l:format . ' -'
|
||||
endfunction
|
||||
|
||||
function! s:ShouldIgnoreErrorCode(buffer, code) abort
|
||||
" Skip warnings for trailing whitespace if the option is off.
|
||||
return a:code is# 'SC1101'
|
||||
\ && !ale#Var(a:buffer, 'warn_about_trailing_whitespace')
|
||||
endfunction
|
||||
|
||||
function! s:HandleShellcheckJSON(buffer, lines) abort
|
||||
try
|
||||
let l:errors = json_decode(a:lines[0])
|
||||
@@ -93,17 +87,11 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
|
||||
let l:type = 'W'
|
||||
endif
|
||||
|
||||
let l:code = 'SC' . l:error['code']
|
||||
|
||||
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
|
||||
continue
|
||||
endif
|
||||
|
||||
let l:item = {
|
||||
\ 'lnum': l:error['line'],
|
||||
\ 'type': l:type,
|
||||
\ 'text': l:error['message'],
|
||||
\ 'code': l:code,
|
||||
\ 'code': 'SC' . l:error['code'],
|
||||
\ 'detail': l:error['message'] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/SC" . l:error['code'],
|
||||
\}
|
||||
|
||||
@@ -119,6 +107,7 @@ function! s:HandleShellcheckJSON(buffer, lines) abort
|
||||
let l:item.end_lnum = l:error['endLine']
|
||||
endif
|
||||
|
||||
|
||||
" If the filename is something like <stdin>, <nofile> or -, then
|
||||
" this is an error for the file we checked.
|
||||
if has_key(l:error, 'file')
|
||||
@@ -146,17 +135,11 @@ function! s:HandleShellcheckGCC(buffer, lines) abort
|
||||
let l:type = 'W'
|
||||
endif
|
||||
|
||||
let l:code = l:match[6]
|
||||
|
||||
if s:ShouldIgnoreErrorCode(a:buffer, l:code)
|
||||
continue
|
||||
endif
|
||||
|
||||
let l:item = {
|
||||
\ 'lnum': str2nr(l:match[2]),
|
||||
\ 'type': l:type,
|
||||
\ 'text': l:match[5],
|
||||
\ 'code': l:code,
|
||||
\ 'code': l:match[6],
|
||||
\ 'detail': l:match[5] . "\n\nFor more information:\n https://www.shellcheck.net/wiki/" . l:match[6],
|
||||
\}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ let s:linters = {}
|
||||
" NOTE: Update the g:ale_linter_aliases documentation when modifying this.
|
||||
let s:default_ale_linter_aliases = {
|
||||
\ 'Dockerfile': 'dockerfile',
|
||||
\ 'bash': 'sh',
|
||||
\ 'csh': 'sh',
|
||||
\ 'javascriptreact': ['javascript', 'jsx'],
|
||||
\ 'plaintex': 'tex',
|
||||
|
||||
@@ -531,7 +531,7 @@ function! ale#lsp#StartProgram(conn_id, executable, command) abort
|
||||
if g:ale_use_neovim_lsp_api && !l:conn.is_tsserver
|
||||
" For Windows from 'cmd /s/c "foo bar"' we need 'foo bar'
|
||||
let l:lsp_cmd = has('win32') && type(a:command) is v:t_string
|
||||
\ ? ['cmd', '/s/c', a:command[10:-2]]
|
||||
\ ? ['cmd', '/s/c/', a:command[10:-2]]
|
||||
\ : a:command
|
||||
|
||||
" Always call lsp.start, which will either create or re-use a
|
||||
@@ -706,7 +706,7 @@ function! ale#lsp#Send(conn_id, message) abort
|
||||
throw 'LSP server not initialized yet!'
|
||||
endif
|
||||
|
||||
if g:ale_use_neovim_lsp_api && !l:conn.is_tsserver
|
||||
if g:ale_use_neovim_lsp_api
|
||||
return luaeval('require("ale.lsp").send_message(_A)', {
|
||||
\ 'client_id': l:conn.client_id,
|
||||
\ 'is_notification': a:message[0] == 1 ? v:true : v:false,
|
||||
|
||||
@@ -28,7 +28,7 @@ function! ale#lsp#response#ReadDiagnostics(diagnostics) abort
|
||||
for l:diagnostic in a:diagnostics
|
||||
let l:severity = get(l:diagnostic, 'severity', 0)
|
||||
let l:loclist_item = {
|
||||
\ 'text': l:diagnostic.message,
|
||||
\ 'text': substitute(l:diagnostic.message, '\(\r\n\|\n\|\r\)', ' ', 'g'),
|
||||
\ 'type': 'E',
|
||||
\ 'lnum': l:diagnostic.range.start.line + 1,
|
||||
\ 'col': l:diagnostic.range.start.character + 1,
|
||||
|
||||
@@ -62,36 +62,6 @@ function! ale#path#FindNearestDirectory(buffer, directory_name) abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Given a buffer and a filename, find the nearest file or directory by
|
||||
" searching upwards through the paths relative to the given buffer.
|
||||
function! ale#path#FindNearestFileOrDirectory(buffer, filename) abort
|
||||
let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p')
|
||||
let l:buffer_filename = fnameescape(l:buffer_filename)
|
||||
|
||||
let l:relative_path_file = findfile(a:filename, l:buffer_filename . ';')
|
||||
let l:relative_path_dir = finddir(a:filename, l:buffer_filename . ';')
|
||||
|
||||
" If we find both a file and directory, choose the shorter response by
|
||||
" making the longer one empty instead.
|
||||
if !empty(l:relative_path_file) && !empty(l:relative_path_dir)
|
||||
if strlen(l:relative_path_file) > strlen(l:relative_path_dir)
|
||||
let l:relative_path_dir = ''
|
||||
else
|
||||
let l:relative_path_file = ''
|
||||
endif
|
||||
endif
|
||||
|
||||
if !empty(l:relative_path_file)
|
||||
return fnamemodify(l:relative_path_file, ':p')
|
||||
endif
|
||||
|
||||
if !empty(l:relative_path_dir)
|
||||
return fnamemodify(l:relative_path_dir, ':p')
|
||||
endif
|
||||
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Given a buffer, a string to search for, and a global fallback for when
|
||||
" the search fails, look for a file in parent paths, and if that fails,
|
||||
" use the global fallback path instead.
|
||||
@@ -145,24 +115,20 @@ endfunction
|
||||
|
||||
" Return 1 if a path is an absolute path.
|
||||
function! ale#path#IsAbsolute(filename) abort
|
||||
if has('win32')
|
||||
return a:filename[:0] =~# '[\\/]' || a:filename[0:2] =~? '[A-Z]:[/\\]'
|
||||
else
|
||||
return a:filename[:0] is# '/'
|
||||
if has('win32') && a:filename[:0] is# '\'
|
||||
return 1
|
||||
endif
|
||||
|
||||
" Check for /foo and C:\foo, etc.
|
||||
return a:filename[:0] is# '/' || a:filename[1:2] is# ':\'
|
||||
endfunction
|
||||
|
||||
let s:temp_dir = ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h:h'))
|
||||
let s:resolved_temp_dir = resolve(s:temp_dir)
|
||||
|
||||
" Given a filename, return 1 if the file represents some temporary file
|
||||
" created by Vim. If the temporary location is symlinked (e.g. macOS), some
|
||||
" linters may report the resolved version of the path, so both are checked.
|
||||
" created by Vim.
|
||||
function! ale#path#IsTempName(filename) abort
|
||||
let l:filename = ale#path#Simplify(a:filename)
|
||||
|
||||
return l:filename[:len(s:temp_dir) - 1] is# s:temp_dir
|
||||
\|| l:filename[:len(s:resolved_temp_dir) - 1] is# s:resolved_temp_dir
|
||||
return ale#path#Simplify(a:filename)[:len(s:temp_dir) - 1] is# s:temp_dir
|
||||
endfunction
|
||||
|
||||
" Given a base directory, which must not have a trailing slash, and a
|
||||
|
||||
@@ -26,6 +26,7 @@ function! ale#python#FindProjectRootIni(buffer) abort
|
||||
" If you change this, update ale-python-root documentation.
|
||||
if filereadable(l:path . '/MANIFEST.in')
|
||||
\|| filereadable(l:path . '/setup.cfg')
|
||||
\|| filereadable(l:path . '/pytest.ini')
|
||||
\|| filereadable(l:path . '/tox.ini')
|
||||
\|| filereadable(l:path . '/.pyre_configuration.local')
|
||||
\|| filereadable(l:path . '/mypy.ini')
|
||||
@@ -54,12 +55,11 @@ endfunction
|
||||
" Given a buffer number, find the project root directory for Python.
|
||||
" The root directory is defined as the first directory found while searching
|
||||
" upwards through paths, including the current directory, until a path
|
||||
" containing an configuration file is found. (See list above)
|
||||
"
|
||||
" If it is not possible to find the project root directory via configuration
|
||||
" file, then it will be defined as the first directory found searching upwards
|
||||
" through paths, including the current directory, until no __init__.py files
|
||||
" is found.
|
||||
" containing an init file (one from MANIFEST.in, setup.cfg, pytest.ini,
|
||||
" tox.ini) is found. If it is not possible to find the project root directory
|
||||
" via init file, then it will be defined as the first directory found
|
||||
" searching upwards through paths, including the current directory, until no
|
||||
" __init__.py files is found.
|
||||
function! ale#python#FindProjectRoot(buffer) abort
|
||||
let l:ini_root = ale#python#FindProjectRootIni(a:buffer)
|
||||
|
||||
@@ -200,7 +200,7 @@ function! ale#python#PoetryPresent(buffer) abort
|
||||
return findfile('poetry.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||
endfunction
|
||||
|
||||
" Detects whether a uv environment is present.
|
||||
" Detects whether a poetry environment is present.
|
||||
function! ale#python#UvPresent(buffer) abort
|
||||
return findfile('uv.lock', expand('#' . a:buffer . ':p:h') . ';') isnot# ''
|
||||
endfunction
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
let g:ale_default_navigation = get(g:, 'ale_default_navigation', 'buffer')
|
||||
let g:ale_references_show_contents = get(g:, 'ale_references_show_contents', 1)
|
||||
|
||||
let s:references_map = {}
|
||||
|
||||
@@ -68,33 +67,17 @@ function! ale#references#HandleTSServerResponse(conn_id, response) abort
|
||||
endfunction
|
||||
|
||||
function! ale#references#FormatLSPResponseItem(response_item, options) abort
|
||||
let l:line_text = ''
|
||||
|
||||
let l:line= a:response_item.range.start.line
|
||||
let l:col = a:response_item.range.start.character
|
||||
let l:filename = ale#util#ToResource(a:response_item.uri)
|
||||
|
||||
if get(a:options, 'show_contents') == 1
|
||||
try
|
||||
let l:line_text = substitute(readfile(l:filename)[l:line], '^\s*\(.\{-}\)\s*$', '\1', '')
|
||||
catch
|
||||
" This happens in tests
|
||||
endtry
|
||||
endif
|
||||
|
||||
if get(a:options, 'open_in') is# 'quickfix'
|
||||
return {
|
||||
\ 'filename': l:filename,
|
||||
\ 'filename': ale#util#ToResource(a:response_item.uri),
|
||||
\ 'lnum': a:response_item.range.start.line + 1,
|
||||
\ 'col': a:response_item.range.start.character + 1,
|
||||
\ 'text': l:line_text,
|
||||
\}
|
||||
else
|
||||
return {
|
||||
\ 'filename': l:filename,
|
||||
\ 'line': l:line + 1,
|
||||
\ 'column': l:col + 1,
|
||||
\ 'match': l:line_text,
|
||||
\ '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
|
||||
@@ -164,7 +147,6 @@ function! s:OnReady(line, column, options, linter, lsp_details) abort
|
||||
let s:references_map[l:request_id] = {
|
||||
\ 'use_relative_paths': has_key(a:options, 'use_relative_paths') ? a:options.use_relative_paths : 0,
|
||||
\ 'open_in': get(a:options, 'open_in', 'current-buffer'),
|
||||
\ 'show_contents': a:options.show_contents,
|
||||
\}
|
||||
endfunction
|
||||
|
||||
@@ -183,8 +165,6 @@ function! ale#references#Find(...) abort
|
||||
let l:options.open_in = 'vsplit'
|
||||
elseif l:option is? '-quickfix'
|
||||
let l:options.open_in = 'quickfix'
|
||||
elseif l:option is? '-contents'
|
||||
let l:options.show_contents = 1
|
||||
endif
|
||||
endfor
|
||||
endif
|
||||
@@ -197,10 +177,6 @@ function! ale#references#Find(...) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
if !has_key(l:options, 'show_contents')
|
||||
let l:options.show_contents = ale#Var(bufnr(''), 'references_show_contents')
|
||||
endif
|
||||
|
||||
let l:buffer = bufnr('')
|
||||
let [l:line, l:column] = getpos('.')[1:2]
|
||||
let l:column = min([l:column, len(getline(l:line))])
|
||||
|
||||
@@ -44,39 +44,5 @@ g:ale_ansible_ansible_lint_executable
|
||||
This variable can be changed to modify the executable used for ansible-lint.
|
||||
|
||||
|
||||
*ale-options.ansible_ansible_lint_auto_pipenv*
|
||||
*g:ale_ansible_ansible_lint_auto_pipenv*
|
||||
*b:ale_ansible_ansible_lint_auto_pipenv*
|
||||
ansible_ansible_lint_auto_pipenv
|
||||
g:ale_ansible_ansible_lint_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.
|
||||
|
||||
*ale-options.ansible_ansible_lint_auto_poetry*
|
||||
*g:ale_ansible_ansible_lint_auto_poetry*
|
||||
*b:ale_ansible_ansible_lint_auto_poetry*
|
||||
ansible_ansible_lint_auto_poetry
|
||||
g:ale_ansible_ansible_lint_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.
|
||||
|
||||
*ale-options.ansible_ansible_lint_auto_uv*
|
||||
*g:ale_ansible_ansible_lint_auto_uv*
|
||||
*b:ale_ansible_ansible_lint_auto_uv*
|
||||
ansible_ansible_lint_auto_uv
|
||||
g:ale_ansible_ansible_lint_auto_uv
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Set the executable to `uv` if true. This is overridden by a manually-set
|
||||
executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -20,11 +20,5 @@ textlint *ale-asciidoc-textlint*
|
||||
See |ale-text-textlint|
|
||||
|
||||
|
||||
===============================================================================
|
||||
redpen *ale-asciidoc-redpen*
|
||||
|
||||
See |ale-redpen-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
===============================================================================
|
||||
ALE BINDZone Integration *ale-bindzone-options*
|
||||
|
||||
===============================================================================
|
||||
checkzone *ale-bindzone-checkzone*
|
||||
|
||||
*ale-options.bindzone_checkzone_executable*
|
||||
*g:ale_bindzone_checkzone_executable*
|
||||
*b:ale_bindzone_checkzone_executable*
|
||||
bindzone_checkzone_executable
|
||||
g:ale_bindzone_checkzone_executable
|
||||
Type: |String|
|
||||
Default: `named-checkzone`
|
||||
|
||||
This variable can be changed to set the path to named-checkzone executable.
|
||||
|
||||
*ale-options.bindzone_checkzone_options*
|
||||
*g:ale_bindzone_checkzone_options*
|
||||
*b:ale_bindzone_checkzone_options*
|
||||
bindzone_checkzone_options
|
||||
g:ale_bindzone_checkzone_options
|
||||
Type: |String|
|
||||
Default: `-c IN`
|
||||
|
||||
This variable can be changed to add additional command-line arguments.
|
||||
All available options can be found at:
|
||||
|
||||
https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone-zone-file-validation-tool
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
@@ -26,7 +26,7 @@ g:ale_c_always_make
|
||||
c_build_dir_names
|
||||
g:ale_c_build_dir_names
|
||||
Type: |List|
|
||||
Default: `['build', 'build/Debug', 'build/Release', 'bin']`
|
||||
Default: `['build', 'bin']`
|
||||
|
||||
A list of directory names to be used when searching upwards from C files
|
||||
to discover compilation databases with. For directory named `'foo'`, ALE
|
||||
|
||||
@@ -41,51 +41,5 @@ Just put the following in `ftdetect/cloudformation.vim`: >
|
||||
This will get both cloudformation and yaml linters to work on any file with
|
||||
`.template.yaml` extension.
|
||||
|
||||
|
||||
===============================================================================
|
||||
checkov *ale-cloudformation-checkov*
|
||||
|
||||
*ale-options.cloudformation_checkov_executable*
|
||||
*g:ale_cloudformation_checkov_executable*
|
||||
*b:ale_cloudformation_checkov_executable*
|
||||
cloudformation_checkov_executable
|
||||
g:ale_cloudformation_checkov_executable
|
||||
Type: |String|
|
||||
Default: `'checkov'`
|
||||
|
||||
This variable can be changed to use a different executable for checkov.
|
||||
|
||||
*ale-options.cloudformation_checkov_options*
|
||||
*g:ale_cloudformation_checkov_options*
|
||||
*b:ale_cloudformation_checkov_options*
|
||||
cloudformation_checkov_options
|
||||
g:ale_cloudformation_checkov_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to set additional options for checkov.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Configuration
|
||||
|
||||
To get chekov to work with cloudformation files (rather than general yaml
|
||||
files) we must set the buffer |filetype| to `yaml.cloudformation`. This
|
||||
causes ALE to lint the file with linters configured for cloudformation and
|
||||
YAML files.
|
||||
|
||||
One option is to put the following in `ftdetect/cloudformation.vim`: >
|
||||
|
||||
au BufRead,BufNewFile *.template.yaml set filetype=yaml.cloudformation
|
||||
|
||||
This will get both cloudformation and yaml linters to work on any file with
|
||||
`.template.yaml` extension.
|
||||
|
||||
Another option is to check for the presence of 'AWSTemplateFormatVersion' in
|
||||
the yaml file: >
|
||||
|
||||
au BufRead,BufNewFile *.yaml,*.yml if search('AWSTemplateFormatVersion', 'nw') | set filetype=yaml.cloudformation | endif
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -424,11 +424,11 @@ running tests. >
|
||||
|
||||
Add-Type -A System.IO.Compression.FileSystem
|
||||
|
||||
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586w32.zip -OutFile C:\vim.zip
|
||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586w32.zip -OutFile C:\vim.zip
|
||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\vim.zip', 'C:\vim')
|
||||
rm C:\vim.zip
|
||||
|
||||
Invoke-WebRequest https://github.com/dense-analysis/ale/releases/download/v4.0.0/vim80-586rt.zip -OutFile C:\rt.zip
|
||||
Invoke-WebRequest ftp://ftp.vim.org/pub/vim/pc/vim80-586rt.zip -OutFile C:\rt.zip
|
||||
[IO.Compression.ZipFile]::ExtractToDirectory('C:\rt.zip', 'C:\vim')
|
||||
rm C:\rt.zip
|
||||
|
||||
|
||||
@@ -2,29 +2,6 @@
|
||||
ALE Fortran Integration *ale-fortran-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
fortitude *ale-fortran-fortitude*
|
||||
|
||||
*ale-options.fortran_fortitude_executable*
|
||||
*g:fortran_fortitude_executable*
|
||||
*b:fortran_fortitude_executable*
|
||||
fortran_fortitude_executable
|
||||
g:fortran_fortitude_executable
|
||||
Type: |String|
|
||||
Default: 'fortitude'
|
||||
|
||||
This variable can be changed to modify the executable used for fortitude.
|
||||
|
||||
*ale-options.fortran_fortitude_options*
|
||||
*g:fortran_fortitude_options*
|
||||
*b:fortran_fortitude_options*
|
||||
fortran_fortitude_options
|
||||
g:fortran_fortitude_options
|
||||
Type: |String|
|
||||
Default: ''
|
||||
|
||||
This variable can be changed to modify options given to fortitude check.
|
||||
|
||||
===============================================================================
|
||||
gcc *ale-fortran-gcc*
|
||||
|
||||
@@ -86,5 +63,6 @@ g:ale_fortran_language_server_use_global
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -144,7 +144,7 @@ g:ale_go_golangci_lint_options
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to alter the command-line arguments to the
|
||||
golangci-lint run invocation.
|
||||
golangci-lint invocation.
|
||||
|
||||
*ale-options.go_golangci_lint_package*
|
||||
*g:ale_go_golangci_lint_package*
|
||||
@@ -157,30 +157,6 @@ g:ale_go_golangci_lint_package
|
||||
When set to `1`, the whole Go package will be checked instead of only the
|
||||
current file.
|
||||
|
||||
golangci_lint can also be user as a fixer to format go source files. In this
|
||||
case the following configuration variables can be used to configure the
|
||||
formatters:
|
||||
|
||||
*ale-options.go_golangci_formatter_executable*
|
||||
*g:ale_go_golangci_formatter_executable*
|
||||
*b:ale_go_golangci_formatter_executable*
|
||||
go_golangci_formatter_executable
|
||||
g:ale_go_golangci_formatter_executable
|
||||
Type: |String|
|
||||
Default: `'golangci-lint'`
|
||||
|
||||
The executable that will be run for golangci-lint.
|
||||
|
||||
*ale-options.go_golangci_formatter_options*
|
||||
*g:ale_go_golangci_formatter_options*
|
||||
*b:ale_go_golangci_formatter_options*
|
||||
go_golangci_formatter_options
|
||||
g:ale_go_golangci_formatter_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to alter the command-line arguments to the
|
||||
golangci-lint fmt invocation.
|
||||
|
||||
===============================================================================
|
||||
golangserver *ale-go-golangserver*
|
||||
|
||||
@@ -8,9 +8,5 @@ djlint *ale-jinja-djlint*
|
||||
|
||||
See |ale-html-djlint|
|
||||
|
||||
===============================================================================
|
||||
j2lint *ale-jinja-j2lint*
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
===============================================================================
|
||||
ALE Lean Integration *ale-lean-options*
|
||||
*ale-integration-lean*
|
||||
|
||||
===============================================================================
|
||||
Integration Information
|
||||
|
||||
Currently, the only supported LSP for Lean 4 is lake.
|
||||
|
||||
===============================================================================
|
||||
lake *ale-lean-lake*
|
||||
|
||||
g:ale_lean_lake_executable *g:ale_lean_lake_executable*
|
||||
*b:ale_lean_lake_executable*
|
||||
Type: |String|
|
||||
Default: `'lake'`
|
||||
|
||||
This variable can be modified to change the executable path for `lake`.
|
||||
|
||||
|
||||
g:ale_lean_lake_config *g:ale_lean_lake_config*
|
||||
*b:ale_lean_lake_config*
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary with configuration settings for lake.
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
@@ -49,22 +49,17 @@ g:ale_lua_language_server_executable
|
||||
If you have compiled the language server yourself in `/some/path`, the path
|
||||
will be `'/some/path/bin/lua-language-server'`.
|
||||
|
||||
*ale-options.lua_language_server_config*
|
||||
*g:ale_lua_language_server_config*
|
||||
*b:ale_lua_language_server_config*
|
||||
lua_language_server_config
|
||||
g:ale_lua_language_server_config
|
||||
|
||||
*ale-options.lua_lua_language_server_config*
|
||||
*g:ale_lua_lua_language_server_config*
|
||||
*b:ale_lua_lua_language_server_config*
|
||||
lua_lua_language_server_config
|
||||
g:ale_lua_lua_language_server_config
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary containing configuration settings that will be passed to the
|
||||
language server.
|
||||
|
||||
For available configuration parameters, see `Settings` on the luals wiki:
|
||||
|
||||
https://luals.github.io/wiki/settings/
|
||||
|
||||
|
||||
===============================================================================
|
||||
luac *ale-lua-luac*
|
||||
|
||||
@@ -225,11 +225,5 @@ write-good *ale-markdown-write-good*
|
||||
See |ale-write-good-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
redpen *ale-markdown-redpen*
|
||||
|
||||
See |ale-redpen-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -35,42 +35,6 @@ g:ale_perl_perl_options
|
||||
invocation.
|
||||
|
||||
|
||||
===============================================================================
|
||||
perl language server *ale-perl-languageserver*
|
||||
|
||||
perl_perl_executable
|
||||
g:ale_perl_perl_executable
|
||||
Type: |String|
|
||||
Default: `'perl'`
|
||||
|
||||
The language server will use the same variable as |ale-perl-perl| to launch
|
||||
the perl executable with the Perl::LanguageServer module.
|
||||
|
||||
*ale-options.perl_languageserver_config*
|
||||
*g:ale_perl_languageserver_config*
|
||||
*b:ale_perl_languageserver_config*
|
||||
perl_languageserver_config
|
||||
g:ale_perl_languageserver_config
|
||||
Type: |Dictionary|
|
||||
Default: `'{}'`
|
||||
|
||||
This variable can be changed to customize the lsp_config (sent as a
|
||||
workspace/didChangeConfiguration command).
|
||||
For example: >
|
||||
|
||||
let g:ale_perl_languageserver_config = {
|
||||
\ 'perl': {
|
||||
\ 'fileFilter': [''],
|
||||
\ 'logLevel': 2,
|
||||
\ 'logFile': '/tmp/plls-log.txt',
|
||||
\ 'perlInc': ['/usr/share/perl5/', '/usr/local/share/perl5/' ],
|
||||
\ },
|
||||
\}
|
||||
<
|
||||
For all available options and explanations, visit
|
||||
https://metacpan.org/pod/Perl::LanguageServer#Extension-Settings
|
||||
|
||||
|
||||
===============================================================================
|
||||
perlcritic *ale-perl-perlcritic*
|
||||
|
||||
|
||||
@@ -78,36 +78,6 @@ g:ale_php_phan_use_client
|
||||
instead of the phan standalone.
|
||||
|
||||
|
||||
===============================================================================
|
||||
phpactor *ale-php-phpactor*
|
||||
|
||||
*ale-options.php_phpactor_executable*
|
||||
*g:ale_php_phpactor_executable*
|
||||
*b:ale_php_phpactor_executable*
|
||||
php_phpactor_executable
|
||||
g:ale_php_phpactor_executable
|
||||
Type: |String|
|
||||
Default: `'phpactor'`
|
||||
|
||||
This variable sets executable used for phpactor.
|
||||
|
||||
php_phpactor_init_options
|
||||
g:ale_php_phpactor_init_options
|
||||
Type: |Dictionary|
|
||||
Default: `'{}'`
|
||||
|
||||
This variable can be changed to customize the LSP initialization_options.
|
||||
For example: >
|
||||
|
||||
let g:ale_php_phpactor_init_options = {
|
||||
\ 'language_server_phpstan.enabled': v:false,
|
||||
\ 'language_server_psalm.enabled': v:false,
|
||||
\ 'worse_reflection.stub_dir': '%application_root%/.php-stubs'
|
||||
\}
|
||||
<
|
||||
For all available options and explanations, visit
|
||||
https://phpactor.readthedocs.io/en/master/reference/configuration.html
|
||||
|
||||
===============================================================================
|
||||
phpcbf *ale-php-phpcbf*
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ ALE will look for configuration files with the following filenames. >
|
||||
|
||||
MANIFEST.in
|
||||
setup.cfg
|
||||
pytest.ini
|
||||
tox.ini
|
||||
.pyre_configuration.local
|
||||
mypy.ini
|
||||
@@ -80,7 +81,6 @@ ALE will look for configuration files with the following filenames. >
|
||||
poetry.lock
|
||||
pyproject.toml
|
||||
.tool-versions
|
||||
uv.lock
|
||||
<
|
||||
|
||||
The first directory containing any of the files named above will be used.
|
||||
@@ -1465,7 +1465,7 @@ g:ale_python_pylsp_executable
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pylsp'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pylsp'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyls'`.
|
||||
|
||||
*ale-options.python_pylsp_use_global*
|
||||
*g:ale_python_pylsp_use_global*
|
||||
@@ -1616,69 +1616,6 @@ g:ale_python_pyre_auto_uv
|
||||
executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyrefly *ale-python-pyrefly*
|
||||
|
||||
`pyrefly` will be run from a detected project root, per |ale-python-root|.
|
||||
|
||||
*ale-options.python_pyrefly_executable*
|
||||
*g:ale_python_pyrefly_executable*
|
||||
*b:ale_python_pyrefly_executable*
|
||||
python_pyrefly_executable
|
||||
g:ale_python_pyrefly_executable
|
||||
Type: |String|
|
||||
Default: `'pyrefly'`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
Set this to `'pipenv'` to invoke `'pipenv` `run` `pyrefly'`.
|
||||
Set this to `'poetry'` to invoke `'poetry` `run` `pyrefly'`.
|
||||
Set this to `'uv'` to invoke `'uv` `run` `pyrefly'`.
|
||||
|
||||
*ale-options.python_pyrefly_use_global*
|
||||
*g:ale_python_pyrefly_use_global*
|
||||
*b:ale_python_pyrefly_use_global*
|
||||
python_pyrefly_use_global
|
||||
g:ale_python_pyrefly_use_global
|
||||
Type: |Number|
|
||||
Default: `get(g:, 'ale_use_global_executables', 0)`
|
||||
|
||||
See |ale-integrations-local-executables|
|
||||
|
||||
*ale-options.python_pyrefly_auto_pipenv*
|
||||
*g:ale_python_pyrefly_auto_pipenv*
|
||||
*b:ale_python_pyrefly_auto_pipenv*
|
||||
python_pyrefly_auto_pipenv
|
||||
g:ale_python_pyrefly_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.
|
||||
|
||||
*ale-options.python_pyrefly_auto_poetry*
|
||||
*g:ale_python_pyrefly_auto_poetry*
|
||||
*b:ale_python_pyrefly_auto_poetry*
|
||||
python_pyrefly_auto_poetry
|
||||
g:ale_python_pyrefly_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.
|
||||
|
||||
*ale-options.python_pyrefly_auto_uv*
|
||||
*g:ale_python_pyrefly_auto_uv*
|
||||
*b:ale_python_pyrefly_auto_uv*
|
||||
python_pyrefly_auto_uv
|
||||
g:ale_python_pyrefly_auto_uv
|
||||
Type: |Number|
|
||||
Default: `0`
|
||||
|
||||
Set the executable to `uv` if true. This is overridden by a manually-set
|
||||
executable.
|
||||
|
||||
|
||||
===============================================================================
|
||||
pyright *ale-python-pyright*
|
||||
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
===============================================================================
|
||||
ALE Roc Integration *ale-roc-options*
|
||||
*ale-integration-roc*
|
||||
|
||||
===============================================================================
|
||||
roc_language_server *ale-roc-roc-language-server*
|
||||
|
||||
*ale-options.roc_roc_language_server_executable*
|
||||
*g:ale_roc_roc_language_server_executable*
|
||||
*b:ale_roc_roc_language_server_executable*
|
||||
roc_roc_language_server_executable
|
||||
g:ale_roc_roc_language_server_executable
|
||||
Type: |String|
|
||||
Default: `'roc_language_server'`
|
||||
|
||||
This variable can be modified to change the executable path for
|
||||
`roc_language_server`.
|
||||
|
||||
*ale-options.roc_roc_language_server_config*
|
||||
*g:ale_roc_roc_language_server_config*
|
||||
*b:ale_roc_roc_language_server_config*
|
||||
roc_roc_language_server_config
|
||||
g:ale_roc_roc_language_server_config
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary with configuration settings for roc_language_server.
|
||||
|
||||
|
||||
===============================================================================
|
||||
roc_format *ale-roc-roc-format*
|
||||
|
||||
*ale-options.roc_roc_format_executable*
|
||||
*g:ale_roc_roc_format_executable*
|
||||
*b:ale_roc_roc_format_executable*
|
||||
roc_roc_format_executable
|
||||
g:ale_roc_roc_format_executable
|
||||
Type: |String|
|
||||
Default: `'roc'`
|
||||
|
||||
This variable can be modified to change the executable path for `roc`.
|
||||
|
||||
*ale-options.roc_roc_format_options*
|
||||
*g:ale_roc_roc_format_options*
|
||||
*b:ale_roc_roc_format_options*
|
||||
roc_roc_format_options
|
||||
g:ale_roc_roc_format_options
|
||||
Type: String
|
||||
Default: `''`
|
||||
|
||||
Additional flags for `roc format`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
roc_annotate *ale-roc-roc-annotate*
|
||||
|
||||
*ale-options.roc_roc_annotate_executable*
|
||||
*g:ale_roc_roc_annotate_executable*
|
||||
*b:ale_roc_roc_annotate_executable*
|
||||
roc_roc_annotate_executable
|
||||
g:ale_roc_roc_annotate_executable
|
||||
Type: |String|
|
||||
Default: `'roc'`
|
||||
|
||||
This variable can be modified to change the executable path for `roc`.
|
||||
|
||||
*ale-options.roc_roc_annotate_options*
|
||||
*g:ale_roc_roc_annotate_options*
|
||||
*b:ale_roc_roc_annotate_options*
|
||||
roc_roc_annotate_options
|
||||
g:ale_roc_roc_annotate_options
|
||||
Type: String
|
||||
Default: `''`
|
||||
|
||||
Additional flags for `roc format annotate`.
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
@@ -267,23 +267,6 @@ g:ale_ruby_sorbet_enable_watchman
|
||||
to files from outside of vim. Defaults to disable watchman because it
|
||||
requires watchman to be installed separately from sorbet.
|
||||
|
||||
*ale-options.ruby_sorbet_initialization_options*
|
||||
*g:ale_ruby_sorbet_initialization_options*
|
||||
*b:ale_ruby_sorbet_initialization_options*
|
||||
ruby_sorbet_initialization_options
|
||||
g:ale_ruby_sorbet_initialization_options
|
||||
Type: |Dictionary|
|
||||
Default: `{ 'highlightUntyped': v:false }`
|
||||
|
||||
This variable can be changed to modify initialization options provided to
|
||||
the Sorbet language server. By default, a minimal object with defaults is
|
||||
provided to ensure proper LSP initialization.
|
||||
|
||||
Setting this variable to a an empty object will cause sorbet LSP to
|
||||
fail during initialization.
|
||||
|
||||
See https://sorbet.org/docs/lsp#initialize-request for available options.
|
||||
|
||||
|
||||
===============================================================================
|
||||
standardrb *ale-ruby-standardrb*
|
||||
|
||||
@@ -33,8 +33,8 @@ Integration Information
|
||||
5. rustfmt -- If you have `rustfmt` installed, you can use it as a fixer to
|
||||
consistently reformat your Rust code.
|
||||
|
||||
Only cargo and rust-analyzer are enabled by default. To switch to using
|
||||
rustc instead of cargo, configure |b:ale_linters| in your ftplugin file
|
||||
Only cargo and rust-analyze are enabled by default. To switch to using rustc
|
||||
instead of cargo, configure |b:ale_linters| in your ftplugin file
|
||||
appropriately: >
|
||||
|
||||
" See the help text for the option for more information.
|
||||
|
||||
@@ -33,8 +33,8 @@ g:ale_scala_metals_project_root
|
||||
Default: `''`
|
||||
|
||||
By default the project root is found by searching upwards for `build.sbt`,
|
||||
`build.sc`, `build.mill`, `.bloop` or `.metals`. If the project root is elsewhere,
|
||||
you can override the project root directory.
|
||||
`build.sc`, `.bloop` or `.metals`. If the project root is elsewhere, you
|
||||
can override the project root directory.
|
||||
|
||||
|
||||
===============================================================================
|
||||
|
||||
@@ -60,8 +60,6 @@ Notes:
|
||||
* `bibclean`
|
||||
* Bicep
|
||||
* `bicep`
|
||||
* Bindzone
|
||||
* `checkzone` (named-checkzone)
|
||||
* BitBake
|
||||
* `oelint-adv`
|
||||
* Bourne Shell
|
||||
@@ -121,7 +119,6 @@ Notes:
|
||||
* `joker`
|
||||
* CloudFormation
|
||||
* `cfn-python-lint`
|
||||
* `checkov`
|
||||
* CMake
|
||||
* `cmake-format`
|
||||
* `cmake-lint`
|
||||
@@ -206,7 +203,6 @@ Notes:
|
||||
* `fish` (-n flag)
|
||||
* `fish_indent`
|
||||
* Fortran
|
||||
* `fortitude`
|
||||
* `gcc`
|
||||
* `language_server`
|
||||
* Fountain
|
||||
@@ -336,7 +332,6 @@ Notes:
|
||||
* `xo`
|
||||
* Jinja
|
||||
* djlint
|
||||
* j2lint
|
||||
* JSON
|
||||
* `VSCode JSON language server`
|
||||
* `biome`
|
||||
@@ -375,8 +370,6 @@ Notes:
|
||||
* `textlint`
|
||||
* `vale`
|
||||
* `write-good`
|
||||
* Lean 4
|
||||
* `lake`
|
||||
* Less
|
||||
* `lessc`
|
||||
* `prettier`
|
||||
@@ -474,7 +467,6 @@ Notes:
|
||||
* Pawn
|
||||
* `uncrustify`
|
||||
* Perl
|
||||
* `languageserver`
|
||||
* `perl -c`
|
||||
* `perl-critic`
|
||||
* `perltidy`
|
||||
@@ -549,7 +541,6 @@ Notes:
|
||||
* `pylint`!!
|
||||
* `pylsp`
|
||||
* `pyre`
|
||||
* `pyrefly`
|
||||
* `pyright`
|
||||
* `refurb`
|
||||
* `reorder-python-imports`
|
||||
@@ -593,10 +584,6 @@ Notes:
|
||||
* `write-good`
|
||||
* Robot
|
||||
* `rflint`
|
||||
* Roc
|
||||
* roc_annotate
|
||||
* roc_format
|
||||
* roc_language_server
|
||||
* RPM spec
|
||||
* `rpmlint`
|
||||
* Ruby
|
||||
@@ -702,7 +689,6 @@ Notes:
|
||||
* `thriftcheck`
|
||||
* TOML
|
||||
* `dprint`
|
||||
* `tombi`
|
||||
* TypeScript
|
||||
* `biome`
|
||||
* `cspell`
|
||||
@@ -727,7 +713,6 @@ Notes:
|
||||
* `hdl-checker`
|
||||
* `iverilog`
|
||||
* slang
|
||||
* `verible`
|
||||
* `verilator`
|
||||
* `vlog`
|
||||
* `xvlog`
|
||||
|
||||
@@ -111,11 +111,5 @@ g:ale_tex_texlab_config
|
||||
let g:ale_tex_texlab_config = {"build":{"onSave":v:true}}
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
redpen *ale-tex-redpen*
|
||||
|
||||
See |ale-redpen-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -51,11 +51,5 @@ write-good *ale-text-write-good*
|
||||
See |ale-write-good-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
redpen *ale-text-redpen*
|
||||
|
||||
See |ale-redpen-options|
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -8,58 +8,5 @@ dprint *ale-toml-dprint*
|
||||
See |ale-dprint-options| and https://dprint.dev/plugins/toml
|
||||
|
||||
|
||||
===============================================================================
|
||||
tombi *ale-toml-tombi*
|
||||
|
||||
`'tombi'` is a TOML formatter, linter, and language server.
|
||||
|
||||
*ale-options.toml_tombi_executable*
|
||||
*g:ale_toml_tombi_executable*
|
||||
*b:ale_toml_tombi_executable*
|
||||
toml_tombi_executable
|
||||
g:ale_toml_tombi_executable
|
||||
Type: |String|
|
||||
Default: `'tombi'`
|
||||
|
||||
This variable can be modified to change the executable path for
|
||||
`tombi`.
|
||||
|
||||
|
||||
*ale-options.toml_tombi_lsp_options*
|
||||
*g:ale_toml_tombi_lsp_options*
|
||||
*b:ale_toml_tombi_lsp_options*
|
||||
toml_tombi_lsp_options
|
||||
g:ale_toml_tombi_lsp_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be modified to provide options when using `tombi` as an
|
||||
LSP server.
|
||||
|
||||
|
||||
*ale-options.toml_tombi_format_options*
|
||||
*g:ale_toml_tombi_format_options*
|
||||
*b:ale_toml_tombi_format_options*
|
||||
toml_tombi_format_options
|
||||
g:ale_toml_tombi_format_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be modified to provide options when using `tombi` as a
|
||||
formatter.
|
||||
|
||||
|
||||
*ale-options.toml_tombi_lint_options*
|
||||
*g:ale_toml_tombi_lint_options*
|
||||
*b:ale_toml_tombi_lint_options*
|
||||
toml_tombi_lint_options
|
||||
g:ale_toml_tombi_lint_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be modified to provide options when using `tombi` as a
|
||||
linter.
|
||||
|
||||
|
||||
===============================================================================
|
||||
vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl:
|
||||
|
||||
@@ -3,7 +3,7 @@ ALE Verilog/SystemVerilog Integration *ale-verilog-options*
|
||||
|
||||
|
||||
===============================================================================
|
||||
ALE can use eight different linters for Verilog HDL:
|
||||
ALE can use seven different linters for Verilog HDL:
|
||||
|
||||
HDL Checker
|
||||
Using `hdl_checker --lsp`
|
||||
@@ -14,9 +14,6 @@ ALE can use eight different linters for Verilog HDL:
|
||||
slang:
|
||||
Using `slang -Weverything`
|
||||
|
||||
verible_ls
|
||||
Using `verible-verilog-ls`
|
||||
|
||||
verilator
|
||||
Using `verilator --lint-only -Wall`
|
||||
|
||||
@@ -38,12 +35,6 @@ defining 'g:ale_linters' variable: >
|
||||
\ let g:ale_linters = {'systemverilog' : ['verilator'],}
|
||||
<
|
||||
|
||||
===============================================================================
|
||||
ALE can use one fixer for Verilog HDL:
|
||||
|
||||
|
||||
verible_fomat
|
||||
Using `verible-verilog-format`
|
||||
===============================================================================
|
||||
General notes
|
||||
|
||||
@@ -79,84 +70,18 @@ iverilog *ale-verilog-iverilog*
|
||||
===============================================================================
|
||||
slang *ale-verilog-slang*
|
||||
|
||||
*ale-options.verilog_slang_options*
|
||||
*g:ale_verilog_slang_options*
|
||||
*ale-options.verilog_slang_option*
|
||||
*g:ale_verilog_slang_option*
|
||||
*b:ale_verilog_slang_options*
|
||||
verilog_slang_options
|
||||
g:ale_verilog_slang_options
|
||||
verilog_slang_option
|
||||
g:ale_verilog_slang_option
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be changed to modify 'slang' command arguments.
|
||||
|
||||
===============================================================================
|
||||
verible_ls *ale-verilog-verible-ls*
|
||||
|
||||
*ale-config.verilog_verible_ls_executable*
|
||||
*g:ale_verilog_verible_ls_executable*
|
||||
*b:ale_verilog_verible_ls_executable*
|
||||
verilog_verible_ls_executable
|
||||
g:ale_verilog_verible_ls_executable
|
||||
Type: |String|
|
||||
Default: `'verible-verilog-ls'`
|
||||
|
||||
This variable can be modifies to change the executable path for `verible_ls`
|
||||
|
||||
*ale-config.verilog_verible_ls_config*
|
||||
*g:ale_verilog_verible_ls_config*
|
||||
*b:ale_verilog_verible_ls_config*
|
||||
verilog_verible_ls_config
|
||||
g:ale_verilog_verible_ls_config
|
||||
Type: |Dictionary|
|
||||
Default: `{}`
|
||||
|
||||
Dictionary with configuration settings for `verible_ls`
|
||||
|
||||
*ale-config.verilog_verible_ls_options*
|
||||
*g:ale_verilog_verible_ls_options*
|
||||
*b:ale_verilog_verible_ls_options*
|
||||
verilog_verible_ls_options
|
||||
g:ale_verilog_verible_ls_options
|
||||
Type: |String|
|
||||
Default: `'--rules_config_search'`
|
||||
|
||||
Additional flags for `verible_ls`
|
||||
|
||||
*ale-config.verilog_verible_ls_rules*
|
||||
*g:ale_verilog_verible_ls_rules*
|
||||
*b:ale_verilog_verible_ls_rules*
|
||||
verilog_verible_ls_rules
|
||||
g:ale_verilog_verible_ls_rules
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
Additional rules applied by `verible_ls`
|
||||
|
||||
===============================================================================
|
||||
verible_format *ale-verilog-verible-format*
|
||||
|
||||
*ale-config.verilog_verible_format_executable*
|
||||
*g:ale_verilog_verible_format_executable*
|
||||
*b:ale_verilog_verible_format_executable*
|
||||
verilog_verible_format_executable
|
||||
g:ale_verilog_verible_format_executable
|
||||
Type: |String|
|
||||
Default: `'verible-verilog-format'`
|
||||
|
||||
This variable can be modifies to change the executable path for
|
||||
`verible_format`
|
||||
|
||||
*ale-config.verilog_verible_format_options*
|
||||
*g:ale_verilog_verible_format_options*
|
||||
*b:ale_verilog_verible_format_options*
|
||||
verilog_verible_format_options
|
||||
g:ale_verilog_verible_format_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
Additional flags for `verible_format`
|
||||
===============================================================================
|
||||
|
||||
verilator *ale-verilog-verilator*
|
||||
|
||||
*ale-options.verilog_verilator_options*
|
||||
|
||||
64
doc/ale.txt
64
doc/ale.txt
@@ -30,8 +30,7 @@ CONTENTS *ale-contents*
|
||||
7.2 Options for cspell................|ale-cspell-options|
|
||||
7.3 Options for languagetool..........|ale-languagetool-options|
|
||||
7.4 Options for write-good............|ale-write-good-options|
|
||||
7.5 Options for redpen................|ale-redpen-options|
|
||||
7.6 Other Linter/Fixer Options........|ale-other-integration-options|
|
||||
7.5 Other Linter/Fixer Options........|ale-other-integration-options|
|
||||
8. Commands/Keybinds....................|ale-commands|
|
||||
9. API..................................|ale-api|
|
||||
10. Special Thanks......................|ale-special-thanks|
|
||||
@@ -1193,13 +1192,13 @@ g:ale_detail_to_floating_preview
|
||||
*b:ale_disable_lsp*
|
||||
disable_lsp
|
||||
g:ale_disable_lsp
|
||||
Type: |Boolean| OR |Number| OR |String|
|
||||
Type: |Number| OR |String|
|
||||
Default: `'auto'`
|
||||
|
||||
When this option is set to `'auto'`, ALE will automatically disable linters
|
||||
that it detects as having already been configured with the `nvim-lspconfig`
|
||||
plugin. When this option is set to `true` or `1`, ALE ignores all linters
|
||||
powered by LSP, and also `tsserver`.
|
||||
plugin. When this option is set to `1`, ALE ignores all linters powered by
|
||||
LSP, and also `tsserver`.
|
||||
|
||||
Any linters that are disabled will also not be usable for LSP functionality
|
||||
other than just linting.
|
||||
@@ -1736,7 +1735,6 @@ g:ale_linter_aliases
|
||||
|
||||
{
|
||||
\ 'Dockerfile': 'dockerfile',
|
||||
\ 'bash': 'sh',
|
||||
\ 'csh': 'sh',
|
||||
\ 'javascriptreact': ['javascript', 'jsx'],
|
||||
\ 'plaintex': 'tex',
|
||||
@@ -2270,16 +2268,6 @@ g:ale_popup_menu_enabled
|
||||
This setting must be set to `true` or `1` before ALE is loaded for this
|
||||
behavior to be enabled. See |ale-lint-settings-on-startup|.
|
||||
|
||||
*ale-options.references_show_contents*
|
||||
*g:ale_references_show_contents*
|
||||
references_show_contents
|
||||
g:ale_references_show_contents
|
||||
Type: |Boolean| or |Number|
|
||||
Default: true
|
||||
|
||||
If set to `true` or `1`, matches found by `:ALEFindReferences` will be
|
||||
shown with a preview of the matching line.
|
||||
|
||||
*ale-options.rename_tsserver_find_in_comments*
|
||||
*g:ale_rename_tsserver_find_in_comments*
|
||||
rename_tsserver_find_in_comments
|
||||
@@ -3332,24 +3320,7 @@ g:ale_writegood_use_global
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
7.6. Options for redpen *ale-redpen-options*
|
||||
|
||||
The options for `redpen` are shared between all filetypes, so options can
|
||||
be configured once.
|
||||
|
||||
*ale-options.redpen_options*
|
||||
*g:ale_redpen_options*
|
||||
*b:ale_redpen_options*
|
||||
redpen_options
|
||||
g:ale_redpen_options
|
||||
Type: |String|
|
||||
Default: `''`
|
||||
|
||||
This variable can be set to pass additional options to redpen.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
7.7. Other Linter/Fixer Options *ale-other-integration-options*
|
||||
7.6. Other Linter/Fixer Options *ale-other-integration-options*
|
||||
|
||||
ALE supports a very wide variety of tools. Other linter or fixer options are
|
||||
documented in additional help files.
|
||||
@@ -3370,7 +3341,6 @@ documented in additional help files.
|
||||
cspell................................|ale-asciidoc-cspell|
|
||||
write-good............................|ale-asciidoc-write-good|
|
||||
textlint..............................|ale-asciidoc-textlint|
|
||||
redpen................................|ale-asciidoc-redpen|
|
||||
asm.....................................|ale-asm-options|
|
||||
gcc...................................|ale-asm-gcc|
|
||||
llvm_mc...............................|ale-asm-llvm_mc|
|
||||
@@ -3390,8 +3360,6 @@ documented in additional help files.
|
||||
bicep...................................|ale-bicep-options|
|
||||
bicep.................................|ale-bicep-bicep|
|
||||
az_bicep..............................|ale-bicep-az_bicep|
|
||||
bindzone................................|ale-bindzone-options|
|
||||
checkzone.............................|ale-bindzone-checkzone|
|
||||
bitbake.................................|ale-bitbake-options|
|
||||
oelint-adv............................|ale-bitbake-oelint_adv|
|
||||
c.......................................|ale-c-options|
|
||||
@@ -3419,7 +3387,6 @@ documented in additional help files.
|
||||
joker.................................|ale-clojure-joker|
|
||||
cloudformation..........................|ale-cloudformation-options|
|
||||
cfn-python-lint.......................|ale-cloudformation-cfn-python-lint|
|
||||
checkov...............................|ale-cloudformation-checkov|
|
||||
cmake...................................|ale-cmake-options|
|
||||
cmakelint.............................|ale-cmake-cmakelint|
|
||||
cmake-lint............................|ale-cmake-cmake-lint|
|
||||
@@ -3510,7 +3477,6 @@ documented in additional help files.
|
||||
fish....................................|ale-fish-options|
|
||||
fish_indent...........................|ale-fish-fish_indent|
|
||||
fortran.................................|ale-fortran-options|
|
||||
fortitude.............................|ale-fortran-fortitude|
|
||||
gcc...................................|ale-fortran-gcc|
|
||||
language_server.......................|ale-fortran-language-server|
|
||||
fountain................................|ale-fountain-options|
|
||||
@@ -3634,7 +3600,6 @@ documented in additional help files.
|
||||
xo....................................|ale-javascript-xo|
|
||||
jinja...................................|ale-jinja-options|
|
||||
djlint................................|ale-jinja-djlint|
|
||||
j2lint................................|ale-jinja-j2lint|
|
||||
json....................................|ale-json-options|
|
||||
biome.................................|ale-json-biome|
|
||||
clang-format..........................|ale-json-clangformat|
|
||||
@@ -3666,8 +3631,6 @@ documented in additional help files.
|
||||
cspell................................|ale-latex-cspell|
|
||||
write-good............................|ale-latex-write-good|
|
||||
textlint..............................|ale-latex-textlint|
|
||||
lean....................................|ale-lean-options|
|
||||
lake..................................|ale-lean-lake|
|
||||
less....................................|ale-less-options|
|
||||
lessc.................................|ale-less-lessc|
|
||||
prettier..............................|ale-less-prettier|
|
||||
@@ -3697,7 +3660,6 @@ documented in additional help files.
|
||||
remark-lint...........................|ale-markdown-remark-lint|
|
||||
textlint..............................|ale-markdown-textlint|
|
||||
write-good............................|ale-markdown-write-good|
|
||||
redpen................................|ale-markdown-redpen|
|
||||
mercury.................................|ale-mercury-options|
|
||||
mmc...................................|ale-mercury-mmc|
|
||||
nasm....................................|ale-nasm-options|
|
||||
@@ -3752,7 +3714,6 @@ documented in additional help files.
|
||||
uncrustify............................|ale-pawn-uncrustify|
|
||||
perl....................................|ale-perl-options|
|
||||
perl..................................|ale-perl-perl|
|
||||
perl language server..................|ale-perl-languageserver|
|
||||
perlcritic............................|ale-perl-perlcritic|
|
||||
perltidy..............................|ale-perl-perltidy|
|
||||
perl6...................................|ale-perl6-options|
|
||||
@@ -3761,7 +3722,6 @@ documented in additional help files.
|
||||
cspell................................|ale-php-cspell|
|
||||
langserver............................|ale-php-langserver|
|
||||
phan..................................|ale-php-phan|
|
||||
phpactor..............................|ale-php-phpactor|
|
||||
phpcbf................................|ale-php-phpcbf|
|
||||
phpcs.................................|ale-php-phpcs|
|
||||
phpmd.................................|ale-php-phpmd|
|
||||
@@ -3823,7 +3783,6 @@ documented in additional help files.
|
||||
pylint................................|ale-python-pylint|
|
||||
pylsp.................................|ale-python-pylsp|
|
||||
pyre..................................|ale-python-pyre|
|
||||
pyrefly...............................|ale-python-pyrefly|
|
||||
pyright...............................|ale-python-pyright|
|
||||
refurb................................|ale-python-refurb|
|
||||
reorder-python-imports................|ale-python-reorder_python_imports|
|
||||
@@ -3858,10 +3817,6 @@ documented in additional help files.
|
||||
write-good............................|ale-restructuredtext-write-good|
|
||||
robot...................................|ale-robot-options|
|
||||
rflint................................|ale-robot-rflint|
|
||||
roc.....................................|ale-roc-options|
|
||||
roc_language_server...................|ale-roc-roc-language-server|
|
||||
roc_format............................|ale-roc-roc-format|
|
||||
roc_annotate..........................|ale-roc-roc-annotate|
|
||||
ruby....................................|ale-ruby-options|
|
||||
brakeman..............................|ale-ruby-brakeman|
|
||||
cspell................................|ale-ruby-cspell|
|
||||
@@ -3951,7 +3906,6 @@ documented in additional help files.
|
||||
lacheck...............................|ale-tex-lacheck|
|
||||
latexindent...........................|ale-tex-latexindent|
|
||||
texlab................................|ale-tex-texlab|
|
||||
redpen................................|ale-tex-redpen|
|
||||
texinfo.................................|ale-texinfo-options|
|
||||
cspell................................|ale-texinfo-cspell|
|
||||
write-good............................|ale-texinfo-write-good|
|
||||
@@ -3959,13 +3913,11 @@ documented in additional help files.
|
||||
cspell................................|ale-text-cspell|
|
||||
textlint..............................|ale-text-textlint|
|
||||
write-good............................|ale-text-write-good|
|
||||
redpen................................|ale-text-redpen|
|
||||
thrift..................................|ale-thrift-options|
|
||||
thrift................................|ale-thrift-thrift|
|
||||
thriftcheck...........................|ale-thrift-thriftcheck|
|
||||
toml....................................|ale-toml-options|
|
||||
dprint................................|ale-toml-dprint|
|
||||
tombi.................................|ale-toml-tombi|
|
||||
typescript..............................|ale-typescript-options|
|
||||
biome.................................|ale-typescript-biome|
|
||||
cspell................................|ale-typescript-cspell|
|
||||
@@ -3988,8 +3940,6 @@ documented in additional help files.
|
||||
hdl-checker...........................|ale-verilog-hdl-checker|
|
||||
iverilog..............................|ale-verilog-iverilog|
|
||||
slang.................................|ale-verilog-slang|
|
||||
verible_ls............................|ale-verilog-verible-ls|
|
||||
verible_format........................|ale-verilog-verible-format|
|
||||
verilator.............................|ale-verilog-verilator|
|
||||
vlog..................................|ale-verilog-vlog|
|
||||
xvlog.................................|ale-verilog-xvlog|
|
||||
@@ -4082,14 +4032,10 @@ documented in additional help files.
|
||||
`:ALEFindReferences -split` - Open the location in a horizontal split.
|
||||
`:ALEFindReferences -vsplit` - Open the location in a vertical split.
|
||||
`:ALEFindReferences -quickfix` - Put the locations into quickfix list.
|
||||
`:ALEFindReferences -contents` - Show line contents for matches.
|
||||
|
||||
The default method used for navigating to a new location can be changed
|
||||
by modifying |g:ale_default_navigation|.
|
||||
|
||||
The default behaviour on whether to show line content for matches can
|
||||
be changed by modifying |g:ale_references_show_contents|.
|
||||
|
||||
You can add `-relative` to the command to view results with relatives paths,
|
||||
instead of absolute paths. This option has no effect if `-quickfix` is used.
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ module.send = function(buffer, loclist)
|
||||
local local_cfg = { priority = sign_priority }
|
||||
local global_cfg = vim.diagnostic.config().signs
|
||||
|
||||
if global_cfg == false or global_cfg == true or global_cfg == nil then
|
||||
if type(global_cfg) == "boolean" then
|
||||
signs = local_cfg
|
||||
elseif type(global_cfg) == "table" then
|
||||
signs = vim.tbl_extend("force", global_cfg, local_cfg)
|
||||
|
||||
@@ -150,14 +150,12 @@ module.send_message = function(args)
|
||||
success, request_id = client.request(
|
||||
args.method,
|
||||
args.params,
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
function(_, result, _, _)
|
||||
vim.fn["ale#lsp#HandleResponse"](client.name, {
|
||||
id = request_id,
|
||||
result = result,
|
||||
})
|
||||
end,
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
-1
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2317
|
||||
DOCKER=${DOCKER:-docker}
|
||||
export DOCKER
|
||||
# Author: w0rp <devw0rp@gmail.com>
|
||||
|
||||
@@ -14,16 +14,15 @@ formatting.
|
||||
|
||||
**Legend**
|
||||
|
||||
| Key | Definition |
|
||||
| -------------- | ----------------------------------------------------------------- |
|
||||
|:speech_balloon:| Language Server Protocol (LSP) |
|
||||
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
|
||||
| :warning: | Disabled by default |
|
||||
| Key | Definition |
|
||||
| ------------- | ----------------------------------------------------------------- |
|
||||
| :floppy_disk: | May only run on files on disk (see: `help ale-lint-file-linters` |
|
||||
| :warning: | Disabled by default |
|
||||
|
||||
---
|
||||
|
||||
* Ada
|
||||
* [ada_language_server](https://github.com/AdaCore/ada_language_server) :speech_balloon:
|
||||
* [ada_language_server](https://github.com/AdaCore/ada_language_server)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [gcc](https://gcc.gnu.org)
|
||||
* [gnatpp](https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/gnat_utility_programs.html#the-gnat-pretty-printer-gnatpp) :floppy_disk:
|
||||
@@ -33,13 +32,13 @@ formatting.
|
||||
* API Blueprint
|
||||
* [drafter](https://github.com/apiaryio/drafter)
|
||||
* APKBUILD
|
||||
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools) :speech_balloon:
|
||||
* [apkbuild-fixer](https://gitlab.alpinelinux.org/Leo/atools)
|
||||
* [apkbuild-lint](https://gitlab.alpinelinux.org/Leo/atools)
|
||||
* [secfixes-check](https://gitlab.alpinelinux.org/Leo/atools)
|
||||
* AsciiDoc
|
||||
* [alex](https://github.com/get-alex/alex)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
||||
* [proselint](http://proselint.com/)
|
||||
* [redpen](http://redpen.cc/)
|
||||
* [textlint](https://textlint.github.io/)
|
||||
@@ -65,13 +64,11 @@ formatting.
|
||||
* Bats
|
||||
* [shellcheck](https://www.shellcheck.net/)
|
||||
* Bazel
|
||||
* [buildifier](https://github.com/bazelbuild/buildtools) :speech_balloon:
|
||||
* [buildifier](https://github.com/bazelbuild/buildtools)
|
||||
* BibTeX
|
||||
* [bibclean](http://ftp.math.utah.edu/pub/bibclean/)
|
||||
* Bicep
|
||||
* [bicep](https://github.com/Azure/bicep) :floppy_disk: :speech_balloon:
|
||||
* Bindzone
|
||||
* [checkzone](https://bind9.readthedocs.io/en/stable/manpages.html#named-checkzone-zone-file-validation-tool)
|
||||
* [bicep](https://github.com/Azure/bicep) :floppy_disk:
|
||||
* BitBake
|
||||
* [oelint-adv](https://github.com/priv-kweihmann/oelint-adv)
|
||||
* Bourne Shell
|
||||
@@ -80,15 +77,15 @@ formatting.
|
||||
* [shfmt](https://github.com/mvdan/sh)
|
||||
* C
|
||||
* [astyle](http://astyle.sourceforge.net/)
|
||||
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||
* [ccls](https://github.com/MaskRay/ccls)
|
||||
* [clang](http://clang.llvm.org/)
|
||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
||||
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
||||
* [cppcheck](http://cppcheck.sourceforge.net)
|
||||
* [cpplint](https://github.com/cpplint/cpplint)
|
||||
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
|
||||
* [cquery](https://github.com/cquery-project/cquery)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
||||
* [gcc](https://gcc.gnu.org/)
|
||||
@@ -103,22 +100,22 @@ formatting.
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* C++ (filetype cpp)
|
||||
* [astyle](http://astyle.sourceforge.net/)
|
||||
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||
* [ccls](https://github.com/MaskRay/ccls)
|
||||
* [clang](http://clang.llvm.org/)
|
||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
* [clangcheck](http://clang.llvm.org/docs/ClangCheck.html) :floppy_disk:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
||||
* [clangtidy](http://clang.llvm.org/extra/clang-tidy/) :floppy_disk:
|
||||
* [clazy](https://github.com/KDE/clazy) :floppy_disk:
|
||||
* [cppcheck](http://cppcheck.sourceforge.net)
|
||||
* [cpplint](https://github.com/google/styleguide/tree/gh-pages/cpplint) :floppy_disk:
|
||||
* [cquery](https://github.com/cquery-project/cquery) :speech_balloon:
|
||||
* [cquery](https://github.com/cquery-project/cquery)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [flawfinder](https://www.dwheeler.com/flawfinder/)
|
||||
* [gcc](https://gcc.gnu.org/)
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* C3
|
||||
* [c3lsp](https://github.com/pherrymason/c3-lsp) :speech_balloon:
|
||||
* [c3lsp](https://github.com/pherrymason/c3-lsp)
|
||||
* Cairo
|
||||
* [scarb](https://docs.swmansion.com/scarb/) :floppy_disk:
|
||||
* [starknet](https://starknet.io/docs)
|
||||
@@ -131,7 +128,6 @@ formatting.
|
||||
* [joker](https://github.com/candid82/joker)
|
||||
* CloudFormation
|
||||
* [cfn-python-lint](https://github.com/awslabs/cfn-python-lint)
|
||||
* [checkov](https://github.com/bridgecrewio/checkov)
|
||||
* CMake
|
||||
* [cmake-format](https://github.com/cheshirekow/cmake_format)
|
||||
* [cmake-lint](https://github.com/cheshirekow/cmake_format)
|
||||
@@ -154,7 +150,7 @@ formatting.
|
||||
* [cucumber](https://cucumber.io/)
|
||||
* CUDA
|
||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
||||
* [nvcc](http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html) :floppy_disk:
|
||||
* Cypher
|
||||
* [cypher-lint](https://github.com/cleishm/libcypher-parser)
|
||||
@@ -189,8 +185,8 @@ formatting.
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
||||
* [dialyxir](https://github.com/jeremyjh/dialyxir)
|
||||
* [dogma](https://github.com/lpil/dogma) :floppy_disk:
|
||||
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning: :speech_balloon:
|
||||
* [lexical](https://github.com/lexical-lsp/lexical) :warning: :speech_balloon:
|
||||
* [elixir-ls](https://github.com/elixir-lsp/elixir-ls) :warning:
|
||||
* [lexical](https://github.com/lexical-lsp/lexical) :warning:
|
||||
* [mix](https://hexdocs.pm/mix/Mix.html) :warning: :floppy_disk:
|
||||
* Elm
|
||||
* [elm-format](https://github.com/avh4/elm-format)
|
||||
@@ -208,17 +204,16 @@ formatting.
|
||||
* [SyntaxErl](https://github.com/ten0s/syntaxerl)
|
||||
* [dialyzer](http://erlang.org/doc/man/dialyzer.html) :floppy_disk:
|
||||
* [elvis](https://github.com/inaka/elvis) :floppy_disk:
|
||||
* [erlang-mode](https://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html) (The Erlang mode for Emacs) :speech_balloon:
|
||||
* [erlang_ls](https://github.com/erlang-ls/erlang_ls) :speech_balloon:
|
||||
* [erlang-mode](https://www.erlang.org/doc/apps/tools/erlang_mode_chapter.html) (The Erlang mode for Emacs)
|
||||
* [erlang_ls](https://github.com/erlang-ls/erlang_ls)
|
||||
* [erlc](http://erlang.org/doc/man/erlc.html)
|
||||
* [erlfmt](https://github.com/WhatsApp/erlfmt)
|
||||
* Fish
|
||||
* fish [-n flag](https://linux.die.net/man/1/fish)
|
||||
* [fish_indent](https://fishshell.com/docs/current/cmds/fish_indent.html)
|
||||
* Fortran
|
||||
* [fortitude](https://github.com/PlasmaFAIR/fortitude)
|
||||
* [gcc](https://gcc.gnu.org/)
|
||||
* [language_server](https://github.com/hansec/fortran-language-server) :speech_balloon:
|
||||
* [language_server](https://github.com/hansec/fortran-language-server)
|
||||
* Fountain
|
||||
* [proselint](http://proselint.com/)
|
||||
* FusionScript
|
||||
@@ -226,11 +221,11 @@ formatting.
|
||||
* Git Commit Messages
|
||||
* [gitlint](https://github.com/jorisroovers/gitlint)
|
||||
* Gleam
|
||||
* [gleam_format](https://github.com/gleam-lang/gleam) :speech_balloon:
|
||||
* [gleamlsp](https://github.com/gleam-lang/gleam) :speech_balloon:
|
||||
* [gleam_format](https://github.com/gleam-lang/gleam)
|
||||
* [gleamlsp](https://github.com/gleam-lang/gleam)
|
||||
* GLSL
|
||||
* [glslang](https://github.com/KhronosGroup/glslang)
|
||||
* [glslls](https://github.com/svenstaro/glsl-language-server) :speech_balloon:
|
||||
* [glslls](https://github.com/svenstaro/glsl-language-server)
|
||||
* Go
|
||||
* [bingo](https://github.com/saibing/bingo) :warning:
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell) :warning:
|
||||
@@ -239,15 +234,15 @@ formatting.
|
||||
* [go vet](https://golang.org/cmd/vet/) :floppy_disk:
|
||||
* [gofmt](https://golang.org/cmd/gofmt/)
|
||||
* [gofumpt](https://github.com/mvdan/gofumpt)
|
||||
* [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning: :speech_balloon:
|
||||
* [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports) :warning:
|
||||
* [golangci-lint](https://github.com/golangci/golangci-lint) :warning: :floppy_disk:
|
||||
* [golangserver](https://github.com/sourcegraph/go-langserver) :warning:
|
||||
* [golines](https://github.com/segmentio/golines)
|
||||
* [gopls](https://github.com/golang/tools/blob/master/gopls/README.md) :speech_balloon:
|
||||
* [gosimple](https://staticcheck.io/changes/2019.2/#deprecated) :warning: :floppy_disk: :speech_balloon:
|
||||
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk: :speech_balloon:
|
||||
* [gopls](https://github.com/golang/go/wiki/gopls)
|
||||
* [gosimple](https://github.com/dominikh/go-tools/tree/master/cmd/gosimple) :warning: :floppy_disk:
|
||||
* [gotype](https://godoc.org/golang.org/x/tools/cmd/gotype) :warning: :floppy_disk:
|
||||
* [revive](https://github.com/mgechev/revive) :warning: :floppy_disk:
|
||||
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk: :speech_balloon:
|
||||
* [staticcheck](https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck) :warning: :floppy_disk:
|
||||
* Go HTML Templates
|
||||
* [djlint](https://djlint.com/)
|
||||
* GraphQL
|
||||
@@ -259,21 +254,21 @@ formatting.
|
||||
* Hack
|
||||
* [hack](http://hacklang.org/)
|
||||
* [hackfmt](https://github.com/facebook/hhvm/tree/master/hphp/hack/hackfmt)
|
||||
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`) :speech_balloon:
|
||||
* [hhast](https://github.com/hhvm/hhast) :warning: (see `:help ale-integration-hack`)
|
||||
* Haml
|
||||
* [haml-lint](https://github.com/brigade/haml-lint)
|
||||
* Handlebars
|
||||
* [djlint](https://djlint.com/)
|
||||
* [ember-template-lint](https://github.com/rwjblue/ember-template-lint)
|
||||
* Haskell
|
||||
* [brittany](https://github.com/lspitzner/brittany) :speech_balloon:
|
||||
* [brittany](https://github.com/lspitzner/brittany)
|
||||
* [cabal-ghc](https://www.haskell.org/cabal/)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [floskell](https://github.com/ennocramer/floskell)
|
||||
* [fourmolu](https://github.com/fourmolu/fourmolu)
|
||||
* [ghc](https://www.haskell.org/ghc/)
|
||||
* [ghc-mod](https://github.com/DanielG/ghc-mod)
|
||||
* [hdevtools](https://hackage.haskell.org/package/hdevtools) :speech_balloon:
|
||||
* [hdevtools](https://hackage.haskell.org/package/hdevtools)
|
||||
* [hfmt](https://github.com/danstiner/hfmt)
|
||||
* [hie](https://github.com/haskell/haskell-ide-engine)
|
||||
* [hindent](https://hackage.haskell.org/package/hindent)
|
||||
@@ -322,10 +317,10 @@ formatting.
|
||||
* [checkstyle](http://checkstyle.sourceforge.net) :floppy_disk:
|
||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls) :speech_balloon:
|
||||
* [eclipselsp](https://github.com/eclipse/eclipse.jdt.ls)
|
||||
* [google-java-format](https://github.com/google/google-java-format)
|
||||
* [javac](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
|
||||
* [javalsp](https://github.com/georgewfraser/vscode-javac) :speech_balloon:
|
||||
* [javalsp](https://github.com/georgewfraser/vscode-javac)
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* JavaScript
|
||||
* [biome](https://biomejs.dev/)
|
||||
@@ -335,7 +330,7 @@ formatting.
|
||||
* [dprint](https://dprint.dev/)
|
||||
* [eslint](http://eslint.org/)
|
||||
* [fecs](http://fecs.baidu.com/)
|
||||
* [flow](https://flowtype.org/) :speech_balloon:
|
||||
* [flow](https://flowtype.org/)
|
||||
* [jscs](https://jscs-dev.github.io/)
|
||||
* [jshint](http://jshint.com/)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
@@ -346,7 +341,6 @@ formatting.
|
||||
* [xo](https://github.com/sindresorhus/xo)
|
||||
* Jinja
|
||||
* [djlint](https://djlint.com/)
|
||||
* [j2lint](https://github.com/aristanetworks/j2lint/)
|
||||
* JSON
|
||||
* [VSCode JSON language server](https://github.com/hrsh7th/vscode-langservers-extracted)
|
||||
* [biome](https://biomejs.dev/)
|
||||
@@ -366,8 +360,8 @@ formatting.
|
||||
* [biome](https://biomejs.dev/)
|
||||
* [eslint](http://eslint.org/) :warning:
|
||||
* Jsonnet
|
||||
* [jsonnet-lint](https://jsonnet.org/learning/tools.html) :speech_balloon:
|
||||
* [jsonnetfmt](https://jsonnet.org/learning/tools.html) :speech_balloon:
|
||||
* [jsonnet-lint](https://jsonnet.org/learning/tools.html)
|
||||
* [jsonnetfmt](https://jsonnet.org/learning/tools.html)
|
||||
* Julia
|
||||
* [languageserver](https://github.com/JuliaEditorSupport/LanguageServer.jl)
|
||||
* Kotlin
|
||||
@@ -381,12 +375,10 @@ formatting.
|
||||
* [lacheck](https://www.ctan.org/pkg/lacheck)
|
||||
* [proselint](http://proselint.com/)
|
||||
* [redpen](http://redpen.cc/)
|
||||
* [texlab](https://texlab.netlify.com) :speech_balloon:
|
||||
* [texlab](https://texlab.netlify.com)
|
||||
* [textlint](https://textlint.github.io/)
|
||||
* [vale](https://github.com/ValeLint/vale)
|
||||
* [write-good](https://github.com/btford/write-good)
|
||||
* Lean 4
|
||||
* [lake](https://github.com/leanprover/lean4)
|
||||
* Less
|
||||
* [lessc](https://www.npmjs.com/package/less)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
@@ -396,7 +388,7 @@ formatting.
|
||||
* Lua
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [lua-format](https://github.com/Koihik/LuaFormatter)
|
||||
* [lua-language-server](https://github.com/LuaLS/lua-language-server) :speech_balloon:
|
||||
* [lua-language-server](https://github.com/LuaLS/lua-language-server)
|
||||
* [luac](https://www.lua.org/manual/5.1/luac.html)
|
||||
* [luacheck](https://github.com/mpeterv/luacheck)
|
||||
* [luafmt](https://github.com/trixnz/lua-fmt)
|
||||
@@ -404,7 +396,7 @@ formatting.
|
||||
* [stylua](https://github.com/johnnymorganz/stylua)
|
||||
* Mail
|
||||
* [alex](https://github.com/get-alex/alex)
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
||||
* [proselint](http://proselint.com/)
|
||||
* [vale](https://github.com/ValeLint/vale)
|
||||
* Make
|
||||
@@ -412,9 +404,9 @@ formatting.
|
||||
* Markdown
|
||||
* [alex](https://github.com/get-alex/alex)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
||||
* [markdownlint](https://github.com/DavidAnson/markdownlint) :floppy_disk:
|
||||
* [marksman](https://github.com/artempyanykh/marksman) :speech_balloon:
|
||||
* [marksman](https://github.com/artempyanykh/marksman)
|
||||
* [mdl](https://github.com/mivok/markdownlint)
|
||||
* [pandoc](https://pandoc.org)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
@@ -426,7 +418,7 @@ formatting.
|
||||
* [vale](https://github.com/ValeLint/vale)
|
||||
* [write-good](https://github.com/btford/write-good)
|
||||
* MATLAB
|
||||
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html) :speech_balloon:
|
||||
* [mlint](https://www.mathworks.com/help/matlab/ref/mlint.html)
|
||||
* Mercury
|
||||
* [mmc](http://mercurylang.org) :floppy_disk:
|
||||
* NASM
|
||||
@@ -435,7 +427,7 @@ formatting.
|
||||
* [nickel_format](https://github.com/tweag/nickel#formatting)
|
||||
* Nim
|
||||
* [nim check](https://nim-lang.org/docs/nimc.html) :floppy_disk:
|
||||
* [nimlsp](https://github.com/PMunch/nimlsp) :speech_balloon:
|
||||
* [nimlsp](https://github.com/PMunch/nimlsp)
|
||||
* nimpretty
|
||||
* nix
|
||||
* [alejandra](https://github.com/kamadorueda/alejandra)
|
||||
@@ -443,7 +435,7 @@ formatting.
|
||||
* [nix-instantiate](http://nixos.org/nix/manual/#sec-nix-instantiate)
|
||||
* [nixfmt](https://github.com/serokell/nixfmt)
|
||||
* [nixpkgs-fmt](https://github.com/nix-community/nixpkgs-fmt)
|
||||
* [rnix-lsp](https://github.com/nix-community/rnix-lsp) :speech_balloon:
|
||||
* [rnix-lsp](https://github.com/nix-community/rnix-lsp)
|
||||
* [statix](https://github.com/nerdypepper/statix)
|
||||
* nroff
|
||||
* [alex](https://github.com/get-alex/alex)
|
||||
@@ -452,24 +444,24 @@ formatting.
|
||||
* Nunjucks
|
||||
* [djlint](https://djlint.com/)
|
||||
* Objective-C
|
||||
* [ccls](https://github.com/MaskRay/ccls) :speech_balloon:
|
||||
* [ccls](https://github.com/MaskRay/ccls)
|
||||
* [clang](http://clang.llvm.org/)
|
||||
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html)
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* Objective-C++
|
||||
* [clang](http://clang.llvm.org/)
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html) :speech_balloon:
|
||||
* [clangd](https://clang.llvm.org/extra/clangd.html)
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* OCaml
|
||||
* [dune](https://dune.build/)
|
||||
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-ocaml-merlin` for configuration instructions
|
||||
* [ocamlformat](https://github.com/ocaml-ppx/ocamlformat)
|
||||
* [ocamllsp](https://github.com/ocaml/ocaml-lsp) :speech_balloon:
|
||||
* [ocamllsp](https://github.com/ocaml/ocaml-lsp)
|
||||
* [ocp-indent](https://github.com/OCamlPro/ocp-indent)
|
||||
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
|
||||
* [ols](https://github.com/freebroccolo/ocaml-language-server)
|
||||
* Odin
|
||||
* [ols](https://github.com/DanielGavin/ols) :speech_balloon:
|
||||
* [ols](https://github.com/DanielGavin/ols)
|
||||
* OpenApi
|
||||
* [ibm_validator](https://github.com/IBM/openapi-validator)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
@@ -480,11 +472,10 @@ formatting.
|
||||
* Packer (HCL)
|
||||
* [packer-fmt-fixer](https://github.com/hashicorp/packer)
|
||||
* Pascal
|
||||
* [ptop](https://www.freepascal.org/tools/ptop.var) :speech_balloon:
|
||||
* [ptop](https://www.freepascal.org/tools/ptop.var)
|
||||
* Pawn
|
||||
* [uncrustify](https://github.com/uncrustify/uncrustify)
|
||||
* Perl
|
||||
* [languageserver](https://metacpan.org/pod/Perl::LanguageServer)
|
||||
* [perl -c](https://perl.org/) :warning:
|
||||
* [perl-critic](https://metacpan.org/pod/Perl::Critic)
|
||||
* [perltidy](https://metacpan.org/pod/distribution/Perl-Tidy/bin/perltidy)
|
||||
@@ -492,12 +483,12 @@ formatting.
|
||||
* [perl6 -c](https://perl6.org) :warning:
|
||||
* PHP
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [intelephense](https://github.com/bmewburn/intelephense-docs) :speech_balloon:
|
||||
* [langserver](https://github.com/felixfbecker/php-language-server) :speech_balloon:
|
||||
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions :speech_balloon:
|
||||
* [intelephense](https://github.com/bmewburn/intelephense-docs)
|
||||
* [langserver](https://github.com/felixfbecker/php-language-server)
|
||||
* [phan](https://github.com/phan/phan) see `:help ale-php-phan` to instructions
|
||||
* [php -l](https://secure.php.net/)
|
||||
* [php-cs-fixer](https://cs.symfony.com)
|
||||
* [phpactor](https://github.com/phpactor/phpactor) :speech_balloon:
|
||||
* [phpactor](https://github.com/phpactor/phpactor)
|
||||
* [phpcbf](https://github.com/squizlabs/PHP_CodeSniffer)
|
||||
* [phpcs](https://github.com/squizlabs/PHP_CodeSniffer)
|
||||
* [phpmd](https://phpmd.org)
|
||||
@@ -535,7 +526,7 @@ formatting.
|
||||
* [puppet](https://puppet.com)
|
||||
* [puppet-lint](https://puppet-lint.com)
|
||||
* PureScript
|
||||
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server) :speech_balloon:
|
||||
* [purescript-language-server](https://github.com/nwolverson/purescript-language-server)
|
||||
* [purs-tidy](https://github.com/natefaubion/purescript-tidy)
|
||||
* [purty](https://gitlab.com/joneshf/purty)
|
||||
* Python
|
||||
@@ -557,10 +548,9 @@ formatting.
|
||||
* [pyflyby](https://github.com/deshaw/pyflyby) :warning:
|
||||
* [pylama](https://github.com/klen/pylama) :floppy_disk:
|
||||
* [pylint](https://www.pylint.org/) :floppy_disk:
|
||||
* [pylsp](https://github.com/python-lsp/python-lsp-server) :warning: :speech_balloon:
|
||||
* [pylsp](https://github.com/python-lsp/python-lsp-server) :warning:
|
||||
* [pyre](https://github.com/facebook/pyre-check) :warning:
|
||||
* [pyrefly](https://github.com/facebook/pyrefly) :warning: :speech_balloon:
|
||||
* [pyright](https://github.com/microsoft/pyright) :speech_balloon:
|
||||
* [pyright](https://github.com/microsoft/pyright)
|
||||
* [refurb](https://github.com/dosisod/refurb) :floppy_disk:
|
||||
* [reorder-python-imports](https://github.com/asottile/reorder_python_imports)
|
||||
* [ruff](https://github.com/charliermarsh/ruff)
|
||||
@@ -570,21 +560,21 @@ formatting.
|
||||
* [yapf](https://github.com/google/yapf)
|
||||
* QML
|
||||
* [qmlfmt](https://github.com/jesperhh/qmlfmt)
|
||||
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint) :speech_balloon:
|
||||
* [qmllint](https://github.com/qt/qtdeclarative/tree/5.11/tools/qmllint)
|
||||
* R
|
||||
* [languageserver](https://github.com/REditorSupport/languageserver)
|
||||
* [lintr](https://github.com/jimhester/lintr)
|
||||
* [styler](https://github.com/r-lib/styler)
|
||||
* Racket
|
||||
* [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master) :speech_balloon:
|
||||
* [racket-langserver](https://github.com/jeapostrophe/racket-langserver/tree/master)
|
||||
* [raco](https://docs.racket-lang.org/raco/)
|
||||
* [raco_fmt](https://docs.racket-lang.org/fmt/)
|
||||
* Re:VIEW
|
||||
* [redpen](http://redpen.cc/)
|
||||
* ReasonML
|
||||
* [merlin](https://github.com/the-lambda-church/merlin) see `:help ale-reasonml-ols` for configuration instructions
|
||||
* [ols](https://github.com/freebroccolo/ocaml-language-server) :speech_balloon:
|
||||
* [reason-language-server](https://github.com/jaredly/reason-language-server) :speech_balloon:
|
||||
* [ols](https://github.com/freebroccolo/ocaml-language-server)
|
||||
* [reason-language-server](https://github.com/jaredly/reason-language-server)
|
||||
* [refmt](https://github.com/reasonml/reason-cli)
|
||||
* Rego
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
@@ -603,12 +593,8 @@ formatting.
|
||||
* [write-good](https://github.com/btford/write-good)
|
||||
* Robot
|
||||
* [rflint](https://github.com/boakley/robotframework-lint)
|
||||
* Roc
|
||||
* [roc_annotate](https://github.com/roc-lang/roc)
|
||||
* [roc_format](https://github.com/roc-lang/roc)
|
||||
* [roc_language_server](https://github.com/roc-lang/roc)
|
||||
* RPM spec
|
||||
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`) :speech_balloon:
|
||||
* [rpmlint](https://github.com/rpm-software-management/rpmlint) :warning: (see `:help ale-integration-spec`)
|
||||
* Ruby
|
||||
* [brakeman](http://brakemanscanner.org/) :floppy_disk:
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
@@ -621,13 +607,13 @@ formatting.
|
||||
* [ruby](https://www.ruby-lang.org)
|
||||
* [rubyfmt](https://github.com/fables-tales/rubyfmt)
|
||||
* [rufo](https://github.com/ruby-formatter/rufo)
|
||||
* [solargraph](https://solargraph.org) :speech_balloon:
|
||||
* [sorbet](https://github.com/sorbet/sorbet) :speech_balloon:
|
||||
* [solargraph](https://solargraph.org)
|
||||
* [sorbet](https://github.com/sorbet/sorbet)
|
||||
* [standardrb](https://github.com/testdouble/standard)
|
||||
* [steep](https://github.com/soutaro/steep)
|
||||
* [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree)
|
||||
* Rust
|
||||
* [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions) :speech_balloon:
|
||||
* [cargo](https://github.com/rust-lang/cargo) :floppy_disk: (see `:help ale-integration-rust` for configuration instructions)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [rls](https://github.com/rust-lang-nursery/rls) :warning:
|
||||
* [rust-analyzer](https://github.com/rust-analyzer/rust-analyzer) :warning:
|
||||
@@ -640,8 +626,8 @@ formatting.
|
||||
* [stylelint](https://github.com/stylelint/stylelint)
|
||||
* Scala
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html) :speech_balloon:
|
||||
* [metals](https://scalameta.org/metals/) :speech_balloon:
|
||||
* [fsc](https://www.scala-lang.org/old/sites/default/files/linuxsoft_archives/docu/files/tools/fsc.html)
|
||||
* [metals](https://scalameta.org/metals/)
|
||||
* [sbtserver](https://www.scala-sbt.org/1.x/docs/sbt-server.html)
|
||||
* [scalac](http://scala-lang.org)
|
||||
* [scalafmt](https://scalameta.org/scalafmt/)
|
||||
@@ -674,11 +660,11 @@ formatting.
|
||||
* [stylelint](https://github.com/stylelint/stylelint)
|
||||
* Svelte
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
* [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server) :speech_balloon:
|
||||
* [svelteserver](https://github.com/sveltejs/language-tools/tree/master/packages/language-server)
|
||||
* Swift
|
||||
* [Apple swift-format](https://github.com/apple/swift-format)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [sourcekit-lsp](https://github.com/apple/sourcekit-lsp) :speech_balloon:
|
||||
* [sourcekit-lsp](https://github.com/apple/sourcekit-lsp)
|
||||
* [swiftformat](https://github.com/nicklockwood/SwiftFormat)
|
||||
* [swiftlint](https://github.com/realm/SwiftLint)
|
||||
* systemd
|
||||
@@ -689,8 +675,8 @@ formatting.
|
||||
* [checkov](https://github.com/bridgecrewio/checkov)
|
||||
* [terraform](https://github.com/hashicorp/terraform)
|
||||
* [terraform-fmt-fixer](https://github.com/hashicorp/terraform)
|
||||
* [terraform-ls](https://github.com/hashicorp/terraform-ls) :speech_balloon:
|
||||
* [terraform-lsp](https://github.com/juliosueiras/terraform-lsp) :speech_balloon:
|
||||
* [terraform-ls](https://github.com/hashicorp/terraform-ls)
|
||||
* [terraform-lsp](https://github.com/juliosueiras/terraform-lsp)
|
||||
* [tflint](https://github.com/wata727/tflint)
|
||||
* [tfsec](https://github.com/aquasecurity/tfsec)
|
||||
* Texinfo
|
||||
@@ -701,7 +687,7 @@ formatting.
|
||||
* Text
|
||||
* [alex](https://github.com/get-alex/alex) :warning:
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk: :speech_balloon:
|
||||
* [languagetool](https://languagetool.org/) :floppy_disk:
|
||||
* [proselint](http://proselint.com/) :warning:
|
||||
* [redpen](http://redpen.cc/) :warning:
|
||||
* [textlint](https://textlint.github.io/) :warning:
|
||||
@@ -712,7 +698,6 @@ formatting.
|
||||
* [thriftcheck](https://github.com/pinterest/thriftcheck)
|
||||
* TOML
|
||||
* [dprint](https://dprint.dev)
|
||||
* [tombi](https://tombi-toml.github.io/tombi/)
|
||||
* TypeScript
|
||||
* [biome](https://biomejs.dev/)
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
@@ -737,17 +722,16 @@ formatting.
|
||||
* [hdl-checker](https://pypi.org/project/hdl-checker)
|
||||
* [iverilog](https://github.com/steveicarus/iverilog)
|
||||
* [slang](https://github.com/MikePopoloski/slang)
|
||||
* [verible](https://github.com/chipsalliance/verible/tree/master)
|
||||
* [verilator](http://www.veripool.org/projects/verilator/wiki/Intro)
|
||||
* [vlog](https://www.mentor.com/products/fv/questa/)
|
||||
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
|
||||
* [xvlog](https://www.xilinx.com/products/design-tools/vivado.html)
|
||||
* [yosys](http://www.clifford.at/yosys/) :floppy_disk:
|
||||
* VHDL
|
||||
* [ghdl](https://github.com/ghdl/ghdl)
|
||||
* [vcom](https://www.mentor.com/products/fv/questa/)
|
||||
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html) :speech_balloon:
|
||||
* [xvhdl](https://www.xilinx.com/products/design-tools/vivado.html)
|
||||
* Vim
|
||||
* [vimls](https://github.com/iamcco/vim-language-server) :speech_balloon:
|
||||
* [vimls](https://github.com/iamcco/vim-language-server)
|
||||
* [vint](https://github.com/Kuniwak/vint)
|
||||
* Vim help
|
||||
* [alex](https://github.com/get-alex/alex) :warning:
|
||||
@@ -756,7 +740,7 @@ formatting.
|
||||
* Vue
|
||||
* [cspell](https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
* [vls](https://github.com/vuejs/vetur/tree/master/server) :speech_balloon:
|
||||
* [vls](https://github.com/vuejs/vetur/tree/master/server)
|
||||
* [volar](https://github.com/johnsoncodehk/volar)
|
||||
* WGSL
|
||||
* [naga](https://github.com/gfx-rs/naga)
|
||||
@@ -773,14 +757,14 @@ formatting.
|
||||
* [gitlablint](https://github.com/elijah-roberts/gitlab-lint)
|
||||
* [prettier](https://github.com/prettier/prettier)
|
||||
* [spectral](https://github.com/stoplightio/spectral)
|
||||
* [swaglint](https://github.com/byCedric/swaglint) :warning: :speech_balloon:
|
||||
* [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) :speech_balloon:
|
||||
* [swaglint](https://github.com/byCedric/swaglint) :warning:
|
||||
* [yaml-language-server](https://github.com/redhat-developer/yaml-language-server)
|
||||
* [yamlfix](https://lyz-code.github.io/yamlfix)
|
||||
* [yamlfmt](https://github.com/google/yamlfmt)
|
||||
* [yamllint](https://yamllint.readthedocs.io/)
|
||||
* [yq](https://github.com/mikefarah/yq)
|
||||
* YANG
|
||||
* [yang-lsp](https://github.com/theia-ide/yang-lsp) :speech_balloon:
|
||||
* [yang-lsp](https://github.com/theia-ide/yang-lsp)
|
||||
* Yara
|
||||
* [yls](https://github.com/avast/yls)
|
||||
* Zeek
|
||||
@@ -788,4 +772,4 @@ formatting.
|
||||
* Zig
|
||||
* [zigfmt](https://github.com/ziglang/zig)
|
||||
* [zlint](https://github.com/DonIsaac/zlint)
|
||||
* [zls](https://github.com/zigtools/zls) :speech_balloon:
|
||||
* [zls](https://github.com/zigtools/zls)
|
||||
|
||||
@@ -14,7 +14,7 @@ Before:
|
||||
let g:ale_completion_enabled = 0
|
||||
let g:ale_completion_autoimport = 0
|
||||
let g:ale_completion_max_suggestions = 50
|
||||
let g:ale_linters = {'typescript': ['tsserver'], 'python': ['pyrefly']}
|
||||
let g:ale_linters = {'typescript': ['tsserver'], 'python': ['pyre']}
|
||||
unlet! b:ale_linters
|
||||
|
||||
let g:server_started_value = 1
|
||||
|
||||
@@ -17,7 +17,7 @@ Execute(The default biome command should be correct):
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape('biome')
|
||||
\ . ' check --write %t'
|
||||
\ . ' check --apply %t'
|
||||
\ }
|
||||
|
||||
Execute(Unsafe fixes can be applied via an option):
|
||||
@@ -28,7 +28,7 @@ Execute(Unsafe fixes can be applied via an option):
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape('biome')
|
||||
\ . ' check --write --unsafe %t'
|
||||
\ . ' check --apply-unsafe %t'
|
||||
\ }
|
||||
|
||||
Execute(The fixer should accept options):
|
||||
@@ -39,5 +39,5 @@ Execute(The fixer should accept options):
|
||||
\ {
|
||||
\ 'read_temporary_file': 1,
|
||||
\ 'command': ale#Escape('biome')
|
||||
\ . ' check --write --foobar %t',
|
||||
\ . ' check --apply --foobar %t',
|
||||
\ }
|
||||
|
||||
@@ -45,8 +45,7 @@ Execute(The clangformat callback should include style options as well):
|
||||
\ {
|
||||
\ 'command': ale#Escape(g:ale_c_clangformat_executable)
|
||||
\ . ' --assume-filename=' . ale#Escape(bufname(bufnr('')))
|
||||
\ . ' --some-option'
|
||||
\ . ' -style=' . ale#Escape(g:ale_c_clangformat_style_option)
|
||||
\ . ' --some-option' . " -style='{BasedOnStyle: Microsoft, ColumnLimit:80,}'",
|
||||
\ },
|
||||
\ ale#fixers#clangformat#Fix(bufnr(''))
|
||||
|
||||
|
||||
@@ -33,9 +33,6 @@ Execute(Emacs executable should be configurable):
|
||||
let b:ale_erlang_erlang_mode_emacs_executable = '/path/to/emacs'
|
||||
AssertEqual 0, stridx(Fixer('command'), ale#Escape('/path/to/emacs'))
|
||||
|
||||
Execute(enable-local-variables should be :safe):
|
||||
Assert Fixer('command') =~# '\m\<enable-local-variables :safe\>'
|
||||
|
||||
Execute(erlang-indent-level should be 4 by default):
|
||||
Assert Fixer('command') =~# '\m\<erlang-indent-level 4\>'
|
||||
|
||||
|
||||
@@ -1,80 +1,48 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('go', 'golangci_lint')
|
||||
Save g:ale_go_go111module
|
||||
Save g:ale_go_golangci_formatter_executable
|
||||
Save g:ale_go_golangci_formatter_options
|
||||
Save g:ale_go_golangci_lint_executable
|
||||
Save g:ale_go_golangci_lint_options
|
||||
Save g:ale_go_golangci_lint_package
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_go_golangci_lint_executable = 'xxxinvalid'
|
||||
let g:ale_go_golangci_lint_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
call ale#test#SetFilename('../test-files/go/testfile.go')
|
||||
|
||||
After:
|
||||
call ale#test#RestoreDirectory()
|
||||
call ale#assert#TearDownFixerTest()
|
||||
Restore
|
||||
|
||||
unlet! b:ale_go_go111module
|
||||
|
||||
Execute(The golangci-lint callback should return the correct default values with v1):
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 1.64.8 built with go1.23.0']
|
||||
Execute(The golangci-lint callback should return the correct default values):
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('golangci-lint') . ' run --fix ' . ale#Escape('testfile.go'),
|
||||
\ }
|
||||
|
||||
Execute(The golangci-lint callback should include custom golangci-lint options with v1):
|
||||
let g:ale_go_golangci_formatter_options = "--new --config /dev/null"
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 1.64.8 built with go1.23.0']
|
||||
|
||||
AssertFixer
|
||||
\ {
|
||||
\ 'command': ale#Escape('golangci-lint')
|
||||
\ . ' run --fix ' . g:ale_go_golangci_formatter_options . ' ' . ale#Escape('testfile.go'),
|
||||
\ 'command': ale#Escape('xxxinvalid') . ' run --fix',
|
||||
\ },
|
||||
\ ale#fixers#golangci_lint#Fix(bufnr(''))
|
||||
|
||||
Execute(The golangci-lint callback should override executable with v1):
|
||||
let g:ale_go_golangci_formatter_executable = 'xxxinvalid'
|
||||
Execute(The golangci-lint callback should include custom golangci-lint options):
|
||||
let g:ale_go_golangci_lint_options = "--new --config /dev/null"
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 1.64.8 built with go1.23.0']
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('xxxinvalid')
|
||||
\ . ' run --fix '
|
||||
\ . g:ale_go_golangci_formatter_options
|
||||
\ . ' ' . ale#Escape('testfile.go'),
|
||||
\ . ' run ' . g:ale_go_golangci_lint_options . ' --fix',
|
||||
\ },
|
||||
\ ale#fixers#golangci_lint#Fix(bufnr(''))
|
||||
|
||||
Execute(The golangci-lint callback should return the correct default values with v2):
|
||||
Execute(The golangci-lint callback should support per-file mode):
|
||||
let g:ale_go_golangci_lint_package = 0
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 2.1.5 built with go1.23.0']
|
||||
|
||||
AssertFixer
|
||||
\ {
|
||||
\ 'command': ale#Escape('golangci-lint') . ' fmt --stdin ',
|
||||
\ }
|
||||
|
||||
Execute(The golangci-lint callback should include custom golangci-lint options with v2):
|
||||
let g:ale_go_golangci_formatter_options = "--new --config /dev/null"
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 2.1.5 built with go1.23.0']
|
||||
|
||||
AssertFixer
|
||||
\ {
|
||||
\ 'command': ale#Escape('golangci-lint')
|
||||
\ . ' fmt --stdin ' . g:ale_go_golangci_formatter_options,
|
||||
\ },
|
||||
|
||||
Execute(The golangci-lint callback should override executable with v2):
|
||||
let g:ale_go_golangci_formatter_executable = 'xxxinvalid'
|
||||
|
||||
GivenCommandOutput ['golangci-lint has version 2.1.5 built with go1.23.0']
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'command': ale#Escape('xxxinvalid')
|
||||
\ . ' fmt --stdin '
|
||||
\ . g:ale_go_golangci_formatter_options
|
||||
\ . ' run '
|
||||
\ . g:ale_go_golangci_lint_options
|
||||
\ . ' --fix ' . ale#Escape('testfile.go'),
|
||||
\ },
|
||||
\ ale#fixers#golangci_lint#Fix(bufnr(''))
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('roc', 'roc_annotate')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The roc annotate callback should return the correct default values):
|
||||
AssertFixer {
|
||||
\ 'command': 'roc format annotate %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute(The roc annotate callback should allow a custom executable):
|
||||
let g:ale_roc_roc_annotate_executable = 'foo/bar'
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': 'foo/bar format annotate %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('roc', 'roc_format')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The roc format callback should return the correct default values):
|
||||
AssertFixer {
|
||||
\ 'command': 'roc format %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
Execute(The roc format callback should allow a custom executable):
|
||||
let g:ale_roc_roc_format_executable = 'foo/bar'
|
||||
|
||||
AssertFixer {
|
||||
\ 'command': 'foo/bar format %t',
|
||||
\ 'read_temporary_file': 1,
|
||||
\}
|
||||
|
||||
@@ -1,47 +1,53 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('ruby', 'rubocop')
|
||||
Save g:ale_ruby_rubocop_executable
|
||||
Save g:ale_ruby_rubocop_options
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_ruby_rubocop_executable = 'xxxinvalid'
|
||||
let g:ale_ruby_rubocop_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
Restore
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The rubocop callback should return the correct default values):
|
||||
call ale#test#SetFilename('../test-files/ruby/dummy.rb')
|
||||
|
||||
GivenCommandOutput ['1.61.0']
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --auto-correct --editor-mode --force-exclusion --stdin %s',
|
||||
\ }
|
||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
||||
\ },
|
||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
||||
|
||||
Execute(The rubocop callback should include custom rubocop options):
|
||||
let g:ale_ruby_rubocop_options = '--except Lint/Debugger'
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
GivenCommandOutput ['1.61.0']
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --except Lint/Debugger'
|
||||
\ . ' --auto-correct --editor-mode --force-exclusion --stdin %s',
|
||||
\ }
|
||||
\ . ' --auto-correct --force-exclusion --stdin %s',
|
||||
\ },
|
||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
||||
|
||||
Execute(The rubocop callback should use auto-correct-all option when set):
|
||||
let g:ale_ruby_rubocop_auto_correct_all = 1
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
GivenCommandOutput ['1.61.0']
|
||||
|
||||
AssertFixer
|
||||
AssertEqual
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --auto-correct-all --editor-mode --force-exclusion --stdin %s'
|
||||
\ }
|
||||
\ . ' --auto-correct-all --force-exclusion --stdin %s'
|
||||
\ },
|
||||
\ ale#fixers#rubocop#Fix(bufnr(''))
|
||||
|
||||
Execute(The rubocop post-processor should remove diagnostics content):
|
||||
AssertEqual
|
||||
@@ -81,16 +87,3 @@ Execute(The rubocop post-processor should remove diagnostics content):
|
||||
\ ' ''forrest'',',
|
||||
\ ' ''run'']',
|
||||
\ ])
|
||||
|
||||
Execute(The rubocop callback should not use editor-mode option with older versions):
|
||||
call ale#test#SetFilename('../test-files/ruby/with_config/dummy.rb')
|
||||
|
||||
GivenCommandOutput ['1.59.0']
|
||||
|
||||
AssertFixer
|
||||
\ {
|
||||
\ 'process_with': 'ale#fixers#rubocop#PostProcess',
|
||||
\ 'command': ale#Escape(g:ale_ruby_rubocop_executable)
|
||||
\ . ' --auto-correct --force-exclusion --stdin %s'
|
||||
\ }
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
Before:
|
||||
Save g:ale_toml_tombi_executable
|
||||
Save g:ale_toml_tombi_format_options
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_toml_tombi_executable = 'xxxinvalid'
|
||||
let g:ale_toml_tombi_format_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The tombi format callback should return the correct default values):
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' format'},
|
||||
\ ale#fixers#tombi_format#Fix(bufnr(''))
|
||||
|
||||
Execute(The tombi format callback should include custom options):
|
||||
let g:ale_toml_tombi_format_options = "--offline"
|
||||
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' format --offline'},
|
||||
\ ale#fixers#tombi_format#Fix(bufnr(''))
|
||||
@@ -1,26 +0,0 @@
|
||||
Before:
|
||||
Save g:ale_toml_tombi_executable
|
||||
Save g:ale_toml_tombi_lint_options
|
||||
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_toml_tombi_executable = 'xxxinvalid'
|
||||
let g:ale_toml_tombi_lint_options = ''
|
||||
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
|
||||
After:
|
||||
Restore
|
||||
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The tombi lint callback should return the correct default values):
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' lint'},
|
||||
\ ale#fixers#tombi_lint#Fix(bufnr(''))
|
||||
|
||||
Execute(The tombi lint callback should include custom options):
|
||||
let g:ale_toml_tombi_lint_options = "--offline"
|
||||
|
||||
AssertEqual
|
||||
\ {'command': ale#Escape('xxxinvalid') . ' lint --offline'},
|
||||
\ ale#fixers#tombi_lint#Fix(bufnr(''))
|
||||
@@ -1,16 +0,0 @@
|
||||
Before:
|
||||
call ale#assert#SetUpFixerTest('verilog', 'verible_format')
|
||||
|
||||
After:
|
||||
call ale#assert#TearDownFixerTest()
|
||||
|
||||
Execute(The verible format callback should return the correct default values):
|
||||
AssertFixer {'command': ale#Escape('verible-verilog-format') .' -'}
|
||||
|
||||
Execute(The verible format callback should allow a custom executable):
|
||||
let g:ale_verilog_verible_format_executable = 'foo/bar'
|
||||
AssertFixer {'command': ale#Escape('foo/bar') . ' -'}
|
||||
|
||||
Execute(The verible format callback should allow custom options):
|
||||
let g:ale_verilog_verible_format_options = '--foo --bar'
|
||||
AssertFixer {'command': ale#Escape('verible-verilog-format') .' --foo --bar -'}
|
||||
@@ -1,26 +0,0 @@
|
||||
Before:
|
||||
runtime ale_linters/bindzone/checkzone.vim
|
||||
|
||||
After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The checkzone handler should handle basic warnings):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 2,
|
||||
\ 'type': 'E',
|
||||
\ 'text': 'unknown RR type ''fasd''',
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 0,
|
||||
\ 'type': 'W',
|
||||
\ 'text': '_some_srv._tcp.example.com/SRV ''some.example.com'' (out of zone) has no addresses records (A or AAAA)',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#bindzone#checkzone#Handle(1, [
|
||||
\ 'zone example.com/IN: _some_srv._tcp.example.com/SRV ''some.example.com'' (out of zone) has no addresses records (A or AAAA)',
|
||||
\ 'zone example.com/IN: loaded serial 2025050400',
|
||||
\ 'zone example.com/IN: not loaded due to errors',
|
||||
\ '/tmp/vb3wXsu/2/example.com:2: unknown RR type ''fasd''',
|
||||
\ ])
|
||||
@@ -7,27 +7,6 @@ After:
|
||||
call ale#linter#Reset()
|
||||
|
||||
Execute(The oelint_adv handler should handle warnings):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
\ 'lnum': 1234,
|
||||
\ 'type': 'I',
|
||||
\ 'code': 'oelint.var.suggestedvar.BUGTRACKER',
|
||||
\ 'text': 'Variable ''BUGTRACKER'' should be set',
|
||||
\ },
|
||||
\ {
|
||||
\ 'lnum': 17,
|
||||
\ 'type': 'E',
|
||||
\ 'code': 'oelint.var.mandatoryvar.DESCRIPTION',
|
||||
\ 'text': 'Variable ''DESCRIPTION'' should be set',
|
||||
\ },
|
||||
\ ],
|
||||
\ ale_linters#bitbake#oelint_adv#Handle(1, [
|
||||
\ '/meta-x/recipes-y/example/example_1.0.bb:1234:info:oelint.var.suggestedvar.BUGTRACKER:Variable ''BUGTRACKER'' should be set [branch:true]',
|
||||
\ '[31mexample2_1.1.bb:17:error:oelint.var.mandatoryvar.DESCRIPTION:Variable ''DESCRIPTION'' should be set[0m [branch:true]',
|
||||
\ ])
|
||||
|
||||
Execute(The oelint_adv handler should handle warnings without branch message):
|
||||
AssertEqual
|
||||
\ [
|
||||
\ {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user