Updated plugins

pull/449/head
Amir Salihefendic 5 years ago
parent 46f1a1bd52
commit 587a185a98
  1. 2
      sources_non_forked/ale/ale_linters/apiblueprint/drafter.vim
  2. 7
      sources_non_forked/ale/ale_linters/asciidoc/writegood.vim
  3. 10
      sources_non_forked/ale/ale_linters/c/clang.vim
  4. 29
      sources_non_forked/ale/ale_linters/c/clangd.vim
  5. 2
      sources_non_forked/ale/ale_linters/c/clangtidy.vim
  6. 32
      sources_non_forked/ale/ale_linters/c/cquery.vim
  7. 10
      sources_non_forked/ale/ale_linters/c/gcc.vim
  8. 2
      sources_non_forked/ale/ale_linters/clojure/joker.vim
  9. 10
      sources_non_forked/ale/ale_linters/cpp/clang.vim
  10. 2
      sources_non_forked/ale/ale_linters/cpp/clangcheck.vim
  11. 2
      sources_non_forked/ale/ale_linters/cpp/clangtidy.vim
  12. 10
      sources_non_forked/ale/ale_linters/cpp/gcc.vim
  13. 2
      sources_non_forked/ale/ale_linters/elixir/dialyxir.vim
  14. 2
      sources_non_forked/ale/ale_linters/elm/make.vim
  15. 27
      sources_non_forked/ale/ale_linters/fortran/language_server.vim
  16. 3
      sources_non_forked/ale/ale_linters/go/gobuild.vim
  17. 3
      sources_non_forked/ale/ale_linters/go/govet.vim
  18. 19
      sources_non_forked/ale/ale_linters/haskell/cabal_ghc.vim
  19. 6
      sources_non_forked/ale/ale_linters/haskell/ghc-mod.vim
  20. 3
      sources_non_forked/ale/ale_linters/haskell/stack_build.vim
  21. 3
      sources_non_forked/ale/ale_linters/haskell/stack_ghc.vim
  22. 7
      sources_non_forked/ale/ale_linters/help/writegood.vim
  23. 9
      sources_non_forked/ale/ale_linters/html/writegood.vim
  24. 4
      sources_non_forked/ale/ale_linters/markdown/remark_lint.vim
  25. 7
      sources_non_forked/ale/ale_linters/markdown/writegood.vim
  26. 7
      sources_non_forked/ale/ale_linters/nroff/writegood.vim
  27. 2
      sources_non_forked/ale/ale_linters/objc/clang.vim
  28. 2
      sources_non_forked/ale/ale_linters/objcpp/clang.vim
  29. 7
      sources_non_forked/ale/ale_linters/po/writegood.vim
  30. 7
      sources_non_forked/ale/ale_linters/pod/writegood.vim
  31. 85
      sources_non_forked/ale/ale_linters/python/vulture.vim
  32. 7
      sources_non_forked/ale/ale_linters/rst/writegood.vim
  33. 3
      sources_non_forked/ale/ale_linters/sml/smlnj_cm.vim
  34. 7
      sources_non_forked/ale/ale_linters/tex/writegood.vim
  35. 7
      sources_non_forked/ale/ale_linters/texinfo/writegood.vim
  36. 7
      sources_non_forked/ale/ale_linters/text/writegood.vim
  37. 7
      sources_non_forked/ale/ale_linters/xhtml/writegood.vim
  38. 9
      sources_non_forked/ale/autoload/ale.vim
  39. 2
      sources_non_forked/ale/autoload/ale/assert.vim
  40. 17
      sources_non_forked/ale/autoload/ale/balloon.vim
  41. 139
      sources_non_forked/ale/autoload/ale/c.vim
  42. 103
      sources_non_forked/ale/autoload/ale/completion.vim
  43. 65
      sources_non_forked/ale/autoload/ale/definition.vim
  44. 2
      sources_non_forked/ale/autoload/ale/engine.vim
  45. 4
      sources_non_forked/ale/autoload/ale/engine/ignore.vim
  46. 16
      sources_non_forked/ale/autoload/ale/fix.vim
  47. 14
      sources_non_forked/ale/autoload/ale/fix/registry.vim
  48. 77
      sources_non_forked/ale/autoload/ale/handlers/gcc.vim
  49. 2
      sources_non_forked/ale/autoload/ale/handlers/rust.vim
  50. 11
      sources_non_forked/ale/autoload/ale/handlers/writegood.vim
  51. 66
      sources_non_forked/ale/autoload/ale/hover.vim
  52. 34
      sources_non_forked/ale/autoload/ale/linter.vim
  53. 2
      sources_non_forked/ale/autoload/ale/loclist_jumping.vim
  54. 204
      sources_non_forked/ale/autoload/ale/lsp.vim
  55. 6
      sources_non_forked/ale/autoload/ale/lsp/response.vim
  56. 56
      sources_non_forked/ale/autoload/ale/lsp_linter.vim
  57. 15
      sources_non_forked/ale/autoload/ale/path.vim
  58. 47
      sources_non_forked/ale/autoload/ale/references.vim
  59. 2
      sources_non_forked/ale/autoload/ale/sign.vim
  60. 23
      sources_non_forked/ale/autoload/ale/test.vim
  61. 2
      sources_non_forked/ale/autoload/ale/toggle.vim
  62. 16
      sources_non_forked/ale/autoload/ale/util.vim
  63. 68
      sources_non_forked/ale/doc/ale-c.txt
  64. 1
      sources_non_forked/ale/doc/ale-cpp.txt
  65. 11
      sources_non_forked/ale/doc/ale-development.txt
  66. 19
      sources_non_forked/ale/doc/ale-fortran.txt
  67. 11
      sources_non_forked/ale/doc/ale-haskell.txt
  68. 30
      sources_non_forked/ale/doc/ale-python.txt
  69. 22
      sources_non_forked/ale/doc/ale.txt
  70. 5
      sources_non_forked/ale/plugin/ale.vim
  71. 4
      sources_non_forked/vim-commentary/plugin/commentary.vim
  72. 2298
      sources_non_forked/vim-fugitive/autoload/fugitive.vim
  73. 27
      sources_non_forked/vim-fugitive/doc/fugitive.txt
  74. 153
      sources_non_forked/vim-fugitive/plugin/fugitive.vim
  75. 2
      sources_non_forked/vim-gitgutter/autoload/gitgutter/diff.vim
  76. 2
      sources_non_forked/vim-go/.coveragerc
  77. 6
      sources_non_forked/vim-go/CHANGELOG.md
  78. 5
      sources_non_forked/vim-go/README.md
  79. 7
      sources_non_forked/vim-go/autoload/go/cmd.vim
  80. 9
      sources_non_forked/vim-go/autoload/go/job.vim
  81. 6
      sources_non_forked/vim-go/doc/vim-go.txt
  82. 1
      sources_non_forked/vim-markdown/.travis.yml
  83. 56
      sources_non_forked/vim-markdown/README.md
  84. 103
      sources_non_forked/vim-markdown/doc/vim-markdown.txt
  85. 18
      sources_non_forked/vim-markdown/ftplugin/markdown.vim
  86. 16
      sources_non_forked/vim-markdown/indent/markdown.vim
  87. 29
      sources_non_forked/vim-markdown/syntax/markdown.vim
  88. 38
      sources_non_forked/vim-markdown/test/syntax.vader
  89. 7
      sources_non_forked/vim-surround/plugin/surround.vim

@ -31,6 +31,6 @@ call ale#linter#Define('apiblueprint', {
\ 'name': 'drafter',
\ 'output_stream': 'stderr',
\ 'executable': 'drafter',
\ 'command': 'drafter --use-line-num --validate %t',
\ 'command': 'drafter --use-line-num --validate',
\ 'callback': 'ale_linters#apiblueprint#drafter#HandleErrors',
\})

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for AsciiDoc files
call ale#linter#Define('asciidoc', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('asciidoc')

@ -14,10 +14,10 @@ function! ale_linters#c#clang#GetCommand(buffer, output) abort
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return ale#Escape(ale_linters#c#clang#GetExecutable(a:buffer))
\ . ' -S -x c -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . l:cflags
\ . ale#Var(a:buffer, 'c_clang_options') . ' -'
\ . ' -S -x c -fsyntax-only'
\ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ale#Pad(l:cflags)
\ . ale#Pad(ale#Var(a:buffer, 'c_clang_options')) . ' -'
endfunction
call ale#linter#Define('c', {
@ -28,5 +28,5 @@ call ale#linter#Define('c', {
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
\ {'callback': 'ale_linters#c#clang#GetCommand'}
\ ],
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -0,0 +1,29 @@
" Author: Andrey Melentyev <andrey.melentyev@protonmail.com>
" Description: Clangd language server
call ale#Set('c_clangd_executable', 'clangd')
call ale#Set('c_clangd_options', '')
function! ale_linters#c#clangd#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction
function! ale_linters#c#clangd#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'c_clangd_executable')
endfunction
function! ale_linters#c#clangd#GetCommand(buffer) abort
let l:executable = ale_linters#c#clangd#GetExecutable(a:buffer)
let l:options = ale#Var(a:buffer, 'c_clangd_options')
return ale#Escape(l:executable) . (!empty(l:options) ? ' ' . l:options : '')
endfunction
call ale#linter#Define('c', {
\ 'name': 'clangd',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#c#clangd#GetExecutable',
\ 'command_callback': 'ale_linters#c#clangd#GetCommand',
\ 'project_root_callback': 'ale_linters#c#clangd#GetProjectRoot',
\})

@ -35,7 +35,7 @@ function! s:GetBuildDirectory(buffer) abort
return l:build_dir
endif
return ale#c#FindCompileCommands(a:buffer)
return ale#path#Dirname(ale#c#FindCompileCommands(a:buffer))
endfunction
function! ale_linters#c#clangtidy#GetCommand(buffer) abort

@ -0,0 +1,32 @@
" Author: Ben Falconer <ben@falconers.me.uk>, jtalowell <jtalowell@protonmail.com>
" Description: A language server for C
call ale#Set('c_cquery_executable', 'cquery')
call ale#Set('c_cquery_cache_directory', expand('~/.cache/cquery'))
function! ale_linters#c#cquery#GetProjectRoot(buffer) abort
let l:project_root = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
return !empty(l:project_root) ? fnamemodify(l:project_root, ':h') : ''
endfunction
function! ale_linters#c#cquery#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'c_cquery_executable')
endfunction
function! ale_linters#c#cquery#GetCommand(buffer) abort
let l:executable = ale_linters#c#cquery#GetExecutable(a:buffer)
return ale#Escape(l:executable)
endfunction
function! ale_linters#c#cquery#GetInitializationOptions(buffer) abort
return {'cacheDirectory': ale#Var(a:buffer, 'c_cquery_cache_directory')}
endfunction
call ale#linter#Define('c', {
\ 'name': 'cquery',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#c#cquery#GetExecutable',
\ 'command_callback': 'ale_linters#c#cquery#GetCommand',
\ 'project_root_callback': 'ale_linters#c#cquery#GetProjectRoot',
\ 'initialization_options_callback': 'ale_linters#c#cquery#GetInitializationOptions',
\})

@ -14,10 +14,10 @@ function! ale_linters#c#gcc#GetCommand(buffer, output) abort
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return ale#Escape(ale_linters#c#gcc#GetExecutable(a:buffer))
\ . ' -S -x c -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . l:cflags
\ . ale#Var(a:buffer, 'c_gcc_options') . ' -'
\ . ' -S -x c -fsyntax-only'
\ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ale#Pad(l:cflags)
\ . ale#Pad(ale#Var(a:buffer, 'c_gcc_options')) . ' -'
endfunction
call ale#linter#Define('c', {
@ -28,5 +28,5 @@ call ale#linter#Define('c', {
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
\ {'callback': 'ale_linters#c#gcc#GetCommand'}
\ ],
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -27,6 +27,6 @@ call ale#linter#Define('clojure', {
\ 'name': 'joker',
\ 'output_stream': 'stderr',
\ 'executable': 'joker',
\ 'command': 'joker --lint %t',
\ 'command': 'joker --working-dir %s --lint %t',
\ 'callback': 'ale_linters#clojure#joker#HandleJokerFormat',
\})

@ -14,10 +14,10 @@ function! ale_linters#cpp#clang#GetCommand(buffer, output) abort
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return ale#Escape(ale_linters#cpp#clang#GetExecutable(a:buffer))
\ . ' -S -x c++ -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . l:cflags
\ . ale#Var(a:buffer, 'cpp_clang_options') . ' -'
\ . ' -S -x c++ -fsyntax-only'
\ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ale#Pad(l:cflags)
\ . ale#Pad(ale#Var(a:buffer, 'cpp_clang_options')) . ' -'
endfunction
call ale#linter#Define('cpp', {
@ -28,5 +28,5 @@ call ale#linter#Define('cpp', {
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
\ {'callback': 'ale_linters#cpp#clang#GetCommand'},
\ ],
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -16,7 +16,7 @@ function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort
let l:build_dir = ale#Var(a:buffer, 'c_build_dir')
if empty(l:build_dir)
let l:build_dir = ale#c#FindCompileCommands(a:buffer)
let l:build_dir = ale#path#Dirname(ale#c#FindCompileCommands(a:buffer))
endif
" The extra arguments in the command are used to prevent .plist files from

@ -29,7 +29,7 @@ function! s:GetBuildDirectory(buffer) abort
return l:build_dir
endif
return ale#c#FindCompileCommands(a:buffer)
return ale#path#Dirname(ale#c#FindCompileCommands(a:buffer))
endfunction
function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort

@ -14,10 +14,10 @@ function! ale_linters#cpp#gcc#GetCommand(buffer, output) abort
" -iquote with the directory the file is in makes #include work for
" headers in the same directory.
return ale#Escape(ale_linters#cpp#gcc#GetExecutable(a:buffer))
\ . ' -S -x c++ -fsyntax-only '
\ . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' '
\ . l:cflags
\ . ale#Var(a:buffer, 'cpp_gcc_options') . ' -'
\ . ' -S -x c++ -fsyntax-only'
\ . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h'))
\ . ale#Pad(l:cflags)
\ . ale#Pad(ale#Var(a:buffer, 'cpp_gcc_options')) . ' -'
endfunction
call ale#linter#Define('cpp', {
@ -29,5 +29,5 @@ call ale#linter#Define('cpp', {
\ {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'},
\ {'callback': 'ale_linters#cpp#gcc#GetCommand'},
\ ],
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -28,7 +28,7 @@ endfunction
call ale#linter#Define('elixir', {
\ 'name': 'dialyxir',
\ 'executable': 'mix',
\ 'command': 'mix dialyzer',
\ 'command': 'mix help dialyzer && mix dialyzer',
\ 'callback': 'ale_linters#elixir#dialyxir#Handle',
\})

@ -136,7 +136,7 @@ function! ale_linters#elm#make#ParseMessage(message) abort
endfunction
function! ale_linters#elm#make#ParseMessageItem(item) abort
if type(a:item) == type('')
if type(a:item) is v:t_string
return a:item
else
return a:item.string

@ -0,0 +1,27 @@
" Author: unpairedbracket ben.spiers22@gmail.com
" Description: A language server for fortran
call ale#Set('fortran_language_server_executable', 'fortls')
call ale#Set('fortran_language_server_use_global', get(g:, 'ale_use_global_executables', 0))
function! ale_linters#fortran#language_server#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'fortran_language_server_executable')
endfunction
function! ale_linters#fortran#language_server#GetCommand(buffer) abort
return ale#Escape(ale_linters#fortran#language_server#GetExecutable(a:buffer))
endfunction
function! ale_linters#fortran#language_server#GetProjectRoot(buffer) abort
let l:fortls_file = ale#path#FindNearestFile(a:buffer, '.fortls')
return !empty(l:fortls_file) ? fnamemodify(l:fortls_file, ':h') : ''
endfunction
call ale#linter#Define('fortran', {
\ 'name': 'language_server',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#fortran#language_server#GetExecutable',
\ 'command_callback': 'ale_linters#fortran#language_server#GetCommand',
\ 'project_root_callback': 'ale_linters#fortran#language_server#GetProjectRoot',
\})

@ -70,7 +70,8 @@ function! ale_linters#go#gobuild#Handler(buffer, lines) abort
endfunction
call ale#linter#Define('go', {
\ 'name': 'go build',
\ 'name': 'gobuild',
\ 'aliases': ['go build'],
\ 'executable': 'go',
\ 'command_chain': [
\ {'callback': 'ale_linters#go#gobuild#GoEnv', 'output_stream': 'stdout'},

@ -9,7 +9,8 @@ function! ale_linters#go#govet#GetCommand(buffer) abort
endfunction
call ale#linter#Define('go', {
\ 'name': 'go vet',
\ 'name': 'govet',
\ 'aliases': ['go vet'],
\ 'output_stream': 'stderr',
\ 'executable': 'go',
\ 'command_callback': 'ale_linters#go#govet#GetCommand',

@ -0,0 +1,19 @@
" Author: Eric Wolf <ericwolf42@gmail.com>
" Description: ghc for Haskell files called with cabal exec
call ale#Set('haskell_cabal_ghc_options', '-fno-code -v0')
function! ale_linters#haskell#cabal_ghc#GetCommand(buffer) abort
return 'cabal exec -- ghc '
\ . ale#Var(a:buffer, 'haskell_cabal_ghc_options')
\ . ' %t'
endfunction
call ale#linter#Define('haskell', {
\ 'name': 'cabal_ghc',
\ 'aliases': ['cabal-ghc'],
\ 'output_stream': 'stderr',
\ 'executable': 'cabal',
\ 'command_callback': 'ale_linters#haskell#cabal_ghc#GetCommand',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})

@ -2,14 +2,16 @@
" Description: ghc-mod for Haskell files
call ale#linter#Define('haskell', {
\ 'name': 'ghc-mod',
\ 'name': 'ghc_mod',
\ 'aliases': ['ghc-mod'],
\ 'executable': 'ghc-mod',
\ 'command': 'ghc-mod --map-file %s=%t check %s',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',
\})
call ale#linter#Define('haskell', {
\ 'name': 'stack-ghc-mod',
\ 'name': 'stack_ghc_mod',
\ 'aliases': ['stack-ghc-mod'],
\ 'executable': 'stack',
\ 'command': 'stack exec ghc-mod -- --map-file %s=%t check %s',
\ 'callback': 'ale#handlers#haskell#HandleGHCFormat',

@ -13,7 +13,8 @@ function! ale_linters#haskell#stack_build#GetCommand(buffer) abort
endfunction
call ale#linter#Define('haskell', {
\ 'name': 'stack-build',
\ 'name': 'stack_build',
\ 'aliases': ['stack-build'],
\ 'output_stream': 'stderr',
\ 'executable': 'stack',
\ 'command_callback': 'ale_linters#haskell#stack_build#GetCommand',

@ -2,7 +2,8 @@
" Description: ghc for Haskell files, using Stack
call ale#linter#Define('haskell', {
\ 'name': 'stack-ghc',
\ 'name': 'stack_ghc',
\ 'aliases': ['stack-ghc'],
\ 'output_stream': 'stderr',
\ 'executable': 'stack',
\ 'command': 'stack ghc -- -fno-code -v0 %t',

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for vim Help files
call ale#linter#Define('help', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('help')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for nroff files
" Description: write-good for html files
call ale#linter#Define('html', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('html')

@ -1,3 +1,4 @@
scriptencoding utf-8
" Author rhysd https://rhysd.github.io/, Dirk Roorda (dirkroorda), Adriรกn Gonzรกlez Rus (@adrigzr)
" Description: remark-lint for Markdown files
call ale#Set('markdown_remark_lint_executable', 'remark')
@ -43,7 +44,8 @@ function! ale_linters#markdown#remark_lint#Handle(buffer, lines) abort
endfunction
call ale#linter#Define('markdown', {
\ 'name': 'remark-lint',
\ 'name': 'remark_lint',
\ 'aliases': ['remark-lint'],
\ 'executable_callback': 'ale_linters#markdown#remark_lint#GetExecutable',
\ 'command_callback': 'ale_linters#markdown#remark_lint#GetCommand',
\ 'callback': 'ale_linters#markdown#remark_lint#Handle',

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Markdown files
call ale#linter#Define('markdown', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('markdown')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for nroff files
call ale#linter#Define('nroff', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('nroff')

@ -19,5 +19,5 @@ call ale#linter#Define('objc', {
\ 'output_stream': 'stderr',
\ 'executable': 'clang',
\ 'command_callback': 'ale_linters#objc#clang#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -19,5 +19,5 @@ call ale#linter#Define('objcpp', {
\ 'output_stream': 'stderr',
\ 'executable': 'clang++',
\ 'command_callback': 'ale_linters#objcpp#clang#GetCommand',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormat',
\ 'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes',
\})

@ -1,9 +1,4 @@
" Author: Cian Butler https://github.com/butlerx
" Description: write-good for PO files
call ale#linter#Define('po', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('po')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Pod files
call ale#linter#Define('pod', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('pod')

@ -0,0 +1,85 @@
" Author: Yauheni Kirylau <actionless.loveless@gmail.com>
" Description: vulture linting for python files
call ale#Set('python_vulture_executable', 'vulture')
call ale#Set('python_vulture_options', '')
call ale#Set('python_vulture_use_global', get(g:, 'ale_use_global_executables', 0))
call ale#Set('python_vulture_change_directory', 1)
" The directory to change to before running vulture
function! s:GetDir(buffer) abort
let l:project_root = ale#python#FindProjectRoot(a:buffer)
return !empty(l:project_root)
\ ? l:project_root
\ : expand('#' . a:buffer . ':p:h')
endfunction
function! ale_linters#python#vulture#GetExecutable(buffer) abort
return ale#python#FindExecutable(a:buffer, 'python_vulture', ['vulture'])
endfunction
function! ale_linters#python#vulture#GetCommand(buffer) abort
let l:change_dir = ale#Var(a:buffer, 'python_vulture_change_directory')
\ ? ale#path#CdString(s:GetDir(a:buffer))
\ : ''
let l:executable = ale_linters#python#vulture#GetExecutable(a:buffer)
let l:exec_args = l:executable =~? 'pipenv$'
\ ? ' run vulture'
\ : ''
let l:lint_dest = ale#Var(a:buffer, 'python_vulture_change_directory')
\ ? ' .'
\ : ' %s'
return l:change_dir
\ . ale#Escape(l:executable) . l:exec_args
\ . ' '
\ . ale#Var(a:buffer, 'python_vulture_options')
\ . l:lint_dest
endfunction
function! ale_linters#python#vulture#Handle(buffer, lines) abort
for l:line in a:lines[:10]
if match(l:line, '^Traceback') >= 0
return [{
\ 'lnum': 1,
\ 'text': 'An exception was thrown. See :ALEDetail',
\ 'detail': join(a:lines, "\n"),
\}]
endif
endfor
" Matches patterns line the following:
let l:pattern = '\v^([a-zA-Z]?:?[^:]+):(\d+): (.*)$'
let l:output = []
let l:dir = s:GetDir(a:buffer)
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:abspath = ale#path#GetAbsPath(l:dir, l:match[1])
let l:item = {
\ 'filename': l:abspath,
\ 'lnum': l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': 'W',
\}
call add(l:output, l:item)
endfor
return l:output
endfunction
call ale#linter#Define('python', {
\ 'name': 'vulture',
\ 'executable_callback': 'ale_linters#python#vulture#GetExecutable',
\ 'command_callback': 'ale_linters#python#vulture#GetCommand',
\ 'callback': 'ale_linters#python#vulture#Handle',
\ 'lint_file': 1,
\})

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for reStructuredText files
call ale#linter#Define('rst', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('rst')

@ -9,7 +9,8 @@ endfunction
" Using CM requires that we set "lint_file: 1", since it reads the files
" from the disk itself.
call ale#linter#Define('sml', {
\ 'name': 'smlnj-cm',
\ 'name': 'smlnj_cm',
\ 'aliases': ['smlnj-cm'],
\ 'executable_callback': 'ale#handlers#sml#GetExecutableSmlnjCm',
\ 'lint_file': 1,
\ 'command_callback': 'ale_linters#sml#smlnj_cm#GetCommand',

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for TeX files
call ale#linter#Define('tex', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('tex')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Texinfo files
call ale#linter#Define('texinfo', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('texinfo')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for text files
call ale#linter#Define('text', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('text')

@ -1,9 +1,4 @@
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for XHTML files
call ale#linter#Define('xhtml', {
\ 'name': 'write-good',
\ 'executable_callback': 'ale#handlers#writegood#GetExecutable',
\ 'command_callback': 'ale#handlers#writegood#GetCommand',
\ 'callback': 'ale#handlers#writegood#Handle',
\})
call ale#handlers#writegood#DefineLinter('xhtml')

@ -95,7 +95,7 @@ function! ale#Queue(delay, ...) abort
throw "linting_flag must be either '' or 'lint_file'"
endif
if type(l:buffer) != type(0)
if type(l:buffer) isnot v:t_number
throw 'buffer_number must be a Number'
endif
@ -192,12 +192,7 @@ endfunction
" Every variable name will be prefixed with 'ale_'.
function! ale#Var(buffer, variable_name) abort
let l:full_name = 'ale_' . a:variable_name
let l:vars = getbufvar(str2nr(a:buffer), '', 0)
if l:vars is 0
" Look for variables from deleted buffers, saved from :ALEFix
let l:vars = get(get(g:ale_fix_buffer_data, a:buffer, {}), 'vars', {})
endif
let l:vars = getbufvar(str2nr(a:buffer), '', {})
return get(l:vars, l:full_name, g:[l:full_name])
endfunction

@ -30,7 +30,7 @@ function! ale#assert#Linter(expected_executable, expected_command) abort
let l:callbacks = map(copy(l:linter.command_chain), 'v:val.callback')
" If the expected command is a string, just check the last one.
if type(a:expected_command) is type('')
if type(a:expected_command) is v:t_string
if len(l:callbacks) is 1
let l:command = call(l:callbacks[0], [l:buffer])
else

@ -34,26 +34,25 @@ function! ale#balloon#Expr() abort
endfunction
function! ale#balloon#Disable() abort
if has('balloon_eval')
set noballooneval
set balloonexpr=
endif
if has('balloon_eval_term')
set noballoonevalterm
set balloonexpr=
endif
set noballooneval
set balloonexpr=
endfunction
function! ale#balloon#Enable() abort
if !has('balloon_eval') && !has('balloon_eval_term')
return
endif
if has('balloon_eval')
set ballooneval
set balloonexpr=ale#balloon#Expr()
endif
if has('balloon_eval_term')
set balloonevalterm
set balloonexpr=ale#balloon#Expr()
endif
set balloonexpr=ale#balloon#Expr()
endfunction

@ -2,10 +2,14 @@
" Description: Functions for integrating with C-family linters.
call ale#Set('c_parse_makefile', 0)
call ale#Set('c_parse_compile_commands', 0)
let s:sep = has('win32') ? '\' : '/'
" Set just so tests can override it.
let g:__ale_c_project_filenames = ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt']
function! ale#c#FindProjectRoot(buffer) abort
for l:project_filename in ['.git/HEAD', 'configure', 'Makefile', 'CMakeLists.txt']
for l:project_filename in g:__ale_c_project_filenames
let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename)
if !empty(l:full_path)
@ -23,11 +27,11 @@ function! ale#c#FindProjectRoot(buffer) abort
return ''
endfunction
function! ale#c#ParseCFlagsToList(path_prefix, cflags) abort
function! ale#c#ParseCFlags(path_prefix, cflag_line) abort
let l:cflags_list = []
let l:previous_options = []
for l:option in a:cflags
for l:option in split(a:cflag_line, '-')
call add(l:previous_options, l:option)
" Check if cflag contained a '-' and should not have been splitted
let l:option_list = split(l:option, '\zs')
@ -59,32 +63,122 @@ function! ale#c#ParseCFlagsToList(path_prefix, cflags) abort
endif
endfor
return l:cflags_list
return join(l:cflags_list, ' ')
endfunction
function! ale#c#ParseCFlags(buffer, stdout_make) abort
function! ale#c#ParseCFlagsFromMakeOutput(buffer, make_output) abort
if !g:ale_c_parse_makefile
return []
return ''
endif
let l:buffer_filename = expand('#' . a:buffer . ':t')
let l:cflags = []
for l:lines in split(a:stdout_make, '\\n')
if stridx(l:lines, l:buffer_filename) >= 0
let l:cflags = split(l:lines, '-')
let l:cflag_line = ''
" Find a line matching this buffer's filename in the make output.
for l:line in a:make_output
if stridx(l:line, l:buffer_filename) >= 0
let l:cflag_line = l:line
break
endif
endfor
let l:makefile_path = ale#path#FindNearestFile(a:buffer, 'Makefile')
return ale#c#ParseCFlagsToList(fnamemodify(l:makefile_path, ':p:h'), l:cflags)
let l:makefile_dir = fnamemodify(l:makefile_path, ':p:h')
return ale#c#ParseCFlags(l:makefile_dir, l:cflag_line)
endfunction
" Given a buffer number, find the build subdirectory with compile commands
" The subdirectory is returned without the trailing /
function! ale#c#FindCompileCommands(buffer) abort
" Look above the current source file to find compile_commands.json
let l:json_file = ale#path#FindNearestFile(a:buffer, 'compile_commands.json')
if !empty(l:json_file)
return l:json_file
endif
" Search in build directories if we can't find it in the project.
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
for l:dirname in ale#Var(a:buffer, 'c_build_dir_names')
let l:c_build_dir = l:path . s:sep . l:dirname
let l:json_file = l:c_build_dir . s:sep . 'compile_commands.json'
if filereadable(l:json_file)
return l:json_file
endif
endfor
endfor
return ''
endfunction
" Cache compile_commands.json data in a Dictionary, so we don't need to read
" the same files over and over again. The key in the dictionary will include
" the last modified time of the file.
if !exists('s:compile_commands_cache')
let s:compile_commands_cache = {}
endif
function! s:GetListFromCompileCommandsFile(compile_commands_file) abort
if empty(a:compile_commands_file)
return []
endif
let l:time = getftime(a:compile_commands_file)
if l:time < 0
return []
endif
let l:key = a:compile_commands_file . ':' . l:time
if has_key(s:compile_commands_cache, l:key)
return s:compile_commands_cache[l:key]
endif
let l:data = []
silent! let l:data = json_decode(join(readfile(a:compile_commands_file), ''))
if !empty(l:data)
let s:compile_commands_cache[l:key] = l:data
return l:data
endif
return []
endfunction
function! ale#c#ParseCompileCommandsFlags(buffer, dir, json_list) abort
for l:item in a:json_list
if bufnr(l:item.file) is a:buffer
return ale#c#ParseCFlags(a:dir, l:item.command)
endif
endfor
return ''
endfunction
function! ale#c#FlagsFromCompileCommands(buffer, compile_commands_file) abort
let l:dir = ale#path#Dirname(a:compile_commands_file)
let l:json_list = s:GetListFromCompileCommandsFile(a:compile_commands_file)
return ale#c#ParseCompileCommandsFlags(a:buffer, l:dir, l:json_list)
endfunction
function! ale#c#GetCFlags(buffer, output) abort
let l:cflags = ' '
if g:ale_c_parse_makefile && !empty(a:output)
let l:cflags = join(ale#c#ParseCFlags(a:buffer, join(a:output, '\n')), ' ') . ' '
if ale#Var(a:buffer, 'c_parse_makefile') && !empty(a:output)
let l:cflags = ale#c#ParseCFlagsFromMakeOutput(a:buffer, a:output)
endif
if ale#Var(a:buffer, 'c_parse_compile_commands')
let l:json_file = ale#c#FindCompileCommands(a:buffer)
if !empty(l:json_file)
let l:cflags = ale#c#FlagsFromCompileCommands(a:buffer, l:json_file)
endif
endif
if l:cflags is# ' '
@ -95,8 +189,9 @@ function! ale#c#GetCFlags(buffer, output) abort
endfunction
function! ale#c#GetMakeCommand(buffer) abort
if g:ale_c_parse_makefile
if ale#Var(a:buffer, 'c_parse_makefile')
let l:makefile_path = ale#path#FindNearestFile(a:buffer, 'Makefile')
if !empty(l:makefile_path)
return 'cd '. fnamemodify(l:makefile_path, ':p:h') . ' && make -n'
endif
@ -158,19 +253,3 @@ let g:ale_c_build_dir_names = get(g:, 'ale_c_build_dir_names', [
\ 'build',
\ 'bin',
\])
" Given a buffer number, find the build subdirectory with compile commands
" The subdirectory is returned without the trailing /
function! ale#c#FindCompileCommands(buffer) abort
for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h'))
for l:dirname in ale#Var(a:buffer, 'c_build_dir_names')
let l:c_build_dir = l:path . s:sep . l:dirname
if filereadable(l:c_build_dir . '/compile_commands.json')
return l:c_build_dir
endif
endfor
endfor
return ''
endfunction

@ -113,7 +113,7 @@ function! ale#completion#Filter(buffer, suggestions, prefix) abort
for l:item in a:suggestions
" A List of String values or a List of completion item Dictionaries
" is accepted here.
let l:word = type(l:item) == type('') ? l:item : l:item.word
let l:word = type(l:item) is v:t_string ? l:item : l:item.word
" Add suggestions if the suggestion starts with a case-insensitive
" match for the prefix.
@ -133,7 +133,7 @@ function! ale#completion#Filter(buffer, suggestions, prefix) abort
" Remove suggestions with words in the exclusion List.
call filter(
\ l:filtered_suggestions,
\ 'index(l:excluded_words, type(v:val) is type('''') ? v:val : v:val.word) < 0',
\ 'index(l:excluded_words, type(v:val) is v:t_string ? v:val : v:val.word) < 0',
\)
endif
@ -214,8 +214,10 @@ function! ale#completion#Show(response, completion_parser) abort
" function, and then start omni-completion.
let b:ale_completion_response = a:response
let b:ale_completion_parser = a:completion_parser
" Replace completion options shortly before opening the menu.
call s:ReplaceCompletionOptions()
call ale#util#FeedKeys("\<Plug>(ale_show_completion_menu)")
call timer_start(0, {-> ale#util#FeedKeys("\<Plug>(ale_show_completion_menu)")})
endfunction
function! s:CompletionStillValid(request_id) abort
@ -315,10 +317,10 @@ function! ale#completion#ParseLSPCompletions(response) abort
let l:item_list = []
if type(get(a:response, 'result')) is type([])
if type(get(a:response, 'result')) is v:t_list
let l:item_list = a:response.result
elseif type(get(a:response, 'result')) is type({})
\&& type(get(a:response.result, 'items')) is type([])
elseif type(get(a:response, 'result')) is v:t_dict
\&& type(get(a:response.result, 'items')) is v:t_list
let l:item_list = a:response.result.items
endif
@ -336,7 +338,9 @@ function! ale#completion#ParseLSPCompletions(response) abort
endif
" See :help complete-items for Vim completion kinds
if l:item.kind is s:LSP_COMPLETION_METHOD_KIND
if !has_key(l:item, 'kind')
let l:kind = 'v'
elseif l:item.kind is s:LSP_COMPLETION_METHOD_KIND
let l:kind = 'm'
elseif l:item.kind is s:LSP_COMPLETION_CONSTRUCTOR_KIND
let l:kind = 'm'
@ -422,54 +426,65 @@ endfunction
function! s:GetLSPCompletions(linter) abort
let l:buffer = bufnr('')
let l:Callback = a:linter.lsp is# 'tsserver'
\ ? function('ale#completion#HandleTSServerResponse')
\ : function('ale#completion#HandleLSPResponse')
let l:lsp_details = ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback)
let l:lsp_details = ale#lsp_linter#StartLSP(l:buffer, a:linter)
if empty(l:lsp_details)
return 0
endif
let l:id = l:lsp_details.connection_id
let l:root = l:lsp_details.project_root
if a:linter.lsp is# 'tsserver'
let l:message = ale#lsp#tsserver_message#Completions(
\ l:buffer,
\ b:ale_completion_info.line,
\ b:ale_completion_info.column,
\ b:ale_completion_info.prefix,
\)
else
" Send a message saying the buffer has changed first, otherwise
" completions won't know what text is nearby.
call ale#lsp#NotifyForChanges(l:lsp_details)
" For LSP completions, we need to clamp the column to the length of
" the line. python-language-server and perhaps others do not implement
" this correctly.
let l:message = ale#lsp#message#Completion(
\ l:buffer,
\ b:ale_completion_info.line,
\ min([
\ b:ale_completion_info.line_length,
\ b:ale_completion_info.column,
\ ]),
\ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix),
\)
endif
function! OnReady(...) abort closure
" If we have sent a completion request already, don't send another.
if b:ale_completion_info.request_id
return
endif
let l:Callback = a:linter.lsp is# 'tsserver'
\ ? function('ale#completion#HandleTSServerResponse')
\ : function('ale#completion#HandleLSPResponse')
call ale#lsp#RegisterCallback(l:id, l:Callback)
if a:linter.lsp is# 'tsserver'
let l:message = ale#lsp#tsserver_message#Completions(
\ l:buffer,
\ b:ale_completion_info.line,
\ b:ale_completion_info.column,
\ b:ale_completion_info.prefix,
\)
else
" Send a message saying the buffer has changed first, otherwise
" completions won't know what text is nearby.
call ale#lsp#NotifyForChanges(l:id, l:root, l:buffer)
" For LSP completions, we need to clamp the column to the length of
" the line. python-language-server and perhaps others do not implement
" this correctly.
let l:message = ale#lsp#message#Completion(
\ l:buffer,
\ b:ale_completion_info.line,
\ min([
\ b:ale_completion_info.line_length,
\ b:ale_completion_info.column,
\ ]),
\ ale#completion#GetTriggerCharacter(&filetype, b:ale_completion_info.prefix),
\)
endif
let l:request_id = ale#lsp#Send(l:id, l:message, l:lsp_details.project_root)
let l:request_id = ale#lsp#Send(l:id, l:message, l:lsp_details.project_root)
if l:request_id
let b:ale_completion_info.conn_id = l:id
let b:ale_completion_info.request_id = l:request_id
if l:request_id
let b:ale_completion_info.conn_id = l:id
let b:ale_completion_info.request_id = l:request_id
if has_key(a:linter, 'completion_filter')
let b:ale_completion_info.completion_filter = a:linter.completion_filter
if has_key(a:linter, 'completion_filter')
let b:ale_completion_info.completion_filter = a:linter.completion_filter
endif
endif
endif
endfunction
call ale#lsp#WaitForCapability(l:id, l:root, 'completion', function('OnReady'))
endfunction
function! ale#completion#GetCompletions() abort

@ -40,9 +40,9 @@ function! ale#definition#HandleLSPResponse(conn_id, response) abort
" The result can be a Dictionary item, a List of the same, or null.
let l:result = get(a:response, 'result', v:null)
if type(l:result) is type({})
if type(l:result) is v:t_dict
let l:result = [l:result]
elseif type(l:result) isnot type([])
elseif type(l:result) isnot v:t_list
let l:result = []
endif
@ -60,43 +60,50 @@ endfunction
function! s:GoToLSPDefinition(linter, options) abort
let l:buffer = bufnr('')
let [l:line, l:column] = getcurpos()[1:2]
let l:lsp_details = ale#lsp_linter#StartLSP(l:buffer, a:linter)
let l:Callback = a:linter.lsp is# 'tsserver'
\ ? function('ale#definition#HandleTSServerResponse')
\ : function('ale#definition#HandleLSPResponse')
let l:lsp_details = ale#lsp_linter#StartLSP(l:buffer, a:linter, l:Callback)
if a:linter.lsp isnot# 'tsserver'
let l:column = min([l:column, len(getline(l:line))])
endif
if empty(l:lsp_details)
return 0
endif
let l:id = l:lsp_details.connection_id
let l:root = l:lsp_details.project_root
function! OnReady(...) abort closure
let l:Callback = a:linter.lsp is# 'tsserver'
\ ? function('ale#definition#HandleTSServerResponse')
\ : function('ale#definition#HandleLSPResponse')
call ale#lsp#RegisterCallback(l:id, l:Callback)
if a:linter.lsp is# 'tsserver'
let l:message = ale#lsp#tsserver_message#Definition(
\ l:buffer,
\ l:line,
\ l:column
\)
else
" Send a message saying the buffer has changed first, or the
" definition position probably won't make sense.
call ale#lsp#NotifyForChanges(l:id, l:root, l:buffer)
" For LSP completions, we need to clamp the column to the length of
" the line. python-language-server and perhaps others do not implement
" this correctly.
let l:message = ale#lsp#message#Definition(l:buffer, l:line, l:column)
endif
if a:linter.lsp is# 'tsserver'
let l:message = ale#lsp#tsserver_message#Definition(
\ l:buffer,
\ l:line,
\ l:column
\)
else
" Send a message saying the buffer has changed first, or the
" definition position probably won't make sense.
call ale#lsp#NotifyForChanges(l:lsp_details)
let l:column = min([l:column, len(getline(l:line))])
" For LSP completions, we need to clamp the column to the length of
" the line. python-language-server and perhaps others do not implement
" this correctly.
let l:message = ale#lsp#message#Definition(l:buffer, l:line, l:column)
endif
let l:request_id = ale#lsp#Send(l:id, l:message, l:lsp_details.project_root)
let l:request_id = ale#lsp#Send(l:id, l:message, l:lsp_details.project_root)
let s:go_to_definition_map[l:request_id] = {
\ 'open_in_tab': get(a:options, 'open_in_tab', 0),
\}
endfunction
let s:go_to_definition_map[l:request_id] = {
\ 'open_in_tab': get(a:options, 'open_in_tab', 0),
\}
call ale#lsp#WaitForCapability(l:id, l:root, 'definition', function('OnReady'))
endfunction
function! ale#definition#GoTo(options) abort

@ -557,7 +557,7 @@ function! s:RunJob(options) abort
if get(g:, 'ale_run_synchronously') == 1
" Run a command synchronously if this test option is set.
let s:job_info_map[l:job_id].output = systemlist(
\ type(l:command) == type([])
\ type(l:command) is v:t_list
\ ? join(l:command[0:1]) . ' ' . ale#Escape(l:command[2])
\ : l:command
\)

@ -4,11 +4,11 @@
" Given a filetype and a configuration for ignoring linters, return a List of
" Strings for linter names to ignore.
function! ale#engine#ignore#GetList(filetype, config) abort
if type(a:config) is type([])
if type(a:config) is v:t_list
return a:config
endif
if type(a:config) is type({})
if type(a:config) is v:t_dict
let l:names_to_remove = []
for l:part in split(a:filetype , '\.')

@ -275,7 +275,7 @@ function! s:RunJob(options) abort
if get(g:, 'ale_run_synchronously') == 1
" Run a command synchronously if this test option is set.
let l:output = systemlist(
\ type(l:command) == type([])
\ type(l:command) is v:t_list
\ ? join(l:command[0:1]) . ' ' . ale#Escape(l:command[2])
\ : l:command
\)
@ -313,10 +313,10 @@ function! s:RunFixer(options) abort
\ : call(l:Function, [l:buffer, copy(l:input)])
endif
if type(l:result) == type(0) && l:result == 0
if type(l:result) is v:t_number && l:result == 0