Skip to content

Commit

Permalink
docs(services): provide working example of provideCompletionItems (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan-Hall authored Apr 3, 2024
1 parent 40318d4 commit 8657bc0
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/content/docs/reference/services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,21 @@ export const service = {
create(context): ServicePluginInstance {
return {
provideCompletionItems(document, position, token) {
return [
{
label: 'Hello',
kind: CompletionItemKind.Text,
},
{
label: 'World',
kind: CompletionItemKind.Text,
},
];
return {
isIncomplete: true,
items: [
{
label: 'Hello',
kind: CompletionItemKind.Text,
isIncomplete: false
},
{
label: 'World',
kind: CompletionItemKind.Text,
isIncomplete: false
},
]
}
},
};
},
Expand Down

0 comments on commit 8657bc0

Please sign in to comment.