<commit_before>;;; lang/ruby/config.el

(def-package! ruby-mode
  :mode ("\\.rb$" "\\.rake$" "\\.gemspec$" "\\.?pryrc$"
         "/\\(Gem\\|Cap\\|Vagrant\\|Rake\\)file$")
  :interpreter "ruby"
  :init
  (add-hook 'ruby-mode-hook 'flycheck-mode)
  :config
  (set! :build 'rake 'ruby-mode '+ruby/rake)
  (set! :company-backend 'ruby-mode '(company-dabbrev-code))
  (set! :electric 'ruby-mode :words '("else" "end" "elseif"))
  (set! :repl 'ruby-mode 'inf-ruby)
  (setq ruby-deep-indent-paren t)
  ;; Don't interfere with my custom RET behavior
  (define-key ruby-mode-map [?\n] nil)

  (map! :map ruby-mode-map
        :localleader
        :prefix "r"
        :desc "toggle block"             :nv "b"  'ruby-toggle-block
        :desc "extract method"           :nv "em" 'ruby-refactor-extract-to-method
        :desc "extract local variable"   :nv "ev" 'ruby-refactor-extract-local-variable
        :desc "extract constant"         :nv "ec" 'ruby-refactor-extract-constant
        :desc "add parameter"            :nv "ad" 'ruby-refactor-add-parameter
        :desc "extract to let"           :nv "el" 'ruby-refactor-extract-to-let
        :desc "convert post conditional" :nv "cc" 'ruby-refactor-convert-post-conditional))


(def-package! ruby-refactor
  :commands
  (ruby-refactor-extract-to-method ruby-refactor-extract-local-variable
   ruby-refactor-extract-constant ruby-refactor-add-parameter
   ruby-refactor-extract-to-let ruby-refactor-convert-post-conditional))


;; Highlight doc comments
(def-package! yard-mode
  :commands yard-mode
  :init (add-hook 'ruby-mode-hook 'yard-mode))<commit_msg>lang/ruby: remove descriptions on refactor keys<commit_after>;;; lang/ruby/config.el

(def-package! ruby-mode
  :mode ("\\.rb$" "\\.rake$" "\\.gemspec$" "\\.?pryrc$"
         "/\\(Gem\\|Cap\\|Vagrant\\|Rake\\)file$")
  :interpreter "ruby"
  :init
  (add-hook 'ruby-mode-hook 'flycheck-mode)
  :config
  (set! :build 'rake 'ruby-mode '+ruby/rake)
  (set! :company-backend 'ruby-mode '(company-dabbrev-code))
  (set! :electric 'ruby-mode :words '("else" "end" "elseif"))
  (set! :repl 'ruby-mode 'inf-ruby)
  (setq ruby-deep-indent-paren t)
  ;; Don't interfere with my custom RET behavior
  (define-key ruby-mode-map [?\n] nil)

  (map! :map ruby-mode-map
        :localleader
        :prefix "r"
        :nv "b"  'ruby-toggle-block
        :nv "em" 'ruby-refactor-extract-to-method
        :nv "ev" 'ruby-refactor-extract-local-variable
        :nv "ec" 'ruby-refactor-extract-constant
        :nv "ad" 'ruby-refactor-add-parameter
        :nv "el" 'ruby-refactor-extract-to-let
        :nv "cc" 'ruby-refactor-convert-post-conditional))


(def-package! ruby-refactor
  :commands
  (ruby-refactor-extract-to-method ruby-refactor-extract-local-variable
   ruby-refactor-extract-constant ruby-refactor-add-parameter
   ruby-refactor-extract-to-let ruby-refactor-convert-post-conditional))


;; Highlight doc comments
(def-package! yard-mode
  :commands yard-mode
  :init (add-hook 'ruby-mode-hook 'yard-mode))
{'fraction_non_alphanumeric': 0.17170375290601128, 'fraction_numerical': 0.0, 'mean_word_length': 3.0267379679144386, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4411150', 'n_tokens_mistral': 1153, 'n_tokens_neox': 1068, 'n_words': 224}