Implement toggle-comments

This commit is contained in:
Max Brunsfeld 2021-11-23 14:13:28 -08:00
parent 2e2bce7322
commit f0db748ba1
5 changed files with 198 additions and 7 deletions

View file

@ -14,6 +14,7 @@ pub struct LanguageConfig {
pub name: String,
pub path_suffixes: Vec<String>,
pub brackets: Vec<BracketPair>,
pub line_comment: Option<String>,
pub language_server: Option<LanguageServerConfig>,
}
@ -115,6 +116,10 @@ impl Language {
self.config.name.as_str()
}
pub fn line_comment_prefix(&self) -> Option<&str> {
self.config.line_comment.as_deref()
}
pub fn start_server(
&self,
root_path: &Path,