github dense-analysis/ale v4.0.0
ALE v4.0.0

14 hours ago

Deprecated Features

  • :ALEInfo' enhancements have led to some deprecations. See new features below. #3368
    • :ALEInfoToClipboard has been deprecated in favour of :ALEInfo -clipboard.

Removed Features / Breaking Changes

  • golint has been removed, as it represents long ago been deprecated and frozen. #4535
  • gometalinter has been removed, as it has been unsupported for a long time now. #4534
  • The minimum supported Neovim version is now 0.7.0, though ALE may still happen to work with Neovim versions lower than 0.7.0.
  • ALE will no longer look for ve-py3 as a virtualenv directory by default. #4481
  • The old g:ale_linters_sh_shell_default_shell option has been removed, and users should use g:ale_sh_shell_default_shell instead.
  • The ale_lsp_root option has been removed. Use ale_root instead.

New Features

  • virtual-text has been greatly enhanced in many ways since the last version.
    • virtual-text highlights are styled to look like comments in code by default in compatible Vim versions, so they look very subtle when editing code. #4401
    • You can use let g:ale_python_auto_virtualenv = 1 to automatically update PATH based on Python virtualenv locations to run executables. #2172
    • Better floating window borders are now used in Neovim. #4417
    • virtual-text messages can be vertically aligned to be easier to read with g:ale_virtualtext_column and g:ale_virtualtext_maxcolumn. #4473
    • virtual-text can be configured to only show the first error with g:ale_virtualtext_single. #4473
      • This is now the default setting, as it makes editing files less annoying.
    • ALE now uses a defined order for virtualtext problems on a single line.
      • The most severe problems are shown first, such as errors instead of warnings.
      • If two problems lie on the same line and are equally severe, ALE shows the first problem by column position on the line.
    • ALE now uses a separate ale_signs group for signs as to not disturb virtual text messages which use the group ale. #4704
  • Floating previews are now closed when you leave a buffer or scroll. #4409
  • ALE now sends diagnostics to Neovim's diagnostics API by default in compatible versions of Neovim. #4345 #4442 #4442 #4597 #4921
    • You use let g:ale_use_neovim_diagnostics_api = 0 to disable this behavior.
  • In Vim 8.2.3874 and up numhl highlights are now supported. #4578
  • In supported Vim versions ALE uses the ModeChanged event instead of InsertLeave emulation with a timer to run linters when leaving insert mode, which is less buggy and more efficient. #4738
  • ALE more efficiently fixes files in Neovim by using nvim_buf_set_lines. #3974
    • This avoids issues with Treesitter, but a known issue is this resets the jumplist and can disturb the cursor position. See #4735.
  • You can now automatically save changes to hidden buffers when LSP commands are run with let g:ale_save_hidden = 1.
  • :ALEInfo has been supercharged with a new set of features. #3368
    • Permit :ALEInfo -clip as a shorthand for :ALEInfo -clipboard
    • Support :ALEInfo -preview to render in the preview window
    • Support :ALEInfo -echo for the classic :ALEInfo mode
    • Change the default mode to 'preview', and make it configurable. See: :h ale_info_default_mode.
    • Add syntax highlighting for :ALEInfo in preview mode.
    • Add a convenience to look up documentation that explains itself.
    • Don't show an empty Linter Variables section.
    • :ALEInfo no longer reports information about its own window. #4618
  • ALE now defaults g:ale_disable_lsp to a new 'auto' mode. With this setting applied, ALE will now check for the presence of the nvim-lspconfig plugin and automatically turn off particular linters if already configured via nvim-lspconfig.
  • ALE now has an ALEStopLSP command to stop all language servers with provided names so only specific language servers can be stopped with a command.
  • When jumping to locations through :ALEGoTo... commands ALE will now present the user with a list of choices if more than one location is available. #4755
  • ale#floating_preview#Show, while not officially supported as part of ALE's API, now returns the preview window ID so you can more easily work with it. #4828
  • Matched text now appears in quickfix for :ALEFindReferences -quicfix for tsserver. #4898
  • If an ALE linter callback returns anything other than a List ALE will now silently treat the output as if it was an empty list. #4912

New Linters

New Fixers

Linter Enhancements

  • The following changes have been make to update ALE for better linter compatibility in newer versions.
    • nix versions before 2.4 should be supported as well as newer versions. #4398
    • The filename is made known to ruff in version 0.0.69 and up. #4414
    • ALE has been updated to run ruff with ruff check in versions 0.3.0 and up to make it compatible with those versions. #4732 #4802
    • ALE now uses --no-fix with ruff check so it doesn't modify files when linting. #4759
    • ansible-lint has been patched to work with versions 6.11.0 and newer. #4492
    • The VSCode JSON language server now works with newer versions that use the vscode-json-languageserver executable name instead of vscode-json-language-server. #4601
    • ALE has been updated to work with solhint versions newer than 3.4.0, as well as older versions. #4499
    • ALE has been updated to work with newer ruff versions. #4632
    • ALE has been updated to work with newer phpmd versions. #4617
    • The volar linter has been updated to work with version 1.0, and uses the global executable by default, which is required for Volar to function properly. #4552
    • ALE now handles stylelint error messages from stderr as well as stdout. This makes ALE support newer as well as older versions. #4702
    • ALE now uses JSON output in shellcheck versions 0.7.0 and above for creating more accurate highlights for problems. #4692
    • ALE now supports sqlfluff 3.0.0 and up, in addition to older versions. #4743
    • jq linter error message parsing has been updated to handle output from versions 1.6 and up. #4862
    • phpstan will now set the memory limit more appropriately for newer versions. #4900
  • phpstan will now set use the cwd to find the configuration file so configuration files are detected better. #4422
  • phpstan filenames will now be mapped correctly so it matches files better when run from inside of Docker. #4685
  • pyright can now be automatically be run via poetry, pipenv, venv. #4389 #4491 #4865
  • Python linters can now be run via uv. #4825 #4865
  • golangci-lint is no longer configured with --enable-all by default so it does not conflict with project configuration files and fail to run. #4488
  • golangci-lint is now enabled by default. #4536
  • golangci-lint now lints the package by default, as Go can implicitly reference symbols from other files. #4730
  • golangci-lint messages are now read from JSON output for more accurate parsing of linter output. #4917
  • bicep can now be run via Azure CLI via an az_bicep linter using the az command. #4496
  • The Ruby erb linter uses keyword arguments to avoid a deprecation warning and make it compatible with future Ruby versions. #4521
  • cspell has been updated to highlight the whole word. #4556
  • The glsllang linter parsing has been updated to catch more errors. #4540
  • The xmllint linter has been updated to work on XML files that haven't been saved yet. #4585 #4884
  • ALE now runs actionlint on GitHub configuration files by default by searching upwards for a .github directory.
  • actionlint now respects project configuration files by linting in the directory instead of a temporary location. #4584
  • actionlint will be run with an appropriate configuration file. #4858
  • actionlint now lints one file at a time via stdin instead of the whole directory. #4688
  • ALE now correctly parses messages from actionlint sub-linters. #4689
  • ALE now uses rust-analyzer by default for Rust instead of rls, which was previously deprecated. #4461
  • If luacheck is run for a Lua file in &runtimepath then ALE automatically adds --globals vim so the linter is aware of Vim globals. This makes it easier to lint Vim plugins written in Lua without having to configure anything manually.
  • .venv is the preferred project directory name for virtualenv directories for Python tools. #4481
  • Project file search for Haskell has been improved to find projects more reliably. #4541
  • ruff now uses json-lines output for better error messages. #4656
  • When ruff throws errors, don't explode with errors in Vim. #4714
  • chktex reports better highlight columns when tabs are used instead of spaces. #4661 #4727
  • ALE now passes a language ID to cspell so it can more accurately lint files. #4700 #4724
  • ALE now links to the shellcheck wiki in detailed messages. #4681
  • ALE more reliably detects the project root for Erlang projects. #4619
  • The elvis linter for Erlang now sets the working directory correctly. #4726
  • .eslintrc.cjs configuration files are now supported. #4742
  • ESLint flag configuration files are supported via the filenames eslint.config.js, eslint.config.mjs, and eslint.config.cjs. #4753
  • ALE now respects the modern ESLint strategy for loading configuration files in nested project directories. #4781
  • cmake-lint is now passed the real filename so the .cmake-format configuration file can be read. #4747
  • php-cs-fixer arguments are now placed in their proper place so options can be correctly configured. #4746
  • The Scala metals default executable was incorrectly named as metals-vim, and this has been fixed to be metals now. #4843
  • You can now use erlang-ls to select the erlang_ls linter. #4852
  • sqlfluff error messages without end line or column numbers are now handled. #4867
  • ALE now parses warnings from Zeek as well as errors. #4883
  • The search path is now set for iverilog to improve linting. #4907
  • The Python black linter is now told where a file is with --stdin-filename. #3406
  • opa check now runs on the entire directory for more context. #4531

Fixer Enhancements

  • The filename is made known to ruff in version 0.0.69 and up. #4414
  • The syntax_tree fixer now formats files without creating temporary files. #4834
  • The stylua fixer now uses --stdin-filepath and sets the cwd to where the configuration file is. #4873 #4892

Bugs Fixed

  • virtual-text messages are now correctly cleared if you are actively working on changes to ALE code. (Only impacts ALE developers.) #4399
  • Fixed errors when using virtual-text but not error highlights. #4400
  • Line 0 problems are placed on line 1 for virtual-text. #4331
  • virtual-text messages will no longer trigger errors if a buffer is unloaded before ALE can show a message. #4410
  • virtual-text messages will no longer trigger errors when buffers are deleted. #4413
  • virtual-text messages will now always be cleared when disabling ALE. #4475 #4476
  • The contents of a file passed to language servers when a file is saved have been fixed to use correct newlines. #4455
  • ALE wasn't telling language servers markdown text is supported and now does. #4453
  • ALE had a bug that was around for some time where echoed error messages would break the user out of visual mode. This has been fixed. #4560
  • Floating window support has been updated to work better in Neovim versions 0.10 and up. #4532
  • ALE no longer errors when trying to load syntax highlights for a filetype we don't have highlights for. #4574
  • Environment variable quoting wasn't quite right on Windows, and has been fixed. #3115
  • Leading spaces in Markdown code fences are now properly handled. #4505
  • Code fences without filetypes are handled properly now. #4699
  • b:undo_ftplugin has been added to ALE's ftplugin files for special filetypes so the changes they make can be undone. #4625
  • The Elm language server configuration was broken and has been fixed so it runs correctly now. #4707
  • ALE now sets PATH and VIRTUAL_ENV correctly when ale_python_auto_virtualenv is used. #4885

Don't miss a new ale release

NewReleases is sending notifications on new releases.