M2.2: PHP highlighting, syntax colour tokens and editor.reveal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-17 12:06:42 +02:00
parent f13a49064d
commit 6c75c08d70
25 changed files with 1044 additions and 33 deletions

View file

@ -5,7 +5,8 @@
*
* Save, save all and close run through the global keymap and the
* palette (`commands/store.ts`): the area supplies their behaviour with the
* active buffer as context and says when they can run.
* active buffer as context and says when they can run. It also supplies the
* UI command `editor.reveal` (`reveal.ts`).
*/
import { onBeforeUnmount, onMounted } from "vue";
import { useCommandsStore } from "../../commands/store";
@ -14,6 +15,7 @@ import { useEditorStore } from "../../stores/editor";
import ClosePrompt from "./ClosePrompt.vue";
import CodeEditor from "./CodeEditor.vue";
import EditorTabs from "./EditorTabs.vue";
import { reveal, REVEAL_COMMAND } from "./reveal";
const editor = useEditorStore();
const commands = useCommandsStore();
@ -28,6 +30,7 @@ onMounted(() => {
commands.provide("file.save", { run: async () => { await editor.save(); }, enabled: hasActive }),
commands.provide("file.saveAll", { run: () => editor.saveAll(), enabled: () => editor.tabs.length > 0 }),
commands.provide("buffer.close", { run: () => editor.requestClose(), enabled: hasActive }),
commands.provide(REVEAL_COMMAND, { run: (params) => reveal(editor, params) }),
];
});