Skip to content

Feature: Support Multiple Autocompleters #440

@mlucool

Description

@mlucool

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:

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....

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions