본문으로 건너뛰기

언어

shikiphp에는 Shiki 언어 세트 전체가 포함되어 있습니다. tm-grammars모든 문법이 들어 있으며, 1.31.15에서 제공하는 Shiki 3.23.0 전체를 담았습니다. 총 235개 언어와 각 언어에 포함된 보조 문법 18개, 모두 253개 문법입니다. TextMate과 VS Code 및 Shiki이 토큰화에 사용하는 문법과 동일하므로 언어 지원 범위, 별칭, 스코프 이름이 일치합니다.

언어는 ID 또는 별칭으로 지정합니다. 예를 들면 ts 또는 typescript, js 또는 javascript, php, rust, python, html, yaml, json 등이 있습니다. ID는 대소문자를 구분해 정확히 일치시킵니다. 아래에 표시된 소문자 형식을 사용하세요. 번들에서 알 수 없는 ID를 사용하면 Shikiphp\Exceptions\Highlight이 발생하며 메시지는 Unknown language "…"입니다.

특수 ID 'ansi'는 문법이 아니라 터미널 출력을 강조 표시합니다. ANSI를 참조하세요.

Shiki의 일반 텍스트 ID인 text, txt, plain, plaintext는 아직 지원되지 않으며 Unknown language가 발생합니다(#2).

번들 언어 목록 확인하기

PHP에서 하이라이터에 요청합니다:

PHP
use Shikiphp\Shikiphp;

$highlighter = Shikiphp::highlighter();

$highlighter->bundledLanguages(); // list<string> — ids shipped in the box
$highlighter->loadedLanguages();  // list<string> — bundled plus any you registered

두 목록에는 확인 가능한 모든 ID가 포함됩니다. 253 문법 ID 뒤에 별칭 97개가 이어지며, 번들 항목은 350개입니다.

또는 명령줄에서 ID를 한 줄에 하나씩 표시합니다:

셸
vendor/bin/shikiphp langs

카탈로그

이름순으로 정렬한 235 번들 언어입니다. 행에 있는 ID나 별칭 중 하나를 사용하면 같은 문법을 선택합니다.

언어 ID 별칭
1C (Enterprise) bsl 1c
1C (Query) sdbl 1c-query
ABAP abap
ActionScript actionscript-3
Ada ada
Angular HTML angular-html
Angular TypeScript angular-ts
Apache Conf apache
Apex apex
APL apl
AppleScript applescript
Ara ara
AsciiDoc asciidoc adoc
ASP.NET Razor razor
Assembly asm
Astro astro
AWK awk
Ballerina ballerina
Batch File bat batch
Beancount beancount
Berry berry be
BibTeX bibtex
Bicep bicep
BIRD2 Configuration bird2 bird
Blade blade
C c
C# csharp c#, cs
C++ cpp c++
C3 c3
Cadence cadence cdc
Cairo cairo
Clarity clarity
Clojure clojure clj
Closure Templates soy closure-templates
CMake cmake
COBOL cobol
CODEOWNERS codeowners
CodeQL codeql ql
CoffeeScript coffee coffeescript
Common Lisp common-lisp lisp
Coq coq
Crystal crystal
CSS css
CSV csv
CUE cue
Cypher cypher cql
D d
Dart dart
DAX dax
Desktop desktop
Diff diff
Dockerfile docker dockerfile
dotEnv dotenv
Dream Maker dream-maker
Edge edge
Elixir elixir
Elm elm
Emacs Lisp emacs-lisp elisp
ERB erb
Erlang erlang erl
F# fsharp f#, fs
Fennel fennel
Fish fish
Fluent fluent ftl
Fortran (Fixed Form) fortran-fixed-form f, for, f77
Fortran (Free Form) fortran-free-form f90, f95, f03, f08, f18
GDResource gdresource tscn, tres
GDScript gdscript gd
GDShader gdshader
Genie genie
Gettext PO po pot, potx
Gherkin gherkin
Git Commit Message git-commit
Git Rebase Message git-rebase
Gleam gleam
Glimmer JS glimmer-js gjs
Glimmer TS glimmer-ts gts
GLSL glsl
GN gn
Gnuplot gnuplot
Go go
GraphQL graphql gql
Groovy groovy
Hack hack
Handlebars handlebars hbs
HashiCorp HCL hcl
Haskell haskell hs
Haxe haxe
Hjson hjson
HLSL hlsl
HTML html
HTML (Derivative) html-derivative
HTTP http
Hurl hurl
HXML hxml
Hy hy
Imba imba
INI ini properties
Java java
JavaScript javascript js, cjs, mjs
Jinja jinja
Jison jison
JSON json
JSON Lines jsonl
JSON with Comments jsonc
JSON5 json5
Jsonnet jsonnet
JSSM jssm fsl
JSX jsx
Julia julia jl
Just just
KDL kdl
Kotlin kotlin kt, kts
Kusto kusto kql
LaTeX latex
Lean 4 lean lean4
Less less
Liquid liquid
LLVM IR llvm
Log file log
Logo logo
Lua lua
Luau luau
Makefile make makefile
Markdown markdown md
Marko marko
MATLAB matlab
MDC mdc
MDX mdx
Mermaid mermaid mmd
MIPS Assembly mipsasm mips
Mojo mojo
MoonBit moonbit mbt, mbti
Move move
Narrat Language narrat nar
Nextflow nextflow nf
Nextflow Groovy nextflow-groovy
Nginx nginx
Nim nim
Nix nix
nushell nushell nu
Objective-C objective-c objc
Objective-C++ objective-cpp
OCaml ocaml
Odin odin
OpenSCAD openscad scad
Pascal pascal
Perl perl
PHP php
Pkl pkl
PL/SQL plsql
Polar polar
PostCSS postcss
PowerQuery powerquery
PowerShell powershell ps, ps1
Prisma prisma
Prolog prolog
Protocol Buffer 3 proto protobuf
Pug pug jade
Puppet puppet
PureScript purescript
Python python py
QML qml
QML Directory qmldir
Qt Style Sheets qss
R r
Racket racket
Raku raku perl6
RegExp regexp regex
Rel rel
reStructuredText rst
RISC-V riscv
RON ron
ROS Interface rosmsg
Ruby ruby rb
Ruby Haml haml
Rust rust rs
SAS sas
Sass sass
Scala scala
Scheme scheme
SCSS scss
ShaderLab shaderlab shader
Shell shellscript bash, sh, shell, zsh
Shell Session shellsession console
Smalltalk smalltalk
Solidity solidity
SPARQL sparql
Splunk Query Language splunk spl
SQL sql
SSH Config ssh-config
Stata stata
Stylus stylus styl
SurrealQL surrealql surql
Svelte svelte
Swift swift
Systemd Units systemd
SystemVerilog system-verilog
TalonScript talonscript talon
Tasl tasl
Tcl tcl
Templ templ
Terraform terraform tf, tfvars
TeX tex
TOML toml
TSV tsv
TSX tsx
Turtle turtle
Twig twig
TypeScript typescript ts, cts, mts
TypeScript with Tags ts-tags lit
TypeSpec typespec tsp
Typst typst typ
V v
Vala vala
Verilog verilog
VHDL vhdl
Vim Script viml vim, vimscript
Visual Basic vb cmd
Vue vue
Vue HTML vue-html
Vue Vine vue-vine
Vyper vyper vy
WebAssembly wasm
WebAssembly Interface Types wit
Wenyan wenyan 文言
WGSL wgsl
Wikitext wikitext mediawiki, wiki
Windows Registry Script reg
Wolfram wolfram wl
XML xml
XSL xsl
YAML yaml yml
ZenScript zenscript
Zig zig

보조 문법

이 18개 문법은 다른 문법에서 포함하거나 삽입할 수 있도록 제공됩니다(Angular, Vue, C++ 매크로, Jinja, Nix, ts-tags의 태그 템플릿 리터럴). 필요한 언어가 로드될 때 자동으로 함께 로드되며 ID도 bundledLanguages() 및 shikiphp langs에 표시됩니다:

angular-expression, angular-let-declaration, angular-template, angular-template-blocks, angular-inline-style, angular-inline-template, cpp-macro, jinja-html, markdown-nix, es-tag-css, es-tag-glsl, es-tag-html, es-tag-sql, es-tag-xml, markdown-vue, vue-directives, vue-interpolations, vue-sfc-style-variable-injection.

직접 추가하기

번들에 없는 언어나 비공개 문법이 필요하신가요? loadGrammar로 등록하세요. 사용자 지정 언어 및 테마를 참조하세요.