}
// File names that are representing highlight classes.
- highlightFileNames = map[string]bool{
- "dockerfile": true,
- "makefile": true,
+ highlightFileNames = map[string]string{
+ "dockerfile": "dockerfile",
+ "makefile": "makefile",
+ "gnumakefile": "makefile",
+ "cmakelists.txt": "cmake",
}
// Extensions that are same as highlight classes.
return "nohighlight"
}
- if highlightFileNames[fname] {
- return fname
+ if name, ok := highlightFileNames[fname]; ok {
+ return name
}
ext := path.Ext(fname)