Skip to content

Commit

Permalink
lsp/completions: Drop period from input new text (#799)
Browse files Browse the repository at this point in the history
This is not consistent with other completions

Signed-off-by: Charlie Egan <[email protected]>
  • Loading branch information
charlieegan3 authored Jun 5, 2024
1 parent 5f6e238 commit 89d3a7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/lsp/completions/providers/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
})
}
Expand Down
4 changes: 4 additions & 0 deletions internal/lsp/completions/providers/input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 89d3a7a

Please sign in to comment.