Skip to content
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 completion #747

Merged
merged 10 commits into from
Dec 5, 2021
Merged

Improve completion #747

merged 10 commits into from
Dec 5, 2021

Conversation

jonatanklosko
Copy link
Member

Closes #746.

Additionally I improved built-in macros like def* and import to insert space instead of parentheses on completion.

isense.mp4

@@ -250,6 +250,7 @@ class LiveEditor {

return this.__asyncIntellisenseRequest("completion", {
hint: lineUntilCursor,
editor_auto_completion: settings.editor_auto_completion,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find any way to detect if the completion was triggered with ctrl+space or requested automatically by the editor. So when auto popups are enabled we don't show the "No runtime" message, even on ctrl+space.

@jonatanklosko
Copy link
Member Author

Sidnote: we could get more fancy and provide whole snippets for stuff like def or defmodule, but this probably distracts the flow unless the user is used to navigating snippet stops with Tab.

Copy link
Contributor

@josevalim josevalim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two tiny suggestions and ship it!

@jonatanklosko jonatanklosko merged commit d909272 into main Dec 5, 2021
@jonatanklosko jonatanklosko deleted the jk-isense branch December 5, 2021 13:58
@bcardarella
Copy link

This problem exists upstream in the Language Server for VSCode: elixir-lsp/elixir-ls#302 (comment)

Could this fix be ported?

@jonatanklosko
Copy link
Member Author

@bcardarella I'm on VSCode v1.63.2 and ElixirLS v0.9.0 and it works as expected:

vscode_do.mp4

@bcardarella
Copy link

@jonatanklosko that's so strange, I'm on the exact same VS Code and ElixirLS versions but not seeing the same result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve completion
3 participants