Repository navigation
Conversation
2d4bfbe to
a51ddfb
Compare
3018267 to
07a709b
Compare
|
Working on this with @unnamedplay-r during sprints. We though a bit about the API to register completions, you have to take into consideration a couple of things:
We had idea of a couple of way to register completer: This second one would automatically dispatch for SQL (in this example), but this might need metaclass to work properly or Python might say "Sql" not define, this mimic the We can also use named conventions, Appending Where the author need to be explicit. We then to like option 4 ( For each of these there is another alternative to split the completer into 2 completer function, for wether the cursor is on the We still need to exactly figure out how to map the completer correctly in case the magic get registered with a different name.. but that's an implementation detail I guess. |
07a709b to
505974a
Compare
In particular useful for multi language integration. One of defect is
that you can't really complete. But what you can do is actually
dispatch the completion to the Magic Class (if you really interested in
integration anyway you go with a magic Class. And dispatch to the class.
So far it completes only for cell magics. I need to poke at
InputSpliter to know if we can figure out we're completing a line magic
which is not at the beginning of the line.
There are a few question remaining:
- How to tell IPython to give-up (or not) on completing using jedi and
Python completion. Indeed for %%timeit you just want to __extend__
completion with your own. For %%sql, you don't want to include Python
completions.
- What API should we provide ?
- here is line/cell/cursor figure things out with a single function
- Allow user to register a separate completer for the first line,
and the core of the cell independently.
I'd like to have a prototype that can forward the completion to another
kernel (hook into the python2 magic and have a Python 3 kernel that
control a Python2 kernel ?
505974a to
62ad964
Compare
|
Note to self: have a look at |
In particular useful for multi language integration. One of defect is
that you can't really complete. But what you can do is actually
dispatch the completion to the Magic Class (if you really interested in
integration anyway you go with a magic Class. And dispatch to the class.
So far it completes only for cell magics. I need to poke at
InputSpliter to know if we can figure out we're completing a line magic
which is not at the beginning of the line.
There are a few question remaining:
Python completion. Indeed for %%timeit you just want to extend
completion with your own. For %%sql, you don't want to include Python
completions.
and the core of the cell independently.
I'd like to have a prototype that can forward the completion to another
kernel (hook into the python2 magic and have a Python 3 kernel that
control a Python2 kernel ?
--
CC @ivanov