mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Editor: CodeLens + completion to scaffold Vega-Lite params; shared snippet core
This commit is contained in:
@@ -54,6 +54,10 @@ import {
|
||||
configureSpecTransformScaffold,
|
||||
installSpecTransformScaffoldCodeLens,
|
||||
} from '../services/spec-transform-scaffold';
|
||||
import {
|
||||
configureSpecParamScaffold,
|
||||
installSpecParamScaffoldCodeLens,
|
||||
} from '../services/spec-param-scaffold';
|
||||
import { runExtract } from '../services/extract-action';
|
||||
import { useAppStore } from '../stores/AppStore';
|
||||
import { confirm } from '../stores/ConfirmStore';
|
||||
@@ -179,6 +183,8 @@ configureSpecDatasetHints();
|
||||
configureSpecExpressionHints();
|
||||
// Register the data-transform step-scaffold completion once (docs/architecture/08).
|
||||
configureSpecTransformScaffold();
|
||||
// Register the parameter-scaffold completion once (docs/architecture/08).
|
||||
configureSpecParamScaffold();
|
||||
|
||||
/** The two spec↔config operations, surfaced as an overflow menu (council:
|
||||
* Carbon menu-buttons — overflow for additional options under space
|
||||
@@ -466,6 +472,10 @@ export function SpecEditor() {
|
||||
// — per editor for the same reason: its commands drive this editor's snippet edit.
|
||||
const scaffoldLensSub = installSpecTransformScaffoldCodeLens(editor);
|
||||
|
||||
// Cursor-aware parameter scaffold CodeLens (+ slider / + point …) — per editor,
|
||||
// its command splices the seeded param into this editor via the snippet engine.
|
||||
const paramScaffoldLensSub = installSpecParamScaffoldCodeLens(editor);
|
||||
|
||||
// Validate Vega expressions in the draft and squiggle the invalid ones — per
|
||||
// editor, because it writes markers to this model (docs/architecture/08).
|
||||
// Debounced internally; recomputes on edit and on a draft↔published toggle.
|
||||
@@ -483,6 +493,7 @@ export function SpecEditor() {
|
||||
transformActionsSub.dispose();
|
||||
codeLensSub.dispose();
|
||||
scaffoldLensSub.dispose();
|
||||
paramScaffoldLensSub.dispose();
|
||||
exprMarkersSub.dispose();
|
||||
editor.dispose();
|
||||
editorRef.current = null;
|
||||
|
||||
Reference in New Issue
Block a user