File types config
Section "detect" in user.json. Specifies mapping from "file name" to "lexer name".
- "detect": {
- "*.mht": "HTML",
- "myconfig.conf": "Nginx",
- ".profile": "Bash script",
- },
- Key name: File mask. Must be full name (without path), or extension after "*." chars. More complex masks are not yet supported.
- Key value: Lexer name. Value "-" means "don't activate lexer".
Another method to specify this mapping is dialog "Lexer properties", in which you can add extension or name+extension to a lexer. But dialog is more limited: it saves option to the lexer file (data/lexlib/lexername.lcf), so setting will be reset on reinstalling lexer.
Section "detect_line" in user.json. Allows to detect lexer by first line of file.
- "detect_line": {
- "<html.*": "HTML",
- "<!DOCTYPE.*": "HTML",
- "<\\?xml.*": "XML",
- },
- Key name: Reg-ex for first line. Case sensitive, but you can use (?i) modifier in reg-ex.
- Key value: Lexer name. Value "-" means "don't activate lexer".