-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add a do
autocompletion
#593
Conversation
For some clients typing `do` will result in autocompletion which is typically not what the developer wants, an example autocompletion is `defoverridable`. So this PR works around that by adding `do` as an autocompletion when the exact text entered is `"do"`.
Talk about a timely issue. Was just going to look this up! defoverridable is the bane of my existence right now. |
Unfortunately that's one of the cons of fuzzy matching |
It would be nice if it also indented, so |
@nshafer I experimented with that a bit, but correct indentation will depend on how indented the original code is which won't always be a single level. We might be able to add some more smartness in the future but I'm not sure what form that would take. |
Ahh, I figured that since the carriage return results in the cursor being on the same line as whatever started the do, I thought just adding one "do_block": {
"prefix": "do",
"body": [
"do",
"\t$0",
"end"
]
} |
For some clients typing
do
will result in autocompletion which is typically not what the developer wants, an example autocompletion isdefoverridable
. So this PR works around that by addingdo
as an autocompletion when the exact text entered is"do"
.I'm curious if anyone has any better/different ideas on how to solve this.