Skip to content

ALE v3.0.0

Compare
Choose a tag to compare
@w0rp w0rp released this 09 Sep 21:07
· 823 commits to master since this release
08295ce

Deprecated Features

  • The g:ale_completion_tsserver_autoimport option has been deprecated. Use g:ale_completion_autoimport instead.

Removed Features / Breaking Changes

Many previously deprecated features have been removed. Here is a list of the features removed, and what you should use instead.

Removed Replacement
:ALEGoToDefinitionInTab :ALEGoToDefinition -tab
:ALEGoToDefinitionInSplit :ALEGoToDefinition -split
:ALEGoToDefinitionInVSplit :ALEGoToDefinition -vsplit
:ALEGoToTypeDefinitionInTab :ALEGoToTypeDefinition -tab
:ALEGoToTypeDefinitionInSplit :ALEGoToTypeDefinition -split
:ALEGoToTypeDefinitionInVSplit :ALEGoToTypeDefinition -vsplit
ale#engine#ManageFile ale#command#ManageFile
ale#engine#ManageDirectory ale#command#ManageDirectory
ale#engine#CreateFile ale#command#CreateFile
ale#engine#CreateDirectory ale#command#CreateDirectory
(linter) command_chain ale#command#Run
(linter) 'command_callback': 'Foo' 'command': function('Foo')
(linter) 'executable_callback': 'Foo' 'executable': function('Foo')
(linter) 'address_callback': 'Foo' 'address': function('Foo')
(linter) 'language_callback': 'Foo' 'language': function('Foo')
(linter) 'initialization_options_callback': 'Foo' 'initialization_options': function('Foo')
(linter) 'lsp_config_callback': 'Foo' 'lsp_config': function('Foo')
(fixer) chain_with ale#command#Run

You can update your scripts to work with the current or previous versions of ALE by checking the ALE version with ale#Has('ale-2.7.0').

The following <Plug> mappings were previously scheduled for deprecation, but instead will be supported forever, and are now documented again.

  • <Plug>(ale_go_to_definition_in_tab)
  • <Plug>(ale_go_to_definition_in_split)
  • <Plug>(ale_go_to_definition_in_vsplit)
  • <Plug>(ale_go_to_type_definition_in_tab)
  • <Plug>(ale_go_to_type_definition_in_split)
  • <Plug>(ale_go_to_type_definition_in_vsplit)

Removed linter options

The following linter options have been replaced.

  • ale_psalm_langserver_executable -> ale_php_psalm_executable
  • ale_psalm_langserver_options -> ale_php_psalm_options
  • ale_psalm_langserver_use_global -> ale_php_psalm_use_global

make dry run parsing on BSD

ALE now uses make -n --always-make for parsing make dry runs on Linux and BSD. This will not work at all with BSD make, and there's no way to automatically take the option away for BSD users without making ALE worse on all other systems. BSD users should use let g:ale_c_always_make = 0 to make it work again. This issue does not affect Mac OSX users, because ALE can use !has('macunix') to disable the option by default for Mac OSX users.

Generic cc Linter

The existing gcc and clang linters have been replaced with a generic cc linter, which can be selected with any of the old linter names. This combined linter now attempts to run clang if available, and falls back to running gcc. See issue #3299 for more information.

New Features

  • ALE now supports linting or fixing files via Docker containers, virtual machines, remote file systems, etc. #2556 #3325
  • %s and %t in commands can now be formatted with :h, :t, :r, and :e, to apply filename-modifiers. #2556
  • lint_file for linters can now be computed dynamically, and from deferred results, so linters and dynamically switch between running only against files on disk, or checking code on the fly. #3285
  • Parsing compile_commands.json for automatically figuring out flags for compilers is now enabled by default, and several improvements have been made to how ALE handles flags for C/C++ linters.
  • ALE will now show LSP/tsserver hover information in your echo line when your cursor rests on a symbol ALE can get information about. #1532
  • ALE now handles some Markdown formatting in hover text, and set syntax highlights when displaying hover text where possible. #3274
  • ALE now supports renaming symbols (:ALERename) with connected LSP servers that support it, like gopls. #3047 #3196 #2943
  • ALE can now be configured to provide auto-completion with imports for LSP servers. #2976 #3196 #3267
  • A new :ALEImport command can be used to request imports for words at the cursor. #3268
  • You can now disable warnings in tsserver completion results, which may not be relevant to you. #2849
  • When completion text is inserted, including through :ALEImport, a new ALECompletePost event is triggered. #3333
  • You can now call :ALEFix with a bang (:ALEFix!) to suppress warnings/errors, such as through ALECompletePost. #3333
  • A new :ALELintStop command has been added which lets you stop any linters currently running. #3333
  • ALE is able to better recognise when newer LSP servers support capabilities like hover, "go to definition," etc. #2907
  • Ignored linters now appear clearly in :ALEInfo. #3003

New Linters

  • AsciiDoc - languagetool #3229
  • Python - pyright - #2472
  • sh - bashate #2732 #3070
  • Swift - swift-format #3007 (Not to be confused with swiftformat, which is a different tool and fixer.)
  • SQL - sql-lint #2988
  • Verilog - hdl-checker #2804
  • zig - zls #3232

New Fixers

Linter Enhancements

  • pylint now checks code as you type if you have installed a new-enough version. #2522
  • dockerfile_lint now shows more useful information in detailed error messages. #3158
  • The documentation for cloudformation linters has been improved a little bit. #3172
  • The eclipselsp linter now starts better on more platforms. #3137
  • ktlint uses stdin now, so .editorconfig files can be loaded. #3119 #3029
  • The checkstyle linter now handles options better. #2914
  • The markdownlint linter now parses more output. #3259
  • More markdownlint versions are now supported. #3253
  • You can now pass options for markdownlint #2940
  • The puppet linter now parses output better. #3223
  • The cppcheck linter now works with more recent versions of cppcheck, and parses column numbers and error codes.
  • The govet linter now works with more recent versions of Go. #3191
  • PowerShell linters now work by default when the filetype is ps1. #3010
  • The sh linter will now check scripts with the current filetype if there's no hashbang line. #2906
  • You can now set custom target directories for cargo with ale_rust_cargo_target_dir. #3164
  • The vlog linter parses the filename for the errors now. #2924
  • credo now recognizes umbrella projects #2759
  • rls is now enabled by default. #3324
  • gcc errors from failed macros are now parsed and reported. #3327
  • The policy name is now included in vint messages #3194
  • You can now configure flake8 to try to run from the Python project root. This is the new default. #2858
  • The ember-template-lint linter now reads from stdin too, for newer versions. #2622

C/C++ flag detection

A wide range of improvements have been made to how ALE detects C/C++ compiler flags.

  • Paths from compile_commands.json are now resolved in a much better way, which results in a massive improvement in how ALE determines flags for files. #3307
  • The ccls linter now detects compile_commands.json in other directories. #3123 #2621
  • compile_commands.json flags can now be used for linting header files. #2919
  • ALE now tells clang-tidy that .h files are C++ files when the filetype is set to C++ in Vim. #1608
  • @file arguments in compile_commands.json are now handled. #3178
  • -std flags from _options settings for C/C++ linters are now replaced by flags parsed from compile_commands.json or make -n. #3056
  • ALE now uses make -n --always-make by default on Linux and BSD, to fix issues with ALE not reading flags after make is run. See above notes on breaking changes for BSD. #2038 #3247
  • -fstack-usage is now removed from parsed C flags, which breaks linters. #3200
  • -iframework is now included in parsed C flags. #3057
  • -include is now included in parsed C flags. #3317

Fixer Enhancements

  • The tslint fixer should work with newer versions again. #3107
  • You can now set ale_ruby_rubocop_auto_correct_all to 1 to apply unsafe fixes in Rubocop. #3237
  • The rubocop fixer now fixes via stdin with the filename, which makes the fixes more accurate. #3230
  • The prettier-standard fixer should now respect configuration files. #2920
  • The prettier fixer now runs from where .prettierignore is to ignore files, if available. #3101
  • The standard fixer should work again. Updates to standard broke it. #3046

Bugs Fixed

  • The ESLint fixer now users the same directory switching logic that the linter uses, for plugin detection. #3094
  • ESLint linters and fixers now search for the location of ESLint and plugins by finding the node_modules directory that contains an ESLint executable. #3222
  • LSP servers like mspyls can respond with invalid hover data, which caused errors in ALE. ALE handles this invalid data now. #3273
  • URI encoding/decoding for paths sent to and from LSP servers now handles UTF-8 paths. #3278
  • ALE hover messages could send a column index -1, which caused some servers to crash. #3294
  • ALE now handles LSP servers crashing, and re-sends initialized messages when they do. #3294
  • When ALE wrote files, it could append extra newline characters when you've configured Vim not to add them. Now they will not be added. #3144
  • tsserver completion results from default exports will now insert the name of the default export. #2899
  • The eclipselsp linter could find the Java path in a broken way. #3288
  • :ALERepeatSelection now repeats -relative from :ALEFindReferences, etc. #3316
  • ALE no longer inserts garbage when completion is enabled and 'paste' mode is enabled. #2971
  • Completion now avoids inserting text by default. #3205
  • Carriage return characters are now removed from some messages on Windows. #2958
  • ALERename no longer generates garbage due to changes not being applied in order. #3322
  • Special characters in filenames like [ and ] broke showing diagnostics from tsserver/LSP. They are escaped now. #3183