Skip to content

Commit

Permalink
fix(server): Improve language detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Myzel394 committed Oct 16, 2024
1 parent 9218771 commit d870beb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/root-handler/lsp-utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ var valueToLanguageMap = map[string]SupportedLanguage{
"etc/hosts": LanguageHosts,

"aliases": LanguageAliases,
"mailaliases": LanguageAliases,
"etc/aliases": LanguageAliases,
}

Expand Down Expand Up @@ -116,13 +117,17 @@ func DetectLanguage(

switch uri {
case "file:///etc/ssh/sshd_config":
fallthrough
case "file:///etc/ssh/ssh_config":
return LanguageSSHDConfig, nil
case "file:///etc/fstab":
return LanguageFstab, nil
case "file:///etc/hosts":
return LanguageHosts, nil
case "file:///etc/aliases":
fallthrough
// Darwin
case "file:///private/etc/aliases":
return LanguageAliases, nil
}

Expand Down

0 comments on commit d870beb

Please sign in to comment.