Commit Graph

969 Commits

Author SHA1 Message Date
Shaun Duncan 6996d1c14d
Allow callbacks for floating preview popups (#4247)
* Add extra config options for virtualtext

* Undo virtualtext changes and move to floating preview

* revert changes to pass hightlight group to floating preview

* rename var

* Document changes

* Add updates based on feedback

* Check for string type and attempt to call the function

* Fix lint errors

Co-authored-by: Shaun Duncan <shaun@speedscale.com>
2022-08-23 20:22:52 +09:00
Mo Lawson 233b681029
Add support for syntax_tree fixer (#4268)
This is the library that now powers prettier/plugin-ruby but is also
stands on its own: https://github.com/ruby-syntax-tree/syntax_tree
2022-08-09 21:11:20 +09:00
Nathan Henrie 5063804d44
Add openscad and sca2d support (#4205) 2022-08-07 16:27:17 +09:00
Albert Peschar 854d606333
Add support for Dune (#4263)
* Add support for dune

* Add test

* Undo reformatting of Markdown file

* Refer to ale-ocaml-dune from ale.txt
2022-07-26 17:55:22 +09:00
0xHyoga 0ea53870b6
cairo support (#4256)
* cairo support

* supported languages txt

* add cairo to ale.txt
2022-07-22 13:05:08 +09:00
Michael Dyrynda ad2f75e4b2
Add support for Laravel Pint (#4238)
* add support, docs, tests for Laravel Pint

* fix php-cs-fixer link

* add missing project-without-pint

* fix indentation

* fix pint executable in pint fixer test

* fix variables, docs related to pint support
2022-07-07 21:42:21 +09:00
infokiller 91e8422d6d
Add pyflyby fixer (using its tidy-imports script) (#4219)
* add pyflyby fixer

updates

* pyflyby: add docs

updates

* add tests to pyflyby fixer
2022-06-16 22:41:57 +09:00
Devin J. Pohly ae44f05600
Allow customization of all floating window borders (#4215)
* Allow customization of all floating window borders

Users may not necessarily want the same border character for top+bottom
or left+right, so allow all eight border characters to be configured in
g:ale_floating_window_border.

For backwards compatibility, the old rules are still applied if only six
elements are given.

* Reorder popup border array for compatibility
2022-05-27 13:41:06 +09:00
Arash Mousavi 3d7b3a6541
Add zig fmt support (#4198)
* Add zig fmt support

* Review changes

* Fix linter errors
2022-05-17 07:38:54 +09:00
Zhuoyun Wei 429f5a1447
Add support for Packer (#4192)
* Add support for HashiCorp Packer

* Add test for packer fmt

* Add doc for HCL/Packer

* Add link to Packer doc

* Also suggest packer fix for packer ft

* Add more links to TOC
2022-05-16 21:15:52 +09:00
Reza J. Bavaghoush 75d2413425
add rego support (#4199)
* add opa fmt fixer for rego files

* add opa linter

* add basic tests for linter and fixer

* add cspell to the docs
2022-05-16 21:14:11 +09:00
w0rp 044a6c956b
Close #4201 - Run vimls from Vader by default 2022-05-13 18:00:19 +01:00
bretello c694a24188
add yaml actionlint support (github actions) (#4173)
Co-authored-by: bretello <bretello@distruzione.org>
2022-05-03 10:03:05 +09:00
Dalius Dobravolskas 56399106fc
VSCode LSPs for CSS, HTML and JSON (#4175)
Switched to `vscode-langservers-extracted` as it is the one most
up-to-date.
2022-05-02 19:42:24 +09:00
Dalius Dobravolskas 34892186e4
vscode-json-languageserver support (#4164)
* vscode-json-languageserver-bin support

VSCode JSON languageserver has schema support for linting and
completions.

I have enabled snippets support (`snippetSupport`) even if it is not
fully supported. `label` that comes with completions response can be
used as well.

* Test fix.

* vscode-json-languageserver instead of vscode-json-languageserver-bin

vscode-json-languageserver is more up-to-date (about 1 year old),
vscode-json-languageserver-bin is 4 years old.

* Use git root.

* Documentation update.

* Trying to sort ordering issue.

* One more attempt

* One more attempt

* Uppercase seems to win.

* Clean-up

* Clean-up 2

* Test removed.
2022-04-30 12:33:48 +09:00
godbless d484347fb5
Add ALEGoToImplementation (#4160)
* Add go to implementation

* Add test cases for GoToImplementation

* Add documentation for GoToImplementation
2022-04-30 12:28:26 +09:00
zandr 57e16957e0
Add support for selene Lua linter (#4169) 2022-04-30 11:11:12 +09:00
Alex McKinney 607f33a1b0
Add buf linter and fixer (#4128)
* Add buf lint to linters

* Add buf format to fixers

* Fix test/linter/test_buf_lint.vader

* Fix test/fixers/test_buf_format_fixer_callback.vader

* Simplify test/test-files/proto/testfile.proto

* Add buf-lint alias and rename linter
2022-04-06 17:00:59 +09:00
James Cherti 6c1f616c59
Add the buffer-local options 'b:ale_shell' and 'b:ale_shell_arguments'. (#4146) 2022-04-06 14:32:11 +09:00
w0rp e5492e124d
Document default linter selections again 2022-03-05 00:43:56 +00:00
Horacio Sanson c173b6243d
Enable autoimport by default (#4102) 2022-03-04 19:05:41 +00:00
w0rp 3e1a98ff67
#3495 Mention that ShowResults() must not be called synchronously 2022-03-01 13:48:16 +00:00
Jerko Steiner 4a4516e3bf
Dispatch textDocument/didChange after rename (2) (#4049)
* Dispatch textDocument/didChange after rename

Previously whenever we renamed a symbol that was referenced from other
files we'd just edit those files in the background, and the LSP wouldn't
know about these changes. If we tried to rename the same symbol again,
the renaming would fail. In some scenarios, the operation would just be
wrong. Here is an attempt to fix this issue.

I also noticed another bug when using Go with `gopls` LSP and the `gofmt`
fixer. Whenever the file was saved, the `gofmt` would run and reformat
the file. But it seems there was some kind of a race condition so I
disabled saving for now, and all of the modified files will be unsaved,
so the user should call `:wa` to save them. I personally like this even
better because I can inspect exactly what changes happened, and I
instantly see them in the other opened buffers, which was previously not
the case.

Fixes #3343, #3642, #3781.

* Address PR comments

* Remove mode tests in corner case tests

* Address PR comments

* Save after ALERename and ALEOrganizeImports

Also provide options to disable automatic saving, as well as instructions to
enable `set hidden` before doing that.

* Fix broken test

* Save only when !&hidden

* Update doc

* Update doc

* Add silent
2022-02-08 20:07:39 +09:00
Jon Parise 8b1ea33cc0
Add a unimport linter for Python files (#4058)
Unimport (https://github.com/hakancelik96/unimport/) is a linter,
formatter for finding and removing unused import statements.

This introduces linting support, although fixer support could come
later.
2022-02-08 15:54:25 +09:00
Carl Smedstad c9938bc293
Add CMake linter cmake-lint (#4036)
* Add CMake linter cmake-lint

Add support for the CMake linter provided by
https://github.com/cheshirekow/cmake_format.

* Escape cmake-lint executable and add linter tests
2022-02-06 21:09:38 +09:00
offa 7cbb68da6c
Add oelint-adv support (#4043) 2022-02-06 14:08:10 +09:00
Dalius Dobravolskas 0c276aac90
Allows to use quickfix for references. (#4033)
* Allows to use quickfix for references.

E.g. following mapping could be used to find references for item under
cursor and put result into quickfix list:

```
nnoremap <leader>af :ALEFindReferences -quickfix<CR>
```

Fixes #1759

* Documentation update.
2022-02-05 21:54:26 +09:00
nospam2998 a58b7b5efb
Treat ale_open_list integer values as thresholds (#4050)
Only open list window if the number of warnings or errors equals to or
exceeds the value of ale_open_list. No change when set to `1`.

Co-authored-by: cos <cos>
2022-02-04 17:56:48 +00:00
David Briscoe 5856c06775
Add ALEPopulateQuickfix and ALEPopulateLocList (#3761)
Closes #1810

Add ALEPopulateQuickfix and ALEPopulateLocList. They're not very useful
with ale's default auto-populate behaviour, so their useful configuration
is described in help.
2022-02-04 17:42:26 +00:00
David Briscoe 6d20b6c162
doc: Clarify the types of process_with (#4039) 2022-02-04 20:22:40 +09:00
Linda_pp 0d529d9b94
Add `naga` linter for WGSL support (#4047)
* Add WGSL support using `naga` command

* Add documents for wgsl

* Add test for `naga` linter

* Separate naga handler callback to hanlder/naga.vim
2022-02-04 16:29:28 +09:00
Jeffrey Lau 5087246c82
Add yaml-language-server support for YAML (#2874) (#4029) 2022-01-07 23:57:29 +09:00
Horacio Sanson 76bd059371
Fix 3838 - deprecate datanalyzer (#3839)
Co-authored-by: Horacio Sanson <horacio@allm.inc>
2022-01-05 22:34:47 +09:00
Nathan ac0495df6e
Add dprint fixer (#4024)
* Add dprint fixer

* Fix windows tests

* dd dprint documentation
2022-01-04 21:49:03 +09:00
Dalius Dobravolskas 5b792c7641
ALEFileRename command added. (#4012)
* ALEFileRename command added.

This command renames file and uses tsserver `getEditsForFileRename` to
fix import paths in Typescript files.

* ale#util#Input fix

* Even more fixes.

* Linting error fix.
2021-12-17 08:09:26 +09:00
thyme-87 091592bfb0
add support for checkov for linting terraform files (#4006)
* add support for checkov for terraform

* add tests for checkov handler

* add basic linter config tests for checkov

* update supported tools and languages lists

* simplify ale_linters#terraform#checkov#Handle

* ensure "-o json --quiet" is always set for checkov

* add documentation for checkov including config options

* fix tests after changing handling of default options for checkov

* add checkov to list of tools in doc/ale.txt
2021-12-11 20:51:26 +09:00
Arnold Chand de67f4743d
Add volar support for vue (#3992)
* feat-draft: inital volar setup

* feat(volar): add documentation

* feat(volar): include default init opts

* feat(volar): add initial tests

* fix(volar): add possible project roots

* fix(volar): tests - use empty files
2021-11-21 20:02:09 +09:00
David Houston ea643b97ab
Add cspell Linter (#3981)
* Add cspell linter

Add cspell linter, with the languages it supports.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell Global Variables Documentation

Add documentation to /doc/ale.txt with cspell configuration options.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add cspell to docs, Minor Cleanup

Add cspell for each supported language, adding some spaces and removing
others when caught navigating the file.

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-19 07:41:05 +09:00
Utkarsh Verma 1e0e76bf96
Add support for AVRA linting (#3950)
* Add support for AVRA linting

* Add tests for AVRA linting and improve code

* Fix test

* Fix warning detection

* Fix test

* Fix test

* Add AVRA as a supported language in docs
2021-11-15 19:41:03 +09:00
David Houston a9d7f45924
Implement statix Linter and Fixer (#3969)
* Add Statix for Linting

Add `statix check` as a linter. Provides a simple set of definition
tests additionally. Variable names specify "check" to allow for later
addition of `statix fix` as a formatter once stream support is added.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fixup Supported Tools List

I didn't realise there were two separate lists of tools, so add statix
to the other list. Also, remembered "S" comes after "R", and so
re-ordered it.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Test File

I refactored the variables for statix to allow for writing a fixer
later, and forgot to update them in the test, so update them now. Also
remove a stray "i", add missing space before checks

Signed-off-by: David Houston <houstdav000@gmail.com>

* Update Output Stream for v0.4.0

statix v0.4.0 provides a breaking change of output stream from stderr to
stdout.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix fix Fixer

Implement statix fix as a fixer for simple Nix antipatterns.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix statix Fixer Tests

Fix the statix fixer tests by removing the unnecessary
'read_temporary_file' value from the command, since it simply uses the
default value.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add statix Handler Test

Add a test for the statix handler per @hsanson's request.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix to run only on stdin for linting

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-12 07:34:25 +09:00
David Houston 8b3b16d71c
Implement gofumpt Fixer (#3968)
* Implement gofumpt Fixer

Add an implementation with test and documentation for the gofumpt go
code formatter, a stricter formatter than your standard "go fmt".

Signed-off-by: David Houston <houstdav000@gmail.com>

* Add gofumpt to ale.txt TOC

Forgot to add gofumpt to the ALE vim help Table of Contents, so do so.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix Test Setup Method Capitalization

I had put "Setup" instead of "SetUp" for "ale#assert#SetUpFixerTests".
Fix such.

Signed-off-by: David Houston <houstdav000@gmail.com>

* Fix typos

Add a missing space, remove an extra bracket by actually running tests
locally first. Would've been smart to do that from the beginning...

Signed-off-by: David Houston <houstdav000@gmail.com>
2021-11-09 16:53:44 +09:00
Benjamin Bannier 92f08b5af2
Add support for zeek (#3952) 2021-10-24 21:05:55 +09:00
Roeland 1ee7580557
Add support for erblint (#3931)
* support for erblint

* fix tests

* test for handler

* wrong names

* typo

* doc layout

* CI failed?
2021-10-09 14:33:07 +09:00
a666 f9deee0e41
Add flakehell python linter (#3295) (#3921) 2021-10-02 16:37:57 +09:00
Arnold Chand 19b0f72c23
feat: add deno lsp for javascript (#3924)
* feat(js/deno): add deno lsp

* fix(doc/typescript): typo

* feat(doc/javascript): add deno lsp information

* feat(doc/supported-tools): add deno to js list, sorted

* fix(doc/javascript): update ToC and supported tools w/ deno
2021-10-02 09:51:22 +09:00
Magnus Groß 708e810414
Implement virtual text support for vim (#3915)
This requires the textprop and popupwin feature (vim 8.2).

Fixes #3906
2021-10-02 09:02:49 +09:00
Trevor Whitney f8a4c78b5b
Add support for jsonnetfmt and jsonnet-lint (#3907)
* update to lates

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix up docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* fix docs

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* get tests passing

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* update regex

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>

* use ale#Pad and AssertFixer

Signed-off-by: Trevor Whitney <trevorjwhitney@gmail.com>
2021-09-21 10:49:15 +09:00
Samuel Branisa 19437e25d0
Robot framework rflint support (#3715)
* Create rflint.vim

support for robot framework by creating ale definition for rflint syntax linter

* robot framework - rflint support
2021-09-11 09:19:17 +09:00
Jon Parise 8fd23f4b71
Introduce an ALELSPStarted autocommand (#3878)
This User autocommand is trigged immediately after an LSP process is
successfully initialized. This provides a way to perform any additional
initialization work, such as setting up buffer-level mappings.
2021-09-05 10:07:53 +09:00
Jelte Fennema d53a085096
Add fixer for "dotnet format" (#3879)
The .NET ecosystem has an official tool for formatting its files: `dotnet format`
This adds support for that tool to ALE.
2021-08-25 15:27:04 +09:00