-
Notifications
You must be signed in to change notification settings - Fork 142
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
autocomplete #57
Comments
There's this, which has been merged: ajaxorg/ace#1189 |
Yayayay! How do we get the words to complete with? |
There's several steps to this. First, we need a function that takes the current cursor position and isolates the "relevant R statement". There might be R code that does this (@s-u, help here?). Here are some relevant use cases, where I'm using First, trivial cases:
This should return
Then, a little more annoying, since it mixes markdown:
This takes some annoying parsing code duplication with knitr, but I see no way around it. |
Assuming we can isolate the latest incomplete R statement, the next step is to crib the
With that,
It's smart enough to pluck the last statement by itself, so it might just be a matter of isolating the last R block. |
Pushing basic support for this. Required a few changes to mode-r.js and ext-language_tools.js which I'm not completely sure about and which will need to be reapplied or rethought the next time we upgrade ace. (See the commit messages.) |
ACE has autocomplete support, and so does R. We should look into doing this. Making it low-latency will be.. interesting.
The text was updated successfully, but these errors were encountered: