diff options
author | w0rp <devw0rp@gmail.com> | 2021-05-26 22:43:30 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2021-05-26 22:43:33 +0100 |
commit | f53431331e2e2030a84de081baec93aad1e62363 (patch) | |
tree | c44ff92c5e4aaf6b39100e9ee40484a49ae39f78 /ale_linters | |
parent | 3f386ae5e988d6e1b39332a760f9e990d2df7f31 (diff) | |
download | ale-f53431331e2e2030a84de081baec93aad1e62363.zip |
Enable gopls by default with GOPATH detection
Diffstat (limited to 'ale_linters')
42 files changed, 61 insertions, 44 deletions
diff --git a/ale_linters/css/stylelint.vim b/ale_linters/css/stylelint.vim index 38cb0e0b..e508f392 100644 --- a/ale_linters/css/stylelint.vim +++ b/ale_linters/css/stylelint.vim @@ -11,7 +11,7 @@ endfunction call ale#linter#Define('css', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'css_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'css_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': function('ale_linters#css#stylelint#GetCommand'), diff --git a/ale_linters/elm/elm_ls.vim b/ale_linters/elm/elm_ls.vim index 2fa71adb..a02dbf42 100644 --- a/ale_linters/elm/elm_ls.vim +++ b/ale_linters/elm/elm_ls.vim @@ -28,7 +28,7 @@ endfunction call ale#linter#Define('elm', { \ 'name': 'elm_ls', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'elm_ls', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'elm_ls', [ \ 'node_modules/.bin/elm-language-server', \ 'node_modules/.bin/elm-lsp', \ 'elm-lsp' diff --git a/ale_linters/elm/make.vim b/ale_linters/elm/make.vim index 48ed82f3..a7f9ea7b 100644 --- a/ale_linters/elm/make.vim +++ b/ale_linters/elm/make.vim @@ -202,7 +202,7 @@ function! ale_linters#elm#make#GetCommand(buffer) abort " elm-test needs to know the path of elm-make if elm isn't installed globally. " https://github.com/rtfeldman/node-test-runner/blob/57728f10668f2d2ab3179e7e3208bcfa9a1f19aa/README.md#--compiler if l:is_v19 && l:is_using_elm_test - let l:elm_make_executable = ale#node#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) + let l:elm_make_executable = ale#path#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) let l:elm_test_compiler_flag = ' --compiler ' . l:elm_make_executable . ' ' else let l:elm_test_compiler_flag = ' ' @@ -222,13 +222,13 @@ function! ale_linters#elm#make#GetExecutable(buffer) abort let l:is_v19 = ale_linters#elm#make#IsVersionGte19(a:buffer) if l:is_test && l:is_v19 - return ale#node#FindExecutable( + return ale#path#FindExecutable( \ a:buffer, \ 'elm_make', \ ['node_modules/.bin/elm-test', 'node_modules/.bin/elm'] \) else - return ale#node#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) + return ale#path#FindExecutable(a:buffer, 'elm_make', ['node_modules/.bin/elm']) endif endfunction diff --git a/ale_linters/go/gopls.vim b/ale_linters/go/gopls.vim index f3f1bd6b..23082e9b 100644 --- a/ale_linters/go/gopls.vim +++ b/ale_linters/go/gopls.vim @@ -5,6 +5,21 @@ call ale#Set('go_gopls_executable', 'gopls') call ale#Set('go_gopls_options', '--mode stdio') call ale#Set('go_gopls_init_options', {}) +call ale#Set('go_gopls_use_global', get(g:, 'ale_use_global_executables', 0)) + +function! s:GetGoPathExecutable(suffix) abort + let l:prefix = $GOPATH + + if !empty($GOPATH) + let l:prefix = $GOPATH + elseif has('win32') + let l:prefix = $USERPROFILE . '/go' + else + let l:prefix = $HOME . '/go' + endif + + return ale#path#Simplify(l:prefix . '/' . a:suffix) +endfunction function! ale_linters#go#gopls#GetCommand(buffer) abort return ale#go#EnvString(a:buffer) @@ -29,7 +44,9 @@ endfunction call ale#linter#Define('go', { \ 'name': 'gopls', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#Var(b, 'go_gopls_executable')}, +\ 'executable': {b -> ale#path#FindExecutable(b, 'go_gopls', [ +\ s:GetGoPathExecutable('bin/gopls'), +\ ])}, \ 'command': function('ale_linters#go#gopls#GetCommand'), \ 'project_root': function('ale_linters#go#gopls#FindProjectRoot'), \ 'initialization_options': {b -> ale#Var(b, 'go_gopls_init_options')}, diff --git a/ale_linters/handlebars/embertemplatelint.vim b/ale_linters/handlebars/embertemplatelint.vim index bd4d1d31..8362bb1c 100644 --- a/ale_linters/handlebars/embertemplatelint.vim +++ b/ale_linters/handlebars/embertemplatelint.vim @@ -5,7 +5,7 @@ call ale#Set('handlebars_embertemplatelint_executable', 'ember-template-lint') call ale#Set('handlebars_embertemplatelint_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#handlebars#embertemplatelint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'handlebars_embertemplatelint', [ + return ale#path#FindExecutable(a:buffer, 'handlebars_embertemplatelint', [ \ 'node_modules/.bin/ember-template-lint', \]) endfunction diff --git a/ale_linters/html/angular.vim b/ale_linters/html/angular.vim index f550d665..17c0a751 100644 --- a/ale_linters/html/angular.vim +++ b/ale_linters/html/angular.vim @@ -11,7 +11,7 @@ function! ale_linters#html#angular#GetProjectRoot(buffer) abort endfunction function! ale_linters#html#angular#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'html_angular', [ + return ale#path#FindExecutable(a:buffer, 'html_angular', [ \ 'node_modules/@angular/language-server/bin/ngserver', \ 'node_modules/@angular/language-server/index.js', \]) diff --git a/ale_linters/html/htmlhint.vim b/ale_linters/html/htmlhint.vim index 3e01f51a..25bf5137 100644 --- a/ale_linters/html/htmlhint.vim +++ b/ale_linters/html/htmlhint.vim @@ -24,7 +24,7 @@ endfunction call ale#linter#Define('html', { \ 'name': 'htmlhint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'html_htmlhint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'html_htmlhint', [ \ 'node_modules/.bin/htmlhint', \ ])}, \ 'command': function('ale_linters#html#htmlhint#GetCommand'), diff --git a/ale_linters/html/stylelint.vim b/ale_linters/html/stylelint.vim index ae8955f3..6b7aba40 100644 --- a/ale_linters/html/stylelint.vim +++ b/ale_linters/html/stylelint.vim @@ -5,7 +5,7 @@ call ale#Set('html_stylelint_options', '') call ale#Set('html_stylelint_use_global', 0) function! ale_linters#html#stylelint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'html_stylelint', [ + return ale#path#FindExecutable(a:buffer, 'html_stylelint', [ \ 'node_modules/.bin/stylelint', \]) endfunction diff --git a/ale_linters/ink/ls.vim b/ale_linters/ink/ls.vim index 1cc93583..00b2f323 100644 --- a/ale_linters/ink/ls.vim +++ b/ale_linters/ink/ls.vim @@ -6,7 +6,7 @@ call ale#Set('ink_ls_use_global', get(g:, 'ale_use_global_executables', 0)) call ale#Set('ink_ls_initialization_options', {}) function! ale_linters#ink#ls#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'ink_ls', [ + return ale#path#FindExecutable(a:buffer, 'ink_ls', [ \ 'ink-language-server', \ 'node_modules/.bin/ink-language-server', \]) diff --git a/ale_linters/javascript/flow.vim b/ale_linters/javascript/flow.vim index 3135e2e9..601bac33 100644 --- a/ale_linters/javascript/flow.vim +++ b/ale_linters/javascript/flow.vim @@ -22,7 +22,7 @@ function! ale_linters#javascript#flow#GetExecutable(buffer) abort return '' endif - return ale#node#FindExecutable(a:buffer, 'javascript_flow', [ + return ale#path#FindExecutable(a:buffer, 'javascript_flow', [ \ 'node_modules/.bin/flow', \]) endfunction diff --git a/ale_linters/javascript/flow_ls.vim b/ale_linters/javascript/flow_ls.vim index accaaa73..fec34011 100644 --- a/ale_linters/javascript/flow_ls.vim +++ b/ale_linters/javascript/flow_ls.vim @@ -19,7 +19,7 @@ endfunction call ale#linter#Define('javascript', { \ 'name': 'flow-language-server', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_flow_ls', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_flow_ls', [ \ 'node_modules/.bin/flow', \ ])}, \ 'command': '%e lsp --from ale-lsp', diff --git a/ale_linters/javascript/jscs.vim b/ale_linters/javascript/jscs.vim index 8905b3a1..ae3be68c 100644 --- a/ale_linters/javascript/jscs.vim +++ b/ale_linters/javascript/jscs.vim @@ -53,7 +53,7 @@ endfunction call ale#linter#Define('javascript', { \ 'name': 'jscs', -\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jscs', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_jscs', [ \ 'node_modules/.bin/jscs', \ ])}, \ 'command': function('ale_linters#javascript#jscs#GetCommand'), diff --git a/ale_linters/javascript/jshint.vim b/ale_linters/javascript/jshint.vim index d80a2250..26d4fda2 100644 --- a/ale_linters/javascript/jshint.vim +++ b/ale_linters/javascript/jshint.vim @@ -25,7 +25,7 @@ endfunction call ale#linter#Define('javascript', { \ 'name': 'jshint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_jshint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_jshint', [ \ 'node_modules/.bin/jshint', \ ])}, \ 'command': function('ale_linters#javascript#jshint#GetCommand'), diff --git a/ale_linters/javascript/standard.vim b/ale_linters/javascript/standard.vim index 1990adce..addf41dd 100644 --- a/ale_linters/javascript/standard.vim +++ b/ale_linters/javascript/standard.vim @@ -6,7 +6,7 @@ call ale#Set('javascript_standard_use_global', get(g:, 'ale_use_global_executabl call ale#Set('javascript_standard_options', '') function! ale_linters#javascript#standard#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'javascript_standard', [ + return ale#path#FindExecutable(a:buffer, 'javascript_standard', [ \ 'node_modules/standardx/bin/cmd.js', \ 'node_modules/standard/bin/cmd.js', \ 'node_modules/semistandard/bin/cmd.js', diff --git a/ale_linters/javascript/tsserver.vim b/ale_linters/javascript/tsserver.vim index 68c252c5..caf6972b 100644 --- a/ale_linters/javascript/tsserver.vim +++ b/ale_linters/javascript/tsserver.vim @@ -8,7 +8,7 @@ call ale#Set('javascript_tsserver_use_global', get(g:, 'ale_use_global_executabl call ale#linter#Define('javascript', { \ 'name': 'tsserver', \ 'lsp': 'tsserver', -\ 'executable': {b -> ale#node#FindExecutable(b, 'javascript_tsserver', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'javascript_tsserver', [ \ 'node_modules/.bin/tsserver', \ ])}, \ 'command': '%e', diff --git a/ale_linters/json/jsonlint.vim b/ale_linters/json/jsonlint.vim index f677b488..812540af 100644 --- a/ale_linters/json/jsonlint.vim +++ b/ale_linters/json/jsonlint.vim @@ -4,7 +4,7 @@ call ale#Set('json_jsonlint_executable', 'jsonlint') call ale#Set('json_jsonlint_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#json#jsonlint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'json_jsonlint', [ + return ale#path#FindExecutable(a:buffer, 'json_jsonlint', [ \ 'node_modules/.bin/jsonlint', \ 'node_modules/jsonlint/lib/cli.js', \]) diff --git a/ale_linters/json/spectral.vim b/ale_linters/json/spectral.vim index c7d56234..14129c56 100644 --- a/ale_linters/json/spectral.vim +++ b/ale_linters/json/spectral.vim @@ -6,7 +6,7 @@ call ale#Set('json_spectral_use_global', get(g:, 'ale_use_global_executables', 0 call ale#linter#Define('json', { \ 'name': 'spectral', -\ 'executable': {b -> ale#node#FindExecutable(b, 'json_spectral', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'json_spectral', [ \ 'node_modules/.bin/spectral', \ ])}, \ 'command': '%e lint --ignore-unknown-format -q -f text %t', diff --git a/ale_linters/less/lessc.vim b/ale_linters/less/lessc.vim index 4ec8b00e..8e21f5b4 100644 --- a/ale_linters/less/lessc.vim +++ b/ale_linters/less/lessc.vim @@ -38,7 +38,7 @@ endfunction call ale#linter#Define('less', { \ 'name': 'lessc', -\ 'executable': {b -> ale#node#FindExecutable(b, 'less_lessc', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'less_lessc', [ \ 'node_modules/.bin/lessc', \ ])}, \ 'command': function('ale_linters#less#lessc#GetCommand'), diff --git a/ale_linters/less/stylelint.vim b/ale_linters/less/stylelint.vim index efb036c2..83f784c4 100644 --- a/ale_linters/less/stylelint.vim +++ b/ale_linters/less/stylelint.vim @@ -12,7 +12,7 @@ endfunction call ale#linter#Define('less', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'less_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'less_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': function('ale_linters#less#stylelint#GetCommand'), diff --git a/ale_linters/markdown/remark_lint.vim b/ale_linters/markdown/remark_lint.vim index ed87d1ad..6085e7ef 100644 --- a/ale_linters/markdown/remark_lint.vim +++ b/ale_linters/markdown/remark_lint.vim @@ -39,7 +39,7 @@ endfunction call ale#linter#Define('markdown', { \ 'name': 'remark_lint', \ 'aliases': ['remark-lint'], -\ 'executable': {b -> ale#node#FindExecutable(b, 'markdown_remark_lint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'markdown_remark_lint', [ \ 'node_modules/.bin/remark', \ ])}, \ 'command': function('ale_linters#markdown#remark_lint#GetCommand'), diff --git a/ale_linters/php/intelephense.vim b/ale_linters/php/intelephense.vim index aca619e3..0fdcc93e 100755 --- a/ale_linters/php/intelephense.vim +++ b/ale_linters/php/intelephense.vim @@ -26,7 +26,7 @@ call ale#linter#Define('php', { \ 'name': 'intelephense', \ 'lsp': 'stdio', \ 'initialization_options': function('ale_linters#php#intelephense#GetInitializationOptions'), -\ 'executable': {b -> ale#node#FindExecutable(b, 'php_intelephense', [])}, +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_intelephense', [])}, \ 'command': '%e --stdio', \ 'project_root': function('ale_linters#php#intelephense#GetProjectRoot'), \}) diff --git a/ale_linters/php/langserver.vim b/ale_linters/php/langserver.vim index fdd1bf2b..c3d89a00 100644 --- a/ale_linters/php/langserver.vim +++ b/ale_linters/php/langserver.vim @@ -19,7 +19,7 @@ endfunction call ale#linter#Define('php', { \ 'name': 'langserver', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'php_langserver', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_langserver', [ \ 'vendor/bin/php-language-server.php', \ ])}, \ 'command': 'php %e', diff --git a/ale_linters/php/phpcs.vim b/ale_linters/php/phpcs.vim index 3d88ad5d..ce47a13b 100644 --- a/ale_linters/php/phpcs.vim +++ b/ale_linters/php/phpcs.vim @@ -44,7 +44,7 @@ endfunction call ale#linter#Define('php', { \ 'name': 'phpcs', -\ 'executable': {b -> ale#node#FindExecutable(b, 'php_phpcs', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_phpcs', [ \ 'vendor/bin/phpcs', \ 'phpcs' \ ])}, diff --git a/ale_linters/php/psalm.vim b/ale_linters/php/psalm.vim index 286c8a96..dbbe9453 100644 --- a/ale_linters/php/psalm.vim +++ b/ale_linters/php/psalm.vim @@ -18,7 +18,7 @@ endfunction call ale#linter#Define('php', { \ 'name': 'psalm', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'php_psalm', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'php_psalm', [ \ 'vendor/bin/psalm', \ ])}, \ 'command': function('ale_linters#php#psalm#GetCommand'), diff --git a/ale_linters/php/tlint.vim b/ale_linters/php/tlint.vim index 6bba8def..80bdd1f6 100644 --- a/ale_linters/php/tlint.vim +++ b/ale_linters/php/tlint.vim @@ -20,7 +20,7 @@ function! ale_linters#php#tlint#GetProjectRoot(buffer) abort endfunction function! ale_linters#php#tlint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'php_tlint', [ + return ale#path#FindExecutable(a:buffer, 'php_tlint', [ \ 'vendor/bin/tlint', \ 'tlint', \]) diff --git a/ale_linters/pug/puglint.vim b/ale_linters/pug/puglint.vim index c819cc45..b552cc06 100644 --- a/ale_linters/pug/puglint.vim +++ b/ale_linters/pug/puglint.vim @@ -47,7 +47,7 @@ endfunction call ale#linter#Define('pug', { \ 'name': 'puglint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'pug_puglint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'pug_puglint', [ \ 'node_modules/.bin/pug-lint', \ ])}, \ 'output_stream': 'stderr', diff --git a/ale_linters/purescript/ls.vim b/ale_linters/purescript/ls.vim index 1c5f937f..a20fae47 100644 --- a/ale_linters/purescript/ls.vim +++ b/ale_linters/purescript/ls.vim @@ -6,7 +6,7 @@ call ale#Set('purescript_ls_use_global', get(g:, 'ale_use_global_executables', 0 call ale#Set('purescript_ls_config', {}) function! ale_linters#purescript#ls#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'purescript_ls', [ + return ale#path#FindExecutable(a:buffer, 'purescript_ls', [ \ 'node_modules/.bin/purescript-language-server', \]) endfunction diff --git a/ale_linters/sass/sasslint.vim b/ale_linters/sass/sasslint.vim index 17cd3667..ff396e68 100644 --- a/ale_linters/sass/sasslint.vim +++ b/ale_linters/sass/sasslint.vim @@ -5,7 +5,7 @@ call ale#Set('sass_sasslint_options', '') call ale#Set('sass_sasslint_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#sass#sasslint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'sass_sasslint', [ + return ale#path#FindExecutable(a:buffer, 'sass_sasslint', [ \ 'node_modules/sass-lint/bin/sass-lint.js', \ 'node_modules/.bin/sass-lint', \]) diff --git a/ale_linters/sass/stylelint.vim b/ale_linters/sass/stylelint.vim index 7b14c6b4..22abef9b 100644 --- a/ale_linters/sass/stylelint.vim +++ b/ale_linters/sass/stylelint.vim @@ -5,7 +5,7 @@ call ale#Set('sass_stylelint_use_global', get(g:, 'ale_use_global_executables', call ale#linter#Define('sass', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'sass_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'sass_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': '%e --stdin-filename %s', diff --git a/ale_linters/scss/sasslint.vim b/ale_linters/scss/sasslint.vim index cf13546e..99027051 100644 --- a/ale_linters/scss/sasslint.vim +++ b/ale_linters/scss/sasslint.vim @@ -5,7 +5,7 @@ call ale#Set('scss_sasslint_options', '') call ale#Set('scss_sasslint_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#scss#sasslint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'scss_sasslint', [ + return ale#path#FindExecutable(a:buffer, 'scss_sasslint', [ \ 'node_modules/sass-lint/bin/sass-lint.js', \ 'node_modules/.bin/sass-lint', \]) diff --git a/ale_linters/scss/stylelint.vim b/ale_linters/scss/stylelint.vim index b5b21536..fea4ea8f 100644 --- a/ale_linters/scss/stylelint.vim +++ b/ale_linters/scss/stylelint.vim @@ -11,7 +11,7 @@ endfunction call ale#linter#Define('scss', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'scss_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'scss_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': function('ale_linters#scss#stylelint#GetCommand'), diff --git a/ale_linters/sh/language_server.vim b/ale_linters/sh/language_server.vim index 5a3b0e9a..c6781584 100644 --- a/ale_linters/sh/language_server.vim +++ b/ale_linters/sh/language_server.vim @@ -6,7 +6,7 @@ call ale#Set('sh_language_server_executable', 'bash-language-server') call ale#Set('sh_language_server_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#sh#language_server#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'sh_language_server', [ + return ale#path#FindExecutable(a:buffer, 'sh_language_server', [ \ 'node_modules/.bin/bash-language-server', \]) endfunction diff --git a/ale_linters/stylus/stylelint.vim b/ale_linters/stylus/stylelint.vim index ce6f9426..b60e38ed 100644 --- a/ale_linters/stylus/stylelint.vim +++ b/ale_linters/stylus/stylelint.vim @@ -12,7 +12,7 @@ endfunction call ale#linter#Define('stylus', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'stylus_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'stylus_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': function('ale_linters#stylus#stylelint#GetCommand'), diff --git a/ale_linters/sugarss/stylelint.vim b/ale_linters/sugarss/stylelint.vim index 6c705e46..879ff0ca 100644 --- a/ale_linters/sugarss/stylelint.vim +++ b/ale_linters/sugarss/stylelint.vim @@ -13,7 +13,7 @@ endfunction call ale#linter#Define('sugarss', { \ 'name': 'stylelint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'sugarss_stylelint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'sugarss_stylelint', [ \ 'node_modules/.bin/stylelint', \ ])}, \ 'command': function('ale_linters#sugarss#stylelint#GetCommand'), diff --git a/ale_linters/svelte/svelteserver.vim b/ale_linters/svelte/svelteserver.vim index bcd10be8..2200b582 100644 --- a/ale_linters/svelte/svelteserver.vim +++ b/ale_linters/svelte/svelteserver.vim @@ -13,7 +13,7 @@ endfunction call ale#linter#Define('svelte', { \ 'name': 'svelteserver', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'svelte_svelteserver', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'svelte_svelteserver', [ \ 'node_modules/.bin/svelteserver', \ ])}, \ 'command': '%e --stdio', diff --git a/ale_linters/swift/swiftlint.vim b/ale_linters/swift/swiftlint.vim index 237c45d3..d08c68f6 100644 --- a/ale_linters/swift/swiftlint.vim +++ b/ale_linters/swift/swiftlint.vim @@ -5,7 +5,7 @@ call ale#Set('swift_swiftlint_executable', 'swiftlint') call ale#Set('swift_swiftlint_use_global', get(g:, 'ale_use_global_executables', 0)) function! ale_linters#swift#swiftlint#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'swift_swiftlint', [ + return ale#path#FindExecutable(a:buffer, 'swift_swiftlint', [ \ 'Pods/SwiftLint/swiftlint', \ 'ios/Pods/SwiftLint/swiftlint', \ 'swiftlint', diff --git a/ale_linters/typescript/standard.vim b/ale_linters/typescript/standard.vim index da8f14eb..1d524a10 100644 --- a/ale_linters/typescript/standard.vim +++ b/ale_linters/typescript/standard.vim @@ -6,7 +6,7 @@ call ale#Set('typescript_standard_use_global', get(g:, 'ale_use_global_executabl call ale#Set('typescript_standard_options', '') function! ale_linters#typescript#standard#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'typescript_standard', [ + return ale#path#FindExecutable(a:buffer, 'typescript_standard', [ \ 'node_modules/standardx/bin/cmd.js', \ 'node_modules/standard/bin/cmd.js', \ 'node_modules/.bin/standard', diff --git a/ale_linters/typescript/tsserver.vim b/ale_linters/typescript/tsserver.vim index 4726e40d..d97becca 100644 --- a/ale_linters/typescript/tsserver.vim +++ b/ale_linters/typescript/tsserver.vim @@ -8,7 +8,7 @@ call ale#Set('typescript_tsserver_use_global', get(g:, 'ale_use_global_executabl call ale#linter#Define('typescript', { \ 'name': 'tsserver', \ 'lsp': 'tsserver', -\ 'executable': {b -> ale#node#FindExecutable(b, 'typescript_tsserver', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'typescript_tsserver', [ \ '.yarn/sdks/typescript/bin/tsserver', \ 'node_modules/.bin/tsserver', \ ])}, diff --git a/ale_linters/vim/vimls.vim b/ale_linters/vim/vimls.vim index 26014d66..7003eb04 100644 --- a/ale_linters/vim/vimls.vim +++ b/ale_linters/vim/vimls.vim @@ -52,7 +52,7 @@ call ale#linter#Define('vim', { \ 'name': 'vimls', \ 'lsp': 'stdio', \ 'lsp_config': {b -> ale#Var(b, 'vim_vimls_config')}, -\ 'executable': {b -> ale#node#FindExecutable(b, 'vim_vimls', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'vim_vimls', [ \ 'node_modules/.bin/vim-language-server', \ ])}, \ 'command': '%e --stdio', diff --git a/ale_linters/vue/vls.vim b/ale_linters/vue/vls.vim index ac451f3c..4bd75286 100644 --- a/ale_linters/vue/vls.vim +++ b/ale_linters/vue/vls.vim @@ -13,7 +13,7 @@ endfunction call ale#linter#Define('vue', { \ 'name': 'vls', \ 'lsp': 'stdio', -\ 'executable': {b -> ale#node#FindExecutable(b, 'vue_vls', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'vue_vls', [ \ 'node_modules/.bin/vls', \ ])}, \ 'command': '%e --stdio', diff --git a/ale_linters/yaml/spectral.vim b/ale_linters/yaml/spectral.vim index bd4623a5..13654f06 100644 --- a/ale_linters/yaml/spectral.vim +++ b/ale_linters/yaml/spectral.vim @@ -6,7 +6,7 @@ call ale#Set('yaml_spectral_use_global', get(g:, 'ale_use_global_executables', 0 call ale#linter#Define('yaml', { \ 'name': 'spectral', -\ 'executable': {b -> ale#node#FindExecutable(b, 'yaml_spectral', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_spectral', [ \ 'node_modules/.bin/spectral', \ ])}, \ 'command': '%e lint --ignore-unknown-format -q -f text %t', diff --git a/ale_linters/yaml/swaglint.vim b/ale_linters/yaml/swaglint.vim index 1f140e37..7fc2b430 100644 --- a/ale_linters/yaml/swaglint.vim +++ b/ale_linters/yaml/swaglint.vim @@ -32,7 +32,7 @@ endfunction call ale#linter#Define('yaml', { \ 'name': 'swaglint', -\ 'executable': {b -> ale#node#FindExecutable(b, 'yaml_swaglint', [ +\ 'executable': {b -> ale#path#FindExecutable(b, 'yaml_swaglint', [ \ 'node_modules/.bin/swaglint', \ ])}, \ 'command': '%e -r compact --stdin', |