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

CodeEditor: Hinting and Completion #97

Open
darth-cheney opened this issue Feb 26, 2020 · 4 comments
Open

CodeEditor: Hinting and Completion #97

darth-cheney opened this issue Feb 26, 2020 · 4 comments
Assignees

Comments

@darth-cheney
Copy link
Contributor

Ace editor has a nice framework for making suggestions when we type. We need an API on the python side that could hook into that so that as we're typing the system can provide suggestions. Ideally we'd be able to specify callbacks to the constructor on the python side where it would call them with the current cursor position and current text buffer and get back a list of suggestions and send that up to the client side.

@dkrasner dkrasner self-assigned this Mar 19, 2020
@dkrasner
Copy link
Contributor

@braxtonmckee I am making decent progress with this today (although Ace docs on adding custom completions is somewhat sparse). The current set up allows you to define a custom completion func on the server side in cells.CodeEditor and when you do so the component knows to use it instead of the default Ace ones. Now do you want this custom completion to replace or complement the Ace ones or do you want a CodeEditor side option for either one? In the latter case, I could see if there is a way to make sure the the custom results come up first or always come up.

@braxtonmckee
Copy link
Contributor

braxtonmckee commented Mar 25, 2020 via email

@dkrasner
Copy link
Contributor

dkrasner commented Mar 25, 2020

ok got it - this is what i have going implement right now

note, the way that ace bundles these completion functions it waits until all of them return, which in our case would include on waiting on the server. At this least this is what I see from their code and my initial tests

@dkrasner
Copy link
Contributor

@braxtonmckee ok we have something working #106 - can be enhanced as needed

@dkrasner dkrasner linked a pull request Apr 22, 2020 that will close this issue
6 tasks
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 a pull request may close this issue.

3 participants