~elais/shaolin-emacs-archive

fe020e9939fe7fd93f505ee6a2020473318211de — Elais Player 4 years ago b0930c7
modify keybindings to take advantage of new leader maps
M lisp/shao-completion.el => lisp/shao-completion.el +2 -0
@@ 66,6 66,8 @@
  (company-prescient-mode +1))

(use-package selectrum
 :custom-face
 (selectrum-current-candidate ((t (:inherit region))))
 :config
 (selectrum-mode +1))


M lisp/shao-defaults.el => lisp/shao-defaults.el +16 -6
@@ 19,8 19,19 @@
(savehist-mode +1)
(setq-default save-place t)

;; Packages
;;
;;; Functions

;;
;;; Packages

(use-package general
  :demand t)

(use-package hl-line
  :config
  (global-hl-line-mode +1))
  
(use-package paren
  :config
  (show-paren-mode +1))


@@ 30,13 41,12 @@
  (electric-pair-mode +1))

(use-package abbrev
  :config
  (setq save-abbrevs 'silently))
  :custom
  (save-abbrevs 'silently))

(use-package recentf
  :init
  (global-set-key (kbd "C-x C-r") 'recentf-open-files)
  (setq recentf-max-saved-items 50)
  :custom
  (recentf-max-saved-items 50)
  :config
  (recentf-mode +1))
  

M lisp/shao-fingers.el => lisp/shao-fingers.el +20 -12
@@ 30,25 30,30 @@
(defvar +shaolin-buffer-map (make-sparse-keymap))

;;
;;; Packages
;;; Functions

(use-package general
  :demand t
  :config
  (general-define-key
(defun +recentf-open-files ()
  "Use `completing-read' to open a recent file."
  (interactive)
  (let ((files (mapcar 'abbreviate-file-name recentf-list)))
    (find-file (completing-read "Find recent file: " files nil t))))

(general-define-key
   :keymaps #'+shaolin-files-map
   "s" 'save-buffer
   "f" 'find-file)
   
  (general-create-definer shaolin-fingers-def
    :keymaps '+shaolin-fingers-map
    "f" #'+shaolin-files-map
    "b" #'+shaolin-buffer-map))
   "f" 'find-file
   "r" '+recentf-open-files)

(general-create-definer shaolin-fingers-def
  :prefix "x"
  :keymaps '(boon-command-map boon-special-map))
  
;;
;;; Packages

(use-package which-key
  :diminish which-key-mode
  :custom
  (which-key-sort-order #'which-key-prefix-then-key-order)
  (which-key-sort-uppercase-first nil)
  (which-key-add-column-padding 1)
  (which-key-max-display-columns nil)


@@ 66,6 71,9 @@

(use-package boon-qwerty
  :demand t
  :general
  (shaolin-fingers-def
    :keymaps 'boon-special-map)
  :config
  (boon-mode +1))


M lisp/shao-projects.el => lisp/shao-projects.el +7 -0
@@ 29,11 29,16 @@
  (envrc-global-mode))

(use-package projectile
  :diminish projectile-mode
  :general
  (shaolin-fingers-def
    "p" '(:keymap projectile-command-map :wk "[p]rojects"))
  :commands (projectile-project-root
             projectile-project-name
             projectile-project-p
             projectile-locate-dominating-file)
  :custom
  (projectile-completion-system 'default) ; uses selectrum
  (projectile-ignored-projects '("~/" "/tmp"))
  (projectile-globally-ignored-files '(".DS_Store" "Icon
" "TAGS"))
  (projectile--globally-ignored-file-suffixes '(".elc" ".pyc" ".o"))


@@ 41,6 46,8 @@
   (append '(".projectile"
             ".project"
             ".git")))
  :init
  (global-set-key [remap find-tag] #'projectile-find-tag)
  :config
  (projectile-mode +1))


M lisp/shao-snippets.el => lisp/shao-snippets.el +6 -5
@@ 17,16 17,14 @@
;;
;;
;;
;;; Code:

;;; Variables
;;; code:

(defvar +guix-snippets-dir
  (expand-file-name
   ".local/guix-profiles/emacs/emacs-profile/share/emacs/yasnippet-snippets/"
   user-emacs-directory)
  "Directory where `yasnippet-dirs' something.")

  
(defvar +file-templates-dir
  (expand-file-name
   "etc/yasnippet/templates/file/"


@@ 56,6 54,8 @@ information.")
;;; Packages

(use-package yasnippet
  :custom
  (yas-snippet-dirs '(+file-templates-dir))
  :commands (yas-minor-mode-on
             yas-expand
             yas-expand-snippet


@@ 69,7 69,8 @@ information.")
         (conf-mode . yas-minor-mode))
  :config
  (add-to-list 'yas-snippet-dirs '+guix-snippets-dir)
  (add-to-list 'yas-snippet-dirs '+file-templates-dir)
  (setq yas-prompt-functions (delq #'yas-dropdown-prompt yas-prompt-functions))
  (add-to-list 'yas-snippet-dirs '+file-templates-dir 'append #'eq)
  (yas-reload-all))

(provide 'shao-snippets)

M lisp/shao-vc.el => lisp/shao-vc.el +34 -4
@@ 1,4 1,25 @@
;;; shao-vc.el -*- lexical-binding: t; -*-
;;; shao-vc --- version control -*- lexical-binding: t; -*-
;;
;; Copyright (C) 2020 Elais Player
;;
;; Author: Elais <https://git.sr.ht/~elais>
;; Maintainer: Elais Player <elais@fastmail.com>
;; Created: June 14, 2020
;; Modified: June 14, 2020
;; Version: 0.0.1
;; Keywords:
;; Homepage: https://git.sr.ht/YY/shaolin-emacs
;; Package-Requires: ((emacs YY))
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;;  
;;
;;; Code:



;; stolen from doom-emacs
;;;###autoload


@@ 35,8 56,17 @@

(use-package magit
  :general
  ("C-x g" 'magit-status)
  :init
  (setq magit-display-buffer-function #'+magit-display-buffer-fn))
  (shaolin-fingers-def
    "g" '(:ignore t     :wk ("[g]it" . "version control"))
    "gg" '(magit-status :wk "[g]it status")
    "gb" '(magit-branch :wk "[b]ranch")
    "gl" '(magit-log    :wk "[l]og")
    ;; Magit Creation Commands
    "gc"  '(:ignore t           :wk "[c]ommit")
    "gcc" '(magit-commit-create :wk "[c]reate"))
  :commands (magit-status magit-branch magit-commit)
  :custom
  (magit-display-buffer-function #'+magit-display-buffer-fn))

(provide 'shao-vc)
;;; shao-vc.el ends here