File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,12 @@ Include path to the executable if it is not in your $PATH."
170170 :type '(repeat symbol)
171171 :group 'drupal )
172172
173+ ;;;### autoload
174+ (defcustom drupal-ignore-paths-regexp " \\ (vendor\\ |node_modules\\ )"
175+ " Don't enable Drupal mode per default in files whose path match this regexp."
176+ :type 'regexp
177+ :group 'drupal )
178+
173179(defcustom drupal-enable-auto-fill-mode t
174180 " Whether to use `auto-fill-mode' in Drupal PHP buffers.
175181Drupal mode will only do auto fill in comments (auto filling code
@@ -848,7 +854,7 @@ mode-hook."
848854 (when (and
849855 (or drupal-version
850856 (string-match " drush" (or buffer-file-name default-directory)))
851- (not (string-match " vendor " (or buffer-file-name default-directory))))
857+ (not (string-match drupal-ignore-paths-regexp (or buffer-file-name default-directory))))
852858 (drupal-mode 1 ))))
853859
854860;;;### autoload
You can’t perform that action at this time.
0 commit comments