From c27fdb3ad562ab0da411b77d7e986bd445338563 Mon Sep 17 00:00:00 2001 From: Rene Jeglinsky Date: Mon, 18 May 2026 16:19:14 +0200 Subject: [PATCH] add alias for php --- .vitepress/languages/index.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.vitepress/languages/index.ts b/.vitepress/languages/index.ts index bfca47efe..82f60b7ae 100644 --- a/.vitepress/languages/index.ts +++ b/.vitepress/languages/index.ts @@ -1,7 +1,8 @@ -import cds from './cds.tmLanguage.json' with {type:'json'} -import csv from './csv.tmLanguage.json' with {type:'json'} -import log from './log.tmLanguage.json' with {type:'json'} -import scsv from './scsv.tmLanguage.json' with {type:'json'} +import { bundledLanguages } from 'shiki' +import cds from './cds.tmLanguage.json' with { type: 'json' } +import csv from './csv.tmLanguage.json' with { type: 'json' } +import log from './log.tmLanguage.json' with { type: 'json' } +import scsv from './scsv.tmLanguage.json' with { type: 'json' } import type { LanguageInput } from 'shiki' export default [ @@ -9,4 +10,8 @@ export default [ { ...csv, aliases:['csv','csvc'] }, { ...scsv, aliases:['csvs'] }, { ...log, aliases:['log','logs'] }, + async () => { + const grammars = (await bundledLanguages['php']()).default + return grammars.map(g => g.scopeName === 'source.php' ? { ...g, aliases: ['http+'] } : g) + }, ] as LanguageInput[]