diff --git a/my_configs.vim b/my_configs.vim new file mode 100644 index 00000000..218605d4 --- /dev/null +++ b/my_configs.vim @@ -0,0 +1,32 @@ +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => VIM user interface +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Show line number +set nu + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Text, tab and indent related +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" Use spaces instead of tabs +set expandtab + +" Be smart when using tabs ;) +set smarttab + +" 1 tab == 3 spaces +set shiftwidth=3 +set tabstop=3 + +" Linebreak on 500 characters +set lbr +set tw=500 + +set ai "Auto indent +set si "Smart indent +set wrap "Wrap lines + +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" => Nerd Tree +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +let g:NERDTreeWinPos = "left" +map :NERDTreeToggle diff --git a/sources_forked/vim-peepopen/README b/sources_forked/vim-peepopen/README deleted file mode 100644 index e69de29b..00000000 diff --git a/sources_non_forked/ale/ale_linters/c3/c3lsp.vim b/sources_non_forked/ale/ale_linters/c3/c3lsp.vim new file mode 100644 index 00000000..43cd89d8 --- /dev/null +++ b/sources_non_forked/ale/ale_linters/c3/c3lsp.vim @@ -0,0 +1,22 @@ +" Author: Koni Marti +" Description: A Language Server implementation for C3 + +call ale#Set('c3_c3lsp_executable', 'c3lsp') +call ale#Set('c3_c3lsp_options', '') +call ale#Set('c3_c3lsp_init_options', {}) + +function! ale_linters#c3#c3lsp#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'c3_c3lsp_executable') + + return ale#Escape(l:executable) . ale#Pad(ale#Var(a:buffer, 'c3_c3lsp_options')) +endfunction + + +call ale#linter#Define('c3', { +\ 'name': 'c3lsp', +\ 'lsp': 'stdio', +\ 'executable': {b -> ale#Var(b, 'c3_c3lsp_executable')}, +\ 'command': function('ale_linters#c3#c3lsp#GetCommand'), +\ 'project_root': function('ale#handlers#c3lsp#GetProjectRoot'), +\ 'lsp_config': {b -> ale#handlers#c3lsp#GetInitOpts(b, 'c3_c3lsp_init_options')}, +\}) diff --git a/sources_non_forked/ale/ale_linters/erlang/erlang_ls.vim b/sources_non_forked/ale/ale_linters/erlang/erlang_ls.vim index 0f070459..15edd48e 100644 --- a/sources_non_forked/ale/ale_linters/erlang/erlang_ls.vim +++ b/sources_non_forked/ale/ale_linters/erlang/erlang_ls.vim @@ -53,4 +53,5 @@ call ale#linter#Define('erlang', { \ 'command': function('s:GetCommand'), \ 'lsp': 'stdio', \ 'project_root': function('s:FindProjectRoot'), +\ 'aliases': ['erlang-ls'], \}) diff --git a/sources_non_forked/ale/ale_linters/json/jq.vim b/sources_non_forked/ale/ale_linters/json/jq.vim index 2f36a29e..ad1da269 100644 --- a/sources_non_forked/ale/ale_linters/json/jq.vim +++ b/sources_non_forked/ale/ale_linters/json/jq.vim @@ -5,7 +5,7 @@ call ale#Set('json_jq_filters', '.') " Matches patterns like the following: " parse error: Expected another key-value pair at line 4, column 3 -let s:pattern = '^parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$' +let s:pattern = 'parse error: \(.\+\) at line \(\d\+\), column \(\d\+\)$' function! ale_linters#json#jq#Handle(buffer, lines) abort return ale#util#MapMatches(a:lines, s:pattern, {match -> { diff --git a/sources_non_forked/ale/ale_linters/php/phpstan.vim b/sources_non_forked/ale/ale_linters/php/phpstan.vim index a0942530..d3c80393 100644 --- a/sources_non_forked/ale/ale_linters/php/phpstan.vim +++ b/sources_non_forked/ale/ale_linters/php/phpstan.vim @@ -22,7 +22,7 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort let l:memory_limit = ale#Var(a:buffer, 'php_phpstan_memory_limit') let l:memory_limit_option = !empty(l:memory_limit) - \ ? ' --memory-limit ' . ale#Escape(l:memory_limit) + \ ? ' --memory-limit=' . ale#Escape(l:memory_limit) \ : '' let l:level = ale#Var(a:buffer, 'php_phpstan_level') diff --git a/sources_non_forked/ale/ale_linters/python/bandit.vim b/sources_non_forked/ale/ale_linters/python/bandit.vim index ba48c3a8..b343a1c5 100644 --- a/sources_non_forked/ale/ale_linters/python/bandit.vim +++ b/sources_non_forked/ale/ale_linters/python/bandit.vim @@ -45,7 +45,7 @@ function! ale_linters#python#bandit#GetCommand(buffer) abort endif endif - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run bandit' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/flake8.vim b/sources_non_forked/ale/ale_linters/python/flake8.vim index 12dca84a..2685f61a 100644 --- a/sources_non_forked/ale/ale_linters/python/flake8.vim +++ b/sources_non_forked/ale/ale_linters/python/flake8.vim @@ -74,7 +74,7 @@ endfunction function! ale_linters#python#flake8#GetCommand(buffer, version) abort let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run flake8' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/flakehell.vim b/sources_non_forked/ale/ale_linters/python/flakehell.vim index 9ff0f18f..a5b466b8 100644 --- a/sources_non_forked/ale/ale_linters/python/flakehell.vim +++ b/sources_non_forked/ale/ale_linters/python/flakehell.vim @@ -74,7 +74,7 @@ endfunction function! ale_linters#python#flakehell#GetCommand(buffer, version) abort let l:executable = ale_linters#python#flakehell#GetExecutable(a:buffer) - if (l:executable =~? 'pipenv\|poetry\|uv$') + if (l:executable =~? '\(pipenv\|poetry\|uv\)$') let l:exec_args = ' run flakehell' elseif (l:executable is? 'python') let l:exec_args = ' -m flakehell' diff --git a/sources_non_forked/ale/ale_linters/python/jedils.vim b/sources_non_forked/ale/ale_linters/python/jedils.vim index 46b2896b..2d4a97c3 100644 --- a/sources_non_forked/ale/ale_linters/python/jedils.vim +++ b/sources_non_forked/ale/ale_linters/python/jedils.vim @@ -28,7 +28,7 @@ endfunction function! ale_linters#python#jedils#GetCommand(buffer) abort let l:executable = ale_linters#python#jedils#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run jedi-language-server' \ : '' let l:env_string = '' diff --git a/sources_non_forked/ale/ale_linters/python/mypy.vim b/sources_non_forked/ale/ale_linters/python/mypy.vim index 586a4381..27d2726b 100644 --- a/sources_non_forked/ale/ale_linters/python/mypy.vim +++ b/sources_non_forked/ale/ale_linters/python/mypy.vim @@ -49,7 +49,7 @@ endfunction function! ale_linters#python#mypy#GetCommand(buffer) abort let l:executable = ale_linters#python#mypy#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run mypy' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/prospector.vim b/sources_non_forked/ale/ale_linters/python/prospector.vim index c40f25c5..29aad060 100644 --- a/sources_non_forked/ale/ale_linters/python/prospector.vim +++ b/sources_non_forked/ale/ale_linters/python/prospector.vim @@ -35,7 +35,7 @@ endfunction function! ale_linters#python#prospector#GetCommand(buffer) abort let l:executable = ale_linters#python#prospector#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run prospector' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pycln.vim b/sources_non_forked/ale/ale_linters/python/pycln.vim index 774c6b04..23d48676 100644 --- a/sources_non_forked/ale/ale_linters/python/pycln.vim +++ b/sources_non_forked/ale/ale_linters/python/pycln.vim @@ -42,7 +42,7 @@ endfunction function! ale_linters#python#pycln#GetCommand(buffer, version) abort let l:executable = ale_linters#python#pycln#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pycln' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pycodestyle.vim b/sources_non_forked/ale/ale_linters/python/pycodestyle.vim index bd3584b8..282e545b 100644 --- a/sources_non_forked/ale/ale_linters/python/pycodestyle.vim +++ b/sources_non_forked/ale/ale_linters/python/pycodestyle.vim @@ -30,7 +30,7 @@ endfunction function! ale_linters#python#pycodestyle#GetCommand(buffer) abort let l:executable = ale_linters#python#pycodestyle#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pycodestyle' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pydocstyle.vim b/sources_non_forked/ale/ale_linters/python/pydocstyle.vim index b012dd43..6293df7b 100644 --- a/sources_non_forked/ale/ale_linters/python/pydocstyle.vim +++ b/sources_non_forked/ale/ale_linters/python/pydocstyle.vim @@ -29,7 +29,7 @@ endfunction function! ale_linters#python#pydocstyle#GetCommand(buffer) abort let l:executable = ale_linters#python#pydocstyle#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pydocstyle' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pyflakes.vim b/sources_non_forked/ale/ale_linters/python/pyflakes.vim index fc0a3fa7..f46772dc 100644 --- a/sources_non_forked/ale/ale_linters/python/pyflakes.vim +++ b/sources_non_forked/ale/ale_linters/python/pyflakes.vim @@ -29,7 +29,7 @@ endfunction function! ale_linters#python#pyflakes#GetCommand(buffer) abort let l:executable = ale_linters#python#pyflakes#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pyflakes' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pylama.vim b/sources_non_forked/ale/ale_linters/python/pylama.vim index 6555b409..626974f8 100644 --- a/sources_non_forked/ale/ale_linters/python/pylama.vim +++ b/sources_non_forked/ale/ale_linters/python/pylama.vim @@ -30,7 +30,7 @@ endfunction function! ale_linters#python#pylama#RunWithVersionCheck(buffer) abort let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pylama' \ : '' @@ -59,7 +59,7 @@ endfunction function! ale_linters#python#pylama#GetCommand(buffer, version) abort let l:executable = ale_linters#python#pylama#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pylama' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pylint.vim b/sources_non_forked/ale/ale_linters/python/pylint.vim index 90aa5f1c..ba69d666 100644 --- a/sources_non_forked/ale/ale_linters/python/pylint.vim +++ b/sources_non_forked/ale/ale_linters/python/pylint.vim @@ -44,7 +44,7 @@ endfunction function! ale_linters#python#pylint#GetCommand(buffer, version) abort let l:executable = ale_linters#python#pylint#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pylint' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/pylsp.vim b/sources_non_forked/ale/ale_linters/python/pylsp.vim index d3db6e82..75ec3884 100644 --- a/sources_non_forked/ale/ale_linters/python/pylsp.vim +++ b/sources_non_forked/ale/ale_linters/python/pylsp.vim @@ -43,7 +43,7 @@ endfunction function! ale_linters#python#pylsp#GetCommand(buffer) abort let l:executable = ale_linters#python#pylsp#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pylsp' \ : '' let l:env_string = '' diff --git a/sources_non_forked/ale/ale_linters/python/pyre.vim b/sources_non_forked/ale/ale_linters/python/pyre.vim index 177f1cb5..745d669a 100644 --- a/sources_non_forked/ale/ale_linters/python/pyre.vim +++ b/sources_non_forked/ale/ale_linters/python/pyre.vim @@ -28,7 +28,7 @@ endfunction function! ale_linters#python#pyre#GetCommand(buffer) abort let l:executable = ale_linters#python#pyre#GetExecutable(a:buffer) - let l:exec_args = (l:executable =~? 'pipenv\|poetry\|uv$' ? ' run pyre' : '') . ' persistent' + let l:exec_args = (l:executable =~? '\(pipenv\|poetry\|uv\)$' ? ' run pyre' : '') . ' persistent' return ale#Escape(l:executable) . l:exec_args endfunction diff --git a/sources_non_forked/ale/ale_linters/python/pyright.vim b/sources_non_forked/ale/ale_linters/python/pyright.vim index 993ed075..95443a13 100644 --- a/sources_non_forked/ale/ale_linters/python/pyright.vim +++ b/sources_non_forked/ale/ale_linters/python/pyright.vim @@ -70,7 +70,7 @@ endfunction function! ale_linters#python#pyright#GetCommand(buffer) abort let l:executable = ale_linters#python#pyright#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pyright-langserver' \ : '' let l:env_string = '' diff --git a/sources_non_forked/ale/ale_linters/python/refurb.vim b/sources_non_forked/ale/ale_linters/python/refurb.vim index 7f92948a..1acd4cee 100644 --- a/sources_non_forked/ale/ale_linters/python/refurb.vim +++ b/sources_non_forked/ale/ale_linters/python/refurb.vim @@ -41,7 +41,7 @@ endfunction function! ale_linters#python#refurb#GetCommand(buffer) abort let l:executable = ale_linters#python#refurb#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run refurb' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/ruff.vim b/sources_non_forked/ale/ale_linters/python/ruff.vim index 25ae2d91..8eb55164 100644 --- a/sources_non_forked/ale/ale_linters/python/ruff.vim +++ b/sources_non_forked/ale/ale_linters/python/ruff.vim @@ -47,7 +47,7 @@ endfunction function! ale_linters#python#ruff#GetCommand(buffer, version) abort let l:executable = ale_linters#python#ruff#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run ruff' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/unimport.vim b/sources_non_forked/ale/ale_linters/python/unimport.vim index 06dbc436..1496fc42 100644 --- a/sources_non_forked/ale/ale_linters/python/unimport.vim +++ b/sources_non_forked/ale/ale_linters/python/unimport.vim @@ -28,7 +28,7 @@ endfunction function! ale_linters#python#unimport#GetCommand(buffer) abort let l:executable = ale_linters#python#unimport#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run unimport' \ : '' diff --git a/sources_non_forked/ale/ale_linters/python/vulture.vim b/sources_non_forked/ale/ale_linters/python/vulture.vim index 2ac05e43..c44638b9 100644 --- a/sources_non_forked/ale/ale_linters/python/vulture.vim +++ b/sources_non_forked/ale/ale_linters/python/vulture.vim @@ -47,7 +47,7 @@ endfunction function! ale_linters#python#vulture#GetCommand(buffer) abort let l:executable = ale_linters#python#vulture#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run vulture' \ : '' let l:lint_dest = ale#Var(a:buffer, 'python_vulture_change_directory') diff --git a/sources_non_forked/ale/ale_linters/scala/metals.vim b/sources_non_forked/ale/ale_linters/scala/metals.vim index da9e855d..1362e1a3 100644 --- a/sources_non_forked/ale/ale_linters/scala/metals.vim +++ b/sources_non_forked/ale/ale_linters/scala/metals.vim @@ -1,7 +1,7 @@ " Author: Jeffrey Lau - https://github.com/zoonfafer " Description: Metals Language Server for Scala https://scalameta.org/metals/ -call ale#Set('scala_metals_executable', 'metals-vim') +call ale#Set('scala_metals_executable', 'metals') call ale#Set('scala_metals_project_root', '') function! ale_linters#scala#metals#GetProjectRoot(buffer) abort diff --git a/sources_non_forked/ale/ale_linters/sql/sqlfluff.vim b/sources_non_forked/ale/ale_linters/sql/sqlfluff.vim index 4381e1ab..91d69c12 100644 --- a/sources_non_forked/ale/ale_linters/sql/sqlfluff.vim +++ b/sources_non_forked/ale/ale_linters/sql/sqlfluff.vim @@ -52,16 +52,24 @@ function! ale_linters#sql#sqlfluff#Handle(buffer, version, lines) abort if ale#semver#GTE(a:version, [3, 0, 0]) for l:violation in get(l:json, 'violations', []) - call add(l:output, { + let l:err = { \ 'filename': l:json.filepath, \ 'lnum': l:violation.start_line_no, - \ 'end_lnum': l:violation.end_line_no, \ 'col': l:violation.start_line_pos, - \ 'end_col': l:violation.end_line_pos, \ 'text': l:violation.description, \ 'code': l:violation.code, \ 'type': 'W', - \}) + \} + + if has_key(l:violation, 'end_line_no') + let l:err.end_lnum = l:violation.end_line_no + endif + + if has_key(l:violation, 'end_line_pos') + let l:err.end_col = l:violation.end_line_pos + endif + + call add(l:output, l:err) endfor else for l:violation in get(l:json, 'violations', []) diff --git a/sources_non_forked/ale/ale_linters/verilog/iverilog.vim b/sources_non_forked/ale/ale_linters/verilog/iverilog.vim index e081f33f..54d55d79 100644 --- a/sources_non_forked/ale/ale_linters/verilog/iverilog.vim +++ b/sources_non_forked/ale/ale_linters/verilog/iverilog.vim @@ -5,6 +5,7 @@ call ale#Set('verilog_iverilog_options', '') function! ale_linters#verilog#iverilog#GetCommand(buffer) abort return 'iverilog -t null -Wall ' + \ . '-y%s:h ' \ . ale#Var(a:buffer, 'verilog_iverilog_options') \ . ' %t' endfunction diff --git a/sources_non_forked/ale/ale_linters/yaml/actionlint.vim b/sources_non_forked/ale/ale_linters/yaml/actionlint.vim index 5afe6d48..902da729 100644 --- a/sources_non_forked/ale/ale_linters/yaml/actionlint.vim +++ b/sources_non_forked/ale/ale_linters/yaml/actionlint.vim @@ -20,9 +20,32 @@ function! ale_linters#yaml#actionlint#GetCommand(buffer) abort let l:options .= ale#Pad('-oneline') endif + let l:configfile = ale_linters#yaml#actionlint#GitRepoHasConfig(a:buffer) + + if !empty(l:configfile) + let l:options .= ale#Pad('-config-file ' . l:configfile) + endif + return '%e' . ale#Pad(l:options) . ' - ' endfunction +" If we have a actionlint.yml or actionlint.yaml in our github directory +" use that as our config file. +function! ale_linters#yaml#actionlint#GitRepoHasConfig(buffer) abort + let l:filename = expand('#' . a:buffer . ':p') + let l:configfilebase = substitute(l:filename, '\.github/.*', '.github/actionlint.','') + + for l:ext in ['yml', 'yaml'] + let l:configfile = l:configfilebase . l:ext + + if filereadable(l:configfile) + return l:configfile + endif + endfor + + return '' +endfunction + function! ale_linters#yaml#actionlint#Handle(buffer, lines) abort " Matches patterns line the following: ".github/workflows/main.yml:19:0: could not parse as YAML: yaml: line 19: mapping values are not allowed in this context [yaml-syntax] diff --git a/sources_non_forked/ale/ale_linters/yaml/yq.vim b/sources_non_forked/ale/ale_linters/yaml/yq.vim new file mode 100644 index 00000000..35aef654 --- /dev/null +++ b/sources_non_forked/ale/ale_linters/yaml/yq.vim @@ -0,0 +1,22 @@ +" Author: axhav +call ale#Set('yaml_yq_executable', 'yq') +call ale#Set('yaml_yq_options', '') +call ale#Set('yaml_yq_filters', '.') + +" Matches patterns like the following: +let s:pattern = '^Error\:.* line \(\d\+\)\: \(.\+\)$' + +function! ale_linters#yaml#yq#Handle(buffer, lines) abort + return ale#util#MapMatches(a:lines, s:pattern, {match -> { + \ 'lnum': match[1] + 0, + \ 'text': match[2], + \}}) +endfunction + +call ale#linter#Define('yaml', { +\ 'name': 'yq', +\ 'executable': {b -> ale#Var(b, 'yaml_yq_executable')}, +\ 'output_stream': 'stderr', +\ 'command': '%e', +\ 'callback': 'ale_linters#yaml#yq#Handle', +\}) diff --git a/sources_non_forked/ale/ale_linters/zeek/zeek.vim b/sources_non_forked/ale/ale_linters/zeek/zeek.vim index e976d75c..1c93094f 100644 --- a/sources_non_forked/ale/ale_linters/zeek/zeek.vim +++ b/sources_non_forked/ale/ale_linters/zeek/zeek.vim @@ -4,11 +4,12 @@ call ale#Set('zeek_zeek_executable', 'zeek') function! ale_linters#zeek#zeek#HandleErrors(buffer, lines) abort - let l:pattern = 'error in \v.*, line (\d+): (.*)$' + let l:pattern = '\(error\|warning\) in \v.*, line (\d+): (.*)$' return map(ale#util#GetMatches(a:lines, l:pattern), "{ - \ 'lnum': str2nr(v:val[1]), - \ 'text': v:val[2], + \ 'lnum': str2nr(v:val[2]), + \ 'text': v:val[3], + \ 'type': (v:val[1] is# 'error') ? 'E': 'W', \}") endfunction diff --git a/sources_non_forked/ale/autoload/ale/fix/registry.vim b/sources_non_forked/ale/autoload/ale/fix/registry.vim index 661fa1e1..c657bebd 100644 --- a/sources_non_forked/ale/autoload/ale/fix/registry.vim +++ b/sources_non_forked/ale/autoload/ale/fix/registry.vim @@ -17,6 +17,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['help'], \ 'description': 'Align help tags to the right margin', \ }, +\ 'apkbuild-fixer': { +\ 'function': 'ale#fixers#apkbuild_fixer#Fix', +\ 'suggested_filetypes': ['apkbuild'], +\ 'description': 'Fix policy violations found by apkbuild-lint in APKBUILDs', +\ }, \ 'autoimport': { \ 'function': 'ale#fixers#autoimport#Fix', \ 'suggested_filetypes': ['python'], @@ -39,7 +44,7 @@ let s:default_registry = { \ }, \ 'biome': { \ 'function': 'ale#fixers#biome#Fix', -\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'jsonc'], +\ 'suggested_filetypes': ['javascript', 'typescript', 'json', 'jsonc', 'css', 'graphql'], \ 'description': 'Fix JavaScript and TypeScript using biome.', \ }, \ 'black': { @@ -98,6 +103,17 @@ let s:default_registry = { \ 'suggested_filetypes': ['dune'], \ 'description': 'Fix dune files with dune format', \ }, +\ 'erlang_mode': { +\ 'function': 'ale#fixers#erlang_mode#Fix', +\ 'suggested_filetypes': ['erlang'], +\ 'description': 'Indent with the Erlang mode for Emacs', +\ 'aliases': ['erlang-mode'], +\ }, +\ 'erlfmt': { +\ 'function': 'ale#fixers#erlfmt#Fix', +\ 'suggested_filetypes': ['erlang'], +\ 'description': 'Format Erlang code with erlfmt', +\ }, \ 'fecs': { \ 'function': 'ale#fixers#fecs#Fix', \ 'suggested_filetypes': ['javascript', 'css', 'html'], @@ -201,6 +217,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['python'], \ 'description': 'Fix Python files with yapf.', \ }, +\ 'yq': { +\ 'function': 'ale#fixers#yq#Fix', +\ 'suggested_filetypes': ['yaml'], +\ 'description': 'Fix YAML files with yq.', +\ }, \ 'rubocop': { \ 'function': 'ale#fixers#rubocop#Fix', \ 'suggested_filetypes': ['ruby'], @@ -321,6 +342,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['go'], \ 'description': 'Fix Go files imports with goimports.', \ }, +\ 'golangci_lint': { +\ 'function': 'ale#fixers#golangci_lint#Fix', +\ 'suggested_filetypes': ['go'], +\ 'description': 'Fix Go files with golangci-lint.', +\ }, \ 'golines': { \ 'function': 'ale#fixers#golines#Fix', \ 'suggested_filetypes': ['go'], @@ -451,6 +477,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['json'], \ 'description': 'Fix JSON files with jq.', \ }, +\ 'json_pytool': { +\ 'function': 'ale#fixers#json_pytool#Fix', +\ 'suggested_filetypes': ['json'], +\ 'description': "Fix JSON files with python's built-in json.tool module.", +\ }, \ 'protolint': { \ 'function': 'ale#fixers#protolint#Fix', \ 'suggested_filetypes': ['proto'], @@ -666,6 +697,11 @@ let s:default_registry = { \ 'suggested_filetypes': ['ruby'], \ 'description': 'A formatter for Ruby source code', \ }, +\ 'cljfmt': { +\ 'function': 'ale#fixers#cljfmt#Fix', +\ 'suggested_filetypes': ['clojure'], +\ 'description': 'formatter and linter for clojure files', +\ }, \} " Reset the function registry to the default entries. diff --git a/sources_non_forked/ale/autoload/ale/fixers/apkbuild_fixer.vim b/sources_non_forked/ale/autoload/ale/fixers/apkbuild_fixer.vim new file mode 100644 index 00000000..b297fc61 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/apkbuild_fixer.vim @@ -0,0 +1,19 @@ +" Author: Leo +" Description: Fix policy violations found by apkbuild-lint + +call ale#Set('apkbuild_apkbuild_fixer_executable', 'apkbuild-fixer') +call ale#Set('apkbuild_apkbuild_fixer_lint_executable', get(g:, 'ale_apkbuild_apkbuild_lint_executable')) +call ale#Set('apkbuild_apkbuild_fixer_options', '') + +function! ale#fixers#apkbuild_fixer#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_executable') + let l:options = ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_options') + + return { + \ 'command': ale#Escape(l:executable) + \ . ' -p ' . ale#Var(a:buffer, 'apkbuild_apkbuild_fixer_lint_executable') + \ . (empty(l:options) ? '' : ' ' . l:options) + \ . ' %t', + \ 'read_temporary_file': 1, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/autoflake.vim b/sources_non_forked/ale/autoload/ale/fixers/autoflake.vim index c2530051..9f8b04fc 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/autoflake.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/autoflake.vim @@ -30,7 +30,7 @@ endfunction function! ale#fixers#autoflake#Fix(buffer) abort let l:executable = ale#fixers#autoflake#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run autoflake' \ : '' diff --git a/sources_non_forked/ale/autoload/ale/fixers/autoimport.vim b/sources_non_forked/ale/autoload/ale/fixers/autoimport.vim index 686da124..8d35419e 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/autoimport.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/autoimport.vim @@ -30,7 +30,7 @@ endfunction function! ale#fixers#autoimport#Fix(buffer) abort let l:executable = ale#fixers#autoimport#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run autoimport' \ : '' diff --git a/sources_non_forked/ale/autoload/ale/fixers/autopep8.vim b/sources_non_forked/ale/autoload/ale/fixers/autopep8.vim index 6b5adfce..f9af46f8 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/autopep8.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/autopep8.vim @@ -30,7 +30,7 @@ endfunction function! ale#fixers#autopep8#Fix(buffer) abort let l:executable = ale#fixers#autopep8#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run autopep8' \ : '' diff --git a/sources_non_forked/ale/autoload/ale/fixers/black.vim b/sources_non_forked/ale/autoload/ale/fixers/black.vim index 4fe239ff..6f263f13 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/black.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/black.vim @@ -32,7 +32,7 @@ function! ale#fixers#black#Fix(buffer) abort let l:executable = ale#fixers#black#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'black']) endif @@ -42,6 +42,9 @@ function! ale#fixers#black#Fix(buffer) abort call add(l:cmd, l:options) endif + let l:fname = expand('#' . a:buffer . '...') + call add(l:cmd, '--stdin-filename '.ale#Escape(ale#path#Simplify(l:fname))) + if expand('#' . a:buffer . ':e') is? 'pyi' call add(l:cmd, '--pyi') endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/cljfmt.vim b/sources_non_forked/ale/autoload/ale/fixers/cljfmt.vim new file mode 100644 index 00000000..dbcf10d8 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/cljfmt.vim @@ -0,0 +1,14 @@ +" Author: rudolf ordoyne +" Description: Support for cljfmt https://github.com/weavejester/cljfmt + +call ale#Set('clojure_cljfmt_executable', 'cljfmt') + +function! ale#fixers#cljfmt#Fix(buffer) abort + let l:executable = ale#Var(a:buffer, 'clojure_cljfmt_executable') + + return { + \ 'command': ale#Escape(l:executable) . ' fix %t', + \ 'read_temporary_file': 1, + \} +endfunction + diff --git a/sources_non_forked/ale/autoload/ale/fixers/erlang_mode.vim b/sources_non_forked/ale/autoload/ale/fixers/erlang_mode.vim new file mode 100644 index 00000000..a89784d5 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/erlang_mode.vim @@ -0,0 +1,49 @@ +" Author: Dmitri Vereshchagin +" Description: Indent with the Erlang mode for Emacs + +call ale#Set('erlang_erlang_mode_emacs_executable', 'emacs') +call ale#Set('erlang_erlang_mode_indent_level', 4) +call ale#Set('erlang_erlang_mode_icr_indent', 'nil') +call ale#Set('erlang_erlang_mode_indent_guard', 2) +call ale#Set('erlang_erlang_mode_argument_indent', 2) +call ale#Set('erlang_erlang_mode_indent_tabs_mode', 'nil') + +let s:variables = { +\ 'erlang-indent-level': 'erlang_erlang_mode_indent_level', +\ 'erlang-icr-indent': 'erlang_erlang_mode_icr_indent', +\ 'erlang-indent-guard': 'erlang_erlang_mode_indent_guard', +\ 'erlang-argument-indent': 'erlang_erlang_mode_argument_indent', +\ 'indent-tabs-mode': 'erlang_erlang_mode_indent_tabs_mode', +\} + +function! ale#fixers#erlang_mode#Fix(buffer) abort + let emacs_executable = + \ ale#Var(a:buffer, 'erlang_erlang_mode_emacs_executable') + + let l:exprs = [ + \ s:SetqDefault(a:buffer, s:variables), + \ '(erlang-mode)', + \ '(font-lock-fontify-region (point-min) (point-max))', + \ '(indent-region (point-min) (point-max))', + \ '(funcall (if indent-tabs-mode ''tabify ''untabify)' + \ . ' (point-min) (point-max))', + \ '(save-buffer 0)', + \] + + let l:command = ale#Escape(l:emacs_executable) + \ . ' --batch' + \ . ' --find-file=%t' + \ . join(map(l:exprs, '" --eval=" . ale#Escape(v:val)'), '') + + return {'command': l:command, 'read_temporary_file': 1} +endfunction + +function! s:SetqDefault(buffer, variables) abort + let l:args = [] + + for [l:emacs_name, l:ale_name] in items(a:variables) + let l:args += [l:emacs_name, ale#Var(a:buffer, l:ale_name)] + endfor + + return '(setq-default ' . join(l:args) . ')' +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/erlfmt.vim b/sources_non_forked/ale/autoload/ale/fixers/erlfmt.vim index f9951e9d..06cb1704 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/erlfmt.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/erlfmt.vim @@ -13,9 +13,7 @@ function! ale#fixers#erlfmt#Fix(buffer) abort let l:options = ale#Var(a:buffer, 'erlang_erlfmt_options') let l:executable = ale#fixers#erlfmt#GetExecutable(a:buffer) - let l:command = ale#Escape(l:executable) . (empty(l:options) ? '' : ' ' . l:options) . ' %s' + let l:command = ale#Escape(l:executable) . ale#Pad(l:options) . ' -' - return { - \ 'command': l:command - \} + return {'command': l:command} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/golangci_lint.vim b/sources_non_forked/ale/autoload/ale/fixers/golangci_lint.vim new file mode 100644 index 00000000..596f1590 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/golangci_lint.vim @@ -0,0 +1,32 @@ +" Author: Ian Stapleton Cordasco +" Description: Run golangci-lint with the --fix flag to autofix some issues + +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#GetCommand(buffer) abort + let l:filename = expand('#' . a:buffer . ':t') + 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 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 + return { + \ 'command': ale#fixers#golangci_lint#GetCommand(a:buffer), + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/isort.vim b/sources_non_forked/ale/autoload/ale/fixers/isort.vim index c4eef3cc..45083ee8 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/isort.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/isort.vim @@ -31,7 +31,7 @@ function! ale#fixers#isort#GetCmd(buffer) abort let l:executable = ale#fixers#isort#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'isort']) endif @@ -42,7 +42,7 @@ function! ale#fixers#isort#FixForVersion(buffer, version) abort let l:executable = ale#fixers#isort#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'isort']) endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/json_pytool.vim b/sources_non_forked/ale/autoload/ale/fixers/json_pytool.vim new file mode 100644 index 00000000..17aeeea1 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/json_pytool.vim @@ -0,0 +1,20 @@ +" Author: idbrii +" Description: json formatter as ALE fixer using python's json.tool + +call ale#Set('json_pytool_executable', 'python') +call ale#Set('json_pytool_options', '') +call ale#Set('json_pytool_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! ale#fixers#json_pytool#GetExecutable(buffer) abort + return ale#path#FindExecutable(a:buffer, 'json_pytool', ['python']) +endfunction + +function! ale#fixers#json_pytool#Fix(buffer) abort + let l:executable = ale#Escape(ale#fixers#json_pytool#GetExecutable(a:buffer)) + let l:opts = ale#Var(a:buffer, 'json_pytool_options') + let l:command = printf('%s -m json.tool %s -', l:executable, l:opts) + + return { + \ 'command': l:command + \ } +endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/pycln.vim b/sources_non_forked/ale/autoload/ale/fixers/pycln.vim index 4ee2373d..ca15cc4e 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/pycln.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/pycln.vim @@ -42,7 +42,7 @@ endfunction function! ale#fixers#pycln#GetCommand(buffer) abort let l:executable = ale#fixers#pycln#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run pycln' \ : '' @@ -53,7 +53,7 @@ function! ale#fixers#pycln#FixForVersion(buffer, version) abort let l:executable = ale#fixers#pycln#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'pycln']) endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/pyflyby.vim b/sources_non_forked/ale/autoload/ale/fixers/pyflyby.vim index f6f289e3..d5c2d235 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/pyflyby.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/pyflyby.vim @@ -33,7 +33,7 @@ function! ale#fixers#pyflyby#Fix(buffer) abort let l:executable = ale#fixers#pyflyby#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'tidy-imports']) endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim b/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim index 3cc76a9f..6e10c1d6 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/reorder_python_imports.vim @@ -30,7 +30,7 @@ endfunction function! ale#fixers#reorder_python_imports#Fix(buffer) abort let l:executable = ale#fixers#reorder_python_imports#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run reorder-python-imports' \ : '' diff --git a/sources_non_forked/ale/autoload/ale/fixers/ruff.vim b/sources_non_forked/ale/autoload/ale/fixers/ruff.vim index c2bea3e3..c0c3cd62 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/ruff.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/ruff.vim @@ -41,7 +41,7 @@ endfunction function! ale#fixers#ruff#GetCommand(buffer) abort let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run ruff' \ : '' @@ -52,7 +52,7 @@ function! ale#fixers#ruff#FixForVersion(buffer, version) abort let l:executable = ale#fixers#ruff#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'ruff']) endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/ruff_format.vim b/sources_non_forked/ale/autoload/ale/fixers/ruff_format.vim index e852dd24..cfa7b76d 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/ruff_format.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/ruff_format.vim @@ -41,7 +41,7 @@ endfunction function! ale#fixers#ruff_format#GetCommand(buffer) abort let l:executable = ale#fixers#ruff_format#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run ruff' \ : '' @@ -52,7 +52,7 @@ function! ale#fixers#ruff_format#Fix(buffer) abort let l:executable = ale#fixers#ruff_format#GetExecutable(a:buffer) let l:cmd = [ale#Escape(l:executable)] - if l:executable =~? 'pipenv\|poetry\|uv$' + if l:executable =~? '\(pipenv\|poetry\|uv\)$' call extend(l:cmd, ['run', 'ruff']) endif diff --git a/sources_non_forked/ale/autoload/ale/fixers/stylua.vim b/sources_non_forked/ale/autoload/ale/fixers/stylua.vim index 3521c935..6c3ba054 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/stylua.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/stylua.vim @@ -4,11 +4,24 @@ call ale#Set('lua_stylua_executable', 'stylua') call ale#Set('lua_stylua_options', '') +function! ale#fixers#stylua#GetCwd(buffer) abort + for l:possible_configfile in ['stylua.toml', '.stylua.toml'] + let l:config = ale#path#FindNearestFile(a:buffer, l:possible_configfile) + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + endfor + + return '%s:h' +endfunction + function! ale#fixers#stylua#Fix(buffer) abort let l:executable = ale#Var(a:buffer, 'lua_stylua_executable') let l:options = ale#Var(a:buffer, 'lua_stylua_options') return { - \ 'command': ale#Escape(l:executable) . ale#Pad(l:options) . ' -', + \ 'cwd': ale#fixers#stylua#GetCwd(a:buffer), + \ 'command': ale#Escape(l:executable) . ale#Pad(l:options) . ' --stdin-filepath %s -', \} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/syntax_tree.vim b/sources_non_forked/ale/autoload/ale/fixers/syntax_tree.vim index 7ae03373..08823a88 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/syntax_tree.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/syntax_tree.vim @@ -6,7 +6,7 @@ function! ale#fixers#syntax_tree#GetCommand(buffer) abort let l:options = ale#Var(a:buffer, 'ruby_syntax_tree_options') return ale#ruby#EscapeExecutable(l:executable, 'stree') - \ . ' write' + \ . ' format' \ . (!empty(l:options) ? ' ' . l:options : '') \ . ' %t' endfunction @@ -14,6 +14,5 @@ endfunction function! ale#fixers#syntax_tree#Fix(buffer) abort return { \ 'command': ale#fixers#syntax_tree#GetCommand(a:buffer), - \ 'read_temporary_file': 1, \} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/xmllint.vim b/sources_non_forked/ale/autoload/ale/fixers/xmllint.vim index 9e478feb..4c74508b 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/xmllint.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/xmllint.vim @@ -7,15 +7,8 @@ call ale#Set('xml_xmllint_indentsize', 2) function! ale#fixers#xmllint#Fix(buffer) abort let l:executable = ale#Escape(ale#Var(a:buffer, 'xml_xmllint_executable')) - let l:filename = bufname(a:buffer) - if empty(l:filename) - let l:filename = '%t' - else - let l:filename = ale#Escape(l:filename) - endif - - let l:command = l:executable . ' --format ' . l:filename + let l:command = l:executable . ' --format' let l:indent = ale#Var(a:buffer, 'xml_xmllint_indentsize') @@ -31,6 +24,6 @@ function! ale#fixers#xmllint#Fix(buffer) abort endif return { - \ 'command': l:command + \ 'command': l:command . ' -' \} endfunction diff --git a/sources_non_forked/ale/autoload/ale/fixers/yapf.vim b/sources_non_forked/ale/autoload/ale/fixers/yapf.vim index 22822a6e..cbc3d46d 100644 --- a/sources_non_forked/ale/autoload/ale/fixers/yapf.vim +++ b/sources_non_forked/ale/autoload/ale/fixers/yapf.vim @@ -29,7 +29,7 @@ endfunction function! ale#fixers#yapf#Fix(buffer) abort let l:executable = ale#fixers#yapf#GetExecutable(a:buffer) - let l:exec_args = l:executable =~? 'pipenv\|poetry\|uv$' + let l:exec_args = l:executable =~? '\(pipenv\|poetry\|uv\)$' \ ? ' run yapf' \ : '' diff --git a/sources_non_forked/ale/autoload/ale/fixers/yq.vim b/sources_non_forked/ale/autoload/ale/fixers/yq.vim new file mode 100644 index 00000000..b9bf7007 --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/fixers/yq.vim @@ -0,0 +1,22 @@ +call ale#Set('yaml_yq_executable', 'yq') +call ale#Set('yaml_yq_options', '') +call ale#Set('yaml_yq_filters', '.') + +function! ale#fixers#yq#GetExecutable(buffer) abort + return ale#Var(a:buffer, 'yaml_yq_executable') +endfunction + +function! ale#fixers#yq#Fix(buffer) abort + let l:options = ale#Var(a:buffer, 'yaml_yq_options') + let l:filters = ale#Var(a:buffer, 'yaml_yq_filters') + + if empty(l:filters) + return 0 + endif + + return { + \ 'command': ale#Escape(ale#fixers#yq#GetExecutable(a:buffer)) + \ . ' ' . l:filters . ' ' + \ . l:options, + \} +endfunction diff --git a/sources_non_forked/ale/autoload/ale/floating_preview.vim b/sources_non_forked/ale/autoload/ale/floating_preview.vim index 970a9b30..3e1fabb8 100644 --- a/sources_non_forked/ale/autoload/ale/floating_preview.vim +++ b/sources_non_forked/ale/autoload/ale/floating_preview.vim @@ -21,6 +21,8 @@ function! ale#floating_preview#Show(lines, ...) abort else call s:VimShow(a:lines, l:options) endif + + return w:preview.id endfunction function! s:NvimShow(lines, options) abort diff --git a/sources_non_forked/ale/autoload/ale/handlers/c3lsp.vim b/sources_non_forked/ale/autoload/ale/handlers/c3lsp.vim new file mode 100644 index 00000000..2763f3db --- /dev/null +++ b/sources_non_forked/ale/autoload/ale/handlers/c3lsp.vim @@ -0,0 +1,19 @@ +scriptencoding utf-8 +" Author: Koni Marti +" Description: Utilities for c3lsp + +function! ale#handlers#c3lsp#GetProjectRoot(buffer) abort + let l:config = ale#path#FindNearestFile(a:buffer, 'project.json') + + if !empty(l:config) + return fnamemodify(l:config, ':h') + endif + + return expand('#' . a:buffer . ':p:h') +endfunction + +function! ale#handlers#c3lsp#GetInitOpts(buffer, init_options_var) abort + let l:init_options = {} + + return extend(l:init_options, ale#Var(a:buffer, a:init_options_var)) +endfunction diff --git a/sources_non_forked/ale/autoload/ale/python.vim b/sources_non_forked/ale/autoload/ale/python.vim index 9eb198fb..148683d6 100644 --- a/sources_non_forked/ale/autoload/ale/python.vim +++ b/sources_non_forked/ale/autoload/ale/python.vim @@ -108,12 +108,17 @@ function! ale#python#AutoVirtualenvEnvString(buffer) abort if !empty(l:venv_dir) let l:strs = [ ] + " venv/bin directory + let l:pathdir = join([l:venv_dir, s:bin_dir], s:sep) " expand PATH correctly inside of the appropriate shell. + " set VIRTUAL_ENV to point to venv if has('win32') - call add(l:strs, 'set PATH=' . ale#Escape(l:venv_dir) . ';%PATH% && ') + call add(l:strs, 'set PATH=' . ale#Escape(l:pathdir) . ';%PATH% && ') + call add(l:strs, 'set VIRTUAL_ENV=' . ale#Escape(l:venv_dir) . ' && ') else - call add(l:strs, 'PATH=' . ale#Escape(l:venv_dir) . '":$PATH" ') + call add(l:strs, 'PATH=' . ale#Escape(l:pathdir) . '":$PATH" ') + call add(l:strs, 'VIRTUAL_ENV=' . ale#Escape(l:venv_dir) . ' ') endif return join(l:strs, '') diff --git a/sources_non_forked/ale/autoload/ale/references.vim b/sources_non_forked/ale/autoload/ale/references.vim index df253c9c..e8cbda9e 100644 --- a/sources_non_forked/ale/autoload/ale/references.vim +++ b/sources_non_forked/ale/autoload/ale/references.vim @@ -17,18 +17,21 @@ function! ale#references#ClearLSPData() abort endfunction function! ale#references#FormatTSResponseItem(response_item, options) abort + let l:match = substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', '') + if get(a:options, 'open_in') is# 'quickfix' return { \ 'filename': a:response_item.file, \ 'lnum': a:response_item.start.line, \ 'col': a:response_item.start.offset, + \ 'text': l:match, \} else return { \ 'filename': a:response_item.file, \ 'line': a:response_item.start.line, \ 'column': a:response_item.start.offset, - \ 'match': substitute(a:response_item.lineText, '^\s*\(.\{-}\)\s*$', '\1', ''), + \ 'match': l:match, \} endif endfunction diff --git a/sources_non_forked/ale/doc/ale-apkbuild.txt b/sources_non_forked/ale/doc/ale-apkbuild.txt index 05261400..f80ca290 100644 --- a/sources_non_forked/ale/doc/ale-apkbuild.txt +++ b/sources_non_forked/ale/doc/ale-apkbuild.txt @@ -2,10 +2,41 @@ ALE APKBUILD Integration *ale-apkbuild-options* +=============================================================================== +apkbuild-fixer *ale-apkbuild-apkbuild-fixer* + +g:apkbuild_apkbuild_fixer_options *g:apkbuild_apkbuild_fixer_options* + *b:apkbuild_apkbuild_fixer_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to the apkbuild_fixer + fixer. + + +g:apkbuild_apkbuild_fixer_executable *g:apkbuild_apkbuild_fixer_executable* + *b:apkbuild_apkbuild_fixer_executable* + Type: |String| + Default: `'apkbuild-fixer'` + + This variable can be modified to change the executable path for + `apkbuild-fixer`. + + +g:apkbuild_apkbuild_fixer_lint_executable + *g:apkbuild_apkbuild_fixer_lint_executable* + *b:apkbuild_apkbuild_fixer_lint_executable* + Type: |String| + Default: `'apkbuild-fixer'` + + This variable can be modified to change the executable path for + `apkbuild-lint`, the binary used to find violations. + + =============================================================================== apkbuild-lint *ale-apkbuild-apkbuild-lint* -g:ale_apkbuild_apkbuild_lint_executable +g:ale_apkbuild_apkbuild_lint_executable *g:ale_apkbuild_apkbuild_lint_executable* *b:ale_apkbuild_apkbuild_lint_executable* diff --git a/sources_non_forked/ale/doc/ale-c3.txt b/sources_non_forked/ale/doc/ale-c3.txt new file mode 100644 index 00000000..acc7e013 --- /dev/null +++ b/sources_non_forked/ale/doc/ale-c3.txt @@ -0,0 +1,35 @@ +=============================================================================== +ALE C3 Integration *ale-c3-options* + +=============================================================================== +c3lsp *ale-c3-c3lsp* + +g:ale_c3_c3lsp_executable *g:ale_c3_c3lsp_executable* + *b:ale_c3_c3lsp_executable* + Type: |String| + Default: `c3lsp` + + This variable can be changed to set the path to c3lsp executable. + + +g:ale_c3_c3lsp_options *g:ale_c3_c3lsp_options* + *b:ale_c3_c3lsp_options* + + Type: |String| + Default: `''` + + Add command line options to the c3lsp executable. This is useful to specify + the path to the C3 standard library with '-stdlib-path='. + + +g:ale_c3_c3lsp_init_options *g:ale_c3_c3lsp_init_options* + *b:ale_c3_c3lsp_init_options* + Type: |Dictionary| + Default: `{}` + + Dictionary containing configuration settings that will be passed to the + language server. + + +=============================================================================== + vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale-clojure.txt b/sources_non_forked/ale/doc/ale-clojure.txt index 3ff367f6..54872de7 100644 --- a/sources_non_forked/ale/doc/ale-clojure.txt +++ b/sources_non_forked/ale/doc/ale-clojure.txt @@ -16,6 +16,18 @@ g:ale_clojure_clj_kondo_options *g:ale_clojure_clj_kondo_options* This variable can be changed to modify options passed to clj-kondo. +=============================================================================== +cljfmt *ale-clojure-cljfmt* + +cljfmt is a linter and fixer for Clojure code, with defaults adhering to the +Clojure Style Guide (see https://guide.clojure.style/ ) + +https://github.com/weavejester/cljfmt + +Linting options are not configurable by ale, but instead are controlled by +Leiningen, or a cljfmt file in the current or parent directories. + +see https://github.com/weavejester/cljfmt#Configuration for more information. =============================================================================== joker *ale-clojure-joker* diff --git a/sources_non_forked/ale/doc/ale-development.txt b/sources_non_forked/ale/doc/ale-development.txt index 6ba03da1..fb7e7cd6 100644 --- a/sources_non_forked/ale/doc/ale-development.txt +++ b/sources_non_forked/ale/doc/ale-development.txt @@ -49,10 +49,10 @@ changes should be preceded by a deprecation phase complete with warnings. Changes required for security may be an exception. ALE supports Vim 8 and above, and NeoVim 0.6.0 or newer. These are the -earliest versions of Vim and NeoVim which support |job|, |timer|, |closure|, -and |lambda| features. All ALE code should be written so it is compatible with -these versions of Vim, or with version checks so particular features can -degrade or fail gracefully. +earliest versions of Vim and NeoVim which support |+job|, |+timer|, +|+closure|, and |+lambda| features. All ALE code should be written so it is +compatible with these versions of Vim, or with version checks so particular +features can degrade or fail gracefully. Just about everything should be documented and covered with tests. @@ -486,7 +486,7 @@ last minor version. Generally ALE releases hit a major version only when there are breaking changes to a public ALE setting or function. A "public" setting or function is -defined as any setting or function documented in the `:help` |ale| text file. +defined as any setting or function documented in the `:help` |ale.txt| file. Major ALE versions ought to be so rare that they only come once a year at most. ALE should not typically introduce any breaking changes. diff --git a/sources_non_forked/ale/doc/ale-erlang.txt b/sources_non_forked/ale/doc/ale-erlang.txt index 2c6ff22a..601410da 100644 --- a/sources_non_forked/ale/doc/ale-erlang.txt +++ b/sources_non_forked/ale/doc/ale-erlang.txt @@ -51,6 +51,57 @@ g:ale_erlang_elvis_executable *g:ale_erlang_elvis_executable* This variable can be changed to specify the elvis executable. +------------------------------------------------------------------------------- +erlang-mode *ale-erlang-erlang-mode* + +g:ale_erlang_erlang_mode_emacs_executable + *g:ale_erlang_erlang_mode_emacs_executable* + *b:ale_erlang_erlang_mode_emacs_executable* + Type: |String| + Default: `'emacs'` + + This variable can be changed to specify the Emacs executable. + +g:ale_erlang_erlang_mode_indent_level *g:ale_erlang_erlang_mode_indent_level* + *b:ale_erlang_erlang_mode_indent_level* + Type: |Number| + Default: `4` + + Indentation of Erlang calls/clauses within blocks. + +g:ale_erlang_erlang_mode_icr_indent *g:ale_erlang_erlang_mode_icr_indent* + *b:ale_erlang_erlang_mode_icr_indent* + Type: `'nil'` or |Number| + Default: `'nil'` + + Indentation of Erlang if/case/receive patterns. `'nil'` means keeping default + behavior. When non-`'nil'`, indent to the column of if/case/receive. + +g:ale_erlang_erlang_mode_indent_guard *g:ale_erlang_erlang_mode_indent_guard* + *b:ale_erlang_erlang_mode_indent_guard* + Type: |Number| + Default: `2` + + Indentation of Erlang guards. + +g:ale_erlang_erlang_mode_argument_indent + *g:ale_erlang_erlang_mode_argument_indent* + *b:ale_erlang_erlang_mode_argument_indent* + Type: `'nil'` or |Number| + Default: `2` + + Indentation of the first argument in a function call. When `'nil'`, indent + to the column after the `'('` of the function. + +g:ale_erlang_erlang_mode_indent_tabs_mode + *g:ale_erlang_erlang_mode_indent_tabs_mode* + *b:ale_erlang_erlang_mode_indent_tabs_mode* + Type: `'nil'` or `'t'` + Default: `'nil'` + + Indentation can insert tabs if this is non-`'nil'`. + + ------------------------------------------------------------------------------- erlang_ls *ale-erlang-erlang_ls* diff --git a/sources_non_forked/ale/doc/ale-json.txt b/sources_non_forked/ale/doc/ale-json.txt index 8822a697..b2b5e2a6 100644 --- a/sources_non_forked/ale/doc/ale-json.txt +++ b/sources_non_forked/ale/doc/ale-json.txt @@ -83,6 +83,40 @@ g:ale_json_fixjson_use_global *g:ale_json_fixjson_use_global* See |ale-integrations-local-executables| +=============================================================================== +pytool *ale-json-pytool* + +Use python's json.tool module to reformat json. + +g:ale_json_pytool_executable *g:ale_json_pytool_executable* + *b:ale_json_pytool_executable* + + Type: |String| + Default: `'python'` + + The python executable that run to use its json.tool module. This fixer + requires python 3, which includes the json module. + +g:ale_json_pytool_options *g:ale_json_pytool_options* + *b:ale_json_pytool_options* + + Type: |String| + Default: `''` + + These options are passed to the json.tool module. Example: > + let g:ale_json_pytool_options = '--sort-keys --indent 2' +< See docs for all options: + https://docs.python.org/3/library/json.html#module-json.tool + +g:ale_json_pytool_use_global *g:ale_json_pytool_use_global* + *b:ale_json_pytool_use_global* + + Type: |Number| + Default: `get(g:, 'ale_use_global_executables', 0)` + + See |ale-integrations-local-executables| + + =============================================================================== jsonlint *ale-json-jsonlint* diff --git a/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt b/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt index ec787d22..063fc36f 100644 --- a/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt +++ b/sources_non_forked/ale/doc/ale-supported-languages-and-tools.txt @@ -23,6 +23,7 @@ Notes: * API Blueprint * `drafter` * APKBUILD + * `apkbuild-fixer` * `apkbuild-lint` * `secfixes-check` * AsciiDoc @@ -104,6 +105,8 @@ Notes: * `flawfinder` * `gcc` (`cc`) * `uncrustify` +* C3 + * `c3lsp` * Cairo * `scarb`!! * `starknet` @@ -112,6 +115,7 @@ Notes: * `foodcritic`!! * Clojure * `clj-kondo` + * `cljfmt` * `joker` * CloudFormation * `cfn-python-lint` @@ -191,6 +195,7 @@ Notes: * `SyntaxErl` * `dialyzer`!! * `elvis`!! + * `erlang-mode` (The Erlang mode for Emacs) * `erlang_ls` * `erlc` * `erlfmt` @@ -324,6 +329,7 @@ Notes: * `eslint` * `fixjson` * `jq` + * `json.tool` * `jsonlint` * `prettier` * `spectral` @@ -727,6 +733,7 @@ Notes: * `yamlfix` * `yamlfmt` * `yamllint` + * `yq` * YANG * `yang-lsp` * Zeek diff --git a/sources_non_forked/ale/doc/ale-yaml.txt b/sources_non_forked/ale/doc/ale-yaml.txt index a6741c83..fc52dc73 100644 --- a/sources_non_forked/ale/doc/ale-yaml.txt +++ b/sources_non_forked/ale/doc/ale-yaml.txt @@ -366,5 +366,43 @@ g:ale_yaml_gitlablint_options *g:ale_yaml_gitlablint_options This variable can be set to pass additional options to gll. +=============================================================================== +yq *ale-yaml-yq* + +Website: https://github.com/mikefarah/yq + + +Installation +------------------------------------------------------------------------------- + +Install yq: > + + wget https://github.com/mikefarah/yq/releases/download/${VERSION}/${BINARY}.tar.gz -O - | tar xz && mv ${BINARY} /usr/bin/yq + +Options +------------------------------------------------------------------------------- + +g:ale_yaml_yq_executable *g:ale_yaml_yq_executable* + *b:ale_yaml_yq_executable* + Type: |String| + Default: `'yq'` + + This variable can be set to change the path to yq. + + +g:ale_yaml_yq_options *g:ale_yaml_yq_options* + *b:ale_yaml_yq_options* + Type: |String| + Default: `''` + + This variable can be set to pass additional options to yq. + +g:ale_yaml_yq_filters *g:ale_yaml_yq_filters + *b:ale_yaml_yq_filters* + Type: |String| + Default: `'.'` + + This option can be changed to pass additional filters to yq + =============================================================================== vim:tw=78:ts=2:sts=2:sw=2:ft=help:norl: diff --git a/sources_non_forked/ale/doc/ale.txt b/sources_non_forked/ale/doc/ale.txt index d9be7682..94d6d3b3 100644 --- a/sources_non_forked/ale/doc/ale.txt +++ b/sources_non_forked/ale/doc/ale.txt @@ -41,7 +41,7 @@ CONTENTS *ale-contents* ALE provides the means to run linters asynchronously in Vim in a variety of languages and tools. ALE sends the contents of buffers to linter programs using the |job-control| features available in Vim 8 and NeoVim. For Vim 8, -Vim must be compiled with the |job| and |channel| and |timers| features +Vim must be compiled with the |+job| and |+channel| and |+timers| features as a minimum. ALE supports the following key features for linting: @@ -49,14 +49,14 @@ ALE supports the following key features for linting: 1. Running linters when text is changed. 2. Running linters when files are opened. 3. Running linters when files are saved. (When a global flag is set.) -4. Populating the |loclist| with warning and errors. +4. Populating the |location-list| with warning and errors. 5. Setting |signs| with warnings and errors for error markers. -6. Using |echo| to show error messages when the cursor moves. +6. Using `:echo` to show error messages when the cursor moves. 7. Setting syntax highlights for errors. -ALE can fix problems with files with the |ALEFix| command, using the same job +ALE can fix problems with files with the `:ALEFix` command, using the same job control functionality used for checking for problems. Try using the -|ALEFixSuggest| command for browsing tools that can be used to fix problems +`:ALEFixSuggest` command for browsing tools that can be used to fix problems for the current buffer. If you are interested in contributing to the development of ALE, read the @@ -81,7 +81,7 @@ for |ale#linter#Define()|. Without any configuration, ALE will attempt to check all of the code for every file you open in Vim with all available tools by default. To see what ALE -is doing, and what options have been set, try using the |:ALEInfo| command. +is doing, and what options have been set, try using the `:ALEInfo` command. Most of the linters ALE runs will check the Vim buffer you are editing instead of the file on disk. This allows you to check your code for errors before you @@ -151,7 +151,7 @@ ALE offers several options for controlling which linters are run. * Disabling only a subset of linters. - |g:ale_linters_ignore| * Disabling LSP linters and `tsserver`. - |g:ale_disable_lsp| -You can stop ALE any currently running linters with the |ALELintStop| command. +You can stop ALE any currently running linters with the `:ALELintStop` command. Any existing problems will be kept. ------------------------------------------------------------------------------- @@ -217,7 +217,7 @@ specific to each project, if you have a lot of projects to manage. ALE comes with many default configurations for language servers, so they can be detected and run automatically. ALE can connect to other language servers by defining a new linter for a filetype. New linters can be defined in |vimrc|, -in plugin files, or `ale_linters` directories in |runtimepath|. +in plugin files, or `ale_linters` directories in 'runtimepath'. See |ale-linter-loading-behavior| for more information on loading linters. @@ -323,14 +323,14 @@ A plugin might integrate its own checks with ALE like so: > =============================================================================== 4. Fixing Problems *ale-fix* -ALE can fix problems with files with the |ALEFix| command. |ALEFix| +ALE can fix problems with files with the `:ALEFix` command. `:ALEFix` accepts names of fixers to be applied as arguments. Alternatively, when no arguments are provided, the variable |g:ale_fixers| will be read for getting a |List| of commands for filetypes, split on `.`, and the functions named in |g:ale_fixers| will be executed for fixing the errors. -The |ALEFixSuggest| command can be used to suggest tools that be used to +The `:ALEFixSuggest` command can be used to suggest tools that be used to fix problems for the current buffer. The values for `g:ale_fixers` can be a list of |String|, |Funcref|, or @@ -348,7 +348,7 @@ argument `lines`. Functions should name two arguments if the `lines` argument is desired. This is required to avoid unnecessary copying of the lines of the buffers being checked. -When a |Dictionary| is returned for an |ALEFix| callback, the following keys +When a |Dictionary| is returned for an `:ALEFix` callback, the following keys are supported for running the commands. `cwd` An optional |String| for setting the working directory @@ -424,7 +424,7 @@ files, a |List| may be used for configuring the fixers instead. ALEFix < -For convenience, a plug mapping is defined for |ALEFix|, so you can set up a +For convenience, a plug mapping is defined for `:ALEFix`, so you can set up a keybind easily for fixing files. > " Bind F8 to fixing problems with ALE @@ -436,7 +436,7 @@ by default. |g:ale_fix_on_save| - Fix files when they are saved. Fixers can be disabled on save with |g:ale_fix_on_save_ignore|. They will -still be run when you manually run |ALEFix|. +still be run when you manually run `:ALEFix`. Fixers can be run on another machines, just like linters, such as fixers run from a Docker container, running in a virtual machine, running a remote @@ -457,8 +457,8 @@ ignore particular linters with |g:ale_linters_ignore|. If for any reason you want to stop a language server ALE starts, such as when a project configuration has significantly changed, or new files have been -added the language server isn't aware of, use either |ALEStopLSP| or -|ALEStopAllLSPs| to stop the server until ALE automatically starts it again. +added the language server isn't aware of, use either `:ALEStopLSP` or +`:ALEStopAllLSPs` to stop the server until ALE automatically starts it again. ------------------------------------------------------------------------------- 5.1 Completion *ale-completion* @@ -549,7 +549,7 @@ number of items can be controlled with |g:ale_completion_max_suggestions|. If you don't like some of the suggestions you see, you can filter them out with |g:ale_completion_excluded_words| or |b:ale_completion_excluded_words|. -The |ALEComplete| command can be used to show completion suggestions manually, +The `:ALEComplete` command can be used to show completion suggestions manually, even when |g:ale_completion_enabled| is set to `0`. For manually requesting completion information with Deoplete, consult Deoplete's documentation. @@ -559,7 +559,7 @@ Disabling automatic imports can drop some or all completion items from some LSP servers (e.g. eclipselsp). You can manually request imports for symbols at the cursor with the -|ALEImport| command. The word at the cursor must be an exact match for some +`:ALEImport` command. The word at the cursor must be an exact match for some potential completion result which includes additional text to insert into the current buffer, which ALE will assume is code for an import line. This command can be useful when your code already contains something you need to import. @@ -626,7 +626,7 @@ would like to use. An example here shows the available options for symbols > ALE supports jumping to the files and locations where symbols are defined through any enabled LSP linters. The locations ALE will jump to depend on the -information returned by LSP servers. The |ALEGoToDefinition| command will jump +information returned by LSP servers. The `:ALEGoToDefinition` command will jump to the definition of symbols under the cursor. See the documentation for the command for configuring how the location will be displayed. @@ -638,7 +638,7 @@ set to `0`. ALE supports jumping to the files and locations where symbols' types are defined through any enabled LSP linters. The locations ALE will jump to depend -on the information returned by LSP servers. The |ALEGoToTypeDefinition| +on the information returned by LSP servers. The `:ALEGoToTypeDefinition` command will jump to the definition of symbols under the cursor. See the documentation for the command for configuring how the location will be displayed. @@ -648,7 +648,7 @@ displayed. ALE supports jumping to the files and locations where symbols are implemented through any enabled LSP linters. The locations ALE will jump to depend on the -information returned by LSP servers. The |ALEGoToImplementation| command will +information returned by LSP servers. The `:ALEGoToImplementation` command will jump to the implementation of symbols under the cursor. See the documentation for the command for configuring how the location will be displayed. @@ -656,7 +656,7 @@ for the command for configuring how the location will be displayed. 5.5 Find References *ale-find-references* ALE supports finding references for symbols though any enabled LSP linters -with the |ALEFindReferences| command. See the documentation for the command +with the `:ALEFindReferences` command. See the documentation for the command for a full list of options. ------------------------------------------------------------------------------- @@ -665,7 +665,7 @@ for a full list of options. ALE supports "hover" information for printing brief information about symbols at the cursor taken from LSP linters. The following commands are supported: -|ALEHover| - Print information about the symbol at the cursor. +`:ALEHover` - Print information about the symbol at the cursor. Truncated information will be displayed when the cursor rests on a symbol by default, as long as there are no problems on the same line. You can disable @@ -700,24 +700,24 @@ settings. For example: > < Documentation for symbols at the cursor can be retrieved using the -|ALEDocumentation| command. This command is only available for `tsserver`. +`:ALEDocumentation` command. This command is only available for `tsserver`. ------------------------------------------------------------------------------- 5.7 Symbol Search *ale-symbol-search* ALE supports searching for workspace symbols via LSP linters with the -|ALESymbolSearch| command. See the documentation for the command +`:ALESymbolSearch` command. See the documentation for the command for a full list of options. ------------------------------------------------------------------------------- 5.8 Refactoring: Rename, Actions *ale-refactor* ALE supports renaming symbols in code such as variables or class names with -the |ALERename| command. +the `:ALERename` command. -`ALEFileRename` will rename file and fix import paths (tsserver only). +`:ALEFileRename` will rename file and fix import paths (tsserver only). -|ALECodeAction| will execute actions on the cursor or applied to a visual +`:ALECodeAction` will execute actions on the cursor or applied to a visual range selection, such as automatically fixing errors. Actions will appear in the right click mouse menu by default for GUI versions @@ -778,8 +778,8 @@ g:ale_change_sign_column_color *g:ale_change_sign_column_color* ALE uses the following highlight groups for highlighting the sign column: - `ALESignColumnWithErrors` - Links to `error` by default. - `ALESignColumnWithoutErrors` - Uses the value for `SignColumn` by default. + `:ALESignColumnWithErrors` - Links to `Error` by default. + `:ALESignColumnWithoutErrors` - Uses the value for `SignColumn` by default. The sign column color can only be changed globally in Vim. The sign column might produce unexpected results if editing different files in split @@ -813,7 +813,7 @@ g:ale_command_wrapper *g:ale_command_wrapper* " Prefix all commands with nice. let g:ale_command_wrapper = 'nice -n5' < - Use the |ALEInfo| command to view the commands that are run. All of the + Use the `:ALEInfo` command to view the commands that are run. All of the arguments for commands will be put on the end of the wrapped command by default. A `%*` marker can be used to spread the arguments in the wrapped command. > @@ -993,7 +993,7 @@ g:ale_default_navigation *g:ale_default_navigation* Default: `'buffer'` The default method for navigating away from the current buffer to another - buffer, such as for |ALEFindReferences|, or |ALEGoToDefinition|. + buffer, such as for `:ALEFindReferences` or `:ALEGoToDefinition`. g:ale_detail_to_floating_preview *g:ale_detail_to_floating_preview* @@ -1125,7 +1125,7 @@ g:ale_enabled *g:ale_enabled* When set to `0`, this option will completely disable ALE, such that no error checking will be performed, etc. ALE can be toggled on and off with - the |ALEToggle| command, which changes this option. + the `:ALEToggle` command, which changes this option. ALE can be disabled in each buffer by setting `let b:ale_enabled = 0` Disabling ALE based on filename patterns can be accomplished by setting @@ -1289,7 +1289,7 @@ g:ale_history_enabled *g:ale_history_enabled* When set to `1`, ALE will remember the last few commands which were run for every buffer which is open. This information can be viewed with the - |ALEInfo| command. The size of the buffer can be controlled with the + `:ALEInfo` command. The size of the buffer can be controlled with the |g:ale_max_buffer_history_size| option. This option can be disabled if storing a command history is not desired. @@ -1302,7 +1302,7 @@ g:ale_history_log_output *g:ale_history_log_output* When set to `1`, ALE will store the output of commands which have completed successfully in the command history, and the output will be displayed when - using |ALEInfo|. + using `:ALEInfo`. |g:ale_history_enabled| must be set to `1` for this output to be stored or printed. @@ -1354,7 +1354,7 @@ g:ale_info_default_mode *g:ale_info_default_mode* Type: |String| Default: `'preview'` - Changes the default mode used for |ALEInfo|. See documentation for |ALEInfo| + Changes the default mode used for `:ALEInfo`. See documentation for `:ALEInfo` for more information. @@ -1560,7 +1560,7 @@ g:ale_filename_mappings *g:ale_filename_mappings* Default: `{}` Either a |Dictionary| mapping a linter or fixer name, as displayed in - |:ALEInfo|, to a |List| of two-item |List|s for filename mappings, or just a + `:ALEInfo`, to a |List| of two-item |List|s for filename mappings, or just a |List| of two-item |List|s. When given some paths to files, the value of this setting will be used to convert filenames on a local file system to filenames on some remote file system, such as paths in a Docker image, @@ -1822,7 +1822,7 @@ g:ale_max_buffer_history_size *g:ale_max_buffer_history_size* Default: `20` This setting controls the maximum number of commands which will be stored in - the command history used for |ALEInfo|. Command history will be rotated in + the command history used for `:ALEInfo`. Command history will be rotated in a FIFO manner. If set to a number <= 0, then the history will be continuously set to an empty |List|. @@ -1950,7 +1950,7 @@ g:ale_rename_tsserver_find_in_comments *g:ale_rename_tsserver_find_in_comments* Default: `0` If enabled, this option will tell tsserver to find and replace text in - comments when calling |ALERename|. It can be enabled by settings the value + comments when calling `:ALERename`. It can be enabled by settings the value to `1`. @@ -1960,7 +1960,7 @@ g:ale_rename_tsserver_find_in_strings *g:ale_rename_tsserver_find_in_strings* Default: `0` If enabled, this option will tell tsserver to find and replace text in - strings when calling |ALERename|. It can be enabled by settings the value to + strings when calling `:ALERename`. It can be enabled by settings the value to `1`. @@ -1988,8 +1988,8 @@ g:ale_save_hidden *g:ale_save_hidden* Default: `0` When set to `1`, save buffers when 'hidden' is set when applying code - actions or rename operations, such as through |ALERename| or - |ALEOrganizeImports|. + actions or rename operations, such as through `:ALERename` or + `:ALEOrganizeImports`. g:ale_set_balloons *g:ale_set_balloons* @@ -2053,18 +2053,20 @@ g:ale_set_highlights *g:ale_set_highlights* ALE will use the following highlight groups for problems: - |ALEError| - Items with `'type': 'E'` - |ALEWarning| - Items with `'type': 'W'` - |ALEInfo.| - Items with `'type': 'I'` - |ALEStyleError| - Items with `'type': 'E'` and `'sub_type': 'style'` - |ALEStyleWarning| - Items with `'type': 'W'` and `'sub_type': 'style'` + ALEError items with `'type': 'E'` |hl-ALEError| + ALEWarning items with `'type': 'W'` |hl-ALEWarning| + ALEInfo items with `'type': 'I'` |hl-ALEInfo| + ALEStyleError items with `'type': 'E'` and + `'sub_type': 'style'` |hl-ALEStyleError| + ALEStyleWarning items with `'type': 'W'` and + `'sub_type': 'style'` |hl-ALEStyleWarning| When |g:ale_set_signs| is set to `0`, the following highlights for entire lines will be set. - |ALEErrorLine| - All items with `'type': 'E'` - |ALEWarningLine| - All items with `'type': 'W'` - |ALEInfoLine| - All items with `'type': 'I'` + ALEErrorLine all items with `'type': 'E'` |hl-ALEErrorLine| + ALEWarningLine all items with `'type': 'W'` |hl-ALEWarningLine| + ALEInfoLine all items with `'type': 'I'` |hl-ALEInfoLine| Vim can only highlight the characters up to the last column in a buffer for match highlights, whereas the line highlights when signs are enabled will @@ -2078,9 +2080,9 @@ g:ale_set_loclist *g:ale_set_loclist* Type: |Number| Default: `1` - When this option is set to `1`, the |loclist| will be populated with any - warnings and errors which are found by ALE. This feature can be used to - implement jumping between errors through typical use of |lnext| and |lprev|. + When this option is set to `1`, the |location-list| will be populated with + any warnings and errors which are found by ALE. This feature can be used to + implement jumping between errors through typical use of `:lnext` and `:lprev`. g:ale_set_quickfix *g:ale_set_quickfix* @@ -2089,16 +2091,16 @@ g:ale_set_quickfix *g:ale_set_quickfix* Default: `0` When this option is set to `1`, the |quickfix| list will be populated with - any problems which are found by ALE, instead of the |loclist|. The loclist - will never be populated when this option is on. + any problems which are found by ALE, instead of the |location-list|. The + loclist will never be populated when this option is on. Problems from every buffer ALE has checked will be included in the quickfix - list, which can be checked with |:copen|. Problems will be de-duplicated. + list, which can be checked with `:copen`. Problems will be de-duplicated. This feature should not be used in combination with tools for searching for - matches and commands like |:cfdo|, as ALE will replace the quickfix list + matches and commands like `:cfdo`, as ALE will replace the quickfix list pretty frequently. If you wish to use such tools, you should populate the - loclist or use |ALEPopulateQuickfix| instead. + loclist or use `:ALEPopulateQuickfix` instead. g:ale_set_signs *g:ale_set_signs* @@ -2117,27 +2119,31 @@ g:ale_set_signs *g:ale_set_signs* ALE will use the following highlight groups for problems: - |ALEErrorSign| - Items with `'type': 'E'` - |ALEWarningSign| - Items with `'type': 'W'` - |ALEInfoSign| - Items with `'type': 'I'` - |ALEStyleErrorSign| - Items with `'type': 'E'` and `'sub_type': 'style'` - |ALEStyleWarningSign| - Items with `'type': 'W'` and `'sub_type': 'style'` + ALEErrorSign items with `'type': 'E'` |hl-ALEErrorSign| + ALEWarningSign items with `'type': 'W'` |hl-ALEWarningSign| + ALEInfoSign items with `'type': 'I'` |hl-ALEInfoSign| + ALEStyleErrorSign items with `'type': 'E'` and + `'sub_type': 'style'` |hl-ALEStyleErrorSign| + ALEStyleWarningSign items with `'type': 'W'` and + `'sub_type': 'style'` |hl-ALEStyleWarningSign| In addition to the style of the signs, the style of lines where signs appear can be configured with the following highlights: - |ALEErrorLine| - All items with `'type': 'E'` - |ALEWarningLine| - All items with `'type': 'W'` - |ALEInfoLine| - All items with `'type': 'I'` + ALEErrorLine all items with `'type': 'E'` |hl-ALEErrorLine| + ALEWarningLine all items with `'type': 'W'` |hl-ALEWarningLine| + ALEInfoLine all items with `'type': 'I'` |hl-ALEInfoLine| With Neovim 0.3.2 or higher, ALE can use the `numhl` option to highlight the 'number' column. It uses the following highlight groups. - |ALEErrorSignLineNr| - Items with `'type': 'E'` - |ALEWarningSignLineNr| - Items with `'type': 'W'` - |ALEInfoSignLineNr| - Items with `'type': 'I'` - |ALEStyleErrorSignLineNr| - Items with `'type': 'E'` and `'sub_type': 'style'` - |ALEStyleWarningSignLineNr| - Items with `'type': 'W'` and `'sub_type': 'style'` + ALEErrorSignLineNr items with `'type': 'E'` |hl-ALEErrorSignLineNr| + ALEWarningSignLineNr items with `'type': 'W'` |hl-ALEWarningSignLineNr| + ALEInfoSignLineNr items with `'type': 'I'` |hl-ALEInfoSignLineNr| + ALEStyleErrorSignLineNr items with `'type': 'E'` and + `'sub_type': 'style'` |hl-ALEStyleErrorSignLineNr| + ALEStyleWarningSignLineNr items with `'type': 'W'` and + `'sub_type': 'style'` |hl-ALEStyleWarningSignLineNr| To enable line number highlighting |g:ale_sign_highlight_linenrs| must be set to `1` before ALE is loaded. @@ -2374,11 +2380,13 @@ g:ale_virtualtext_cursor *g:ale_virtualtext_cursor* highlights for configuring ALE's virtualtext messages can be configured with custom highlight groups: - |ALEVirtualTextError| - Items with `'type': 'E'` - |ALEVirtualTextWarning| - Items with `'type': 'W'` - |ALEVirtualTextInfo| - Items with `'type': 'I'` - |ALEVirtualTextStyleError| - Items with `'type': 'E'` and `'sub_type': 'style'` - |ALEVirtualTextStyleWarning| - Items with `'type': 'W'` and `'sub_type': 'style'` + ALEVirtualTextError items with `'type': 'E'` |hl-ALEVirtualTextError| + ALEVirtualTextWarning items with `'type': 'W'` |hl-ALEVirtualTextWarning| + ALEVirtualTextInfo items with `'type': 'I'` |hl-ALEVirtualTextInfo| + ALEVirtualTextStyleError items with `'type': 'E'` and + `'sub_type': 'style'` |hl-ALEVirtualTextStyleError| + ALEVirtualTextStyleWarning items with `'type': 'W'` and + `'sub_type': 'style'` |hl-ALEVirtualTextStyleWarning| g:ale_virtualtext_delay *g:ale_virtualtext_delay* @@ -2404,16 +2412,16 @@ g:ale_virtualtext_prefix *g:ale_virtualtext_prefix* Prefix to be used with |g:ale_virtualtext_cursor|. - This setting can be changed in each buffer with `b:ale_virtualtext_prefix`. + This setting can be changed in each buffer with |b:ale_virtualtext_prefix||. All of the same format markers used for |g:ale_echo_msg_format| can be used for defining the prefix, including some additional sequences of characters. `%comment%` - replaced with comment characters in the current language - ALE will read the comment characters from |&commentstring|, reading only the + ALE will read the comment characters from 'commentstring', reading only the part before `%s`, with whitespace trimmed. If comment syntax cannot be - pulled from |&commentstring|, ALE will default to `'#'`. + pulled from 'commentstring', ALE will default to `'#'`. g:ale_virtualtext_column *g:ale_virtualtext_column* @@ -2516,14 +2524,14 @@ g:ale_windows_node_executable_path *g:ale_windows_node_executable_path* ------------------------------------------------------------------------------- 6.1. Highlights *ale-highlights* -ALEError *ALEError* +ALEError *hl-ALEError* Default: `highlight link ALEError SpellBad` The highlight for highlighted errors. See |g:ale_set_highlights|. -ALEErrorLine *ALEErrorLine* +ALEErrorLine *hl-ALEErrorLine* Default: Undefined @@ -2533,14 +2541,14 @@ ALEErrorLine *ALEErrorLine* See |g:ale_set_signs| and |g:ale_set_highlights|. -ALEErrorSign *ALEErrorSign* +ALEErrorSign *hl-ALEErrorSign* Default: `highlight link ALEErrorSign error` The highlight for error signs. See |g:ale_set_signs|. -ALEErrorSignLineNr *ALEErrorSignLineNr* +ALEErrorSignLineNr *hl-ALEErrorSignLineNr* Default: `highlight link ALEErrorSignLineNr CursorLineNr` @@ -2549,21 +2557,21 @@ ALEErrorSignLineNr *ALEErrorSignLineNr* NOTE: This highlight is only available on Neovim 0.3.2 or higher. -ALEInfo *ALEInfo.* +ALEInfo *hl-ALEInfo* *ALEInfo-highlight* Default: `highlight link ALEInfo ALEWarning` The highlight for highlighted info messages. See |g:ale_set_highlights|. -ALEInfoSign *ALEInfoSign* +ALEInfoSign *hl-ALEInfoSign* Default: `highlight link ALEInfoSign ALEWarningSign` The highlight for info message signs. See |g:ale_set_signs|. -ALEInfoLine *ALEInfoLine* +ALEInfoLine *hl-ALEInfoLine* Default: Undefined @@ -2573,7 +2581,7 @@ ALEInfoLine *ALEInfoLine* See |g:ale_set_signs| and |g:ale_set_highlights|. -ALEInfoSignLineNr *ALEInfoSignLineNr* +ALEInfoSignLineNr *hl-ALEInfoSignLineNr* Default: `highlight link ALEInfoSignLineNr CursorLineNr` @@ -2582,21 +2590,21 @@ ALEInfoSignLineNr *ALEInfoSignLineNr* NOTE: This highlight is only available on Neovim 0.3.2 or higher. -ALEStyleError *ALEStyleError* +ALEStyleError *hl-ALEStyleError* Default: `highlight link ALEStyleError ALEError` The highlight for highlighted style errors. See |g:ale_set_highlights|. -ALEStyleErrorSign *ALEStyleErrorSign* +ALEStyleErrorSign *hl-ALEStyleErrorSign* Default: `highlight link ALEStyleErrorSign ALEErrorSign` The highlight for style error signs. See |g:ale_set_signs|. -ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr* +ALEStyleErrorSignLineNr *hl-ALEStyleErrorSignLineNr* Default: `highlight link ALEStyleErrorSignLineNr CursorLineNr` @@ -2605,21 +2613,21 @@ ALEStyleErrorSignLineNr *ALEStyleErrorSignLineNr* NOTE: This highlight is only available on Neovim 0.3.2 or higher. -ALEStyleWarning *ALEStyleWarning* +ALEStyleWarning *hl-ALEStyleWarning* Default: `highlight link ALEStyleWarning ALEError` The highlight for highlighted style warnings. See |g:ale_set_highlights|. -ALEStyleWarningSign *ALEStyleWarningSign* +ALEStyleWarningSign *hl-ALEStyleWarningSign* Default: `highlight link ALEStyleWarningSign ALEWarningSign` The highlight for style warning signs. See |g:ale_set_signs|. -ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr* +ALEStyleWarningSignLineNr *hl-ALEStyleWarningSignLineNr* Default: `highlight link ALEStyleWarningSignLineNr CursorLineNr` @@ -2628,49 +2636,49 @@ ALEStyleWarningSignLineNr *ALEStyleWarningSignLineNr* NOTE: This highlight is only available on Neovim 0.3.2 or higher. -ALEVirtualTextError *ALEVirtualTextError* +ALEVirtualTextError *hl-ALEVirtualTextError* Default: `highlight link ALEVirtualTextError Comment` The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. -ALEVirtualTextInfo *ALEVirtualTextInfo* +ALEVirtualTextInfo *hl-ALEVirtualTextInfo* Default: `highlight link ALEVirtualTextInfo ALEVirtualTextWarning` The highlight for virtualtext info. See |g:ale_virtualtext_cursor|. -ALEVirtualTextStyleError *ALEVirtualTextStyleError* +ALEVirtualTextStyleError *hl-ALEVirtualTextStyleError* Default: `highlight link ALEVirtualTextStyleError ALEVirtualTextError` The highlight for virtualtext style errors. See |g:ale_virtualtext_cursor|. -ALEVirtualTextStyleWarning *ALEVirtualTextStyleWarning* +ALEVirtualTextStyleWarning *hl-ALEVirtualTextStyleWarning* Default: `highlight link ALEVirtualTextStyleWarning ALEVirtualTextWarning` The highlight for virtualtext style warnings. See |g:ale_virtualtext_cursor|. -ALEVirtualTextWarning *ALEVirtualTextWarning* +ALEVirtualTextWarning *hl-ALEVirtualTextWarning* Default: `highlight link ALEVirtualTextWarning Comment` The highlight for virtualtext errors. See |g:ale_virtualtext_cursor|. -ALEWarning *ALEWarning* +ALEWarning *hl-ALEWarning* Default: `highlight link ALEWarning SpellCap` The highlight for highlighted warnings. See |g:ale_set_highlights|. -ALEWarningLine *ALEWarningLine* +ALEWarningLine *hl-ALEWarningLine* Default: Undefined @@ -2680,14 +2688,14 @@ ALEWarningLine *ALEWarningLine* See |g:ale_set_signs| and |g:ale_set_highlights|. -ALEWarningSign *ALEWarningSign* +ALEWarningSign *hl-ALEWarningSign* Default: `highlight link ALEWarningSign todo` The highlight for warning signs. See |g:ale_set_signs|. -ALEWarningSignLineNr *ALEWarningSignLineNr* +ALEWarningSignLineNr *hl-ALEWarningSignLineNr* Default: `highlight link ALEWarningSignLineNr CursorLineNr` @@ -2702,8 +2710,8 @@ ALEWarningSignLineNr *ALEWarningSignLineNr* Linter and fixer options are documented below and in individual help files. Every option for programs can be set globally, or individually for each -buffer. For example, `b:ale_python_flake8_executable` will override any -values set for `g:ale_python_flake8_executable`. +buffer. For example, |b:ale_python_flake8_executable| will override any +values set for |g:ale_python_flake8_executable|. *ale-integrations-local-executables* @@ -2890,6 +2898,7 @@ documented in additional help files. ansible-language-server...............|ale-ansible-language-server| ansible-lint..........................|ale-ansible-ansible-lint| apkbuild................................|ale-apkbuild-options| + apkbuild-fixer........................|ale-apkbuild-apkbuild-fixer| apkbuild-lint.........................|ale-apkbuild-apkbuild-lint| secfixes-check........................|ale-apkbuild-secfixes-check| asciidoc................................|ale-asciidoc-options| @@ -2938,6 +2947,7 @@ documented in additional help files. foodcritic............................|ale-chef-foodcritic| clojure.................................|ale-clojure-options| clj-kondo.............................|ale-clojure-clj-kondo| + cljfmt................................|ale-clojure-cljfmt| joker.................................|ale-clojure-joker| cloudformation..........................|ale-cloudformation-options| cfn-python-lint.......................|ale-cloudformation-cfn-python-lint| @@ -2979,6 +2989,8 @@ documented in additional help files. clang-format..........................|ale-cuda-clangformat| clangd................................|ale-cuda-clangd| nvcc..................................|ale-cuda-nvcc| + c3......................................|ale-c3-options| + c3lsp.................................|ale-c3-c3lsp| d.......................................|ale-d-options| dfmt..................................|ale-d-dfmt| dls...................................|ale-d-dls| @@ -3016,6 +3028,7 @@ documented in additional help files. erlang..................................|ale-erlang-options| dialyzer..............................|ale-erlang-dialyzer| elvis.................................|ale-erlang-elvis| + erlang-mode...........................|ale-erlang-erlang-mode| erlang_ls.............................|ale-erlang-erlang_ls| erlc..................................|ale-erlang-erlc| erlfmt................................|ale-erlang-erlfmt| @@ -3146,6 +3159,7 @@ documented in additional help files. dprint................................|ale-json-dprint| eslint................................|ale-json-eslint| fixjson...............................|ale-json-fixjson| + pytool................................|ale-json-pytool| jsonlint..............................|ale-json-jsonlint| jq....................................|ale-json-jq| prettier..............................|ale-json-prettier| @@ -3507,6 +3521,7 @@ documented in additional help files. yamlfmt...............................|ale-yaml-yamlfmt| yamllint..............................|ale-yaml-yamllint| gitlablint............................|ale-yaml-gitlablint| + yq....................................|ale-yaml-yq| yang....................................|ale-yang-options| yang-lsp..............................|ale-yang-lsp| zeek....................................|ale-zeek-options| @@ -3519,7 +3534,7 @@ documented in additional help files. =============================================================================== 8. Commands/Keybinds *ale-commands* -ALEComplete *ALEComplete* +:ALEComplete *:ALEComplete* Manually trigger LSP autocomplete and show the menu. Works only when called from insert mode. > @@ -3530,9 +3545,9 @@ ALEComplete *ALEComplete* imap (ale_complete) < -ALEDocumentation *ALEDocumentation* +:ALEDocumentation *:ALEDocumentation* - Similar to the |ALEHover| command, retrieve documentation information for + Similar to the `:ALEHover` command, retrieve documentation information for the symbol at the cursor. Documentation data will always be shown in a preview window, no matter how small the documentation content is. @@ -3541,14 +3556,14 @@ ALEDocumentation *ALEDocumentation* A plug mapping `(ale_documentation)` is defined for this command. -ALEFindReferences *ALEFindReferences* +:ALEFindReferences *:ALEFindReferences* Find references in the codebase for the symbol under the cursor using the enabled LSP linters for the buffer. ALE will display a preview window containing the results if some references are found. The window can be navigated using the usual Vim navigation commands. The - Enter key (``) can be used to jump to a referencing location, or the `t` + Enter key () can be used to jump to a referencing location, or the `t` key can be used to jump to the location in a new tab. The locations opened in different ways using the following variations. @@ -3564,7 +3579,7 @@ ALEFindReferences *ALEFindReferences* 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. - The selection can be opened again with the |ALERepeatSelection| command. + The selection can be opened again with the `:ALERepeatSelection` command. You can jump back to the position you were at before going to a reference of something with jump motions like CTRL-O. See |jump-motions|. @@ -3576,7 +3591,7 @@ ALEFindReferences *ALEFindReferences* nnoremap (my_mapping) :ALEFindReferences -relative < -ALEFix *ALEFix* +:ALEFix [linter] *:ALEFix* Fix problems with the current buffer. See |ale-fix| for more information. @@ -3587,14 +3602,14 @@ ALEFix *ALEFix* A plug mapping `(ale_fix)` is defined for this command. -ALEFixSuggest *ALEFixSuggest* +:ALEFixSuggest *:ALEFixSuggest* Suggest tools that can be used to fix problems in the current buffer. See |ale-fix| for more information. -ALEGoToDefinition `` *ALEGoToDefinition* +:ALEGoToDefinition [options] *:ALEGoToDefinition* Jump to the definition of a symbol under the cursor using the enabled LSP linters for the buffer. ALE will jump to a definition if an LSP server @@ -3625,9 +3640,9 @@ ALEGoToDefinition `` *ALEGoToDefinition* `(ale_go_to_definition_in_vsplit)` - `:ALEGoToDefinition -vsplit` -ALEGoToTypeDefinition *ALEGoToTypeDefinition* +:ALEGoToTypeDefinition [options] *:ALEGoToTypeDefinition* - This works similar to |ALEGoToDefinition| but instead jumps to the + This works similar to `:ALEGoToDefinition` but instead jumps to the definition of a type of a symbol under the cursor. ALE will jump to a definition if an LSP server provides a location to jump to. Otherwise, ALE will do nothing. @@ -3653,9 +3668,9 @@ ALEGoToTypeDefinition *ALEGoToTypeDefinition* `(ale_go_to_type_definition_in_vsplit)` - `:ALEGoToTypeDefinition -vsplit` -ALEGoToImplementation *ALEGoToImplementation* +:ALEGoToImplementation [options] *:ALEGoToImplementation* - This works similar to |ALEGoToDefinition| but instead jumps to the + This works similar to `:ALEGoToDefinition` but instead jumps to the implementation of symbol under the cursor. ALE will jump to a definition if an LSP server provides a location to jump to. Otherwise, ALE will do nothing. @@ -3680,7 +3695,7 @@ ALEGoToImplementation *ALEGoToImplementation* `(ale_go_to_implementation_in_vsplit)` - `:ALEGoToImplementation -vsplit` -ALEHover *ALEHover* +:ALEHover *:ALEHover* Print brief information about the symbol under the cursor, taken from any available LSP linters. There may be a small non-blocking delay before @@ -3693,7 +3708,7 @@ ALEHover *ALEHover* A plug mapping `(ale_hover)` is defined for this command. -ALEImport *ALEImport* +:ALEImport *:ALEImport* Try to import a symbol using `tsserver` or a Language Server. @@ -3710,12 +3725,12 @@ ALEImport *ALEImport* mapping should only be bound for normal mode. -ALEOrganizeImports *ALEOrganizeImports* +:ALEOrganizeImports *:ALEOrganizeImports* Organize imports using tsserver. Currently not implemented for LSPs. -ALERename *ALERename* +:ALERename *:ALERename* Rename a symbol using `tsserver` or a Language Server. @@ -3723,15 +3738,15 @@ ALERename *ALERename* prompt will open to request a new name. The rename operation will not save modified buffers when 'hidden' is on - unless |g:ale_save_hidden| is `1`. + unless |g:ale_save_hidden| is 1. -ALEFileRename *ALEFileRename* +:ALEFileRename *:ALEFileRename* Rename a file and fix imports using `tsserver`. -ALECodeAction *ALECodeAction* +:ALECodeAction *:ALECodeAction* Apply a code action via LSP servers or `tsserver`. @@ -3743,12 +3758,12 @@ ALECodeAction *ALECodeAction* refactors. A menu will be shown to select code action to apply. -ALERepeatSelection *ALERepeatSelection* +:ALERepeatSelection *:ALERepeatSelection* Repeat the last selection displayed in the preview window. -ALESymbolSearch `` *ALESymbolSearch* +:ALESymbolSearch [query] *:ALESymbolSearch* Search for symbols in the workspace, taken from any available LSP linters. @@ -3758,8 +3773,8 @@ ALESymbolSearch `` *ALESymbolSearch* You can add `-relative` to the command to view results with relatives paths, instead of absolute paths. - *:ALELint* -ALELint *ALELint* + +:ALELint *:ALELint* Run ALE once for the current buffer. This command can be used to run ALE manually, instead of automatically, if desired. @@ -3770,15 +3785,15 @@ ALELint *ALELint* A plug mapping `(ale_lint)` is defined for this command. -ALELintStop *ALELintStop* +:ALELintStop *:ALELintStop* Stop any currently running jobs for checking the current buffer. Any problems from previous linter results will continue to be shown. -ALEPopulateQuickfix *ALEPopulateQuickfix* -ALEPopulateLocList *ALEPopulateLocList* +:ALEPopulateQuickfix *:ALEPopulateQuickfix* +:ALEPopulateLocList *:ALEPopulateLocList* Manually populate the |quickfix| or |location-list| and show the corresponding list. Useful when you have other uses for both the |quickfix| @@ -3791,23 +3806,23 @@ ALEPopulateLocList *ALEPopulateLocList* With these settings, ALE will still run checking and display it with signs, highlighting, and other output described in |ale-lint-file-linters|. -ALEPrevious *ALEPrevious* -ALEPreviousWrap *ALEPreviousWrap* -ALENext *ALENext* -ALENextWrap *ALENextWrap* -ALEFirst *ALEFirst* -ALELast *ALELast* +:ALEPrevious *:ALEPrevious* +:ALEPreviousWrap *:ALEPreviousWrap* +:ALENext *:ALENext* +:ALENextWrap *:ALENextWrap* +:ALEFirst *:ALEFirst* +:ALELast *:ALELast* *ale-navigation-commands* Move between warnings or errors in a buffer. ALE will only navigate between the errors or warnings it generated, even if both |g:ale_set_quickfix| and |g:ale_set_loclist| are set to `0`. - `ALEPrevious` and `ALENext` will stop at the top and bottom of a file, while - `ALEPreviousWrap` and `ALENextWrap` will wrap around the file to find + `:ALEPrevious` and `:ALENext` will stop at the top and bottom of a file, while + `:ALEPreviousWrap` and `:ALENextWrap` will wrap around the file to find the last or first warning or error in the file, respectively. - `ALEPrevious` and `ALENext` take optional flags arguments to custom their + `:ALEPrevious` and `:ALENext` take optional flags arguments to custom their behavior : `-wrap` enable wrapping around the file `-error`, `-warning` and `-info` enable jumping to errors, warnings or infos @@ -3821,7 +3836,7 @@ ALELast *ALELast* ":ALENext -wrap -error -nosyle" to jump to the next error which is not a style error while going back to the beginning of the file if needed. - `ALEFirst` goes to the first error or warning in the buffer, while `ALELast` + `:ALEFirst` goes to the first error or warning in the buffer, while `:ALELast` goes to the last one. The following || mappings are defined for the commands: > @@ -3840,8 +3855,8 @@ ALELast *ALELast* (ale_first) - ALEFirst (ale_last) - ALELast < - For example, these commands could be bound to the keys Ctrl + j - and Ctrl + k: > + For example, these commands could be bound to the keys CTRL-j + and CTRL-k: > " Map movement through errors without wrapping. nmap (ale_previous) @@ -3851,23 +3866,23 @@ ALELast *ALELast* nmap (ale_next_wrap) < -ALEToggle *ALEToggle* -ALEEnable *ALEEnable* -ALEDisable *ALEDisable* -ALEToggleBuffer *ALEToggleBuffer* -ALEEnableBuffer *ALEEnableBuffer* -ALEDisableBuffer *ALEDisableBuffer* +:ALEToggle *:ALEToggle* +:ALEEnable *:ALEEnable* +:ALEDisable *:ALEDisable* +:ALEToggleBuffer *:ALEToggleBuffer* +:ALEEnableBuffer *:ALEEnableBuffer* +:ALEDisableBuffer *:ALEDisableBuffer* - `ALEToggle`, `ALEEnable`, and `ALEDisable` enable or disable ALE linting, + `:ALEToggle`, `:ALEEnable`, and `:ALEDisable` enable or disable ALE linting, including all of its autocmd events, loclist items, quickfix items, signs, current jobs, etc., globally. Executing any of these commands will change the |g:ale_enabled| variable. ALE can be disabled or enabled for only a single buffer with - `ALEToggleBuffer`, `ALEEnableBuffer`, and `ALEDisableBuffer`. Disabling ALE + `:ALEToggleBuffer`, `:ALEEnableBuffer`, and `:ALEDisableBuffer`. Disabling ALE for a buffer will not remove autocmd events, but will prevent ALE from checking for problems and reporting problems for whatever buffer the - `ALEDisableBuffer` or `ALEToggleBuffer` command is executed from. These + `:ALEDisableBuffer` or `:ALEToggleBuffer` command is executed from. These commands can be used for temporarily disabling ALE for a buffer. These commands will modify the |b:ale_enabled| variable. @@ -3877,18 +3892,18 @@ ALEDisableBuffer *ALEDisableBuffer* The following plug mappings are defined, for conveniently defining keybinds: - |ALEToggle| - `(ale_toggle)` - |ALEEnable| - `(ale_enable)` - |ALEDisable| - `(ale_disable)` - |ALEToggleBuffer| - `(ale_toggle_buffer)` - |ALEEnableBuffer| - `(ale_enable_buffer)` - |ALEDisableBuffer| - `(ale_disable_buffer)` + `:ALEToggle` - `(ale_toggle)` + `:ALEEnable` - `(ale_enable)` + `:ALEDisable` - `(ale_disable)` + `:ALEToggleBuffer` - `(ale_toggle_buffer)` + `:ALEEnableBuffer` - `(ale_enable_buffer)` + `:ALEDisableBuffer` - `(ale_disable_buffer)` For removing problems reported by ALE, but leaving ALE enabled, see - |ALEReset| and |ALEResetBuffer|. + `:ALEReset` and `:ALEResetBuffer`. - *:ALEDetail* -ALEDetail *ALEDetail* + +:ALEDetail *:ALEDetail* Show the full linter message for the problem nearest to the cursor on the given line in the preview window. The preview window can be easily closed @@ -3901,9 +3916,8 @@ ALEDetail *ALEDetail* A plug mapping `(ale_detail)` is defined for this command. - *:ALEInfo* -ALEInfo *ALEInfo* - *ALEInfoToFile* +:ALEInfo *:ALEInfo* + *:ALEInfoToFile* Print runtime information about ALE, including the values of global and buffer-local settings for ALE, the linters that are enabled, the commands @@ -3928,39 +3942,39 @@ ALEInfo *ALEInfo* `ale-info` filetype. `:ALEInfoToFile` will write the ALE runtime information to a given filename. - The filename works just like |:w|. + The filename works just like `:write`. -ALEReset *ALEReset* -ALEResetBuffer *ALEResetBuffer* +:ALEReset *:ALEReset* +:ALEResetBuffer *:ALEResetBuffer* - `ALEReset` will remove all problems reported by ALE for all buffers. - `ALEResetBuffer` will remove all problems reported for a single buffer. + `:ALEReset` will remove all problems reported by ALE for all buffers. + `:ALEResetBuffer` will remove all problems reported for a single buffer. Either command will leave ALE linting enabled, so ALE will report problems when linting is performed again. See |ale-lint| for more information. The following plug mappings are defined, for conveniently defining keybinds: - |ALEReset| - `(ale_reset)` - |ALEResetBuffer| - `(ale_reset_buffer)` + `:ALEReset` - `(ale_reset)` + `:ALEResetBuffer` - `(ale_reset_buffer)` - ALE can be disabled globally or for a buffer with |ALEDisable| or - |ALEDisableBuffer|. + ALE can be disabled globally or for a buffer with `:ALEDisable` or + `:ALEDisableBuffer`. -ALEStopAllLSPs *ALEStopAllLSPs* +:ALEStopAllLSPs *:ALEStopAllLSPs* - `ALEStopAllLSPs` will close and stop all channels and jobs for all LSP-like + `:ALEStopAllLSPs` will close and stop all channels and jobs for all LSP-like clients, including tsserver, remove all of the data stored for them, and delete all of the problems found for them, updating every linted buffer. This command can be used when LSP clients mess up and need to be restarted. -ALEStopLSP `linter_name` *ALEStopLSP* +:ALEStopLSP [linter] *:ALEStopLSP* - `ALEStopLSP` will stop a specific language server with a given linter name. + `:ALEStopLSP` will stop a specific language server with a given linter name. Completion is supported for currently running language servers. All language servers with the given name will be stopped across all buffers for all projects. @@ -4264,7 +4278,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* |setqflist()|. The |List| will be sorted by line and then column order so it can be searched with a binary search by in future before being passed on to the - |loclist|, etc. + |location-list|, etc. This argument is required, unless the linter is an LSP linter. In which case, this argument must not be @@ -4280,17 +4294,17 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* *ale-loclist-format* `text` - This error message is required. `detail` - An optional, more descriptive message. - This message can be displayed with the |ALEDetail| + This message can be displayed with the `:ALEDetail` command instead of the message for `text`, if set. `lnum` - The line number is required. Any strings will be automatically converted to numbers by - using `str2nr()`. + using |str2nr()|. Line 0 will be moved to line 1, and lines beyond the end of the file will be moved to the end. `col` - The column number is optional and will default to `0`. Any strings will be automatically - converted to number using `str2nr()`. + converted to number using |str2nr()|. `end_col` - An optional end column number. This key can be set to specify the column problems end on, for improved highlighting. @@ -4314,7 +4328,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* and have been checked at least once. Temporary files in directories used for Vim - temporary files with `tempname()` will be assumed + temporary files with |tempname()| will be assumed to be the buffer being checked, unless the `bufnr` key is also set with a valid number for some other buffer. @@ -4418,7 +4432,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* run only when events occur against the file on disk, including |g:ale_lint_on_enter| and |g:ale_lint_on_save|. Linters where this option - evaluates to `1` will also be run when the |ALELint| + evaluates to `1` will also be run when the `:ALELint` command is run. When this option is evaluates to `1`, ALE will behave @@ -4586,7 +4600,7 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()* ale_linters//.vim < - Any linters which exist anywhere in |runtimepath| with that directory + Any linters which exist anywhere in 'runtimepath' with that directory structure will be automatically loaded for the matching |filetype|. Filetypes containing `.` characters will be split into individual parts, and files will be loaded for each filetype between the `.` characters. @@ -4728,7 +4742,7 @@ ALECompletePost *ALECompletePost-autocmd* This |User| autocmd is triggered after ALE inserts an item on |CompleteDone|. This event can be used to run commands after a buffer - is changed by ALE as the result of completion. For example, |ALEFix| can + is changed by ALE as the result of completion. For example, `:ALEFix` can be configured to run automatically when completion is done: > augroup FixAfterComplete diff --git a/sources_non_forked/ale/supported-tools.md b/sources_non_forked/ale/supported-tools.md index f49b5a02..5f8efde7 100644 --- a/sources_non_forked/ale/supported-tools.md +++ b/sources_non_forked/ale/supported-tools.md @@ -32,6 +32,7 @@ formatting. * API Blueprint * [drafter](https://github.com/apiaryio/drafter) * APKBUILD + * [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 @@ -113,6 +114,8 @@ formatting. * [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) * Cairo * [scarb](https://docs.swmansion.com/scarb/) :floppy_disk: * [starknet](https://starknet.io/docs) @@ -121,6 +124,7 @@ formatting. * [foodcritic](http://www.foodcritic.io/) :floppy_disk: * Clojure * [clj-kondo](https://github.com/borkdude/clj-kondo) + * [cljfmt](https://github.com/weavejester/cljfmt) * [joker](https://github.com/candid82/joker) * CloudFormation * [cfn-python-lint](https://github.com/awslabs/cfn-python-lint) @@ -200,6 +204,7 @@ 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) * [erlang_ls](https://github.com/erlang-ls/erlang_ls) * [erlc](http://erlang.org/doc/man/erlc.html) * [erlfmt](https://github.com/WhatsApp/erlfmt) @@ -333,6 +338,7 @@ formatting. * [eslint](http://eslint.org/) :warning: * [fixjson](https://github.com/rhysd/fixjson) * [jq](https://stedolan.github.io/jq/) :warning: + * [json.tool](https://docs.python.org/3/library/json.html#module-json.tool) :warning: * [jsonlint](https://github.com/zaach/jsonlint) * [prettier](https://github.com/prettier/prettier) * [spectral](https://github.com/stoplightio/spectral) @@ -736,6 +742,7 @@ formatting. * [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) * Zeek diff --git a/sources_non_forked/bufexplorer/.gitignore b/sources_non_forked/bufexplorer/.gitignore index 0d0e6876..31b8ec55 100644 --- a/sources_non_forked/bufexplorer/.gitignore +++ b/sources_non_forked/bufexplorer/.gitignore @@ -8,3 +8,5 @@ tags # Github token. github_token +# goreleaser dist directory. +dist/ diff --git a/sources_non_forked/bufexplorer/.goreleaser.yaml b/sources_non_forked/bufexplorer/.goreleaser.yaml deleted file mode 100644 index 4a1fa1cc..00000000 --- a/sources_non_forked/bufexplorer/.goreleaser.yaml +++ /dev/null @@ -1,54 +0,0 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com - -# The lines below are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/need to use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj - -#version: 1 - -env_files: - # GoReleaser requires an API token with the 'repo' scope selected to deploy - # the artifacts to GitHub. You can create one here - # https://github.com/settings/tokens/new. - github_token: ./github_token - -#before: -# hooks: -# # You may remove this if you don't use go modules. -# - go mod tidy -# # you may remove this if you don't need go generate -# - go generate ./... - -builds: - - skip: true - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives - format_overrides: - - goos: windows - format: zip - -checksum: - name_template: 'checksums.txt' - -snapshot: - name_template: '{{ .Tag }}-next' - -changelog: - use: github-native - sort: asc - -release: - draft: false - replace_existing_draft: true diff --git a/sources_non_forked/bufexplorer/README.md b/sources_non_forked/bufexplorer/README.md index aa1fa658..a6206957 100644 --- a/sources_non_forked/bufexplorer/README.md +++ b/sources_non_forked/bufexplorer/README.md @@ -1,5 +1,6 @@ -bufexplorer -=========== +# bufexplorer + +--- BufExplorer Plugin for Vim @@ -13,28 +14,35 @@ With bufexplorer, you can quickly and easily switch between buffers by using the `\bv` force vertical split open - Once the bufexplorer window is open you can use the normal movement keys (hjkl) to move around and then use `` or `` to select the buffer you would like to open. If you would like to have the selected buffer opened in a new tab, simply press either `` or `t`. Please note that when opening a buffer in a tab, that if the buffer is already in another tab, bufexplorer can switch to that tab automatically for you if you would like. More about that in the supplied VIM help. Bufexplorer also offers various options including: + - Display the list of buffers in various sort orders including: - - Most Recently Used (MRU) which is the default - - Buffer number - - File name - - File extension - - Full file path name + - Most Recently Used (MRU) which is the default + - Buffer number + - File name + - File extension + - Full file path name - Delete buffer from list For more about options, sort orders, configuration options, etc. please see the supplied VIM help. +In this example, the `` key is assigned to [Space]. + +![ScreenToGif](https://github.com/user-attachments/assets/ae5422b9-59ac-4657-aab5-30e6eb8a3243) + ## vim.org + This plugin can also be found at http://www.vim.org/scripts/script.php?script_id=42. ## Installation + ### Manually + 1. If you do not want to use one of the the bundle handlers, you can take the zip file from vim.org and unzip it and copy the plugin to your vimfiles\plugin - directory and the txt file to your vimfiles\doc directory. If you do that, + directory and the txt file to your vimfiles\doc directory. If you do that, make sure you generate the help by executing `:helptag /doc` @@ -43,47 +51,52 @@ This plugin can also be found at http://www.vim.org/scripts/script.php?script_id `:help bufexplorer`. ### Vundle (https://github.com/gmarik/Vundle.vim) -1. Add the following configuration to your `.vimrc`. + +1. Add the following configuration to your `.vimrc`. Plugin 'jlanzarotta/bufexplorer' -2. Install with `:BundleInstall`. +2. Install with `:BundleInstall`. ### NeoBundle (https://github.com/Shougo/neobundle.vim) -1. Add the following configuration to your `.vimrc`. + +1. Add the following configuration to your `.vimrc`. NeoBundle 'jlanzarotta/bufexplorer' -2. Install with `:NeoBundleInstall`. +2. Install with `:NeoBundleInstall`. ### Plug (https://github.com/junegunn/vim-plug) -1. Add the following configuration to your `.vimrc`. + +1. Add the following configuration to your `.vimrc`. Plug 'jlanzarotta/bufexplorer' -2. Install with `:PlugInstall`. +2. Install with `:PlugInstall`. ### Pathogen -1. Install with the following command. + +1. Install with the following command. git clone https://github.com/jlanzarotta/bufexplorer.git ~/.vim/bundle/bufexplorer.vim ## License -Copyright (c) 2001-2023, Jeff Lanzarotta + +Copyright (c) 2001-2025, Jeff Lanzarotta All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this +- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, this +- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the {organization} nor the names of its +- Neither the name of the {organization} nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/sources_non_forked/bufexplorer/doc/bufexplorer.txt b/sources_non_forked/bufexplorer/doc/bufexplorer.txt index 6f82611e..e66d4555 100644 --- a/sources_non_forked/bufexplorer/doc/bufexplorer.txt +++ b/sources_non_forked/bufexplorer/doc/bufexplorer.txt @@ -1,7 +1,7 @@ -*bufexplorer.txt* Buffer Explorer Last Change: 13 Aug 2024 +*bufexplorer.txt* Buffer Explorer Last Change: 17 Feb 2025 Buffer Explorer *buffer-explorer* *bufexplorer* - Version 7.4.27 + Version 7.6.0 Plugin for easily exploring (or browsing) Vim|:buffers|. @@ -26,7 +26,7 @@ To install: - Download the bufexplorer.zip from one of the following places: https://github.com/jlanzarotta/bufexplorer http://www.vim.org/scripts/script.php?script_id=42 - or use a package manager like Vundle. + or use a package manager like vim-plug, Vundle, etc.. - Extract the zip archive into your runtime directory. The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt. - Start Vim or goto an existing instance of Vim. @@ -254,6 +254,12 @@ To control the size of the new vertical split window, use: > let g:bufExplorerSplitVertSize=0 " New split windows size set by Vim. The default is 0, so that the size is set by Vim. + *g:bufExplorerShowTerminal* +To control whether terminal buffers are displayed in BufExplorer, use: > + let g:bufExplorerShowTerminal=1 " Show terminal buffers. + let g:bufExplorerShowTerminal=0 " Don't show terminal buffers. +The default is 1, to show the terminal buffers. + *g:bufExplorerVersionWarn* To control whether to warning about Vim version or not, use: > let g:bufExplorerVersionWarn=1 " Warn if version conflict. @@ -263,6 +269,59 @@ The default is 1. =============================================================================== CHANGE LOG *bufexplorer-changelog* +7.6.0 February 17, 2025 + What's Changed + - Another Major patch implemented by Dr. Michael Henry. + https://github.com/jlanzarotta/bufexplorer/pull/119 + * Sorting by fullname now depends only on the buffer's absolute path + using a new sorting mechanism. Other sort modes have been converted to + use this mechanism as well. + * Display of directory buffers is now suppressed when + g:bufExplorerShowDirectories == 0 as described in the BufExplorer + documentation. + * Path calculations for the elements in s:types have been normalized. + fullpath now has simplify() applied to normalize paths like + dir/../file. Trailing path separators for directories have been + removed. The shortname for directories has been + eliminated; instead, the directory's basename is used as is done for + files (except for root directories, where the trailing path separator + cannot be removed; a shortname of . is used for this case). A new + element, homepath, has been added to s.types; this is fullpath + shortened for paths in $HOME and without the trailing path separator. + Other displayable paths (path, relativepath, relativename) are + similarly shortened for paths in $HOME. + * Textual substitution of $HOME -> ~ in paths has been eliminated. This + substitution could occur anywhere in the path, not just at the start, + causing undesirable anomalies. Shortening for paths in $HOME is now + done via homename and associated variables from s:types. + * If the devicons plugin is installed, a buffer's buf.isdir status has + been added as a parameter passed to that plugin, allowing the plugin + to supply a directory icon for buffer directories. + * Avoid calculating buffer details until they are needed for display. + Users who don't want to see unlisted buffers shouldn't have to pay + for the expensive work of calculating buffer details for unlisted + buffers, only to have that information ignored. This resolves + bufexplorer is slow to open with many unlisted buffers. + https://github.com/jlanzarotta/bufexplorer/issues/20 +7.5.0 February 16, 2025 + What's Changed + - Major patch implemented by Dr. Michael Henry. + https://github.com/jlanzarotta/bufexplorer/pull/118 + Significant rework and restructuring of the s:SelectBuffer() method to + demonstrate behaviors described in Github issue #117. + https://github.com/jlanzarotta/bufexplorer/issues/117 + This patch includes fixes which also resolves: + - Github issue #81. Previous buffer duplicated in split after openning + new buffer in tab. + https://github.com/jlanzarotta/bufexplorer/issues/81 + - Github issue #65. bv plus t does weird things. + https://github.com/jlanzarotta/bufexplorer/issues/65 + - Github issue #52. Find Active Window not working as expected. + https://github.com/jlanzarotta/bufexplorer/issues/52 +7.4.28 November 5, 2024 + - Thanks to GitHub user jsvia, for the addition of the new + bufExplorerShowTerminal feature. Please refer to the documentation + for complete information. 7.4.27 May 30, 2024 - Thanks to GitHub user NotNormallyAGitUser, for the recommendation to change the display of the relative path to replace $HOME with "~". diff --git a/sources_non_forked/bufexplorer/how_to_release.txt b/sources_non_forked/bufexplorer/how_to_release.txt index f3f565d8..8d1d08d3 100644 --- a/sources_non_forked/bufexplorer/how_to_release.txt +++ b/sources_non_forked/bufexplorer/how_to_release.txt @@ -1,16 +1,17 @@ -https://goreleaser.com/quick-start/ - To make a release... -1. Make changes. -2. Commit and push changes. -3. git tag -a v7.4.27 -m "Release v7.4.27." -4. git push origin v7.4.27 -5. goreleaser release --clean -6. Go to github and make the release. +1. Make changes +2. Commit and push changes +3. git tag -a 7.4.28 -m "Release 7.4.28" +4. git push origin 7.4.28 +5. set GH_TOKEN environment variable +6. 7z a bufexplorer-7.4.28.zip plugin\bufexplorer.vim doc\bufexplorer.txt +7. gh release create 7.4.28 --notes-from-tag bufexplorer-7.4.28.zip If something happens and the tag is messed up, you will need to delete the local and remote tag and release again. To delete the tag: -1. git tag -d v7.4.27 -2. git push --delete origin v7.4.27 +1. git tag -d 7.4.27 +2. git push --delete origin 7.4.27 +3. Remove the release. + diff --git a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim b/sources_non_forked/bufexplorer/plugin/bufexplorer.vim index f5a74613..a038bc06 100644 --- a/sources_non_forked/bufexplorer/plugin/bufexplorer.vim +++ b/sources_non_forked/bufexplorer/plugin/bufexplorer.vim @@ -1,5 +1,5 @@ "============================================================================ -" Copyright: Copyright (c) 2001-2024, Jeff Lanzarotta +" Copyright: Copyright (c) 2001-2025, Jeff Lanzarotta " All rights reserved. " " Redistribution and use in source and binary forms, with or @@ -36,7 +36,7 @@ " Name Of File: bufexplorer.vim " Description: Buffer Explorer Vim Plugin " Maintainer: Jeff Lanzarotta (my name at gmail dot com) -" Last Changed: Tuesday, 13 August 2024 +" Last Changed: Monday, 17 February 2025 " Version: See g:bufexplorer_version for version number. " Usage: This file should reside in the plugin directory and be " automatically sourced. @@ -74,7 +74,7 @@ endif "1}}} " Version number -let g:bufexplorer_version = "7.4.27" +let g:bufexplorer_version = "7.6.0" " Plugin Code {{{1 " Check for Vim version {{{2 @@ -90,6 +90,7 @@ if v:version < 700 endif finish endif + " Check to see if the version of Vim has the correct patch applied, if not, do " not used . if v:version > 703 || v:version == 703 && has('patch1261') && has('patch1264') @@ -133,7 +134,7 @@ let s:running = 0 let s:sort_by = ["number", "name", "fullpath", "mru", "extension"] let s:splitMode = "" let s:didSplit = 0 -let s:types = {"fullname": ':p', "path": ':p:h', "relativename": ':~:.', "relativepath": ':~:.:h', "shortname": ':t'} +let s:types = ["fullname", "homename", "path", "relativename", "relativepath", "shortname"] " Setup the autocommands that handle the MRUList and other stuff. {{{2 autocmd VimEnter * call s:Setup() @@ -185,10 +186,9 @@ function! s:CatalogBuffers() endfunction " AssociatedTab {{{2 -" Return the number of the tab associated with the specified buffer. -" If the buffer is associated with more than one tab, the first one -" found is returned. If the buffer is not associated with any tabs, -" -1 is returned. +" Return the number of the tab associated with the specified buffer. If the +" buffer is associated with more than one tab, the first one found is +" returned. If the buffer is not associated with any tabs, -1 is returned. function! s:AssociatedTab(bufnr) for tab in range(1, tabpagenr('$')) let list = gettabvar(tab, 'bufexp_buf_list', []) @@ -202,8 +202,8 @@ function! s:AssociatedTab(bufnr) endfunction " RemoveBufFromOtherTabs {{{2 -" Remove the specified buffer from the buffer lists of all tabs -" except the current tab. +" Remove the specified buffer from the buffer lists of all tabs except the +" current tab. function! s:RemoveBufFromOtherTabs(bufnr) for tab in range(1, tabpagenr('$')) if tab == tabpagenr() @@ -222,8 +222,8 @@ function! s:RemoveBufFromOtherTabs(bufnr) endfunction " AddBufToCurrentTab {{{2 -" Add the specified buffer to the list of buffers associated -" with the current tab +" Add the specified buffer to the list of buffers associated with the current +" tab. function! s:AddBufToCurrentTab(bufnr) if index(t:bufexp_buf_list, a:bufnr) == -1 call add(t:bufexp_buf_list, a:bufnr) @@ -231,12 +231,10 @@ function! s:AddBufToCurrentTab(bufnr) endfunction " IsInCurrentTab {{{2 -" Returns whether the specified buffer is associated -" with the current tab +" Returns whether the specified buffer is associated with the current tab. function! s:IsInCurrentTab(bufnr) - " It shouldn't happen that the list of buffers is - " not defined but if it does, play it safe and - " include the buffer + " It shouldn't happen that the list of buffers is not defined but if it + " does, play it safe and include the buffer. if !exists('t:bufexp_buf_list') return 1 endif @@ -245,27 +243,25 @@ function! s:IsInCurrentTab(bufnr) endfunction " UpdateTabBufData {{{2 -" Update the tab buffer data for the specified buffer +" Update the tab buffer data for the specified buffer. " -" The current tab's list is updated. If a buffer is only -" allowed to be associated with one tab, it is removed -" from the lists of any other tabs with which it may have -" been associated. +" The current tab's list is updated. If a buffer is only allowed to be +" associated with one tab, it is removed from the lists of any other tabs +" with which it may have been associated. " -" The associations between tabs and buffers are maintained -" in separate lists for each tab, which are stored in tab- -" specific variables 't:bufexp_buf_list'. +" The associations between tabs and buffers are maintained in separate lists +" for each tab, which are stored in tab-specific variables +" 't:bufexp_buf_list'. function! s:UpdateTabBufData(bufnr) - " The first time we add a tab, Vim uses the current buffer - " as its starting page even though we are about to edit a - " new page, and another BufEnter for the new page is triggered - " later. Use this first BufEnter to initialize the list of - " buffers, but don't add the buffer number to the list if - " it is already associated with another tab + " The first time we add a tab, Vim uses the current buffer as its starting + " page even though we are about to edit a new page, and another BufEnter + " for the new page is triggered later. Use this first BufEnter to + " initialize the list of buffers, but don't add the buffer number to the + " list if it is already associated with another tab. " - " Unfortunately, this doesn't work right when the first - " buffer opened in the tab should be associated with it, - " such as when 'tab split +buffer N' is used + " Unfortunately, this doesn't work right when the first buffer opened in + " the tab should be associated with it, such as when 'tab split +buffer N' + " is used. if !exists("t:bufexp_buf_list") let t:bufexp_buf_list = [] @@ -537,6 +533,8 @@ function! s:MapKeys() nnoremap