<commit_before>;;; feature-syntax-checker.el --- Syntax checking -*- lexical-binding: t; -*-

;;; Commentary:
;; Catching your errors.

;;; Code:

(eval-when-compile
  (require 'base-package)
  (require 'base-keybinds))

;; pkg-info doesn't get autoloaded when `flycheck-version' needs it.
(autoload 'pkg-info-version-info "pkg-info")

;;;
;; Packages

(req-package flycheck
  :demand t
  :diminish flycheck-mode
  :commands
  (flycheck-list-errors
   flycheck-buffer
   flycheck-add-next-checker)
  :general
  (:keymaps 'flycheck-error-list-mode-map :states '(normal motion emacs)
            "C-n" 'flycheck-error-list-next-error
            "C-p" 'flycheck-error-list-previous-error
            "j"   'flycheck-error-list-next-error
            "k"   'flycheck-error-list-previous-error
            "RET" 'flycheck-error-list-goto-error)
  (:keymaps 'motion
            "[e" 'previous-error
            "]e" 'next-error)
  :init
  (setq-default flycheck-emacs-lisp-load-path 'inherit)
  (setq flycheck-check-syntax-automatically '(save mode-enabled))
  :config
  (set-evil-state 'flycheck-error-list-mode 'motion)
  (set-popup-buffer (rx bos "*Flycheck errors*" eos)
                    (rx bos "*Flycheck checker*" eos)))

;; Inline error messages
(req-package flycheck-inline
  :el-get t :ensure nil
  :hook (after-init . flycheck-inline-mode)
  :init
  (setq flycheck-display-errors-delay 0.5))

;; Pop-up error messages
(req-package flycheck-popup-tip
  :disabled t
  :hook (flycheck-mode . flycheck-popup-tip-mode))
<commit_msg>feature: display flycheck in child frame at position<commit_after>;;; feature-syntax-checker.el --- Syntax checking -*- lexical-binding: t; -*-

;;; Commentary:
;; Catching your errors.

;;; Code:

(eval-when-compile
  (require 'base-package)
  (require 'base-keybinds))

;; pkg-info doesn't get autoloaded when `flycheck-version' needs it.
(autoload 'pkg-info-version-info "pkg-info")

;;;
;; Packages

(req-package flycheck
  :demand t
  :diminish flycheck-mode
  :commands
  (flycheck-list-errors
   flycheck-buffer
   flycheck-add-next-checker)
  :general
  (:keymaps 'flycheck-error-list-mode-map :states '(normal motion emacs)
            "C-n" 'flycheck-error-list-next-error
            "C-p" 'flycheck-error-list-previous-error
            "j"   'flycheck-error-list-next-error
            "k"   'flycheck-error-list-previous-error
            "RET" 'flycheck-error-list-goto-error)
  (:keymaps 'motion
            "[e" 'previous-error
            "]e" 'next-error)
  :init
  (setq-default flycheck-emacs-lisp-load-path 'inherit)
  (setq flycheck-check-syntax-automatically '(save mode-enabled))
  :config
  (set-evil-state 'flycheck-error-list-mode 'motion)
  (set-popup-buffer (rx bos "*Flycheck errors*" eos)
                    (rx bos "*Flycheck checker*" eos)))

;; Pos-frame error messages
(req-package flycheck-posframe
  :hook (flycheck-mode . flycheck-posframe-mode))

;; Inline error messages
(req-package flycheck-inline
  :el-get t :ensure nil
  :disabled t
  :hook (after-init . flycheck-inline-mode)
  :init
  (setq flycheck-display-errors-delay 0.5))

;; Pop-up error messages
(req-package flycheck-popup-tip
  :disabled t
  :hook (flycheck-mode . flycheck-popup-tip-mode))

{'fraction_non_alphanumeric': 0.1465224111282844, 'fraction_numerical': 0.0012364760432766616, 'mean_word_length': 3.0653266331658293, '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': '2989001', 'n_tokens_mistral': 1157, 'n_tokens_neox': 1124, 'n_words': 237}