Commit Graph

79 Commits

Author SHA1 Message Date
w0rp d3df00b898
Fix test for echoing messages
The previous linter rule about stray echo lines has been restored, and
now all problems for custom linting rules can be ignored by adding a
comment above problem lines.
2022-04-01 14:35:07 +01:00
yoshi1123 e490e87a60
Add eclipselsp jdt:// support for textDocument/definition (#4030)
This patch adds support for opening jdt:// links on "go to definition" requests returned by Java language servers.

Co-authored-by: w0rp <devw0rp@gmail.com>
2022-03-04 19:03:27 +00: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
Wilson E. Alvarez 42a6e039cb
Implement textDocument/didSave includeText optional argument (#3925) 2021-10-07 20:48:54 +09:00
w0rp dc40ece3c3
#3632 Add ale#util#MapMatches 2021-03-15 22:30:22 +00: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
Horacio Sanson 49f8aa4703
Revert "Improves fixer performance for large buffers" 2021-01-12 17:49:30 +09:00
Łukasz Woźniak 6bebdcfa30 Improves fixer performance for large buffers 2020-09-18 12:59:27 +02:00
w0rp dd9ad9b5be
#3319 - Try to modify buffers later for ALEFix 2020-08-29 12:33:17 +01:00
w0rp ecd7abecc0
Fix #3319 - Force modifications to buffers 2020-08-27 21:29:13 +01:00
w0rp 2b2403a20d
Merge pull request #3144 from jamescdavis/dont_append_newline_when_noeol
don't append a newline to temp file when buffer is noeol and nofixeol is set
2020-08-14 00:32:28 +01:00
w0rp 7c4b1d8444
Close #3274 - Handle basic LSP markdown formatting 2020-08-12 22:11:45 +01:00
James C. Davis 15d590ee5e
fix: don't append newline when buffer is noeol and nofixeol 2020-04-30 15:00:10 -04: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
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
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
Jerko Steiner 493705336c Add old check for bufline api 2019-12-29 15:08:22 +01:00
Jerko Steiner 40890cfcf3 Rename ale#fix#SetBufferContents to ale#util#SetBufferContents 2019-10-22 16:39:43 -05:00
Jerko Steiner 3e8c8d3ccb Add ALERename (tsserver & LSP), ALEOrganizeImports (tsserver) and auto import support (tsserver) (#2709)
This commit adds support for renaming symbols in tsserver and with LSP tools, and for organising imports with tsserver. Completion results for symbols that can be imported are now suggested if enabled for tsserver completion done via ALE.
2019-09-12 21:53:23 +01:00
w0rp 737ed31de5
Disable fsync for writefile() calls for performance 2019-04-26 20:17:33 +01:00
w0rp 5505f2323d
Fix #2330 - Do not use getcurpos() to avoid changing curswant 2019-03-07 12:28:42 +00:00
Alvin Chan 70b95f16c3 Replace `normal` with `normal!` 2019-02-05 16:37:26 -08:00
Alvin Chan 9f63bec12c Remove the `redraw` since it's implicit with the `zz` 2019-02-05 16:31:02 -08:00
Alvin Chan 7ce481c8f6 Center the line within the viewport after a jump 2019-02-05 16:27:13 -08:00
Alvin Chan a4ed9a1c35 Force Vim to `redraw` after `ale#util#Open` 2019-02-05 16:13:58 -08:00
Ben Kraft 73a204dd00 Add versions of ALEGoToDefinition that open in splits
This is just like `:ALEGoToDefinitionInTab`, only a (v)split instead of
a tab.  Fixes #2140.
2018-12-19 18:35:56 -05:00
Luan Santos f58a5cba05
Move virtualtext handling to own file
This allows cursor and virtualtext to be independently autoloaded.
2018-11-06 22:31:35 -08:00
w0rp a6c6e24d61
#1872 Remove extra carriage returns when fixing files on Windows 2018-09-19 19:28:57 +01: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 61a0716837
Use &l:equalprg so local options do not override global ones 2018-08-17 10:10:49 +01:00
Bradford Larsen 023ade872e Adjust the jumplist with line numbers too when opening a new file
This further addresses Issue #1758.
2018-08-07 16:10:36 -04:00
w0rp 4ed35f7247
Fix #1758 - Set marks before going to definitions 2018-07-25 19:43:25 +01:00
w0rp 06132954b1
Switch to v:t_ variables for type checks 2018-07-25 01:27:28 +01:00
w0rp fcd62342d5
Only temporarily replace TMPDIR if it's defined to be an empty string 2018-07-16 08:45:55 +01:00
w0rp b2e2bbd042
unlet $TMPDIR too, where we can 2018-07-15 23:04:50 +01:00
w0rp ac0abc7c1f
Fix #1716 - Replace tempdir() with a wrapper to preserve TMPDIR 2018-07-12 13:05:59 +01:00
w0rp c9a6b04dc7
Update the sandbox test now that functions can be defined in the sandbox 2018-07-11 13:36:59 +01:00
w0rp 01c68fedd6
#830 Implement a socket wrapper API for use with LSP connections 2018-07-02 23:49:47 +01:00
w0rp 935740cf93
Close #1590 - Automatically close previews for hover 2018-06-21 23:02:36 +01:00
w0rp 8bca073763
Fix #1661 - Do not use :edit when jumping inside of a file 2018-06-21 21:20:54 +01:00
w0rp 82ea36576c
Move ClockMilliseconds to events, so fewer files are loaded some times 2018-06-19 20:53:49 +01:00
w0rp ebbf7d0353
#1428 Show multiline hover messages, and document the new command 2018-04-24 21:03:06 +01:00
w0rp ef130c4428
#1428 Start implementing LSP hover support 2018-04-22 22:00:25 +01:00
w0rp 87ad4dfbe7
Implement a preview window for selecting locations to open 2018-04-22 15:53:01 +01:00
w0rp f064ba48f5
Close #1494 - Prefer displaying higher severity problems for cursor messages, balloons, and highlights 2018-04-10 21:05:22 +01:00
w0rp 91d7e81ebc
Fix #605 - Support `vcol: 1` for multi-byte character positions 2018-04-08 17:17:46 +01:00
Jelte Fennema b6d1c41925 Go: Add gotype support (#1099) 2018-01-07 12:11:01 +00:00
w0rp 5160f814d9 Fix #988 - Support --fix-dry-run for ESLint by processing the JSON output 2017-11-22 23:23:14 +00: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 753cf5da95 #653 - Automatically accept annoying loclist and quickfix errors from Vim 2017-08-20 13:27:18 +01:00