mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-24 02:11:10 +01:00
Tree fixes and sidebar filter DSL
This commit is contained in:
@@ -10,7 +10,8 @@ import { json } from '@codemirror/lang-json';
|
||||
import { markdown } from '@codemirror/lang-markdown';
|
||||
import { xml } from '@codemirror/lang-xml';
|
||||
import type { LanguageSupport } from '@codemirror/language';
|
||||
import { bracketMatching ,
|
||||
import {
|
||||
bracketMatching,
|
||||
codeFolding,
|
||||
foldGutter,
|
||||
foldKeymap,
|
||||
@@ -152,8 +153,11 @@ export function getLanguageExtension({
|
||||
];
|
||||
}
|
||||
|
||||
const base_ = syntaxExtensions[language ?? 'text'] ?? text();
|
||||
const base = typeof base_ === 'function' ? base_() : text();
|
||||
const maybeBase = language ? syntaxExtensions[language] : null;
|
||||
const base = typeof maybeBase === 'function' ? maybeBase() : null;
|
||||
if (base == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!useTemplating) {
|
||||
return [base, extraExtensions];
|
||||
|
||||
Reference in New Issue
Block a user