<commit_before>;;; packages.el --- madand-base layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2016 <NAME> & Contributors
;;
;; Author: <NAME>' <<EMAIL>>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;;; Commentary:

;; Base layer with general configuration.

;;; Code:

(defconst madand-base-packages
  '(
    ace-jump-helm-line
    ace-popup-menu
    (browse-url :location built-in)
    editorconfig
    evil-evilified-state
    helm
    (info :location built-in)
    simple-mpc
    yasnippet
    ))

(defun madand-base/post-init-ace-jump-helm-line ()
  (setq ace-jump-helm-line-style 'pre)

  (with-eval-after-load 'helm
    (define-key helm-map (kbd "C-a") #'ace-jump-helm-line-and-select)))

(defun madand-base/init-ace-popup-menu ()
  (spacemacs/defer-until-after-user-config
   (lambda ()
     (ace-popup-menu-mode 1))))

(defun madand-base/init-browse-url ()
  (setq browse-url-browser-function #'madand/browse-url-palemoon))

(defun madand-base/init-editorconfig ()
  (use-package editorconfig
    :defer t
    :init
    (add-hook 'prog-mode-hook #'editorconfig-mode)))

(defun madand-base/post-init-evil-evilified-state ()
  (define-key evil-evilified-state-map-original (kbd "Q") 'spacemacs/kill-this-buffer))

(defun madand-base/post-init-helm ()
  (with-eval-after-load 'helm
    (define-key helm-map (kbd "C-h") 'delete-backward-char)
    (define-key helm-map (kbd "C-u") #'helm-find-files-up-one-level)))

(defun madand-base/init-info ()
  (with-eval-after-load 'info
    (define-key Info-mode-map (kbd "s") 'avy-goto-word-1)
    (define-key Info-mode-map (kbd "S") 'avy-goto-char-timer)
    (define-key Info-mode-map (kbd "S-SPC") 'Info-scroll-up)))

(defun madand-base/init-simple-mpc ()
  (use-package simple-mpc
    :commands simple-mpc-view-current-playlist
    :diminish simple-mpc-current-playlist-mode
    :init
    (spacemacs/set-leader-keys "am" #'simple-mpc-view-current-playlist)
    :config
    (progn
      (setq simple-mpc-mpd-playlist-directory "~/.config/mpd/playlists/"<commit_msg>madand-base: bind flyspell action to zi<commit_after>;;; packages.el --- madand-base layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2016 <NAME> & Contributors
;;
;; Author: <NAME>' <<EMAIL>>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;;; Commentary:

;; Base layer with general configuration.

;;; Code:

(defconst madand-base-packages
  '(
    ace-jump-helm-line
    ace-popup-menu
    (browse-url :location built-in)
    editorconfig
    flyspell
    evil-evilified-state
    helm
    (info :location built-in)
    simple-mpc
    yasnippet
    ))

(defun madand-base/post-init-ace-jump-helm-line ()
  (setq ace-jump-helm-line-style 'pre)

  (with-eval-after-load 'helm
    (define-key helm-map (kbd "C-a") #'ace-jump-helm-line-and-select)))

(defun madand-base/init-ace-popup-menu ()
  (spacemacs/defer-until-after-user-config
   (lambda ()
     (ace-popup-menu-mode 1))))

(defun madand-base/init-browse-url ()
  (setq browse-url-browser-function #'madand/browse-url-palemoon))

(defun madand-base/init-editorconfig ()
  (use-package editorconfig
    :defer t
    :init
    (add-hook 'prog-mode-hook #'editorconfig-mode)))

(defun madand-base/post-init-evil-evilified-state ()
  (define-key evil-evilified-state-map-original (kbd "Q") 'spacemacs/kill-this-buffer))

(defun madand-base/post-init-flyspell ()
  (with-eval-after-load 'flyspell
    (define-key evil-normal-state-map (kbd "zi") 'flyspell-correct-word-before-point)))

(defun madand-base/post-init-helm ()
  (with-eval-after-load 'helm
    (define-key helm-map (kbd "C-h") 'delete-backward-char)
    (define-key helm-map (kbd "C-u") #'helm-find-files-up-one-level)))

(defun madand-base/init-info ()
  (with-eval-after-load 'info
    (define-key Info-mode-map (kbd "s") 'avy-goto-word-1)
    (define-key Info-mode-map (kbd "S") 'avy-goto-char-timer)
    (define-key Info-mode-map (kbd "S-SPC") 'Info-scroll-up)))

(defun madand-base/init-simple-mpc ()
  (use-package simple-mpc
    :commands simple-mpc-view-current-playlist
    :diminish simple-mpc-current-playlist-mode
    :init
    (spacemacs/set-leader-keys "am" #'simple-mpc-view-current-playlist)
    :config
    (progn
      (setq simple-mpc-mpd-playlist-directory "~/.config/mpd/playlists/"
{'fraction_non_alphanumeric': 0.1717217787913341, 'fraction_numerical': 0.005929304446978335, 'mean_word_length': 3.377245508982036, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '2621566', 'n_tokens_mistral': 1751, 'n_tokens_neox': 1695, 'n_words': 294}