Remove useTemplating prop (#184)

This commit is contained in:
Gregory Schier
2025-03-18 05:34:38 -07:00
committed by GitHub
parent f42f3d0e27
commit b9ed554aca
20 changed files with 134 additions and 231 deletions

View File

@@ -91,8 +91,8 @@ const syntaxExtensions: Record<NonNullable<EditorProps['language']>, LanguageSup
const closeBracketsFor: (keyof typeof syntaxExtensions)[] = ['json', 'javascript', 'graphql'];
export function getLanguageExtension({
useTemplating,
language = 'text',
useTemplating = false,
environmentVariables,
autocomplete,
onClickVariable,
@@ -100,12 +100,13 @@ export function getLanguageExtension({
onClickPathParameter,
completionOptions,
}: {
useTemplating: boolean;
environmentVariables: EnvironmentVariable[];
onClickVariable: (option: EnvironmentVariable, tagValue: string, startPos: number) => void;
onClickMissingVariable: (name: string, tagValue: string, startPos: number) => void;
onClickPathParameter: (name: string) => void;
completionOptions: TwigCompletionOption[];
} & Pick<EditorProps, 'language' | 'useTemplating' | 'autocomplete'>) {
} & Pick<EditorProps, 'language' | 'autocomplete'>) {
const extraExtensions: Extension[] = [];
if (language === 'url') {