diff --git a/completion.go b/completion.go index 57e82eef..402f59aa 100644 --- a/completion.go +++ b/completion.go @@ -188,3 +188,9 @@ func NewCompletionManager(completer Completer, max uint16) *CompletionManager { verticalScroll: 0, } } + +var _ Completer = NoopCompleter + +func NoopCompleter(_ Document) []Suggest { + return nil +} diff --git a/completion_test.go b/completion_test.go index 0b66347a..c17c1d91 100644 --- a/completion_test.go +++ b/completion_test.go @@ -204,3 +204,9 @@ func TestFormatText(t *testing.T) { } } } + +func TestNoopCompleter(t *testing.T) { + if NoopCompleter(Document{}) != nil { + t.Errorf("NoopCompleter should return nil") + } +}