diff --git a/internal/lsp/completions/providers/input.go b/internal/lsp/completions/providers/input.go index 56ba5611..84b12834 100644 --- a/internal/lsp/completions/providers/input.go +++ b/internal/lsp/completions/providers/input.go @@ -58,7 +58,7 @@ You can also experiment with input in the [Rego Playground](https://play.openpol Line: params.Position.Line, Character: params.Position.Character, }, }, - NewText: "input.", + NewText: "input", }, }) } diff --git a/internal/lsp/completions/providers/input_test.go b/internal/lsp/completions/providers/input_test.go index 7f4df66d..3a579ad8 100644 --- a/internal/lsp/completions/providers/input_test.go +++ b/internal/lsp/completions/providers/input_test.go @@ -44,4 +44,8 @@ allow if i` if labels[0] != "input" { t.Fatalf("Expected 'input' completion, got: %v", labels[0]) } + + if exp, got := "input", completions[0].TextEdit.NewText; exp != got { + t.Fatalf("Expected '%s' as new text, got: %s", exp, got) + } }