diff --git a/completion.go b/completion.go index 57e82ee..402f59a 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 0b66347..c17c1d9 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") + } +}