Commit Graph

4485 Commits

Author SHA1 Message Date
Bea Hughes 1e1604be56
When using `actionlint` look for & use a config file (#4858)
Actionlint supports a config file and it lives in a very searchable
path, as the only files it acts on are in the `.github` directory
already.

Look for an `actionlint.yml` and `.yaml` in that path, and use the
config if its there.
2024-11-19 11:40:56 +09:00
rudolf ordoyne defb0ea336
Add cljfmt fixer for clojure files (#4860) 2024-11-17 11:22:36 +09:00
Walter Kaunda 5cc6b933b1
Fix python linting/formatting error when in virtual environment (#4865)
Python fixers and linters were failing when vim is running in a virtual
environment that's located in a path containing text `poetry`. The cause
of this was the regular expression `poetry\|pipenv\|uv$` which matches
`poetry` and `pipenv` if they appear anywhere in the virtualenv path.
2024-11-17 11:00:55 +09:00
Dmitri Vereshchagin 898638abe5
Add erlang-ls as an alias for erlang_ls linter (#4852)
The project itself is often referred to as Erlang LS, so erlang-ls would
be a suitable alias.
2024-11-09 15:51:54 +09:00
Dmitri Vereshchagin 4fca3824cc
Add erlang-mode fixer for Erlang files (#4848)
This fixer performs indentation with the Erlang mode for Emacs.
The Erlang mode is maintained in the Erlang/OTP source tree.  It indents
some things differently than the Vim indent plugin, and provides more
customization options.
2024-10-31 21:29:59 +09:00
Dmitri Vereshchagin d82d968f8a
Set two-space indent for *.vader in .editorconfig (#4849)
Will be useful for those who use an EditorConfig plugin.
2024-10-31 21:28:44 +09:00
Krishnansh Agarwal 9854e19fa9
Update metals.vim (#4843)
The binary installed by `cs install metals` is called `metals`, not `metals-vim`

Please fix this !
2024-10-20 00:19:18 +09:00
Friedrich C. Kischkel 02eb9984b1
Make documentation more consistent with Vim's own :help (#4840)
* Prefix user-defined commands with colons

This is consistent with Vim's own :help pages.

* Remove dot hack

Now that we have `:ALEInfo` and `ALEInfo`, we don't need `ALEInfo.` any
more to disambiguate them.

* Use colons in references

* Use angle brackets for command arguments

* Use `:Command` for command references

* Use a non-command reference for tsserver

* Prefix highlight references with hl-

* Fix some references into Vim's own :help

E.g. location-list or +features

* Misc hotlink improvements

* Undo previous changes to tsserver

Just leave it in backticks - even though I don't like it.

* Use bars for a command for consistency

* Append hotlinks to hl-groups

Remove minuses to make tables look more like in Vim's own :help

* Prefix features with +

* Provide full hotlink to ale.txt

* Fix double pipe typo

* Capitalize Error highlight

There seems to be no hotlink in Vim's own documentation for this.
I would have expected *hl-Error* - no such thing :-(

* Right align tags to col 79
2024-10-20 00:18:24 +09:00
David Briscoe 0b4c665840
Return floating_preview window id (#4828)
Make ale#floating_preview#Show more similar to popup_create and return
the id of the window so it's easy to set the filetype of the resulting
buffer.

Update test stub version of Show() to return a win id (the current window
since it's not actually creating a window).

Test
* both tests still pass
2024-10-20 00:13:50 +09:00
Markus 2e5f135836
no need to write and read temporary file with syntax_tree (#4834) 2024-10-14 11:45:41 +09:00
Diego Henrique Oliveira a7ef1817b7
Improve support for python package manage: pipenv, poetry and uv (#4825) 2024-09-05 15:37:30 +09:00
ghsang 954682108d
Add support for astro (#4780)
* feat: prettier for astro
* feat: eslint for astro
* feat: doc for astro
2024-08-14 08:24:22 +01:00
Dmitri Vereshchagin 48d73c87c3
Refactor SyntaxErl linter file (#4807) 2024-07-12 09:40:38 +09:00
Braden Kelley 5c635d5038
feat(biome): add support for json and jsonc (#4805)
- adds biome linter for json and jsonc
- enables biome by default for json and jsonc
- suggests biome as a fixer for json and jsonc
2024-07-09 09:41:17 +09:00
w0rp 3220b94d20
Fix #4714 - Handle ruff garbage
When ruff outputs errors are invalid JSON text, handle that and stop ALE
from throwing exceptions.
2024-07-08 03:22:46 +01:00
Tom Bourton a35fa4d732
When ruff version is >=0.5.0 use 'ruff check <path>' instead of 'ruff <path>' (#4802) 2024-07-02 16:43:02 +09:00
Braden Kelley a0ad5f938a
fix!(biome): allow passing options to `biome check` (#4799)
The only option available to biome's `lsp-proxy` command used for
linting is `--config-path`. However, we are using ALE to find and set
the project root, and have a way to manually override, so that is no
longer necessary.

The LSP proxy also used the `g:ale_biome_options` config, which is
shared with the fixer's `check` command, but `lsp-proxy` will throw an
error if unknown options are included, making it so that option is only
useful to set the project root.

BREAKING CHANGE: We are no longer passing options to the biome LSP
proxy, but we can still set the project root with
`g:ale_biome_lsp_project_root`.
2024-06-27 14:30:06 +09:00
Braden Kelley ed0b036220
fix(biome): find root when using biome.jsonc (#4774)
Since biome supports either `biome.json` or `biome.jsonc` config files,
we need to look for both when searching for the LSP project root. We can
also look for a package.json or .git folder to use. This uses mostly the
same logic as deno.
2024-06-25 17:18:28 +09:00
Loic Nageleisen e09520e2d7
Add Ruby linter with Steep (#4671)
* Add Ruby linter with Steep

Fixes #3254

* Run steep instead of using language server

LSP presents a few issues and this works around those.

* Work around Steep path issue

See https://github.com/soutaro/steep/pull/975

* Add simple tests for steep

* Add steep to supported tools

* Pass linter

* Add a comment regarding Steep's column counting

* Make lnum an integer

* Add Steep handler test

* Fix separator for Windows

* Escape Windows path separators for substitute()

* Use ALEInfo (I) group

* Use fnameescape instead of quotes

* Skip linting for files not under steep root

* Add and pass tests covering proper steep root lookup

* Fix separator discrepancy

* Use strict operators (match case)

* Fix ordering

* Use `is#` instead of `==#`
2024-06-25 17:17:27 +09:00
Alexey Vazhnov f4bc3c2711
README.md: fix typo: there should be a comma (#4797) 2024-06-24 06:34:34 +01:00
Braden Kelley 5606606b32
fix(biome): send correct language to lsp proxy (#4773)
Since Biome understands `typescriptreact` and `javascriptreact` as
languages, we can send the `filetype` to the LSP, rather than only
sending `typescript` for both `ts` and `tsx` files, or `javascript` for
`js` and `jsx` files.

fixes: #4752
2024-06-24 06:32:24 +01:00
Braden Kelley f2aef2f510
fix(biome): run all enabled biome fixers (#4763)
- based on biome config, will format, lint, and/or sort imports
- adds variable to apply unsafe fixes, disabled by default

fixes: #4754
2024-06-21 09:21:19 +09:00
Braden Kelley 0cd64c87bf
fix(biome): use temp file instead of stdin (#4775)
biome handles utf8 characters differently between files and stdin, and
in some cases can replace emojis with ascii characters when using stdin

refs: biomejs/biome#2604
2024-06-21 08:19:55 +09:00
w0rp c7c41e1574
Run actionlint by default on GitHub files
Detect paths containing .github as a directory for running actionlint
by default on YAML filetypes.
2024-06-02 19:07:06 +01:00
ghsang adaa7f6f62
Fix eslint cwd strategy (#4781)
Change eslint cwd to follow configuration file paths.
2024-05-31 09:30:37 +02:00
Macuyler Dunn c88bddfa83
Update dart analysis_server command (#4761)
* Update dart analysis_server command

In 2021 the dart team added a new sub-command `language-server` to
replace the original `./snapshots/analysis_server.dart.snapshot --lsp`
convention for starting the language server.

c224cc2e0d

* Add ale_dart_analysis_server_enable_language_server option

This allows users to opt-in to the new `dart language-server` command.

* Enable ale_dart_analysis_server_enable_language_server option by default

* Update doc/ale-dart.txt

Include the dart version number where the `dart language-server` command
was added.
2024-05-09 10:58:16 +09:00
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