diff --git a/layers/+lang/ruby/funcs.el b/layers/+lang/ruby/funcs.el index ab9fdce19..3f47cefa8 100644 --- a/layers/+lang/ruby/funcs.el +++ b/layers/+lang/ruby/funcs.el @@ -62,9 +62,11 @@ Called interactively it prompts for a directory." ;; highlight debugger keywords -(defun spacemacs/ruby-highlight-debugger-keywords () + +(defun spacemacs/ruby-maybe-highlight-debugger-keywords () "Highlight break point lines." (interactive) - (highlight-lines-matching-regexp "byebug") - (highlight-lines-matching-regexp "binding.irb") - (highlight-lines-matching-regexp "binding.pry")) + (when ruby-highlight-debugger-keywords + (highlight-lines-matching-regexp "byebug") + (highlight-lines-matching-regexp "binding.irb") + (highlight-lines-matching-regexp "binding.pry"))) diff --git a/layers/+lang/ruby/packages.el b/layers/+lang/ruby/packages.el index e992e37c2..3f84f9d90 100644 --- a/layers/+lang/ruby/packages.el +++ b/layers/+lang/ruby/packages.el @@ -213,10 +213,9 @@ :init (progn (spacemacs/declare-prefix-for-mode 'ruby-mode "mt" "ruby/test") - (when ruby-highlight-debugger-keywords - (spacemacs/add-to-hooks 'spacemacs/ruby-highlight-debugger-keywords - '(ruby-mode-hook - enh-ruby-mode-hook)))) + (spacemacs/add-to-hooks + 'spacemacs/ruby-maybe-highlight-debugger-keywords + '(ruby-mode-local-vars-hook enh-ruby-mode-local-vars-hook))) :config (spacemacs/set-leader-keys-for-major-mode 'ruby-mode "'" 'ruby-toggle-string-quotes "{" 'ruby-toggle-block)))