---
title: Syntax Highlight - 为 macOS 经典功能快速查看添加代码高亮，超过 150 种新文件类型
date: 2025-05-07T04:20:08Z
modified: 2025-05-07T04:20:33Z
permalink: "https://www.appinn.com/syntax-highlight-for-macos/"
type: post
status: publish
excerpt: ""
categories:
  - macOS
tags:
  - macOS
  - 代码高亮
  - 快速查看
  - 预览
featured_image: "https://www.appinn.com/wp-content/uploads/2022/07/Copy-of-appinn-homework-2025-05-07T113646.022.jpg"
author: 青小蛙
timestamp: 2025-05-07T04:20:33Z
---

**Syntax Highlight** 是一款为 macOS 的经典功能**快速查看**（QuickLook）添加代码高亮的系统扩展。安装后将为**快速查看**新增 157 种文件类型。@[Appinn](https://www.appinn.com/syntax-highlight-for-macos.md)

![](https://www.appinn.com/wp-content/uploads/2022/07/Copy-of-appinn-homework-2025-05-07T113646.022.jpg)

青小蛙在编辑 .yaml 文件的时候发现**快速查看**不支持这种格式，于是寻找了一番，就有了它。

## Syntax Highlight

通过 brew 安装之后：


brew install --no-quarantine syntax-highlight


即可在**应用程序**中找到：

![](https://www.appinn.com/wp-content/uploads/2022/07/Screen-20250507114028@2x.avif)

你可以在这里自定义样式、字体大小、页面尺寸，还可以具体调整每一个支持的格式，以及…自定义格式等等。

之后，需要前往**系统设置**页面，搜索**快速预览**，向下拉找刀快速查看，点击叹号，找到 **Syntax Highlight** 并打开即可：

![](https://www.appinn.com/wp-content/uploads/2022/07/Screen-20250507114352@2x.avif)

之后就能通过 **选中文件** > **空格** 来预览这些文件了。

## 获取

- [GitHub](https://github.com/sbarex/SourceCodeSyntaxHighlight)
- 搬运：[百度](https://pan.baidu.com/s/1bCWIQ6swEh_D90cGPdfiLQ?pwd=uus1)｜[夸克](https://pan.quark.cn/s/d6d28c84e1a7)｜[城通](https://url61.ctfile.com/f/15690961-1503594328-68014f?p=5712) (访问密码: 5712)

对于不习惯 brew 的同学，青小蛙提供了网盘搬运，可直接运行（第一次运行后，可能需要前往系统设置 > 隐私与安全性，运行该程序运行）

## 支持的格式

- Ada (.ada)
- Adobe Acrobat Sequence files (.sequ) as XML
- Adobe Flash ActionScript source files (.as)
- Adobe Flex files (.mxml) files as XML
- Adobe JSX script files (.jsx)
- Apple workflow (.wflow) as plist (XML)
- AppleScript (.scpt, .applescript, .ascr) automatically decompiled with osadecompile
- Apple shell script files (.command)
- Assembler source files (.asm, .s79)
- Astro files (.astro) as JSX.
- Autolit files (.au3, .a3x)
- Azkaban flow files (.flow) as YAML
- ATL files (.atl)
- (G)AWK files (.awk)
- Bash Script files (.bash)
- Bezel (.bezel) as plain text
- BibTex (.bib)
- C shell script files (.csh)
- C source files (.c, .h)
- C# source files (.cs)
- C++ source files (.cpp, .cp, .c++, .cc, .cxx, .hpp, .hh, .hxx, .ipp )
- ClojureScript (.cli, .cljs, .cljc, .edn)
- CMake files (.cmake)
- CocoaPod files (.podspec) as Ruby
- CoffeeScript source files (.coffee)
- ColdFusion files (.cfc, .cfm, .cfml)
- Configuration files (.conf)
- Configuration profiles (.mobileconfig) as XML
- Crystal language (.cr)
- CSON source files (.cson)
- CSS files (.css)
- Cuda files (.cu) as C++
- D (.d)
- Dart source files (.dart) .dart is reserved by macOS and cannot be handled.
- Diff files (.diff, .patch)
- Dockerfile (.dockerfile)
- Document Type Definition (.dtd)
- DOS batch files (.bat, .cmd)
- Dylang (.dylan)
- ECore files (.ecore)
- Eiffel project files (.ecf) as XML
- Eiffel source files (.e, .ex, .exs)
- Erlang source files (.erl, .hri)
- F# source files (.fsx, .fs)
- fish source files (.fish)
- Fortran source files (.f, .for, .f90, .f95)
- GCC linked files (.ld, .map, .d)
- Gdscript (Godot engine) (.gd).
- Golang source files (.go)
- Google Earth KML Document files (.kml) as XML
- Gradle source files (.gradle)
- Graphics Language Transmission Format (.gltf) as JSON
- Groovy source files (.groovy)
- Haskell source files (.hs, .lhs)
- HTML Abstraction Markup Language (.haml)
- IDL source files (.pro)
- INF files (.inf)
- INI configuration files (.ini, .cfg)
- Inno source files (.iss)
- INO source files (.ino)
- IntelliJ IDEA module (.iml)
- Interface Builder Storyboard (.storybard) as XML
- Interface Builder XIB (.xib) as XML
- Java Compiled Class (.class) require javap to decompile
- Java Properties files (.properties) as INI
- Java Server Page files (.jsp)
- Java source code (.java, .jav)
- Java Web Start (.jnlp)
- JavaFX ML (.fxml)
- JavaScript files (.js, .jscript, .javascript, .mjs, .jsm)
- JSON files (.json, .jsonc) \*\* On macOS 13 Ventura with Apple Silicon the .json extension is reserved by the system and cannot be handled.\*\*
- JSON Line files (.jsonl) as JSON
- Julia source files (.jl)
- Jupyter Notebook files (.ipynb) as JSON
- Kermeta source files (.kmt)
- Korn Shell script files (.ksh)
- Kotlin source files (.kt, .kts)
- LESS stylesheet (.less)
- Lilypond files (.ly, .ily)
- Lisp source files (.lisp, .lsp, .asd, .el)
- Logos source files (.xm)
- Lua source files (.lua)
- Makefile files (.mk, .mak)
- MAMEdev layout files (.lay) as XML.
- Markdown files (.md, .rmd): please use QLMarkdown which allows you to choose whether to display formatted output or the highlighted source code.
- Media Presentation Description (.mpd) as XML.
- MF source files (.mf)
- Microsoft Active Server Page files (.asp, .aspx)
- Microsoft PowerShell files (.psm1, .psd1, .ps1)
- NextFlow (.nf) as Groovy (Java)
- Nim source files (.nim)
- Nix Expression Language (.nix)
- Node CommonJS module (.cjs)
- Objective-C source files (.m)
- Objective-C++ source files (.mm)
- OCaml source files (.ml, .mll, .mly)
- OpenSSH RSA public key (.pub) as plain text
- OPML (Outline Processor Markup Language) files (.opml) as XML
- Oracle PL/SQL files (.fnc, .prc, .trg, .pks, .pkb, .pck, .tps, .tpb, .typ, .tab, .avt, .con, .sqs, .vw, .mvw, .trg) as SQL
- Paradox files (.sc)
- Pascal source files (.pas)
- Patch files (.patch, .diff)
- PDE source files (.pde, .ino)
- Perl script files (.pl, .pm, .t)
- Planning Domain Description Language (.pddl) as Lisp
- PHP source files (.php, .php3, .php4, .ph3, .ph4, .phtml)
- Properties files (.properties) as INI
- Property List files (.plist) dynamically decompiled with plutil On macOS 10.15 Catalina .plist is reserved by the system and cannot be handled.
- Python source files (.py)
- R (.r)
- Racket (.rkt) as Lisp
- RAML (.raml) as YAML
- RDF files (.rdf)
- README files (.readme) as plain text
- reStructuredText document (.rst)
- Rez files (.r)
- Ruby on Rails files (.rhtml, .erb, .rjs)
- Ruby Gems file (.gemfile)
- Ruby script (.rb, .rbw)
- Rust source files (.rs)
- SageMath files (.sage) as Python
- SAS files (.sas)
- SASS/SCSS files (.scss)
- Scala source files (.sc, .sbt, .scala)
- Scheme source files (.scm, .ss, .sls, .sps, .sld, .sch) as Lisp
- Shell script files (.bashrc, .zshrc, .sh)
- Smali (.smali) as plain text.
- Solidity source files (.sol)
- SQL files (.sql)
- Standard ML source files (.ml)
- Stata files (.do, .ado) as plain text
- Steam app manifest files (.acf) as plain text.
- Svelte (.svelte) as HTML
- Swift source files (.swift)
- Symfony Twig files (.twig)
- TCL source files (.tcl)
- Tenex C Shell script files (.tcsh)
- Terraform files (.tfvars, .tfstate, .tf, .hcl) as YAML
- TeX and LaTeX files (.tex, .sty, .cls, .latex, .ltx, .texi, .ctx, .sty)
- Text files (.txt, .text)
- TOML files (.toml)
- TypeScript files (.ts, .tsx, .cts, .mts) .ts and .mts are reserved by macOS and cannot be handled.
- Visual Studio Code Workspace (.code-workspace) \_ as JSON\_
- Verilog HDL files (.v, .vl)
- VHDL source files (.vhd, .vhdl)
- VIM script files (.vim)
- Visual Basic source files (.vb, .bas, .basic, .vbs)
- Vue source files (.vue)
- XAML source files (.xaml) as XML
- Xcode entitlement files (.entitlements) (dynamically decompiled with plutil) as XML
- Xcode localizable strings files (.strings, .stringsdict) (dynamically decompiled with plutil) as XML
- XHTML files (.xhtml)
- XML files (.xml) Before macOS 12 Monterey .xml is reserved by the system and cannot be handled.
- XSD Schema files (.xsd, .xquery, .xq, .xu)
- XUL files (.xul)
- YAML files (.yaml)
- Z shell script files (.zsh)

## Topics

**分类目录:** [macOS](https://www.appinn.com/category/mac/?output_format=md)

**标签:** [代码高亮](https://www.appinn.com/tag/%e4%bb%a3%e7%a0%81%e9%ab%98%e4%ba%ae/?output_format=md), [快速查看](https://www.appinn.com/tag/%e5%bf%ab%e9%80%9f%e6%9f%a5%e7%9c%8b/?output_format=md), [预览](https://www.appinn.com/tag/%e9%a2%84%e8%a7%88/?output_format=md)