mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 08:07:49 +00:00
HTML files in Angular projects were highlighted as plain HTML. Languages can now declare framework UI modes with root markers (angular.json, node_modules/@angular/core); files under such a root get the framework's editor mode, re-detected when a marker appears or disappears, and the root-marker lookup is shared with language server roots. The Angular Template mode (vendored @codemirror/lang-angular, MIT) adds @if/@for/@switch/@defer/@let blocks, key and animation binding names, and colours {{ }} delimiters.
Lazily loaded editor modes are now loaded before a document's first editor opens, so a file never renders as plain text first (this also left Angular templates uncoloured).
Co-authored-by: nntndfrk <2458463+nntndfrk@users.noreply.github.com>
22 lines
639 B
TypeScript
22 lines
639 B
TypeScript
import type { KnipConfig } from "knip";
|
|
|
|
const config: KnipConfig = {
|
|
// Entries come from the Vite (index.html), Vitest, Playwright and package.json script plugins.
|
|
project: [
|
|
"src/**/*.{ts,tsx,css}",
|
|
"!src/editor/core/cm/angular/parser.terms.ts",
|
|
"scripts/**/*.ts",
|
|
"perf/**/*.ts",
|
|
"e2e/**/*.ts",
|
|
],
|
|
ignoreExportsUsedInFile: true,
|
|
// lint-staged formats Rust files with the toolchain's rustfmt.
|
|
ignoreBinaries: ["rustfmt"],
|
|
compilers: {
|
|
// Fonts come in through `@import` in global.css.
|
|
css: (text: string) => [...text.matchAll(/(?<=@)import[^;]+/g)].join("\n"),
|
|
},
|
|
};
|
|
|
|
export default config;
|