1
0
mirror of https://github.com/dense-analysis/ale synced 2024-12-24 23:22:29 +00:00
Commit Graph

4311 Commits

Author SHA1 Message Date
koka
14d2b261ce
Add support for tfsec Terraform linter () 2022-10-04 11:47:00 +09:00
Horacio Sanson
4094426c70
Add vim 9.0 and remove 8.0 ()
* Add vim 9.0 and remove 8.0

* Remove vim 8.2 and keep 8.0
2022-10-04 09:38:07 +09:00
Matheus Gabriel Werny de Lima
a33960eb51
Add fixer "css-beautify". Adjust "html-beautify." ()
* Add fixer "css-beautify". Adjust "html-beautify."

* Error fixes.

* Added chars.
2022-09-30 19:24:32 +09:00
Matheus Gabriel Werny de Lima
7dd13afc6c
Added file types for dprint. () 2022-09-30 12:58:44 +09:00
Andreas Doll
915dc415f3
Add pyright config files to project root files list ()
Add configuration files for pyright (JSON and TOML) to list of files
which identify a project root directory. Update documentation
accordingly.

Co-authored-by: Andreas Doll <andreas.doll@posteo.de>
2022-09-30 11:21:09 +09:00
Nicolas Pauss
78942df284
cc: use '-x c*-header' for header files for C and C++ linters. ()
When linting an header file in C or C++, `-x c-header` or
`-x c++-header` should be used instead of `-x c` or `-x c++`.

Using `-x c` or `-x c++` for headers files can lead to unused variables
and functions marked as static inlined as seen in .

Using `-x c-header` or `-x c++-header` solve these issues.

The list of file extensions that are considered as header files can be
configured with the variables `g:ale_c_cc_header_exts` and
`g:ale_cpp_cc_header_exts`.
2022-09-25 09:02:43 +09:00
Christoph Frick
a56d51ec1c
Pass input via stdin and filename as arg to clj-kondo ()
This allows using linters like `:namespace-name-mismatch`.

This replaces: https://github.com/dense-analysis/ale/pull/4109
2022-09-22 07:24:01 +09:00
Carl Smedstad
e73f0f5cb3
bicep: Lint files on disk instead of buffer ()
I discovered that references to other Bicep files (modules) will be
broken if running on a temporary file in a different location. I've
found no way of providing an alternate path when invoking the command.
2022-09-21 22:44:22 +09:00
Carl Smedstad
8e03ceecdc
Add support for Microsoft's DSL Bicep ()
* Add support for Microsoft's DSL Bicep

The compilation command 'bicep build' catches compilation errors as well
as providing some lint warnings.

Repository for Bicep: https://github.com/Azure/bicep

* Different null file on Windows & hardcode commands
2022-09-14 08:13:41 +09:00
BBOOXX
77fcf9b2c2
chore(volar): update volar executable name ()
see: 
see: johnsoncodehk/volar/blob/master/packages/vue-language-server/package.json#L11
2022-09-11 11:07:01 +09:00
Dirk Jonker
1458b8749c
Deno: find project root using deno.json/deno.jsonc ()
Deno LSP automatically detects config files named deno.json or
deno.jsonc since version 1.18.

For Deno 1.18+ this means that ALE no longer needs to resolve the
project root. However, removing the project root logic from ALE means
breaking changes for people that are still using an older version.
Adding deno.json to the list of looking files to look for will keep the
behavior consistent and compatible with the Deno config file naming
convention.

See also:
https://deno.com/blog/v1.18#auto-discovery-of-the-config-file
2022-09-11 10:57:03 +09:00
Horacio Sanson
a51fd9daba
Add gitlablint support () 2022-09-11 10:53:33 +09:00
Horacio Sanson
9e8920b336
Fix 4155 - Show error when project root not found () 2022-09-11 10:51:27 +09:00
Guangqing Chen
477ad3fdd2
Allow to pass options to the buf linter and fix callback. ()
* Allow to pass options to the buf linter

* Fix the callback of buf linter
2022-09-08 17:04:17 +09:00
D. Ben Knoble
e99f262c2f
omni: find last racket keyword for completion ()
Otherwise it finds the first keyword, which is usually not relevant to the
cursor position, and incorrectly calculates the completion position.
2022-09-08 16:57:43 +09:00
Nate Pinsky
a83a3659ac
Fix typo in plug mapping for ale_go_to_implementation_in_vsplit () 2022-09-08 16:53:42 +09:00
Magnus Groß
9feba1148c
Implement buffer-wide virtual text support ()
* Remove virtual text via types-filter

This is more robust and has the additional sideeffect that it will make
it easier to implement showing virtual text for all warnings
simultaneously.

We definitely do not want to do a call to prop_remove() for every
virtual text as that will cause noticeable lag when many warnings are
present, thus we can use this to remove all virtual text lines with one
call in the future.

Fixes 

refs: https://github.com/vim/vim/pull/10945

* Allow virtual text to appear for all warnings of the buffer

This can be enabled with:

let g:ale_virtualtext_cursor = 2

It is implemented both for neovim and vim 9.0.0297.

Note that sometimes it may appear like some warnings are displayed
multiple times. This is not a bug in the virtual text implementation,
but a sideeffect of multiple linters returning similar results.

For example for Rust, the 'cargo' and 'rls' linters appear to be
activated at the same time, but they sometimes return identical errors.
This causes the virtual text to show the same warning twice.

In the future we can mitigate this problem by removing duplicate errors
from our internal location list.

However users can also achieve cleaner warnings simply by activating
only one linter for each language (or multiple unambiguous linters).

For example for Rust, the problem could be solved with:

let g:ale_linters = {'rust': ['analyzer']}

Fixes 
Fixes 
2022-09-07 19:38:01 +09:00
Magnus Groß
4943b7d39f
Fix virtual text for vim 8.2 ()
Regression was introduced in d93bc2baf7

The problem was that we did not handle the edge case where there is no
last popup to close, which caused old vim versions to enter code by
accident that was only supposed to be run by vim 9.

We fix this by guarding the if condition for vim 9.

Fixes 
2022-09-06 19:35:13 +09:00
Shaun Duncan
6996d1c14d
Allow callbacks for floating preview popups ()
* 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
Magnus Groß
d93bc2baf7
Use native virtual-text for vim9 ()
Our current virtual text implementation for vim emulates it by abusing
the textprop and popupwin feature from vim 8.2 (for more details see
commit 708e810414).
This implementation sometimes is janky, for example the popups may leak
into other vim windows next to the current window.

Luckily, vim just got native virtual-text support as a proper subtype to
the prop_add() function. By using the 'text' option, the text property
automatically becomes virtual text that is appended to the current line
if col is zero.

Note that the prop_add() method now returns negative IDs for virtual
text properties.

This feature was added in vim 9.0.0067, but it got a lot of bugfixes
which is why we only use this new API if vim has at least version
9.0.0214.
However, there are still some minor bugs with vim's native virtual text,
so we might have to bump the version check again in the future.

Also see .

Now with proper virtual text support for both vim and neovim available,
we can tackle  in the future by simply tracking multiple virt-texts
instead of just the last one.

In the future we might also want to disable our virtual text emulation
support for vim, as it is a total hack, but for now we should keep it
for backwards compatibility.
2022-08-23 20:22:14 +09:00
Erik Westrup
992476982a
Put :ALEInfo in collapsible for bug reports ()
To make the bug reports a bit more readable. See an example of usage
here: https://github.com/dense-analysis/ale/issues/4285
2022-08-18 06:51:01 +09:00
Hongbo Liu
7889983f89
fix : honor b:ale_enabled for hover at cursor ()
* fix : honor b:ale_enabled for hover at cursor

* fix indention
2022-08-18 06:34:34 +09:00
Mo Lawson
233b681029
Add support for syntax_tree fixer ()
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 () 2022-08-07 16:27:17 +09:00
Tomáš Janoušek
e10fcf22dc
Prevent buffering of job output and excessive polling ()
When 'close_cb' is set for job_start(), but out_cb or err_cb isn't, vim
buffers data instead of dropping it (in case someone wanted to read and
process it in close_cb), and additionally polls for new data every 10
milliseconds, causing excessive wakeups and CPU usage. Since we don't
read the data anywhere outside of out_cb/err_cb, any LSP that prints an
error to stderr triggers this and vim keeps spinning until :ALEStopAllLSPs.

Fix this by always setting both callbacks, thus dropping any data we're
not interested in.

See https://github.com/vim/vim/issues/10758 for an upstream report of
the excessive polling. It's possible this is intentional, I dunno.

Fixes: b42153eb17 ("Fix  - Clear LSP data when servers crash")
2022-07-26 17:56:12 +09:00
Albert Peschar
854d606333
Add support for Dune ()
* 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 ()
* cairo support

* supported languages txt

* add cairo to ale.txt
2022-07-22 13:05:08 +09:00
Horacio Sanson
5ef26c32da
Fix 4249 - Revert change to stop compl menu. ()
In  some code was added to stop the completion menu if any when
opening a new one. This resulted in an issue in Vim that fills the
buffer with Ctrl-Z characters when deleting to the end of a line in a
position that triggers auto-completion.

Since auto-completion seems to work fine on all my tests I am reverting
this specific change.
2022-07-14 07:25:42 +09:00
Michael Dyrynda
ad2f75e4b2
Add support for Laravel Pint ()
* 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
Marios S
a918f8c7bc
Improve struct and pointer autocompletion in C ()
* Add explicit trigger characters for C ()

* Stop completion before issuing subsequent requests ()

Co-authored-by: Marios Sioutis <26476573+s-marios@users.noreply.github.com>
2022-07-04 22:00:29 +09:00
Henrique Barcelos
d6f3d4976d
Allow shfmt fixer to use .editorconfig ()
* fix: added support for local solhint executable

* feat: added support for matching parse errors

* test: added test for solhint command callback and handler

* chore: removed command callback test

* refactor: made solhint handler structure closer to eslint

* refactor(shfmt-fixer): remove derivation of default CLI arguments
2022-07-02 22:05:03 +09:00
Horacio Sanson
16cca1413f
Update tests to use latest neovim 0.7 ()
* Update tests to use latest neovim 0.7

* Update CI to use neovim 0.7

* Fix conflict
2022-06-29 13:17:00 +09:00
Steven Leiva
39d1a10589
Update ale-haskell.txt ()
Change `b:ale_haskell_his_executable` to `b:ale_haskell_hls_executable`.
2022-06-26 16:04:59 +09:00
Gabriel Remus
4a0d669c0a
Show warnings for dart_analyze linter () 2022-06-25 00:18:08 +09:00
D. Ben Knoble
0e99519500
racket: start completion in a full keyword ()
The default `omni_start_map` is too restrictive for Lisps and Schemes
like Racket, which permit hyphens (among other special characters).

As recorded in , trying to complete `file-name-from-path` when
typing `file-name<C-x><C-o>` would give completions like `namespace`
because the hyphen is ignored to find the start of the word for
completion.

Now the racket filetype searches for the start using the keyword class
`\k`, which is more precise.
2022-06-23 09:13:28 +09:00
infokiller
91e8422d6d
Add pyflyby fixer (using its tidy-imports script) ()
* add pyflyby fixer

updates

* pyflyby: add docs

updates

* add tests to pyflyby fixer
2022-06-16 22:41:57 +09:00
w0rp
f10349b48b
Replace gitter badge with Discord 2022-06-08 15:26:25 +01:00
w0rp
9e1089c38d
Recommend Discord instead of IRC, actually 2022-06-08 15:22:21 +01:00
Danny (he/him)
f6d7aa4f0f
Fix README typo () 2022-06-06 22:58:11 +09:00
Paul Thompson
9bdc923624
re-worded confusing grammar () 2022-06-04 15:58:36 +09:00
Isman Firmansyah
876140832c
Add support for actionlint options ()
* Add support for actionlint options

* fix misaligned doc tags
2022-05-29 22:23:47 +09:00
Devin J. Pohly
ae44f05600
Allow customization of all floating window borders ()
* 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 ()
* Add zig fmt support

* Review changes

* Fix linter errors
2022-05-17 07:38:54 +09:00
Michał Padula
e343148e80
Fallback to summary field if detail exists but is empty in terraform linter ()
* Fallback to summary field if detail exists but is empty in terraform linter

* Add test

* Update terraform.vim

* remove whitespaces
2022-05-17 00:00:34 +09:00
Zhuoyun Wei
429f5a1447
Add support for Packer ()
* 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
Krishnakumar Gopalakrishnan, PhD
b611fde718
fixes cpplint url in supported-tools.md () 2022-05-16 21:15:09 +09:00
Reza J. Bavaghoush
75d2413425
add rego support ()
* 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
James C. Davis
5479b58660
support ember-template-lint 4.x ()
* support ember-template-lint 4.x

* update ember-template-lint linter test
2022-05-15 12:44:23 +09:00
Fionn Fitzmaurice
e6ca599e87
Look for .mypy.ini when finding project root ()
We already check for mypy.ini, but the fallback .mypy.ini was ignored.
2022-05-15 12:20:16 +09:00
w0rp
044a6c956b
Close - Run vimls from Vader by default 2022-05-13 18:00:19 +01:00