Skip to content

Theme [Phase 2]: tokenColors и TextMate scope resolution #46

Description

@ZhuchkaTriplesix

Summary

Phase 2: поддержка tokenColors из VS Code theme — TextMate scope → стили редактора / highlighter.

Контекст

Массив правил в manifest:

{
  "scope": "variable.other.property",
  "settings": { "foreground": "#BD93F9", "fontStyle": "italic" }
}

Разрешение: longest prefix match по цепочке a.b.ca.ba.

Реализация

  1. Парсинг tokenColors в модели (Theme: парсер VS Code theme JSON/JSONC #39)
  2. TokenStyleResolver с кэшем HashMap<scope, TextStyle>
  3. Мост в выбранный highlighter (Editor [Spike]: выбор пакета code editor #48, Editor [MVP]: SQL syntax highlighting в QueryaCodeEditor #49) — likely syntax_highlight / HighlighterTheme
  4. Isolate для токенизации больших буферов (порог ~8KB, настраиваемо)

Acceptance criteria

  • Dracula/One Dark: различимые keyword, string, comment в SQL fixture
  • UI isolate: 500-line SQL не блокирует ввод > 100ms p95
  • Fallback: editor.foreground из workbench colors

Зависимости

Оценка

~4–6 дней

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestthemeTheming, colors, VS Code themes

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions