Commit Graph

4460 Commits

Author SHA1 Message Date
w0rp dca621b675
Fix #4505 - Handle spaces in markdown fences 2023-09-16 23:04:46 +01:00
w0rp e412fa34ff
Fix #3115 - Fix environment variable quoting on Windows 2023-09-16 22:33:59 +01:00
w0rp ae1d051504
#4454 Clean up more tests and code
* Remove some tests we no longer need
* Delete blocks of redundant code
* Compress some tests together to simplify them
* Remove a little code for ancient linter versions
* Escape more executables we didn't escape before
* Rename a deno option that didn't match our conventions
2023-09-16 22:23:30 +01:00
pokir 4b11cf21dc
Fix grammar in ale-java.txt (#4611) 2023-09-16 22:06:13 +01:00
w0rp cf270a1ada
Stop supporting ale_lsp_root
We renamed the ale_lsp_root setting to ale_root long ago. Stop
supporting the old setting name.
2023-09-16 17:17:42 +01:00
w0rp 1799f8bec6
Close #4458 - Add an ALEStopLSP command
Add an ALEStopLSP command to stop all language servers that match a
given name. Completions are available for the command. This makes it
possible to keep other language servers running other than the one
you're interested in stopping.
2023-09-16 17:03:02 +01:00
w0rp be69af2705
#4607 No conflicts with nvim-lspconfig by default
Default `g:ale_disable_lsp` to a new mode `'auto'` by default. With this
setting applied, ALE will now check for the presence of nvim-lspconfig
and automatically turn off particular LSP linters if already configured
via nvim-lspconfig.

For users that do not use `nvim-lspconfig`, everything should work as
before.
2023-09-14 00:40:56 +01:00
ymap 9092af9ad6
Add support for Packwerk (#4594)
Packwerk (https://github.com/Shopify/packwerk) is a Ruby gem
used to enforce boundaries and modularize Rails applications.
2023-09-13 15:53:24 +01:00
Axel Clark ac615e7f65
Add lexical for linting elixir projects (#4580) 2023-09-11 13:48:11 +01:00
w0rp 1bf445c6d5
Print the most severe problem with virtualtext
Fix the ordering of virtualtext so we print the most severe problem on a
line. If two problems are the most severe, we will print the left-most
problem.
2023-09-10 17:44:25 +01:00
w0rp 385dc4130c
Show a single virtualtext message by default
Show only a single virtualtext message per line by default. The setting
can be configured to whatever the user wants. This default prevents
several linters from spamming the editor with messages that run off into
the right margin.

Documentation now clarifies that problems have a predictable order, and
which message will come first.
2023-09-10 17:22:16 +01:00
Peter Benjamin 61892e8586
fix(json): update vscode json lsp name (#4601)
* fix(json): update vscode json lsp name
* fix(vscodejson): fallback to previous name

Co-authored-by: w0rp <devw0rp@gmail.com>
2023-09-09 23:28:38 +01:00
w0rp 92267a14ba
Remove backwards compatibility with ancient setting names 2023-09-09 23:13:44 +01:00
w0rp 7b56ddc3f6
Close #4481 Try .venv first, drop ve-py3
.venv was going to be the officially recommended default virtualenv
directory name in PEP 704, which was not accepted. Still, poetry uses
this name by default, as do other projects. We can deem it the first
name we should try to search for.

ve-py3 was a directory name I can't find mentions of online, and was
used in my own projects during the days of migrating from Python 2 to 3.
We can just drop it, and people can update their settings if they still
need it.
2023-09-09 22:57:01 +01:00
w0rp 65f0fd0d6a
#4442 - Use the same default signs as Neovim diagnostics 2023-09-09 16:44:54 +01:00
w0rp a16f060481
Close #4442 - Use Neovim diagnostics by default
Use Neovim's diagnostics API by default in recent enough Neovim
versions. This will make problems found by ALE play nicely with problems
found by other tools.
2023-09-09 16:34:55 +01:00
w0rp 0a135456a6
Clean up documentation typos and formatting 2023-09-09 15:40:30 +01:00
w0rp d2c2bbf2dc
Add `--globals vim` to luacheck automatically
luacheck will run with `--globals vim` automatically if the file is in
runtimepath and `--globals` hasn't already been configured.
2023-09-09 14:01:00 +01:00
w0rp 79a2dc2d8a
#4442 Display error codes in Neovim diagnostics 2023-09-09 00:10:27 +01:00
w0rp e4411276a5
#4442 Configure signs in Neovim diagnostics
Respect ALE's options to enable/disable signs in Neovim diagnostics,
and use ALE's priority setting.
2023-09-08 23:54:16 +01:00
w0rp dadc778451
#4605 Use a single time for InsertLeave emulation
Use a single timer for InsertLeave emulation to optimise it for many
buffers, and specifically lint the buffer we entered insert mode on.
2023-09-08 18:51:04 +01:00
w0rp dd3abf1ad9
Close #4605 - Emulate InsertLeave mode
Use a repeating timer to emulate InsertLeave mode for users who have not
rebound <C-c> to <Esc>, like many experienced Vim users do. This allows
ALE to start linting when you finish typing by default without having
to know about this quirk in Vim or Neovim.
2023-09-08 18:42:45 +01:00
w0rp bf55175b69
#4454 Clean up root test directory tests
Combine cases into smaller tests of tests and remove tests we no longer
need. Linter tests have been moved to where they should be.
2023-09-08 01:00:35 +01:00
w0rp e5816964d1
Give up on Windows tests again for now
Add directories and files to AppVeyor to make it skip running if it
doesn't need to run.
2023-09-07 21:20:58 +01:00
w0rp 89428cb957
Try windows-2019, as windows-latest is slow as Hell 2023-09-07 21:06:44 +01:00
w0rp 0d07f4dba6
Try to fix building Vader again 2023-09-07 20:57:13 +01:00
w0rp bf8e7f6368
Stop redirecting error streams for Vader build 2023-09-07 20:54:35 +01:00
w0rp 752acbe79b
Try http:// for downloading Vim 2023-09-07 20:52:42 +01:00
w0rp 9713faf192
Attempt running Windows rests relative to GitHub dir 2023-09-07 20:47:20 +01:00
w0rp d52c3db238
Try to fix GitHub Actions 2023-09-07 20:38:32 +01:00
w0rp 99a33d8d3f
Try to test ALE on Windows in GitHub 2023-09-07 20:29:35 +01:00
w0rp 108e858d61
Update minimum supported NeoVim version to 0.6.0
Stop officially supporting NeoVim versions below 0.6.0, without
necessarily breaking ALE for people using older versions.
2023-09-07 20:01:31 +01:00
w0rp 14350dbb0d
Close #3368 - Supercharge :ALEInfo
Make a series of sweeping changes to make :ALEInfo more useful.

1. Deprecate :ALEInfoToClipboard and support :ALEInfo -clipboard
2. Permit :ALEInfo -clip as a shorthand for :ALEInfo -clipboard
3. Support :ALEInfo -preview to render in the preview window
4. Support :ALEInfo -echo for the classic :ALEInfo mode
5. Change the default mode to 'preview', and make it configurable
6. Add syntax highlighting for ALEInfo in preview mode
7. Add a convenience to look up documentatation that explains itself
8. Don't show an empty 'Linter Variables' section
2023-09-06 00:21:58 +01:00
w0rp 551fbcfb09
Add an option to save hidden buffers
When commands are run, it can be useful to just save the hidden buffers
so language servers immediately get updated with changes to files
without you having to manually save each file. You can now enable this
by setting `g:ale_save_hidden` to `1`.
2023-09-06 00:17:27 +01:00
w0rp 8ba7ae818c
Close #4461 - Use rust-analyzer by default
Use rust-analyzer by default instead of rls, as rls has been deprecated.
2023-09-05 21:45:34 +01:00
Henrique Barcelos 64ddf457e1
Feature: add `forge fmt` as a fixer for Solidity files (#4598)
* feat: add `forge fmt` as a fixer for Solidity
2023-09-05 18:34:39 +01:00
Magnus Groß 59e455b4d8
Improve ALEFix performance for neovim (#3974)
* Avoid performance problems with setbufline() and Treesitter

Call nvim_buf_set_lines() instead.

Since this is a performance problem only in Neovim (Treesitter is only
available there), it doesn't matter that this API is unavailable in Vim.

Note: nvim_buf_set_lines() returns E5555, when set nomodifiable is on.

Fixes #3669

* Avoid sign flickering

The signs flickered because nvim_buf_set_lines() removes all signs from
lines that it touches, which will immediately be readded by Ale (causing
the brief flicker). This is intended behaviour in neovim [0].

Neovim itself faced this problem in their own LSP formatting sync,
although they had the problem with marks instead of signs [1].
Similar to how neovim fixed it by storing and restoring the marks [2],
we can do the same thing with signs.

In fact it is easier with signs, because sign_placelist() will just
ignore and skip invalid line numbers, so we don't need to filter signs
that are not valid anymore.

[0] https://github.com/neovim/neovim/issues/10880#issuecomment-526466042
[1] https://github.com/neovim/neovim/issues/14307
[2] https://github.com/neovim/neovim/pull/14630
2023-09-05 14:36:17 +01:00
xu0o0 ea27441834
fix(neovim): ignore unrelated diagnostics (#4597)
Fix the NeoVim diagnostics bridge so it only sends over diagnostics relevant to the current buffer.
2023-09-05 14:34:33 +01:00
Peter Benjamin 3bedafc29a
fix(yaml): make actionlint respect config (#4584)
* fix(yaml): make actionlint respect config
* docs: update actionlint docs
* chore: update author & add description
* test: move actionlint test to test/linter/
2023-09-05 14:33:41 +01:00
jiz4oh 115ad17ace
Support format xml file which haven't yet persisted at the disk (#4585)
Support format xml file which haven't yet persisted at the disk
2023-08-20 10:43:31 +01:00
ymap d1bac104a1
Fix typo in filename (#4595) 2023-08-20 10:33:37 +01:00
Tomáš Janoušek fe38101db7
Fix error loading "text" syntax for hover (#4574)
rust-analyzer sometimes returns a hover result with language being
"text", but there's no syntax/text.vim, so this would fail with:

    Error detected while processing function <SNR>150_VimOutputCallback[6]..<lambda>8[1]..ale#lsp#HandleMessage[30]..ale#hover#HandleLSPResponse[42]..ale#floating_preview#Show[13]..<SNR>161_VimShow:
    line   13:
    E484: Cannot open file syntax/text.vim

Only including the file when it actually exists fixes this.
2023-08-15 11:20:47 +01:00
Matheus Werny 951b280bd5
yamlfmt (#4587)
* Added the fixer, wrote tests and tested it
2023-08-15 10:15:06 +01:00
Rodrigo Mesquita 15cbc0e912
Close #4579 - Support numhl highlights for vim >= 8.2.3874
In #2637, support for numhl highlights was added for nvim.

In the meantime, vim added support for numhl highlights in patch 8.2.3874.

This patch allows numhl highlights to be enabled in ALE for vim >= 8.2.3874 too.
2023-08-05 18:10:03 +01:00
Oskar Haarklou Veileborg af42e0b510
floatwin: use win_execute in NeoVim for commands when it exists (#4532) 2023-08-01 21:30:23 +01:00
Peter Benjamin 0bc2ea0800
docs: fix typo (#4567)
Closes #4517

Co-authored-by: Peter Benjamin <peterbenjamin@peters-mbp.lan>
2023-08-01 21:23:53 +01:00
Peter Benjamin 18cd44c57d
feat(markdown): add marksman lsp (#4565)
* feat(markdown): add marksman lsp
* docs: add marksman docs
* test(markdown): add marksman test

Co-authored-by: Peter Benjamin <peter.benjamin@peter.benjamin-FVFHP2WSQ05Q>
2023-08-01 21:23:02 +01:00
Amadeus Demarzi 1174b3b81e
Don't echom if not in normal mode (#4560) 2023-07-31 08:39:30 +01:00
Wooter b216892f0c
Communicate support for markdown to the lsp server (#4450) (#4453) 2023-07-25 10:43:57 +01:00
JoseGRuiz 481c5cccbf
fixed parsing errors when certain options are used in glslangValidator (#4540)
* fixed parsing errors when certain options are used in glslang

* Update glslang.vim

set column number to 0 like it is always set by glslangValidator

* Added a test for the handler of glslangValidator
2023-07-24 21:43:13 +09:00