diff --git a/docs/languages.md b/docs/languages.md index 958e044e3..f6f78a978 100644 --- a/docs/languages.md +++ b/docs/languages.md @@ -109,7 +109,7 @@ export type Lang = | 'glsl' | 'gnuplot' | 'go' - | 'graphql' + | 'graphql' | 'gql' | 'groovy' | 'hack' | 'haml' diff --git a/packages/shiki/src/languages.ts b/packages/shiki/src/languages.ts index a84428775..1648bf427 100644 --- a/packages/shiki/src/languages.ts +++ b/packages/shiki/src/languages.ts @@ -59,7 +59,7 @@ export type Lang = | 'glsl' | 'gnuplot' | 'go' - | 'graphql' + | 'graphql' | 'gql' | 'groovy' | 'hack' | 'haml' @@ -593,6 +593,7 @@ export const languages: ILanguageRegistration[] = [ path: 'graphql.tmLanguage.json', displayName: 'GraphQL', samplePath: 'graphql.sample', + aliases: ['gql'], embeddedLangs: ['javascript', 'typescript', 'jsx', 'tsx'] }, { diff --git a/scripts/grammarSources.ts b/scripts/grammarSources.ts index d222cab46..47d93b4b9 100644 --- a/scripts/grammarSources.ts +++ b/scripts/grammarSources.ts @@ -395,7 +395,8 @@ export const languageAliases = { viml: ['vim', 'vimscript'], vyper: ['vy'], wenyan: ['文言'], - yaml: ['yml'] + yaml: ['yml'], + graphql: ['gql'], } /**