package lexers
import "github.com/alecthomas/chroma/lexers"
Package lexers contains the registry of all lexers.
Sub-packages contain lexer implementations.
Index ¶
- Variables
- func Analyse(text string) chroma.Lexer
- func Get(name string) chroma.Lexer
- func Match(filename string) chroma.Lexer
- func MatchMimeType(mimeType string) chroma.Lexer
- func Names(withAliases bool) []string
- func Register(lexer chroma.Lexer) chroma.Lexer
Variables ¶
Fallback lexer if no other is found.
Registry of Lexers.
Functions ¶
func Analyse ¶
Analyse text content and return the "best" lexer..
func Get ¶
Get a Lexer by name, alias or file extension.
func Match ¶
Match returns the first lexer matching filename.
func MatchMimeType ¶
MatchMimeType attempts to find a lexer for the given MIME type.
func Names ¶
Names of all lexers, optionally including aliases.
func Register ¶
Register a Lexer with the global registry.
Source Files ¶
Directories ¶
- Version
- v0.4.0
- Published
- Mar 2, 2018
- Platform
- js/wasm
- Imports
- 26 packages
- Last checked
- 7 minutes ago –
Tools for package owners.