<commit_before>;;; core/autoload/help.el -*- lexical-binding: t; -*-

;;;###autoload
(defun doom/describe-setting (setting)
  "Open the documentation of SETTING (a keyword defined with `def-setting!')."
  (interactive
   ;; TODO try to read setting from whole line
   (list (completing-read "Describe setting%s: "
                          (mapcar #'car doom-settings)
                          nil t nil nil)))
  (let ((fn (cdr (assq (intern setting) doom-settings))))
    (unless fn
      (error "'%s' is not a valid DOOM setting" setting))
    (describe-function fn)))

;;;###autoload
(defun doom/describe-module (module)<commit_msg>Sort settings list in doom/describe-settings<commit_after>;;; core/autoload/help.el -*- lexical-binding: t; -*-

;;;###autoload
(defun doom/describe-setting (setting)
  "Open the documentation of SETTING (a keyword defined with `def-setting!')."
  (interactive
   ;; TODO try to read setting from whole line
   (list (completing-read "Describe setting%s: "
                          (sort (mapcar #'car doom-settings) #'string-lessp)
                          nil t nil nil)))
  (let ((fn (cdr (assq (intern setting) doom-settings))))
    (unless fn
      (error "'%s' is not a valid DOOM setting" setting))
    (describe-function fn)))

;;;###autoload
(defun doom/describe-module (module)
{'fraction_non_alphanumeric': 0.14566037735849058, 'fraction_numerical': 0.0, 'mean_word_length': 2.9464285714285716, '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': '3787872', 'n_tokens_mistral': 426, 'n_tokens_neox': 404, 'n_words': 129}