Commit Graph

100 Commits

Author SHA1 Message Date
w0rp 7d90ff56d9
Close #3333 - Add an ALECompletePost event
Add an `ALECompletePost` event along with everything needed to make it
useful for its primary purpose: fixing code after inserting completions.

* `ALEFix` can now be called with a bang (`!`) to suppress errors.
* A new `ALELintStop` command lets you stop linting, and start it later.
2020-09-08 21:40:10 +01:00
w0rp b4b75126f9
Fix a completion error 2020-09-07 10:01:18 +01:00
w0rp c36053d4cc
Close #3268 - Implement :ALEImport
A new command, `:ALEImport`, has been added, which lets you import words
at your cursor if a completion provider can provide a completion for
that word which includes some additional text changes.
2020-09-06 22:37:37 +01:00
w0rp 25b572b3bf
Close #3205 - Avoid inserting completions by default 2020-08-29 17:36:25 +01:00
w0rp 6e2e51b154
Fix #2971 - Disable automatic completion while 'paste' is active 2020-08-29 17:27:53 +01:00
w0rp a955f5dfa8
#3312 - Just check if additionalTextEdits is non-empty 2020-08-27 08:57:12 +01:00
w0rp 396fba7cca
Fix #3312 - Fix a false positive for auto imports
ALE was incorrectly detecting completion results from servers such as
rust-analyzer as wanting to add import lines when additionalTextEdits
was present, but empty.

Now ALE only filters out completion results if the autoimport setting is
off, and one of the additionalTextEdits starts on some line other than
the current line. If any additionalTextEdits happen to be identical to
the change from completion anyway, ALE will skip them.
2020-08-27 08:44:43 +01:00
w0rp 5a4fad6172
Fix #2899 - Handle tsserver default import completion 2020-08-14 01:55:54 +01:00
w0rp 6d502233d8
Close #3267 - Add a general autoimport setting 2020-08-09 02:32:47 +01:00
w0rp 8bfb5c6407
Merge pull request #2849 from DonnieWest/excludeTsserverWarnings
Allow the user to remove warnings from completions
2020-08-09 01:32:27 +01:00
Jerko Steiner b29e9867e8 Add test for LSP autoimport 2020-05-31 11:46:10 +02:00
Jerko Steiner 4062b05669 Fix completion with langserver (autoimport in go) 2020-05-31 11:00:53 +02: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
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
Zander Lee 4cbe16197c
Allow popup to be used instead of preview in completeopt 2019-12-22 09:35:29 +01: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
Donnie West 4bdde36661
Check kind safely 2019-11-08 16:41:38 -06:00
Donnie West db5fe5659f
Allow the user to remove warnings from completions 2019-11-08 16:41:37 -06:00
Jerko Steiner 463deedc29 Merge branch 'master' into do-not-save-on-autoimport 2019-10-22 16:40:27 -05:00
w0rp 9125ec8739
Merge pull request #2845 from DonnieWest/fixItemDetailsOnEmptySource
Fix tsserver not returning details for items with empty source
2019-10-18 15:16:54 +01:00
Donnie West 8698c44e2a
Fix tsserver not returning details for items with empty source 2019-10-17 23:26:24 -05:00
Donnie West b27df1b169
Allow code actions to work on callback based sources 2019-10-17 23:22:31 -05:00
Jerko Steiner c8c142b881 Do not save for ALERename and ALEOrganizeImports 2019-10-09 20:54:47 -05:00
w0rp 3fe2223a48
Fix #2800 - Ignore completion user data which is not a dictionary 2019-10-09 10:12:31 +01:00
Jerko Steiner f5e44415e8 Show description of autoimport action for tsserver 2019-09-20 13:11:16 +07: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
Donnie West 5388ff1d54 Add asyncomplete.vim Support (#2627) 2019-08-17 18:40:05 +01:00
w0rp 36a50111b9
Merge pull request #2601 from delphinus/feature/better-completion-for-deoplete
Show more candidates for Deoplete completion
2019-07-14 10:29:03 +01:00
delphinus a3521de64e Use input_patterns & add comments for updating it 2019-06-25 18:04:04 +09:00
delphinus e0f8304860 Add separated func for deoplete
Deoplete needs `get_complete_position` method and it has a different
signature. It already fetches the input string and attempts to detect
the position with `\k*` regexp patterns.
2019-06-19 15:08:24 +09:00
Parker Snell c5a4bbf8b0 Enable C++ autocompletion on '::' and '->' 2019-06-18 18:02:44 -07:00
w0rp 27146ade32
Fix #2544 - Completion positions are off by one 2019-05-30 10:26:17 +01:00
w0rp 67d7caee30
Fix #2535 - Automatically emit <C-x><C-o> less to prevent <C-o> issues 2019-05-28 20:03:35 +01:00
w0rp e5ea809094
Close #2285 - Add a function for use with omnifunc 2019-05-17 00:57:52 +01:00
w0rp bfc79bd2aa
#2492 - Try to fix a deoplete bug again 2019-05-12 19:35:10 +01:00
w0rp df90725c85
Support b:ale_completion_enabled for disabling it for some buffers 2019-05-11 17:19:45 +01:00
w0rp 722c3e8dae
#2481 - Use text to insert from insertText 2019-05-09 17:26:33 +01:00
w0rp 01331266a8
Close #1753 - Implement minimum viable integration with Deoplete 2019-04-23 21:26:25 +01:00
w0rp a6012d853c
Merge pull request #2347 from codenut/master
Fix for #2346
2019-03-11 09:07:31 +00:00
w0rp 03384a5d6f
#2341 - Handle completion messages with textEdit objects 2019-03-10 15:21:36 +00:00
Michael Valladolid a5cf7e854b set maximum number of autocomplete suggestions for results coming from LSP 2019-03-10 00:50:25 +08:00
w0rp 413529f603
Fix #2326 - ALEComplete no longer replaces completeopt 2019-03-08 21:32:05 +00:00
w0rp 5505f2323d
Fix #2330 - Do not use getcurpos() to avoid changing curswant 2019-03-07 12:28:42 +00:00
w0rp 1ee56713b8
#2132 Use an on-init callback for all LSP logic 2019-02-13 17:26:37 +00:00
w0rp d21581016e
Fix #2257 - Fix an off by 1 which broke completion for some servers 2019-02-08 19:31:47 +00:00
w0rp 3e11cbd18d
Update syntax checking
* Line continuation characters should be on the same lines.
* .vim file line indentation should be a multiple of 4.
2019-02-06 18:05:13 +00:00
Andrey Popp bcf63eea96 Request LSP completion for the next col after the cursor 2019-01-21 23:19:47 +03:00
Jerko Steiner b1b05e6e66 Optimize ale#completion#Filter when prefix is "" 2019-01-08 15:10:03 +01:00