mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-02 23:27:14 -04:00
Support initial batch of languages
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//go:build stxLisp || stxAll
|
||||
|
||||
package syntax
|
||||
|
||||
func init() {
|
||||
syntaxMap["lisp"] = &lazySyntax{init: func() []byte {
|
||||
return []byte(`filetype: lisp
|
||||
|
||||
detect:
|
||||
filename: "(emacs|zile)$|\\.(el|li?sp|scm|ss)$"
|
||||
|
||||
rules:
|
||||
- default: "\\([a-z-]+"
|
||||
- symbol: "\\(([\\-+*/<>]|<=|>=)|'"
|
||||
- constant.number: "\\b[0-9]+b>"
|
||||
- special: "\\bnil\\b"
|
||||
- preproc: "\\b[tT]b>"
|
||||
- constant.string: "\\\"(\\\\.|[^\"])*\\\""
|
||||
- constant.specialChar: "'[A-Za-z][A-Za-z0-9_-]+"
|
||||
- constant.specialChar: "\\\\.?"
|
||||
- comment: "(^|[[:space:]]);.*"
|
||||
- indent-char.whitespace: "[[:space:]]+$"
|
||||
- indent-char: " + +| + +"`)
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user