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:
@@ -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");
|
||||
});
|
||||
Reference in New Issue
Block a user