You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While LSP has a lot of great features, sometimes I don't want to use its autocompleter. Other autocompleters offer different features that are better for certain workflows. LSP should let me choose my default autocompleter and change that per notebook.
Motivation
Consider this code:
def foo(a):
if a:
return A()
return B()
x = foo(True)
# New cell
x.<tab>
IPykernel's autocomplete knows about runtime properties of objects, which I don't believe LSP does. This means I'll get autocomplete results for both A and B in the above example, but ipykernel will only show A. Another autocompleter is kite which uses ML to predict the best autocomplete results based on context (including more than just the function). Finally, LSP's autocomplete is (typically) fast and can be used without a running kernel.
All this is to say is that none of these are better than the rest, just different. Depending on my use case or personal preference, I'd like to be able to use other autocompleters without losing the rest of the features of LSP.
Design Ideas
Add a global setting that can store the "default" autocompleter then add a command to switch it per notebook. It's not clear if this feature should be requested on lab itself and LSP implement it or if this is all LSP specific....
The text was updated successfully, but these errors were encountered:
Thanks, this is a good idea. We already combine results from both the kernel and the LSP but this is indeed problematic because either one of those can be slow and we need to wait for both to complete to display the result. Giving user the choice is the right thing. Enabling Kite is also a good idea. It was previously brought up in #236; since then we split the codebase making it more developer friendly to tackle those issues.
Some use love LSP for many of its features, but prefer to keep
completions via the kernel.
This adds two boolean flags in the configuration to not send completions
request to LSP and not send completions requests to the kernel.
See jupyter-lsp#440
Elevator Pitch
While LSP has a lot of great features, sometimes I don't want to use its autocompleter. Other autocompleters offer different features that are better for certain workflows. LSP should let me choose my default autocompleter and change that per notebook.
Motivation
Consider this code:
IPykernel's autocomplete knows about runtime properties of objects, which I don't believe LSP does. This means I'll get autocomplete results for both A and B in the above example, but ipykernel will only show A. Another autocompleter is kite which uses ML to predict the best autocomplete results based on context (including more than just the function). Finally, LSP's autocomplete is (typically) fast and can be used without a running kernel.
All this is to say is that none of these are better than the rest, just different. Depending on my use case or personal preference, I'd like to be able to use other autocompleters without losing the rest of the features of LSP.
Design Ideas
Add a global setting that can store the "default" autocompleter then add a command to switch it per notebook. It's not clear if this feature should be requested on lab itself and LSP implement it or if this is all LSP specific....
The text was updated successfully, but these errors were encountered: