Commit Graph

37 Commits

Author SHA1 Message Date
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
Gregory Anders 49bdbc3ba5
Deduplicate items in location list (#3792) 2021-07-03 18:38:37 +09:00
Horacio Sanson bafe1c0fd6
3560 add vim 8.2 and nvim 0.4 to ci tests (#3561)
* Add vim82 and neovim04 to CI tests.

* Fix test_sign_column_hightlighting test.

In vim82 with verbose=1 the output of highlight command changes breaking
the ale#sign#SetUpDefaultColumnWithoutErrorsHighlight(). This commit
forces verbose=0 when the method starts and restores the previous value
before exiting.

* No return values in vim82 returns a numeric value instead of a empty string.

* Fix test_reek_handler test

The FuzzyJSONDecode() method catches E474 when it fails to parse the
input as JSON but Vim8.2 throws E491 instead. This commit modifies the
function to catch both E474 or E491.

* Fix perl6 handler test.

Perl6 handler catches json parse errors using the E474 error but in
Vim82 it changed to E491. This commit modifies the handler so both
errors are considered.

* Fix list opening tests.

In Vim 8.2 the call `range(1, bufnr('$'))` always returns quickfix
buffers no matter if they are closed or not. Using `ls` does not show
them but the above range will always include them.

This new behavior breaks the ale#list#IsQuickfixOpen() method that in
turn breaks many other things. This commit fixes this by using the
getqflist() and getloclist() methods instead.

* Fix test updates loclist test.

For some reason in Vim 8.2 the sign offset seems to not reset between
tests causing the sign_id to not match in the Assert. When the test is
run individually it passes but when run as part of the whole suite the
sign_id is off by one.

Forcing the offset in the test setup seems to fix the issue.

* Fix omnifunc completion test.

For unknown reasons the SetCompletionResponse tests fail in Neovim 0.2
and 0.4. Unfortunatelly the only solution I found is to disable them
for neovim.

* Fix linter warnings

* Fix smoker test.

Add vim 8.2 to the list of versions that need some retires due to
randomly failing tests.

* Add docker image build job.

Trying some clever trick to build the docker image if not available
locally or in Docker hub. It uses the Dockerfile md5 checksum as tag so
only when changes on that file occur will the image be downloaded or
build.

* Add labels to Docker image

* Remove tests for middle versions 8.1 and 0.3.5

* Use same vader commit as appveyor

* Implement image push to Docker Hub

Co-authored-by: Horacio Sanson <horacio@allm.inc>
2021-01-27 19:52:24 +00:00
Andre Souto 219fb5873c Keep cursor position on screen when opening/closing lists (#2632)
* Trying to keep win view from bouncing
* Adjusting when views are saved and restored
* Also restore view when closing quickfix
* Don't restore view when opening list vertically
2019-08-17 19:14:21 +01:00
Pete Beardmore a5240009ba Fix incorrect re-selection (#2630)
ALE now only resets selections when needed, to prevent side effects.
2019-07-02 08:31:24 +01:00
w0rp 59829bc194
Merge pull request #2253 from jj-kim/master
Improve location list behavior on split windows of same buffer.
2019-06-08 23:25:02 +01:00
Andrew Crites a3a052b55a
Fix #2368 - Open vertical list to the right
This was normal behavior before, and it also stops ale from stealing focus.
2019-03-16 21:39:11 -04:00
Jason Kim 8b0879212f Improve location list behavior on split windows of same buffer. 2019-01-16 17:15:47 -08:00
w0rp d476578a40
Improve ALE project style checking
* The project style linter now runs while you type.
* Now the scripts for checking the project require blank lines.
* Many style issues have been found and fixed.
2018-09-04 16:51:18 +01:00
w0rp f2837b5802
#1524 - Define global variables where they are needed 2018-05-28 19:19:20 +01:00
Andrew Crites acbe527e15 Option to open lists vertically (#1381)
* Add configuration option to open lists vertically

* Add tests, clean up vertical list config

* Vertical list option cleanup

* Use is# for tests
* Order properties in documentation alphabetically
2018-03-02 20:22:29 +00:00
w0rp 597507e519 Make the message formats configurable with buffer local variables 2017-11-19 23:44:09 +00:00
w0rp 16e7dc2371 Fix #1069 Support formatting the loclist messages with g:ale_loclist_msg_format 2017-11-14 10:28:36 +00:00
w0rp e19a81cb09 Fix #920 - Shut up about E776 2017-09-10 20:13:35 +01:00
w0rp 89cc8ca314 Fix #912 - Close lists automatically when g:ale_open_list is set to 'on_save' again 2017-09-08 20:10:11 +01:00
w0rp c7fbcb3c02 Fix #899 - Make the quickfix and loclist windows close again 2017-09-03 19:44:00 +01:00
w0rp 1a524ca63e #653 - Always set loclist or quickfix in a timer callback, which prevents errors E924, E925, and E926 2017-08-22 21:19:36 +01:00
w0rp 9d6883561c #653 Set problems from other buffers when buffers are first checked 2017-08-19 20:15:46 +01:00
w0rp 5c839c4825 #653 Collect items for quickfix from all buffers, and de-duplicate them. Set filename items in quickfix and loclist. 2017-08-19 14:28:51 +01:00
w0rp d5ae3201a4 Ban !=# and !=? from the codebase 2017-08-11 00:31:42 +01:00
w0rp 16772298ab Simplify some comparisons 2017-08-08 08:43:51 +01:00
w0rp a535d07f28 Ban use of ==# or ==? in the codebase, and prefer is# or is? instead 2017-08-08 08:39:13 +01:00
w0rp 5010ddc28f Fix #833 - Do not open windows on save when the option is off 2017-08-08 07:29:10 +01:00
w0rp 16cfedf04a Fix #271 - Add the ability to open the quickfix or loclist windows only after saving a file 2017-08-08 00:46:42 +01:00
w0rp 2edea15358 Fix the resetting of selections and annotate it 2017-08-07 22:08:35 +01:00
Adrian Kocis c18451fba9 added missing visual reselection after quick/location list update (#788)
Reset visual selection after opening loclist or quickfix windows
2017-08-07 21:57:59 +01:00
w0rp e45c16d9bb Fix #796 - Ignore errors for closing the last window 2017-07-24 09:30:41 +01:00
w0rp 62862c3347 Experimental code for showing results as soon as each linter completes 2017-06-08 17:30:21 +01:00
w0rp 9dadde190e Fix #461 - Allow multiple loclist windows to be opened, and replace some split windows 2017-06-06 17:31:13 +01:00
w0rp d5ae9b50ea Fix #499 Set an explicit height for the quickfix list, and make the height configurable 2017-06-01 10:39:21 +01:00
cs86661 81f27a99c8 Set qflist/loclist window title properly ... (#588)
* Update list.vim

Set qflist/loclist window title properly ...

* Update list.vim

1. Remove redundant code.
2. Get absolute path from 'a:buffer'.

* Set the list window titles appropriately for each version of Vim, and add tests
2017-05-31 22:55:23 +01:00
Lucas Kolstad b3f6f56745 Fix #272 by checking if quickfix is open before reopening to avoid triggering a BufEnter event that causes quickly repeating linting runs when g:ale_lint_on_enter = 1.
Add test assertions that quickfix window closes when lists become empty again.
2017-03-24 10:39:37 -07:00
w0rp 6f0fc965ab #394 Attempt to fix running linters when bufwinid() doesn't exist 2017-03-13 23:45:32 +00:00
w0rp ad49846a48 #376 Use the window ID for a given buffer for setting the loclist 2017-03-09 00:43:53 +00:00
w0rp d7ed49f849 Add a script for custom checks to enforce using the abort flag for functions and trailing whitespace, and fix existing issues. 2017-01-22 14:54:57 +00:00
yfery a23173eeb2 Add option to open loclist/quicklist when there are errors (#266)
* Add option to open loclist/quicklist when there are errors

I copied PR #137, and tries to complete it by correcting some issues and
adding vader tests.

About tests, first time with vader, can you give some feedback if there
are what you expected in PR #137.

* Remove old code + fix indent issue

* add g:ale_keep_list_window_open option

* Correct bug with keep open option

* Add comment into vader file

* Fix errors for Travis CI build
2017-01-22 12:57:05 +00:00