Skip to content

Commit

Permalink
feat: add gql as an alias of graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 10, 2023
1 parent ac960d5 commit 6c20565
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/languages.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export type Lang =
| 'glsl'
| 'gnuplot'
| 'go'
| 'graphql'
| 'graphql' | 'gql'
| 'groovy'
| 'hack'
| 'haml'
Expand Down
3 changes: 2 additions & 1 deletion packages/shiki/src/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export type Lang =
| 'glsl'
| 'gnuplot'
| 'go'
| 'graphql'
| 'graphql' | 'gql'
| 'groovy'
| 'hack'
| 'haml'
Expand Down Expand Up @@ -593,6 +593,7 @@ export const languages: ILanguageRegistration[] = [
path: 'graphql.tmLanguage.json',
displayName: 'GraphQL',
samplePath: 'graphql.sample',
aliases: ['gql'],
embeddedLangs: ['javascript', 'typescript', 'jsx', 'tsx']
},
{
Expand Down
3 changes: 2 additions & 1 deletion scripts/grammarSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,8 @@ export const languageAliases = {
viml: ['vim', 'vimscript'],
vyper: ['vy'],
wenyan: ['文言'],
yaml: ['yml']
yaml: ['yml'],
graphql: ['gql'],
}

/**
Expand Down

0 comments on commit 6c20565

Please sign in to comment.