diff --git a/snippet_manager.info.yml b/snippet_manager.info.yml
index 5e2eb65..fe86948 100644
--- a/snippet_manager.info.yml
+++ b/snippet_manager.info.yml
@@ -4,4 +4,5 @@ description: Manages code snippets on a site.
 core: 8.x
 dependencies:
   - drupal:system (>= 8.2.0)
+  - filter
 configure: entity.snippet.collection
diff --git a/src/Entity/Snippet.php b/src/Entity/Snippet.php
index 92c6478..461f779 100644
--- a/src/Entity/Snippet.php
+++ b/src/Entity/Snippet.php
@@ -168,6 +168,7 @@ class Snippet extends ConfigEntityBase implements SnippetInterface {
     // Sort variables by name to make their listing and configuration export
     // more consistent.
     ksort($this->variables);
+    $this->calculateDependencies();
     parent::preSave($storage);
   }
 
@@ -276,4 +277,13 @@ class Snippet extends ConfigEntityBase implements SnippetInterface {
     return isset($formats['full_html']) ? 'full_html' : filter_default_format();
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function calculateDependencies() {
+    parent::calculateDependencies();
+    $this->addDependency('module', 'filter');
+    return $this->dependencies;
+  }
+
 }
