Skip to content

Commit

Permalink
Merge pull request #14 from abradd/load-hs-minor-mode
Browse files Browse the repository at this point in the history
Hook hs-minor-mode into verilog-mode
  • Loading branch information
gmlarumbe committed Jan 12, 2024
2 parents 9108d41 + 9617c6d commit 3f54bcc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion verilog-ext-hs.el
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@
,verilog-ext-hs-block-start-keywords-re
,verilog-ext-hs-block-end-keywords-re
nil
,(cdr mode)))))
,(cdr mode))))
(dolist (hook '(verilog-mode-hook verilog-ts-mode-hook))
(add-hook hook #'hs-minor-mode))
;; Workaround to enable `hideshow' on first file visit with lazy loading using
;; :config section with `use-package'
(when (member major-mode '(verilog-mode verilog-ts-mode))
(hs-minor-mode 1)))

(defun verilog-ext-hs-toggle-hiding (&optional e)
"Wrapper for `hs-toggle-hiding' depending on current Verilog `major-mode'.
Expand Down

0 comments on commit 3f54bcc

Please sign in to comment.