-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve completions #410
Merged
Merged
Improve completions #410
Conversation
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
zachallaun
force-pushed
the
za-completions-improvements
branch
2 times, most recently
from
October 12, 2023 18:11
729f362
to
d8537ef
Compare
scohen
reviewed
Oct 13, 2023
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Outdated
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Outdated
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
apps/server/lib/lexical/server/code_intelligence/completion/translations/macro.ex
Show resolved
Hide resolved
zachallaun
force-pushed
the
za-completions-improvements
branch
from
October 13, 2023 14:19
d8537ef
to
0d75016
Compare
scohen
reviewed
Oct 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing i'm not a fan of in this PR is enabling erlang modules for single character completions. It's a LOT of noise.
apps/server/test/lexical/server/code_intelligence/completion_test.exs
Outdated
Show resolved
Hide resolved
zachallaun
force-pushed
the
za-completions-improvements
branch
2 times, most recently
from
October 13, 2023 18:43
e0e9dd8
to
078e645
Compare
zachallaun
force-pushed
the
za-completions-improvements
branch
2 times, most recently
from
October 15, 2023 18:08
d3cf414
to
572ce9c
Compare
scottming
approved these changes
Oct 16, 2023
zachallaun
force-pushed
the
za-completions-improvements
branch
from
October 16, 2023 13:33
572ce9c
to
46a62a5
Compare
- Removes unnecessary `$0` from end of some snippets, as it introduces trailing whitespace - Use more consistent capitalization for labels - Improved snippets for `defdelegate`, `defguard`, `defguardp`, `with`, `quote`
Related: #400 VS Code in particular handles empty completions lists very poorly, refusing to make further completion requests. This commit removes the logic that was preventing completions from being returned when the prefix is a single character.
Prior to these changes, do/end blocks would be suggested in situations like `@do|`.
This commit reverts some of #398 in order to retain the previous, better UX that users had in other editors, while still allowing completions to work in VS Code.
…`{ isIncomplete: false, items }`. According to this explanation: > result: CompletionItem[] | CompletionList | null. If a CompletionItem[] is provided, it is interpreted as complete. So it is the same as { isIncomplete: false, items }. I suspect that many clients do not handle the situation of `{ isIncomplete: false, items }`. They default to only handling `CompletionItem[]`.
zachallaun
force-pushed
the
za-completions-improvements
branch
from
October 16, 2023 13:34
46a62a5
to
e2feb49
Compare
@zachallaun this looks ready to me. Things seem to work well in emacs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #409, which was cherry-picked out of this branch initially to make review easier.
This PR includes a set of fixes and improvements for completions. It's probably best to review commits individually.
Please do pull and build this branch and play with completions locally.
Related: