Files
zyedidia.micro/internal/lsp/languages.go
2020-08-12 16:03:23 -04:00

21 lines
448 B
Go

package lsp
// mappings for when micro filetypes don't match LSP language identifiers
var languages = map[string]string{
"batch": "bat",
"c++": "cpp",
"git-rebase-todo": "git-rebase",
"html4": "html",
"html5": "html",
"python2": "python",
"shell": "shellscript",
// "tex": "latex",
}
func Filetype(ft string) string {
if l, ok := languages[ft]; ok {
return l
}
return ft
}