mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
Convert filetypes to language IDs
This commit is contained in:
20
internal/lsp/languages.go
Normal file
20
internal/lsp/languages.go
Normal file
@@ -0,0 +1,20 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user