feat(editor): complete the apis block and drop the removed snippets

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 12:31:23 +05:30
co-authored by Claude Opus 5
parent 990a8128a7
commit 2bb52487eb
5 changed files with 62 additions and 6 deletions
+3 -2
View File
@@ -15,7 +15,7 @@ export interface TextDocument {
version?: number;
}
export const WRN_COMPLETIONS = [
export const WRN_KEYWORDS = [
"page",
"component",
"layout",
@@ -29,6 +29,7 @@ export const WRN_COMPLETIONS = [
"load",
"action",
"api",
"apis",
"realtime",
"view",
"style",
@@ -237,7 +238,7 @@ export function hover(document: TextDocument, position: Position) {
}
export function completionItems() {
return WRN_COMPLETIONS.map((label) => ({ label, kind: 14, detail: "WRNexus language keyword" }));
return WRN_KEYWORDS.map((label) => ({ label, kind: 14, detail: "WRNexus language keyword" }));
}
const semanticTokenTypes = ["variable"] as const;
@@ -0,0 +1,6 @@
import { expect, test } from "bun:test";
import { WRN_KEYWORDS } from "../src/index.ts";
test("apis is a known page-level keyword", () => {
expect(WRN_KEYWORDS).toContain("apis");
});