Hello guys i'm havint my snippets on my appwrite database i wish to build my extension to use them i'm having an issue
const htmlConsoleCompletionProvider = vscode.languages.registerCompletionItemProvider(
"html",
{
provideCompletionItems: async function (document: vscode.TextDocument, position: vscode.Position): Promise<any> {
const activeEditor = vscode.window.activeTextEditor;
if (!activeEditor) return new vscode.CompletionList([], true);
const { text } = activeEditor.document.lineAt(activeEditor.selection.active.line);
try {
const matchingSnippets = (await callToAPIAndRetrieve(text)) as any[];
const completionItems = matchingSnippets.map((snippet: any) => {
return {
label: snippet.label,
kind: vscode.CompletionItemKind.Snippet,
documentation: snippet.description,
insertText: new vscode.SnippetString(snippet.value),
};
});
return new vscode.CompletionList(completionItems, true);
} catch (error) {
console.error("Error retrieving snippets:", error);
return new vscode.CompletionList([], true);
}
},
},
""
);
Everythink works fine if the html file is empty but if i'm inside a html tag like <span></span> or inside of
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
</body>
</html>
It doesn't do anybody knows why ?
Recommended threads
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...
- Can't login or deploy functions in Appwr...
Hello, since i updatet to the appwrite cli 6.1.0 i can't login or deploy functions with the cli. When i call the command: "appwrite get account --verbose" i ge...
- Create admin user?
I'm not really sure how this is supposed to work, I installed Appwrite through docker-compose and set it up. When I launched the app and went into it, I created...