Scroll to navigation

filetypes.conf(5) user documentation filetypes.conf(5)

NAME

filetypes.conf - the file type configuration of highlight

DESCRIPTION

This config file contains filename extensions and shebang patterns which are mapped to highlight's syntax definitions.

If there is only one extension, just name the lang file accordingly and it will work (no entry needed in this file).

The filetype entries in gui_files/ext/fileopenfilter.conf should also be updated.

Extensions can be configured for multiple languages (see "asm", which is assigned to assembler and fasm).

The command line (CLI) and Qt GUI builds handle ambiguous assignments as follows:

- CLI: the first association listed here will be used

- GUI: a syntax selection prompt will be shown

If a filename has no extension by convention (ie. makefile), it may be added here nevertheless or be configured as "Shebang".

Location: The first filetypes.conf found in a highlight search directory wins.

It's easily possible to enhance highlight's database of programming languages and colour themes. See the README file for details.

EXTENSION MAPPING EXAMPLE

{ Lang='purebasic', Extensions={'pb', 'pbi'} }

SHEBANG MAPPING EXAMPLE

{ Lang='xml', Shebang=[[^\s*<\?xml\s+version='1.0'*?>\s*$]] }

AUTHORS

Andre Simon <as@andre-simon.de>

SEE ALSO

highlight(1) man page

2019-03-12 Andre Simon