dev: merge branch 'master' of github.com:doomemacs
This commit is contained in:
commit
4a8987bcce
34 changed files with 2915 additions and 2919 deletions
|
@ -1,26 +0,0 @@
|
|||
;;; config/default/+emacs.el -*- lexical-binding: t; -*-
|
||||
|
||||
(require 'projectile) ; we need its keybinds immediately
|
||||
|
||||
|
||||
;;
|
||||
;;; Reasonable defaults
|
||||
|
||||
(setq shift-select-mode t)
|
||||
(delete-selection-mode +1)
|
||||
|
||||
(use-package! expand-region
|
||||
:commands (er/contract-region er/mark-symbol er/mark-word)
|
||||
:config
|
||||
(defadvice! doom--quit-expand-region-a (&rest _)
|
||||
"Properly abort an expand-region region."
|
||||
:before '(evil-escape doom/escape)
|
||||
(when (memq last-command '(er/expand-region er/contract-region))
|
||||
(er/contract-region 0))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Keybinds
|
||||
|
||||
(when (modulep! +bindings)
|
||||
(load! "+emacs-bindings"))
|
|
@ -159,8 +159,9 @@
|
|||
|
||||
;;; :completion (in-buffer)
|
||||
(map! (:when (modulep! :completion company)
|
||||
:i "C-@" (cmds! (not (minibufferp)) #'company-complete-common)
|
||||
:i "C-SPC" (cmds! (not (minibufferp)) #'company-complete-common)
|
||||
(:unless (bound-and-true-p evil-disable-insert-state-bindings)
|
||||
:i "C-@" (cmds! (not (minibufferp)) #'company-complete-common)
|
||||
:i "C-SPC" (cmds! (not (minibufferp)) #'company-complete-common))
|
||||
(:after company
|
||||
(:map company-active-map
|
||||
"C-w" nil ; don't interfere with `evil-delete-backward-word'
|
||||
|
@ -189,15 +190,18 @@
|
|||
(:when (modulep! :completion corfu)
|
||||
(:after corfu
|
||||
(:map corfu-mode-map
|
||||
:i "C-SPC" #'completion-at-point
|
||||
:i "C-n" #'+corfu/dabbrev-or-next
|
||||
:i "C-p" #'+corfu/dabbrev-or-last
|
||||
(:unless (bound-and-true-p evil-disable-insert-state-bindings)
|
||||
:i "C-@" #'completion-at-point
|
||||
:i "C-SPC" #'completion-at-point
|
||||
:i "C-n" #'+corfu/dabbrev-or-next
|
||||
:i "C-p" #'+corfu/dabbrev-or-last)
|
||||
:n "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
||||
(call-interactively #'completion-at-point))
|
||||
:v "C-SPC" (cmd! (call-interactively #'evil-change)
|
||||
(call-interactively #'completion-at-point)))
|
||||
(:map corfu-map
|
||||
:i "C-SPC" #'corfu-insert-separator
|
||||
(:unless (bound-and-true-p evil-disable-insert-state-bindings)
|
||||
:i "C-SPC" #'corfu-insert-separator)
|
||||
"C-k" #'corfu-previous
|
||||
"C-j" #'corfu-next
|
||||
"C-u" (cmd! (let (corfu-cycle)
|
||||
|
@ -506,8 +510,6 @@
|
|||
:desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill
|
||||
:desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage
|
||||
:desc "Git time machine" "t" #'git-timemachine-toggle
|
||||
(:when (modulep! :ui hydra)
|
||||
:desc "SMerge" "m" #'+vc/smerge-hydra/body)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk
|
||||
:desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
;;; config/default/+evil.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun +default-disable-delete-selection-mode-h ()
|
||||
(delete-selection-mode -1))
|
||||
(add-hook 'evil-insert-state-entry-hook #'delete-selection-mode)
|
||||
(add-hook 'evil-insert-state-exit-hook #'+default-disable-delete-selection-mode-h)
|
||||
|
||||
|
||||
;;
|
||||
;;; Keybindings
|
||||
|
||||
;; This section is dedicated to "fixing" certain keys so that they behave
|
||||
;; sensibly (and consistently with similar contexts).
|
||||
|
||||
;; Make SPC u SPC u [...] possible (#747)
|
||||
(map! :map universal-argument-map
|
||||
:prefix doom-leader-key "u" #'universal-argument-more
|
||||
:prefix doom-leader-alt-key "u" #'universal-argument-more)
|
||||
|
||||
(when (modulep! +bindings)
|
||||
(load! "+evil-bindings"))
|
|
@ -466,28 +466,21 @@ Continues comments if executed from a commented line."
|
|||
(let ((cmds-del
|
||||
`(menu-item "Reset completion" corfu-reset
|
||||
:filter ,(lambda (cmd)
|
||||
(cond
|
||||
((and (>= corfu--index 0)
|
||||
(eq corfu-preview-current 'insert))
|
||||
cmd)))))
|
||||
(when (and (>= corfu--index 0)
|
||||
(eq corfu-preview-current 'insert))
|
||||
cmd))))
|
||||
(cmds-ret
|
||||
`(menu-item "Insert completion DWIM" corfu-insert
|
||||
:filter ,(lambda (cmd)
|
||||
(cond
|
||||
((null +corfu-want-ret-to-confirm)
|
||||
(corfu-quit)
|
||||
nil)
|
||||
((eq +corfu-want-ret-to-confirm 'minibuffer)
|
||||
(funcall-interactively cmd)
|
||||
nil)
|
||||
((and (or (not (minibufferp nil t))
|
||||
(eq +corfu-want-ret-to-confirm t))
|
||||
(>= corfu--index 0))
|
||||
cmd)
|
||||
((or (not (minibufferp nil t))
|
||||
(eq +corfu-want-ret-to-confirm t))
|
||||
nil)
|
||||
(t cmd)))))
|
||||
(pcase +corfu-want-ret-to-confirm
|
||||
('nil (corfu-quit) nil)
|
||||
('t (if (>= corfu--index 0) cmd))
|
||||
('both (funcall-interactively cmd) nil)
|
||||
('minibuffer
|
||||
(if (minibufferp nil t)
|
||||
(ignore (funcall-interactively cmd)) ; 'both' behavior
|
||||
(if (>= corfu--index 0) cmd))) ; 't' behavior
|
||||
(_ cmd)))))
|
||||
(cmds-tab
|
||||
`(menu-item "Select next candidate or expand/traverse snippet" corfu-next
|
||||
:filter (lambda (cmd)
|
||||
|
@ -505,7 +498,7 @@ Continues comments if executed from a commented line."
|
|||
(featurep 'org)
|
||||
(org-at-table-p))
|
||||
#'org-table-next-field)))
|
||||
(t cmd)))) )
|
||||
(t cmd)))))
|
||||
(cmds-s-tab
|
||||
`(menu-item "Select previous candidate or expand/traverse snippet"
|
||||
corfu-previous
|
||||
|
@ -572,6 +565,42 @@ Continues comments if executed from a commented line."
|
|||
;;
|
||||
;;; Bootstrap configs
|
||||
|
||||
(if (featurep 'evil)
|
||||
(load! "+evil")
|
||||
(load! "+emacs"))
|
||||
(cond
|
||||
((modulep! :editor evil)
|
||||
(defun +default-disable-delete-selection-mode-h ()
|
||||
(delete-selection-mode -1))
|
||||
(add-hook 'evil-insert-state-entry-hook #'delete-selection-mode)
|
||||
(add-hook 'evil-insert-state-exit-hook #'+default-disable-delete-selection-mode-h)
|
||||
|
||||
;; Make SPC u SPC u [...] possible (#747)
|
||||
(map! :map universal-argument-map
|
||||
:prefix doom-leader-key "u" #'universal-argument-more
|
||||
:prefix doom-leader-alt-key "u" #'universal-argument-more)
|
||||
|
||||
(when (modulep! +bindings)
|
||||
(load! "+evil-bindings")))
|
||||
|
||||
(t
|
||||
(add-hook 'doom-first-buffer-hook #'delete-selection-mode)
|
||||
(setq shift-select-mode t)
|
||||
|
||||
(use-package! drag-stuff
|
||||
:defer t
|
||||
:init
|
||||
(map! "<M-up>" #'drag-stuff-up
|
||||
"<M-down>" #'drag-stuff-down
|
||||
"<M-left>" #'drag-stuff-left
|
||||
"<M-right>" #'drag-stuff-right))
|
||||
|
||||
(use-package! expand-region
|
||||
:commands (er/contract-region er/mark-symbol er/mark-word)
|
||||
:config
|
||||
(defadvice! doom--quit-expand-region-a (&rest _)
|
||||
"Properly abort an expand-region region."
|
||||
:before '(evil-escape doom/escape)
|
||||
(when (memq last-command '(er/expand-region er/contract-region))
|
||||
(er/contract-region 0))))
|
||||
|
||||
(when (modulep! +bindings)
|
||||
(require 'projectile nil t) ; we need its keybinds immediately
|
||||
(load! "+emacs-bindings"))))
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
;;; config/default/packages.el
|
||||
|
||||
(package! avy :pin "be612110cb116a38b8603df367942e2bb3d9bdbe")
|
||||
(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8")
|
||||
(package! link-hint :pin "9153eafc776549376bb85d9ff555fef83aca8285")
|
||||
|
||||
(unless (modulep! :editor evil)
|
||||
(package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8")
|
||||
(package! expand-region :pin "e8f4e0fe9c9a80a6a26e2b438502aba9a799d580"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue