Commit Graph

4556 Commits

Author SHA1 Message Date
PizZaKatZe
22185c4c5c Remove ANSI color codes from nix linter messages (#4944)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Remove ANSI color codes from nix linter messages

* Add test for color-coded nix linter findings

* Fix test: Escape backslashes

---------

Co-authored-by: Sebastian Neuser <sebastian.neuser@fnordkollektiv.de>
Co-authored-by: Sebastian Neuser <haggl@sineband.de>
2025-04-07 20:23:13 +09:00
Josh Pencheon
2883260ade Correctly identify tempfiles once symlinks are resolved (#3726)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Some linters will expand the paths of symlinked tempfiles when
reporting them back to ALE. This ensures that if they do, the filename
is still flagged appropriately as being temporary.
2025-04-02 21:48:32 +09:00
Dmitri Vereshchagin
090d31b79a Always use safe file local variables for erlang-mode fixer (#4942)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
File local variables in Emacs are used in a way similar to Vim
modelines.  For example, at the end of the file you might find something
like the following:

    %% Local Variables:
    %% erlang-indent-level: 2
    %% something-weird: t
    %% End:

The `erlang-indent-level' variable in this list instructs the Erlang
mode to use two columns per indentation level.  But since the
`something-weird' variable is likely unknown, both may be ignored.

By default, Emacs in batch mode ignores all variable/value pairs if it
encounters at least one that is not known to be safe.  Setting
`enable-local-variables' to `:safe' tells Emacs to use only safe values
and ignore the rest.
2025-04-01 20:44:57 +09:00
Horacio Sanson
067e74fee8 Add support for glnagci-lint v2 (#4936)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Version 2 of golangci-lint introduces several breaking changes to the
command line arguments and the configuration file.

Thi PR updates ale integration to support both version 1.6x.x and 2.x.x
of golangci-lint.
2025-03-31 11:46:42 +01:00
Dmitri Vereshchagin
ff8fe94494 Remove hadolint rule code from location list entry text (#4939)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
The code is already passed with the code key of location list entry.
Before this change, when using the default message format, it appeared
twice in the description of each location list entry and twice in each
echo message.
2025-03-30 13:58:04 +09:00
w0rp
6433d31f47 Update ale_disable_lsp documentation to clarify options
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-03-29 13:34:22 +00:00
w0rp
f3f0b05240 Fix #4935 - Send tsserver messsages to tsserver in Neovim 2025-03-29 13:25:49 +00:00
w0rp
add538213f Set up Lua development for Macs with Homebrew
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-03-28 16:20:18 +00:00
w0rp
dd23b92ee9 #3600 Implement pull model with Neovim Client
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Implement the diagnostics pull model with the LSP Neovim client. We
must handle messages a little different and tweak client capabilities
for pull diagnostics to work through the Neovim client.
2025-03-27 12:40:11 +00:00
w0rp
f90e72ae1f Close #3600 - Implement pull diagnostics in VimL
Implement pull diagnostics in the VimL implementation so ALE is able
to track when servers are busy checking files. Only servers that
support this feature will return diagnostics these ways.
2025-03-27 12:40:11 +00:00
w0rp
26ffb9dfa3 Implement ale.queue for calling ale#Queue in Lua 2025-03-27 12:40:11 +00:00
w0rp
db43854ca3 Implement ale.pad in Lua 2025-03-27 12:40:11 +00:00
w0rp
b85e5191a3 Implement ale.get_filename_mappings in Lua 2025-03-27 12:40:11 +00:00
w0rp
ecf815891d Add ale.has to mirror ale#Has in Lua 2025-03-27 12:40:11 +00:00
w0rp
bd591d47f2 Add basic Lua ALE functions and test coverage
Ensure that basic ALE functions `ale.var`, `ale.escape`, and `ale.env`
are available in Lua. Cover all Lua code so far with busted tests,
fixing bugs where ALE variables can be set with Boolean values instead
of numbers. Document all functionality so far.
2025-03-27 12:40:11 +00:00
w0rp
06f4b6fe25 Detect the Lua project root using .luarc.json 2025-03-27 12:40:11 +00:00
w0rp
400857d758 Implement Lua ALE setup & overhaul documentation
1. Add ale.setup and ale.setup.buffer for pure Lua configuration.
2. Update many global settings to use Booleans instead of numbers to
   make types easiert to work with in Lua.
3. Radically reformat documentation and fix errors to make
   documentation more usable for Neovim users.
2025-03-27 12:40:11 +00:00
w0rp
2280d41b30 Support g:ale_shell with the Neovim LSP client 2025-03-27 12:40:11 +00:00
w0rp
cdbd218a82 Add Neovim TCP connections to language servers
Support TCP connections to language servers through Neovim's built in
client. In all but what is currently the nightly builds of Neovim
connections via a hostname will fail, but connections via an IP address
should function. We will still enable the built in Neovim client by
default anyway, as LSP clients very rarely connect over TCP.
2025-03-27 12:40:11 +00:00
w0rp
73b568b071 Supply language_id values to Neovim LSP API
Change logic so ALE's LSP implementation and the Neovim LSP client
retrieve the language_id for language clients at roughly the same time
via the same means. This makes ALE inform the language server what the
language for the language is for clients.
2025-03-27 12:40:11 +00:00
w0rp
4f4d68f153 Fix tests for Neovim LSP integration 2025-03-27 12:40:11 +00:00
w0rp
25547c856e Update documentation for Neovim LSP integration
Update documentation to advertise ALE's integration with Neovim's native
LSP client, and explain how functionality is integrated with ALE,
Neovim's native tools, and other plugins.
2025-03-27 12:40:11 +00:00
w0rp
cec1b26d82 Clean up message handling for LSP integration
Now we ought to be able to handle any kind of response for any request
we send, clean up message handling so there are fewer changes to make
to LSP code to adjust for Neovim integration.
2025-03-27 12:40:11 +00:00
w0rp
33377583fd Handle other LSP capabilities via ALE
Save capabilities from language servers ALE connects to via Neovim's LSP
client and handle responses to requests ALE sends to language servers.
This enables ALE to work with Neovim's language client for its commands
while also letting users directly use the connected clients for native
Neovim keybinds and so on.
2025-03-27 12:40:11 +00:00
w0rp
22c741648f Remove the log_level line from Lua code 2025-03-27 12:40:11 +00:00
w0rp
338f3eeb73 Handle Neovim LSP diagnostics via ALE's functions 2025-03-27 12:40:11 +00:00
w0rp
8ee20eca4b Start up language servers with Neovim's API
Get language servers starting and displaying diagnostics with Neovim's
API in Neovim 0.8 and up. With this set up, now ALE needs to take over
handling diagnostics returned by the language servers.
2025-03-27 12:40:11 +00:00
dcai
f3512cd778 fix(biome): update biome to replace deprecated arguments (#4934) 2025-03-27 12:37:31 +00:00
Horacio Sanson
7fcc0548b0 (feat) add support for kulala_fmt fixer (#4925)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* (feat) add support for kulala_fmt fixer

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2025-03-18 12:40:52 +00:00
w0rp
9ce2c29df1 Simplfiy zlint configuration and tests 2025-03-18 12:33:58 +00:00
Enrique Miguel Mora Meza
59c996c5b8 Support for Zlint as Zig linter (#4923)
* feat: Add Zig zlint linter and handler for ALE
* docs: Add zlint documentation to ALE Zig integration guide
* docs: Updating docs for zlint support
* tests: Adding tests for checking zlint executable and command
* refactor: Move zlint configuration test to separate test file
2025-03-18 12:30:05 +00:00
w0rp
c4cedeea3f Remove unreliable yls test for now 2025-03-18 11:57:49 +00:00
w0rp
f3b6269388 Make yls tests work better locally 2025-03-18 11:38:47 +00:00
Adrian Vollmer
47f1f49655 Add linting support for all formats supported by djlint (#4920)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
* Refactor djlint linter code

This patch moves the code to the `autoload` directory, so it's available
when it's needed by a specific linter. This avoids redundant code when
another format supported by djlint is added.

* Add linting support for all formats supported by djlint

So far, the `djlint` linter in ALE only supported `html`, which is only
one of several file types supported by `djlint`.

This patch adds support for the following file types:

* gohtmltmpl
* handlebars
* htmlangular
* htmldjango
* jinja
* nunjucks

* Add djlint fixer for various HTML template formats

* Supported formats:
    - html
    - htmlangular
    - htmldjango
    - jinja
    - handlebars
    - nunjucks
    - gohtmltmpl

* Add doc entries

* Add vader tests

---------

Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
2025-03-18 07:56:32 +09:00
Adrian Vollmer
fe6a91fb92 Add the typstyle formatter as a fixer for Typst (#4927)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Co-authored-by: Adrian Vollmer <computerfluesterer@protonmail.com>
2025-03-17 21:10:24 +09:00
K4YT3X
995d78435a fix(golangci-lint): incorrect filename concat preventing errors from being displayed (#4926)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
Signed-off-by: k4yt3x <i@k4yt3x.com>
2025-03-16 09:56:27 +09:00
w0rp
1c91102112 Bump the ALE version to 4.0.0
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
v4.0.0
2025-03-14 11:58:10 +00:00
w0rp
8506d0d1ae Fix the ftplugin for ALEInfo in Vim 8.0
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
2025-03-14 09:40:08 +00:00
w0rp
15bf26632c Close #4618 - Do not show info for the ALEInfo window 2025-03-14 09:19:41 +00:00
Simon Lundström
1acd964a2b Fix docs for variable names (#4922)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
2025-03-12 17:43:46 +00:00
Braden Kelley
07b0496f6d Run opacheck on entire dir for more context (#4531)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Running `opa check` on a single file can report errors that might not
exist when considering other files in the same directory
2025-03-11 20:05:06 +00:00
JINNOUCHI Yasushi
61191dd4bf feat: remove logic for unsupported older Neovim (#4921)
See #4872

Now we no longer support Neovim 0.6 or older, we can remove logic in Lua code for supporting it.
2025-03-11 19:57:38 +00:00
JINNOUCHI Yasushi
e4a2bff0f2 Consider the original config for signs in Neovim (#4872)
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-07-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
Preserve a user-configured sign priority in Neovim if set, and use the ALE setting if not configured otherwise.
2025-03-11 13:14:21 +00:00
w0rp
a49943aa62 Update GitHub Actions to test with Neovim 0.7 2025-03-11 13:06:21 +00:00
w0rp
564369db58 Update the minimum supported Neovim version to 0.7 2025-03-11 13:04:52 +00:00
tony-o
92753662a7 Add scadformat fixer for OpenSCAD (#4808)
Add scadformat to ALE

---------

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2025-03-11 13:00:03 +00:00
Raph471
b26608681d Add pymarkdown for Markdown linting (#4906)
Add support for pymarkdown

Closes #4785
2025-03-11 12:31:31 +00:00
TcM1911
f0c8eb4fa8 Add Yara yls support (#4886)
This adds Yara support to ALE using Avast's language server for Yara:
https://avast.github.io/yls/

A ".git" folder is used to determine the project_root so this means the
Yara rules must be in a git repo for the integration to work.

The server only have 1 optional argument (-v, --verbose). Since this is
the case, no additional configuration options are available.

---------

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2025-03-11 12:18:29 +00:00
w0rp
0f71d4c494 Use ModeChanged events instead of InsertLeave emulation #4919 #4738
Some checks are pending
CI / build_image (push) Waiting to run
CI / test_ale (--linters-only) (push) Blocked by required conditions
CI / test_ale (--neovim-06-only) (push) Blocked by required conditions
CI / test_ale (--neovim-08-only) (push) Blocked by required conditions
CI / test_ale (--vim-80-only) (push) Blocked by required conditions
CI / test_ale (--vim-90-only) (push) Blocked by required conditions
`ModeChanged` looks like a more reliable way to detect an "exit insert mode" event and is a lot simpler (doesn't need a timer). Also, it can detect some other transitions like `\<C-o\>` in insert mode.
The `ModeChanged` event is available in:

* [Vim 8.2.3430](f1e8876fa2)
* [NeoVim 0.7.0](69bd1e4e36)

---------

Co-authored-by: Dmitry Zolotukhin <zlogic@gmail.com>
2025-03-10 21:28:20 +00:00
Vivian De Smedt
3611c32d60 Add support for the [djlinter](https://www.djlint.com/) (#4909)
Some checks failed
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--neovim-06-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Add support for the [djlinter](https://www.djlint.com/)

* Add documentation and tests.

* Fix the name of the variable for the executable name.

* Correct the name of the handler in the test.

* Correct the test adding the value of vcol.

* Format djlint.vim according to formatting rules.
2025-03-08 16:45:17 +09:00