Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r--helix-core/src/syntax.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 6a2c28d1..dfc32342 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -274,6 +274,15 @@ struct FileTypeGlobMatcher {
file_types: Vec<FileTypeGlob>,
}
+impl Default for FileTypeGlobMatcher {
+ fn default() -> Self {
+ Self {
+ matcher: globset::GlobSet::empty(),
+ file_types: Default::default(),
+ }
+ }
+}
+
impl FileTypeGlobMatcher {
fn new(file_types: Vec<FileTypeGlob>) -> Result<Self, globset::Error> {
let mut builder = globset::GlobSetBuilder::new();
@@ -299,7 +308,7 @@ impl FileTypeGlobMatcher {
// Expose loader as Lazy<> global since it's always static?
-#[derive(Debug)]
+#[derive(Debug, Default)]
pub struct Loader {
// highlight_names ?
language_configs: Vec<Arc<LanguageConfiguration>>,