-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(completion): make completion request directly where possible
Details: - Do not force 'completefunc_lsp' call to make a completion LSP request. Instead make it explicitly and allow its callback to later trigger necessary keys. Among other things, this reduces flickering in case of `isIncomplete` update (as emulating 'completefunc_lsp' keys forces completion popup to immediately hide only to slightly later to reappear again). - Being able to still make an LSP request directly inside `completefunc_lsp` is crucial to make it work with explicit `<C-x>...` and being able to retrigger completion at `<BS>`.
- Loading branch information
1 parent
d6678c2
commit a84b7e5
Showing
5 changed files
with
161 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tests/screenshots/tests-test_completion.lua---Autocompletion---works-with-`-BS-`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--|---------|---------| | ||
01|Jun | ||
02|June Function | ||
03|~ | ||
04|~ | ||
05|~ | ||
06|~ | ||
07|~ | ||
08|~ | ||
09|<ame] [+] 1,4 All | ||
10|-- INSERT -- | ||
|
||
--|---------|---------| | ||
01|00000000000000000000 | ||
02|11111111111111122222 | ||
03|22222222222222222222 | ||
04|22222222222222222222 | ||
05|22222222222222222222 | ||
06|22222222222222222222 | ||
07|22222222222222222222 | ||
08|22222222222222222222 | ||
09|33333333333333333333 | ||
10|44444444444455555555 |
23 changes: 23 additions & 0 deletions
23
tests/screenshots/tests-test_completion.lua---Autocompletion---works-with-`-BS-`-002
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--|---------|---------| | ||
01|Ju | ||
02|June Function | ||
03|July Function | ||
04|~ | ||
05|~ | ||
06|~ | ||
07|~ | ||
08|~ | ||
09|<ame] [+] 1,3 All | ||
10|-- INSERT -- | ||
|
||
--|---------|---------| | ||
01|00000000000000000000 | ||
02|11111111111111122222 | ||
03|11111111111111122222 | ||
04|22222222222222222222 | ||
05|22222222222222222222 | ||
06|22222222222222222222 | ||
07|22222222222222222222 | ||
08|22222222222222222222 | ||
09|33333333333333333333 | ||
10|44444444444455555555 |
23 changes: 23 additions & 0 deletions
23
tests/screenshots/tests-test_completion.lua---Autocompletion---works-with-`-BS-`-003
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--|---------|---------| | ||
01|J | ||
02|January Text | ||
03|June Function | ||
04|July Function | ||
05|~ | ||
06|~ | ||
07|~ | ||
08|~ | ||
09|<ame] [+] 1,2 All | ||
10|-- INSERT -- | ||
|
||
--|---------|---------| | ||
01|00000000000000000000 | ||
02|11111111111111111222 | ||
03|11111111111111111222 | ||
04|11111111111111111222 | ||
05|22222222222222222222 | ||
06|22222222222222222222 | ||
07|22222222222222222222 | ||
08|22222222222222222222 | ||
09|33333333333333333333 | ||
10|44444444444455555555 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters