Commit Graph

4459 Commits

Author SHA1 Message Date
Bryan Garber 70eeae54fb
Implement listing all returned results for LSP textDocument/implements (#4755)
* Fix list of definitions
* Fix when LSP returns single response on definition/implementation
* Update tag stack on ShowSelection
2024-05-01 11:58:06 +01:00
Yining d19b238aa2
fix: force `--no-fix` when `ruff` used as a linter (#4759)
this commit is to fix #4756 which suggests to force disable applying
fixes when linting, particularly when `fix = true` was set in project
`pyproject.toml` file.

The flag `--no-fix` was added without checking the version of `ruff` at
this moment as it seems to be available in a quite early version.
2024-04-26 18:29:17 +09:00
Mathew Attlee adee52fba0
feat: detect ESLint flat config (#4753) 2024-04-20 19:14:48 +01:00
Arash Mousavi 7516e2e484
Add htmlbeautifier support (#4751) 2024-04-17 23:58:28 +09:00
Kevin Van Leer 6db58b3379
Added fix subcommand options (#4746)
php-cs-fixer command line options are ordered. Options that appear after the
main command are applied to the main command. Options that appear after the
subcommands are applied to the subcommands. This change enables a user to
specific fix options (like --config). This change also sets the plugin to
find the the configuraiton file in the current project tree. This matches
the default behavior of other linters like eslint.
2024-04-07 17:34:02 +09:00
Chayoung You b6b9612691
Make cmake-lint read .cmake-format config file (#4747) 2024-04-07 10:32:19 +09:00
elig0n 6c10a519f1
Fix typos (#4745) 2024-03-20 17:06:33 +09:00
Shad 712b4b3a97
Add support for sqlfluff 3.0.0 (#4743)
As stated in the changelog:
"the original fields of line_pos and line_no have been renamed to start_line_pos and start_line_no, to distinguish them from the new fields starting end_*"
2024-03-14 09:09:56 +09:00
Andrew Brunker 831f739340
docs: Add lazy.nvim configration #4694 (#4739)
* docs: Add lazy.nvim configration #4694

* docs: fix typo, and add lazy.nvim configuration example
2024-03-12 14:44:04 +09:00
Horacio Sanson 8f9197b79b
Fix 4740 - add hurlfmt linter (#4741)
* Fix 4740 - add hurlfmt linter

* Fix 4740 - add hurlfmt fixer

* Fix wrong comments

* Add end_col to qflist

* Fix test
2024-03-12 09:51:49 +09:00
Mathew Attlee 5a8287e676
Add support for .eslintrc.cjs (#4742) 2024-03-12 08:53:59 +09:00
David Dominguez 4d132b3ffa
Fix biome formatter (#4733)
* Fix biome formatter

Added escaped executable to the biome#Fix command

* Added fixer callback test
2024-03-02 16:05:47 +09:00
Yining b01c0b23bb
Fix: ruff version `0.3.0` cli breaking changes (#4732)
This commit appends `check` to the ruff executable if the version of
specified ruff executable is `>= 0.3.0`, as ruff version `0.3.0`
deprecates `ruff <path>` in favor of `ruff check <path>`:

https://github.com/astral-sh/ruff/releases/tag/v0.3.0
2024-03-02 08:31:19 +09:00
Horacio Sanson 24a937e04f
Fix 4586 - Make golangci-lint lint package on by default. (#4730)
Checking whole packages instead of individual files is more sensible
default for golang projects. Without this we get many cryptic
`typecheck` errors in ALE that do not show when running in terminal or
CI.
2024-02-28 10:07:22 +09:00
Horacio Sanson 8d199d8c10
Fix 4721 - force latex language id on cspell for tex filetype (#4724)
* Fix 4721 - force latex language id on cspell for tex filetype

* Fix tests
2024-02-27 08:54:45 +09:00
Jorengarenar 9b8413a825
Fix chktex highlighting wrong column when using tabs instead of spaces (#4727)
* Fix '-s' to be '-S' when setting 'TabSize=1' for chktex

Fixes #4712
Closes #4725

* Check if chktex's -S option is available

* Check chktex version instead of trying -S option
2024-02-27 08:54:14 +09:00
Horacio Sanson 00dcf52d6f
4712 revert chktex 4661 (#4725)
* Fix 4712 - revert #4661

* Fix tests
2024-02-26 11:56:56 +09:00
Filip Gospodinov 9cc8383fe9
Add full support for biome (#4705)
* Revert "Add biome support for javascript (#4701)"

This reverts commit 8922478a83.

* Add support for biome
2024-02-24 16:51:39 +09:00
Dmitri Vereshchagin b74cd02648
Set working directory for Elvis linter (#4726)
Most of the time it works to assume that the current working
directory is the root of the project.  However, this is not the case
for Rebar3 checked out dependencies, for example.

It's also worth noting that because of the way Elvis handles file
patterns, and because directories in configuration are relative to the
project root, the path supplied to command must be also relative.
2024-02-24 15:37:55 +09:00
Sam 5e8904cd3d
Add support for gjs template linting using embertemplate lint (#4653)
* super hacky way to get ember template lint to work on gjs files

* Clean up code so we use a handler which means we reuse all the config
also moves handler to the glimmer directory so it only fires
for gjs files

* fix tests
2024-02-23 13:30:12 +09:00
Edwin Huijsing f38a802172
Add file mapping to phpstan (#4685)
* PHPStan is now working with filename-mapping

See help ale-lint-other-machines for more info about filename-mapping.

* Add two tests to show and test what is expected

* Missed this update while creating previous commit

* Simplified the update

We only needed to refactor the processing loop.
No extra test are needed.
2024-02-22 11:55:52 +09:00
AlvinRolling 52c6146751
Slang linter for Verilog. (#4713) 2024-02-22 11:18:04 +09:00
Dmitri Vereshchagin 1c5b84f375
Update project root detection for erlang_ls linter (#4619)
* Refactor erlang_ls linter tests

* Add Rebar3 _checkouts support for erlang_ls linter

* Add Erlang.mk support for erlang_ls linter
2024-02-22 11:14:56 +09:00
Benjamin Block 8b8ddea6e5
Adding support for Odin language server (ols). (#4679) 2024-02-22 11:12:57 +09:00
Brandon Maier 38c31302da
Add wiki link to ShellCheck linting (#4681)
The ShellCheck integrations wiki suggests providing users with more
info by linking back to the ShellCheck wiki.

https://www.shellcheck.net/wiki/Integration#linking-to-the-wiki
2024-02-22 11:11:56 +09:00
Oliver Albertini 506d392f6a
[hover] ParseLSPResult sets language 'text' for missing spec (#4699)
I have an LSP that is returning markdown code blocks on Hover with no
language specified, e.g.

````
```
Foobar
```
````

As a result, you get "```" in the message line which is not that useful.

I made the regex to catch the first code fence accept empty language as
well, and if it's empty, we set it to "text".

This makes it so that LSPs that return no language still produce legible
restuls on the message line.

Co-authored-by: Oliver Ruben Albertini <ora@fb.com>
2024-02-22 11:10:32 +09:00
Tim Carry 6fd9f3c54f
fix #4687 - only lint one file with actionlint (#4688) 2024-02-06 10:23:26 +09:00
Jonathan Palardy 1b24bd3f5f
Support 'gleam format' as Gleam fixer (#4710) 2024-02-06 10:16:25 +09:00
Akiomi Kamakura 8922478a83
Add biome support for javascript (#4701) 2024-01-14 21:11:14 +09:00
ohakutsu 531970533a
Add language id of cspell (#4700) 2024-01-14 21:05:38 +09:00
Jorengarenar 94f764631d
Fix chktex highlighting wrong column when using tabs instead of spaces (#4661)
* Fix chktex highlighting wrong column when using tabs instead of spaces

Fixes #723

chktex implemented feature request [1] for allowing setting options from
the command line. Thanks to that we can tell it to treat tab character
as of one space width, i.e. one char. That means, after we translate the
output back to Vim columns, we get correct numbers.

[1]: https://savannah.nongnu.org/bugs/?56486

* Add test_tex_chktex.vader

* Use functions to set g: variables in ale_linters/tex/chktex.vim

* Update ale_linters#tex#chktex#GetCommand() to use '%e'
2024-01-14 21:04:23 +09:00
Yining 3dbf0b2202
add: support for `rubyfmt` as `ruby` fixer (#4678)
[rubyfmt](https://github.com/fables-tales/rubyfmt) is a formatter for
 `ruby` code.

This commit adds support for `rubyfmt` as a `ruby` fixer (#2991),
together with some tests and documentation.
2024-01-14 20:59:20 +09:00
Tim Carry 17cca243e3
Actionlint: correctly parse error line when using shellcheck sublinter (#4689) 2024-01-14 20:51:39 +09:00
Brandon Maier d63f5e6a77
Add end_col and end_lnum to ShellCheck (#4692)
* Add end_col and end_lnum to ShellCheck

ShellCheck supports a JSON format mode which includes an 'endLine' and
'endColumn' field.

We must use the newer 'json1' format as it properly treats tabs as a
single character. 'json1' was not supported until v0.7.0 in 2019[1], so
we maintain support for the older GCC based format.

[1] https://github.com/koalaman/shellcheck/blob/v0.9.0/CHANGELOG.md?plain=1#L121

* Add wiki link to ShellCheck json output
2024-01-14 20:47:42 +09:00
Jonathan Palardy ebc6718c0a
Support gleamlsp language server for gleam (#4696) 2024-01-14 20:43:59 +09:00
Nicolas Blanchot 32e6fc5975
Stylelint linter output stream can go to stderr (#4702)
Since [version 13.6.0](804bb24c75/CHANGELOG.md?plain=1#L654),
following [PR 4799](https://github.com/stylelint/stylelint/pull/4799)
`stylelint` errors are sent to `stderr`. Previous versions where sending
errors to `stdout`.
2024-01-14 20:43:31 +09:00
Ingo Meyer 562680e786
Use different group names for signs and virtual text (#4704)
Since Neovim commit c4afb9788c4f139eb2e3b7aa4d6a6a20b67ba156, the sign
API uses extmarks internally. Virtual text is already rendered using
extmarks. ALE uses the same group name for both signs and virtual text
and as a result, both are placed in the same extmark group. Since ALE
deletes all extmarks in the virtual text group after all signs have been
placed, no signs are ever shown. This commit fixes this by renaming the
sign group from `ale` to `ale_signs`.
2024-01-14 20:29:10 +09:00
samuelhelen 143074a780
Fix E1085: Not a callable type: elm_ls#GetOptions (#4707)
Rename GetOptions to GetInitializationOptions for consistency.
2024-01-14 20:28:29 +09:00
Finn Steffens 9a23ec1f60
Ruff use json-lines output format (#4656)
* Ruff use json-lines output format
* Fix Ruff: add -q to prevent non json output

Using the json-lines output format allows for setting of the end_line,
end_col and code field of the handle output.

Additionally, the first letter of the code is used to determine the type
field.

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2023-12-10 11:45:01 +00:00
Shad ecc796b3d7
fix tempfile for phpmd, to be able to use phpmd 2.14.0 (#4617) 2023-12-10 11:11:29 +00:00
MD 71718722b2
Add support for Scarb in `cairo` files (#4669)
* Add support for Scarb in `cairo` files
* specify if linter should run on saved
2023-12-08 22:13:37 +00:00
Yining 32ee7039d0
add: support for `nickel format` as `Nickel` fixer (#4665)
Nickel(https://nickel-lang.org/) is a configuration language, like
Jsonnet, Cue, Dhall.

`nickel`(https://github.com/tweag/nickel) is the main command to run,
export and also format Nickel code.

this commit adds `nickel format` as a Nickel fixer, together with some
tests and documentation.
2023-12-07 14:55:14 +00:00
Jorengarenar fc45a935bf
Add clang-check linter for C (#4662)
* Close #976 - add clang-check to C linters

* Update docs
2023-12-07 14:49:37 +00:00
D. Ben Knoble 1ccd99e113
add b:undo_ftplugin (#4625) 2023-11-19 09:13:56 +00:00
Joseph Henrich 5cddc4c8e1
Adding support for ruff formatter (#4645) 2023-11-16 12:12:40 +00:00
Adam Blackwater 50e237facd
Fix: Ruff output option (#4632)
* fix --output-format option
* Add conditionally changing flag based on Ruff version
2023-11-08 21:44:11 +00:00
Julian Gong 901d3ff8dd
Fix a typo in README.md (#4647)
Co-authored-by: Julian Gong <julian@meds.com>
2023-11-05 18:22:41 +00:00
w0rp 53b01d6a54
Fix #4499 - Fix solhint >= 3.4.0
Fix solhint for versions >= 3.4.0, while still supporting older
versions.

The solhint linter code has been moved out of the `handlers` directory
as it does not need to be shared between different filetypes. Code has
been simplified.

Co-authored-by: Henrique Barcelos <16565602+hbarcelos@users.noreply.github.com>
2023-09-17 17:24:23 +01:00
w0rp bd9fc580a1
Close #4541 - Fix Haskell project root detection
We weren't joining and returning paths correctly for detecting project
roots for Haskell projects, and now we are.

Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita@gmail.com>
2023-09-16 23:25:39 +01:00
w0rp dca621b675
Fix #4505 - Handle spaces in markdown fences 2023-09-16 23:04:46 +01:00