Commit graph

1222 commits

Author SHA1 Message Date
jhlink
428c5f94da fix: Use ALE to reliably find project options 2020-07-29 01:36:45 -04:00
jhlink
5377272d20 fix: Change _options to _project_options 2020-07-28 19:48:27 -04:00
jhlink
0e6578cf65 fix: Remove explicit calls to file path in astyle 2020-07-26 22:05:14 -04:00
jhlink
75723e4522 doc: Add C++ desc in astyle entry in registry 2020-07-26 22:05:10 -04:00
jhlink
78295024e1 feat: Add project option file support for astyle 2020-07-26 21:11:37 -04:00
jhlink
b25bb64a4d feat: Use stdin/redirection for astyle 2020-07-26 20:51:41 -04:00
jhlink
488df0fa41 feat: Add cpp to registry.vim 2020-07-25 20:22:10 -04:00
jhlink
076f9efbd9 feat: Add cpp support to astyle fixer 2020-07-25 20:20:47 -04:00
jhlink
d0b7a6e71f doc: Remove c++ from astyle 2020-07-10 19:06:22 -04:00
jhlink
6c58164094 feat: Add astyle to fix/register.vim 2020-07-10 17:47:01 -04:00
jhlink
7f881f66a8 feat: Add ALE fixer for astyle 2020-07-10 17:46:01 -04:00
Kevin Locke
106c27644b
eslint: Use cwd from executable location to fix nested projects (#3222)
* Split FindNearestExecutable from FindExecutable

The path searching in ale#node#FindExecutable() will be useful for
eslint.  Refactor it into a separate function so it can be used without
regard for the state of the _use_global and _executable variables.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* eslint: Set project root from local executable

Using the nearest directory with node_modules does not work correctly
for nested projects where the eslint dependencies are in the outer
project.  For example:
https://github.com/dense-analysis/ale/issues/3143#issuecomment-652452362

Adopt the behavior of SublimeLinter, which runs from project_root
determined by the presence of the eslint executable in node_modules/.bin
(or eslint in dependencies/devDependencies of package.json, which we can
add later as necessary).  See [NodeLinter#find_local_executable].

[NodeLinter#find_local_executable]: https://github.com/SublimeLinter/SublimeLinter/blob/056e6f6/lint/base_linter/node_linter.py#L109

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-08 14:42:01 +01:00
Kevin Locke
b3c6db173a
Run ESLint fixer from project root, where possible (#3096)
* Split eslint#GetCdString from eslint#GetCommand

Move the code for finding the project root and building the cd string
into a separate function so that it can be reused in the eslint fixer.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Run ESLint fixer from project root dir

To match the ESLint linter, as changed in 9ee57d43 (which I forgot to
apply to the fixer, whoops).

Fixes: #3094
Closes: #3095

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2020-07-01 17:00:21 +01:00
w0rp
1428c7b29e
Update the internal ALE version to 2.7.0 2020-06-11 19:21:17 +01:00
Ian2020
ca97f32258 Use a function to define shellcheck linters and vars needed, fixes tests 2020-05-08 12:55:54 +01:00
Ian2020
716f9a9bbb Fix linting issue - indentation incorrect 2020-04-28 20:53:42 +01:00
Ian2020
d4e1c57026 Moved common code to ale handlers, updated bats doc 2020-04-28 17:46:15 +01:00
Yuto
93a13d7353
Broken message in pycodestyle (or any other Linters whose name include 'code') (#3114)
* Swap substitution order for echoed message

This prevents 'code' string in liter_name to be substituted by accident.
Linters including pycodestyle have been affected by this problem.

* Add test for linter whose name contains 'code'

Test for c525db8cb4088d02448c5ddcf4a80ffa028c3181
2020-04-18 11:59:26 +01:00
w0rp
dc054f30c8
Merge pull request #2823 from jeremija/do-not-save-on-autoimport
Do not save after ALERename and ALEOrganizeImports
2020-04-17 17:32:36 +01:00
Horacio Sanson
16cd59805b
Merge pull request #3050 from StarryLeo/fix-vim-sign-priority-patch-check
Fix vim sign priority patch check
2020-04-17 22:22:03 +09:00
w0rp
82f734a7c2
Closes #3019 - Implement default navigation
Default navigation for commands that jump to new locations has been
implemented with the `ale_default_navigation` variable, and all commands
that jump to locations now support `-tab`, `-split`, or `-vsplit`
arguments for overriding the default navigation behavior.
2020-04-15 16:50:13 +01:00
StarryLeo
302ce71931 Fix vim sign priority patch check
With Vim 8.2 released, the previous check method is not accurate enough.
2020-03-15 14:58:38 +08:00
w0rp
bbe5153fcb
Fixes #2982 - Implement g:ale_exclude_highlights
Particular highlights can now be excluded by providing Lists of regular
expressions.
2020-03-11 12:52:41 -04:00
w0rp
8f7ccdc5e9
Refactor the "s:LoadArgCount()" function (#3025)
* Refactor the "s:LoadArgCount()" function

Previously, this function would always set "v:errmsg" on the first
call with a given function.  This is because autoloaded functions
are not defined on the first call.

A number of improvements have been made:
 - a useless local function ("l:Function") is removed
 - the "execute()" builtin captures the output, instead of ":redir"
 - a ":try" block handles the case where a function is not defined
 - a useless ":if" is removed since ":redir" always defines the var
 - confusing quoting is re-written (remove double "'" chars)

Fixes: #3021
2020-03-04 20:56:22 +00:00
Andrew Lee
07ee4d39c5
misc: change email address for @ndrewtl
This is kind of a peculiar reason for a PR, but I no longer control the email listed. I want to change it to avoid people getting the wrong email for me. Also, I still control the domain, but if at any point I don't, I want to put down in writing that if you get an email from this, it's not from me.
2020-01-28 10:47:37 -08:00
Jerko Steiner
0cb432cb82 Add TypeScript autoimport support for deoplete (#2779)
* Add autoimport support for deoplete

* Fix test_deoplete_source.py

* Use callback instead of is_async for deoplete

Shuogo, the author of Deoplete, does not recommend using the `is_async`
option:

> I think is_async is not recommended. It is not so useful and broken.
> You should use callback system instead.

Link: https://github.com/Shougo/deoplete.nvim/issues/1006#issuecomment-526797857

Incidentally, the same thread mentiones an issue started by w0rp:
https://github.com/Shougo/deoplete.nvim/issues/976

The deoplete docs also say is_async is deprecated:

> is_async        (Bool)
>     If the gather is asynchronous, the source must set
>     it to "True". A typical strategy for an asynchronous
>     gather_candidates method to use this flag is to
>     set is_async flag to True while results are being
>     produced in the background (optionally, returning them
>     as they become ready). Once background processing
>     has completed, is_async flag should be set to False
>     indicating that this is the last portion of the
>     candidates.
>
>     Note: The feature is deprecated and not recommended.
>     You should use callback system by
>     |deoplete#auto_complete()| instead.

Link: https://github.com/Shougo/deoplete.nvim/blob/master/doc/deoplete.txt

Co-authored-by: w0rp <w0rp@users.noreply.github.com>
2020-01-01 19:00:41 +00:00
w0rp
7a4f5cefba
Merge pull request #2942 from PsiPhire/master
Allow popup to be used instead of preview in completeopt
2020-01-01 18:43:53 +00:00
w0rp
6ad8836c68
Merge pull request #2937 from kevinoid/eslint-run-from-project-root
Run ESLint from project root dir where possible
2020-01-01 18:30:01 +00:00
w0rp
25e457595a
Merge pull request #2828 from akhilman/hover-to-preview
Add option to show hover messages in preview.
2020-01-01 18:21:00 +00:00
Jerko Steiner
493705336c Add old check for bufline api 2019-12-29 15:08:22 +01:00
Zander Lee
4cbe16197c
Allow popup to be used instead of preview in completeopt 2019-12-22 09:35:29 +01:00
Kevin Locke
9ee57d4362 Run ESLint from project root dir where possible
ESLint 6 loads all plugins/configs/parsers relative to the project root
which, by default, is the directory in which ESLint is invoked, as
described in [ESLint RFC 2018-simplified-package-loading].

Therefore, ALE should run ESLint from the project root, when possible,
so that dependencies will load.  This commit does so.

[ESLint RFC 2018-simplified-package-loading]: https://github.com/eslint/rfcs/blob/master/designs/2018-simplified-package-loading/README.md

Fixes: #2787

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2019-12-17 12:25:44 -07:00
Horacio Sanson
5f95d032ee Fix 2891 - eslint not showing errors.
ESLint errors are contained in an array that can contain different
stuff other than JSON error messages. This patch iterates over the whole
array ignoring any non-json data.
2019-11-26 13:37:25 +09:00
w0rp
b91d82bfaa
Merge pull request #2847 from DonnieWest/allowUserToCustomizeItems
Allow user to customize items
2019-11-15 09:34:24 +00:00
w0rp
9005a62dc2
Clean up the nimpretty code 2019-11-14 14:50:21 +00:00
w0rp
7665559d0e
Merge pull request #2660 from YPCrumble/master
Add StandardJS linter for TypeScript
2019-11-14 14:47:19 +00:00
Bùi Thành Nhân
abad8e474b add nimpretty fixer 2019-11-09 16:28:49 +07:00
Donnie West
e6ee613e00
Switch variables to dictionary key 2019-11-08 16:44:04 -06:00
Donnie West
6637de46c2
Add scriptencoding to completion.vim 2019-11-08 16:44:03 -06:00
Donnie West
0b5fcbad1f
Allow the user to set their own completion values 2019-11-08 16:44:00 -06:00
Thibault Vatter
db6b1b5ecc Switch from style to transformers (#2838)
* Switch to transformers for styler
* Adapt unit test too
2019-11-07 18:22:57 +00:00
w0rp
2d9380d75c
Merge pull request #2690 from iclanzan/purty
Add purty fixer for PureScript
2019-10-29 17:37:18 +00:00
w0rp
9a0b604a99
Fix the test issues with html-beautify 2019-10-28 13:45:25 +00:00
Hugo Osvaldo Barrera
47eb3dd0c0 Add support for html-beautify (#2788)
* Add support for html-beautify
* Add html-beautify to the list of supported tools
* Update docs
2019-10-28 13:25:36 +00:00
Charlie Johnson
af8c8516d1 fixers/stylelint: enhance stylelint fixer (#2745)
* Refactor stylelint fixer test
* Support additional stylelint fixer options
* Support changing working directory for stylelint fixer
* Force css syntax for stylelint fixer
2019-10-28 13:23:02 +00:00
Jerko Steiner
463deedc29 Merge branch 'master' into do-not-save-on-autoimport 2019-10-22 16:40:27 -05:00
Jerko Steiner
40890cfcf3 Rename ale#fix#SetBufferContents to ale#util#SetBufferContents 2019-10-22 16:39:43 -05:00
Ian Campbell
ea91209a66 Allow the use of StandardX for StandardJS linting and fixing.
See https://github.com/standard/standardx
2019-10-21 20:46:54 -04:00
Ian Campbell
cf5120ba75 Remove standardts fixer in favor of allowing standard.vim fixer to handle JavaScript or TypeScript options. 2019-10-21 20:46:54 -04:00
Ian Campbell
9017d3ef9c Add StandardJS for TypeScript linting and fixing. 2019-10-21 18:20:43 -04:00