filetypes.conf(5)
π filetypes.conf(5) π
okay bestie, pull up a chair, because this is the manual page for filetypes.conf β the file type configuration of highlight. β¨
πΈ NAME πΈ
filetypes.conf β the file type configuration of highlight π
π¦ DESCRIPTION π¦
So like, this config file is where you keep your filename extensions and your shebang patterns, and it maps them to highlight's syntax definitions. That's the whole vibe. π
If there's only one extension for a language, you literally don't need to do anything here β just name the lang file accordingly and it will work. No entry needed in this file. Iconic behaviour tbh. β¨
π«Ά heads up: the filetype entries in gui_files/ext/fileopenfilter.conf should also be updated. Don't forget her, she gets jealous.
Extensions can be configured for multiple languages, no cap. Look at "asm" β she's assigned to both assembler and fasm. Multitasking queen. π
Now, the command line (CLI) and the Qt GUI builds handle ambiguous assignments very differently, and this is lowkey important:
- CLI: the first association listed here will be used
- GUI: a syntax selection prompt will be shown (it's asking you to choose, bestie, be nice)
If a filename has no extension by convention β like makefile β it may be added here anyway, or you can configure it as "Shebang". Either way works, do what feels right. π
Location: The first filetypes.conf found in a highlight search directory wins. First come, first served, no takebacks. πββοΈπ¨
And ngl, it's easily possible to enhance highlight's database of programming languages and colour themes β just peep the README file for the details. Go build your empire. π
β EXTENSION MAPPING EXAMPLE β
{ Lang='purebasic', Extensions={'pb', 'pbi'} }
look at her go, so clean, so organised β¨
π§ SHEBANG MAPPING EXAMPLE π§
{ Lang='xml', Shebang=[[^\s*<\?xml\s+version='1.0'\s+[^(\?>)]*?>\s*$]] }
regex girlies rise up, this one's for you π
π AUTHORS π
Andre Simon <as@andre-simon.de> π
π SEE ALSO π
highlight(1)man page
and that's the tea, bestie π mwah π
This page came to you courtesy of Andre Simon, dated 2019-03-12, and it's part of the filetypes.conf(5) manual. slay, stay hydrated, and go map some file types π
β¨
π¦ where this page comes from
- alpine 3.22: highlight-doc 4.13-r0 Β· GPL-3.0-or-later
- alpine 3.23: highlight-doc 4.18-r0 Β· GPL-3.0-or-later
- alpine 3.24: highlight-doc 4.19-r0 Β· GPL-3.0-or-later
- arch rolling: highlight 4.21-2 Β· GPL-3.0-or-later
- debian trixie: highlight 4.10-1+b2 Β· GPL-3.0-or-later
- epel 10: highlight 4.20-3.el10_3 Β· GPL-3.0-only
- fedora 43: highlight 4.13-3.fc43 Β· GPL-3.0-only
- fedora 43: highlight 4.20-3.fc43 Β· GPL-3.0-only
- fedora 44: highlight 4.19-1.fc44 Β· GPL-3.0-only
- fedora 44: highlight 4.20-3.fc44 Β· GPL-3.0-only
- nixos 26.05: highlight 4.19
- nixpkgs unstable: highlight 4.21
- opensuse-leap 16.0: highlight-common 4.12-bp160.1.13 Β· GPL-3.0-or-later
- ubuntu noble: highlight 4.10-1build2 Β· GPL-3.0-or-later
- ubuntu questing: highlight 4.10-1build3
- ubuntu resolute: highlight 4.10-1.1 Β· GPL-3.0-or-later
- ubuntu stonking: highlight 4.10-1.1build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms