forked from onivim/oni2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(completion): Fix handling of multiple providers (onivim#2202)
There were several issues with completion, in terms of handling multiple completion providers: - We'd make multiple requests, in some cases, showing unnecessary duplicates of items - Unregistration was not handled in the previous strategy - We'd wait for all completion requests to go through before showing completion UX - We did not use the `sortText` or `filterText` properties - When committing a completion, the completion UX might pop back up (ie, like onivim#1171) This improves the state management of the completion experience by moving it to the `Feature_LanguageSupport` module, handling dynamic registration / unregistration, keeping track of 'committed' completions (so we don't re-trigger until a new completion meet is encountered). Fixes onivim#1171 onivim#1133 onivim#1172 __TODO:__ - [x] Fix syntax scope handling (restore the previous functionality) - [x] Restore the `Control+N`/`Control+P` behavior (along with arrow keys) for cycling completions - [x] Add trigger character support - [x] Does this impact onivim#1133 ? - [x] Add trigger command (onivim#1172) - [x] Handle `insert` / `normal` transition - [x] Test the `isActive` / context key to ensure it's being triggered - [x] Handle cursor movement (onivim#2167) - [x] Investigate proper `insertText` handling (deserialize range, kind, additional edits, command): - C++ - extra spaces introduced - elixir - `/4` is added - Java - `System.out.println() : void` - [x] Handle snippets in a simple way (zero out placeholders, move cursor to first placeholder) - [x] Hook up completion details subscription / resolve
- Loading branch information
Showing
55 changed files
with
2,136 additions
and
1,134 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
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
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
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
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
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
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
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
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
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
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 @@ | ||
open Oni_Core; | ||
|
||
[@deriving show] | ||
type t = (int, int); | ||
|
||
let decode = { | ||
Json.Decode.( | ||
list(int) | ||
|> and_then( | ||
fun | ||
| [cacheId0, cacheId1] => succeed((cacheId0, cacheId1)) | ||
| _ => fail("Expected (int, int)"), | ||
) | ||
); | ||
}; | ||
|
||
let encode = { | ||
Json.Encode.( | ||
((cacheId0, cacheId1)) => { | ||
[cacheId0, cacheId1] |> list(int); | ||
} | ||
); | ||
}; |
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
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
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
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
Oops, something went wrong.