[Emacs] Replace helm with vertico, orderless, consult and embark
This commit is contained in:
parent
31e05314ae
commit
031616e09e
@ -899,47 +899,6 @@ details.
|
|||||||
(when (executable-find "copyq")
|
(when (executable-find "copyq")
|
||||||
(run-with-idle-timer 10 nil 'imalison:copyq-sync))
|
(run-with-idle-timer 10 nil 'imalison:copyq-sync))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-zsh-history
|
|
||||||
This was stolen from https://github.com/jwiegley/dot-emacs
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defvar helm-c-source-zsh-history
|
|
||||||
'((name . "Zsh History")
|
|
||||||
(candidates . helm-c-zsh-history-set-candidates)
|
|
||||||
(action . (("Execute Command" . helm-c-zsh-history-action)))
|
|
||||||
(volatile)
|
|
||||||
(requires-pattern . 3)
|
|
||||||
(delayed)))
|
|
||||||
|
|
||||||
(defun helm-c-zsh-history-set-candidates (&optional request-prefix)
|
|
||||||
(let ((pattern (replace-regexp-in-string
|
|
||||||
" " ".*"
|
|
||||||
(or (and request-prefix
|
|
||||||
(concat request-prefix
|
|
||||||
" " helm-pattern))
|
|
||||||
helm-pattern))))
|
|
||||||
(with-current-buffer (find-file-noselect "~/.zsh_history" t t)
|
|
||||||
(auto-revert-mode -1)
|
|
||||||
(goto-char (point-max))
|
|
||||||
(loop for pos = (re-search-backward pattern nil t)
|
|
||||||
while pos
|
|
||||||
collect (replace-regexp-in-string
|
|
||||||
"\\`:.+?;" ""
|
|
||||||
(buffer-substring (line-beginning-position)
|
|
||||||
(line-end-position)))))))
|
|
||||||
|
|
||||||
(defun helm-c-zsh-history-action (candidate)
|
|
||||||
(imalison:named-compile candidate))
|
|
||||||
|
|
||||||
(defun helm-command-from-zsh ()
|
|
||||||
(interactive)
|
|
||||||
(require 'helm)
|
|
||||||
(helm-other-buffer 'helm-c-source-zsh-history "*helm zsh history*"))
|
|
||||||
#+END_SRC
|
|
||||||
*** Use projectile as default directory
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(imalison:let-around imalison:projectile-helm-command-from-zsh helm-command-from-zsh
|
|
||||||
(default-directory (projectile-project-root)))
|
|
||||||
#+END_SRC
|
|
||||||
** Disable hooks
|
** Disable hooks
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(cl-defmacro imalison:disable-mode-hook (mode-name &optional (disable-value -1))
|
(cl-defmacro imalison:disable-mode-hook (mode-name &optional (disable-value -1))
|
||||||
@ -1062,9 +1021,9 @@ I keep it around just in case I need it.
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
;; TODO: fix
|
||||||
(emit-prefix-selector imalison:mark-ring
|
(emit-prefix-selector imalison:mark-ring
|
||||||
helm-mark-ring
|
mark-ring)
|
||||||
helm-global-mark-ring)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Keyboard Macros
|
** Keyboard Macros
|
||||||
*** For editing literate config
|
*** For editing literate config
|
||||||
@ -1622,7 +1581,8 @@ custom-set-faces in your custom file.
|
|||||||
(use-package helpful
|
(use-package helpful
|
||||||
:bind (("C-h f" . helpful-callable)
|
:bind (("C-h f" . helpful-callable)
|
||||||
("C-h v" . helpful-variable)
|
("C-h v" . helpful-variable)
|
||||||
("C-h k" . helpful-key)))
|
("C-h k" . helpful-key)
|
||||||
|
("C-h a" . describe-symbol)))
|
||||||
#+end_src
|
#+end_src
|
||||||
* Keybindings
|
* Keybindings
|
||||||
** god-mode
|
** god-mode
|
||||||
@ -1671,7 +1631,7 @@ custom-set-faces in your custom file.
|
|||||||
("h" imalison:set-huge-font-size "Huge")
|
("h" imalison:set-huge-font-size "Huge")
|
||||||
("a" imalison:appearance "Set Default Appearance")
|
("a" imalison:appearance "Set Default Appearance")
|
||||||
("f" set-frame-font "Set Frame Font")
|
("f" set-frame-font "Set Frame Font")
|
||||||
("t" helm-themes "Choose Emacs Theme")
|
("t" load-theme "Choose Emacs Theme")
|
||||||
("0" imalison:font-size-reset "Reset to default size")
|
("0" imalison:font-size-reset "Reset to default size")
|
||||||
("8" imalison:font-size-80chars "80 chars 3 columns font size"))
|
("8" imalison:font-size-80chars "80 chars 3 columns font size"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@ -1709,8 +1669,6 @@ custom-set-faces in your custom file.
|
|||||||
(imalison:named-compile "nix-build default.nix")))
|
(imalison:named-compile "nix-build default.nix")))
|
||||||
|
|
||||||
(defhydra imalison:compile nil "Compile"
|
(defhydra imalison:compile nil "Compile"
|
||||||
("p" imalison:projectile-helm-command-from-zsh "Run a command in projectile root")
|
|
||||||
("d" helm-command-from-zsh "Run a command in default directory")
|
|
||||||
("c" imalison:named-compile "Enter Custom Command")
|
("c" imalison:named-compile "Enter Custom Command")
|
||||||
("s" imalison:stack-build "Stack build")
|
("s" imalison:stack-build "Stack build")
|
||||||
("n" imalison:nix-build "Nix build")
|
("n" imalison:nix-build "Nix build")
|
||||||
@ -1789,98 +1747,9 @@ bind-key and global-set-key forms.
|
|||||||
(setq zop-to-char-kill-keys '(?\C-k ?\C-w))
|
(setq zop-to-char-kill-keys '(?\C-k ?\C-w))
|
||||||
(setq zop-to-char-quit-at-point-keys '(?\r))))
|
(setq zop-to-char-quit-at-point-keys '(?\r))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm
|
|
||||||
I use helm for almost all emacs completion
|
|
||||||
#+BEGIN_SRC emacs-lisp -n -r
|
|
||||||
(use-package helm-rg
|
|
||||||
:demand t
|
|
||||||
:config (setq helm-rg-thing-at-point nil))
|
|
||||||
(use-package helm-config
|
|
||||||
:demand t
|
|
||||||
:diminish helm-mode
|
|
||||||
:straight helm
|
|
||||||
:bind (("M-y" . helm-show-kill-ring)
|
|
||||||
("M-x" . helm-M-x)
|
|
||||||
("C-x C-i" . helm-imenu)
|
|
||||||
("C-h a" . helm-apropos)
|
|
||||||
("C-c ;" . helm-recentf))
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(setq helm-split-window-default-side 'same
|
|
||||||
helm-exit-idle-delay 0)
|
|
||||||
|
|
||||||
(use-package helm-org
|
|
||||||
:straight nil
|
|
||||||
:defer 10
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
|
|
||||||
(cl-defun helm-org-headings-in-buffer ()
|
|
||||||
(interactive)
|
|
||||||
(helm :sources (helm-source-org-headings-for-files
|
|
||||||
(list (projectile-completing-read
|
|
||||||
"File to look at headings from: "
|
|
||||||
(projectile-all-project-files))))
|
|
||||||
:candidate-number-limit 99999
|
|
||||||
:buffer "*helm org inbuffer*"))))
|
|
||||||
|
|
||||||
(use-package helm-ag
|
|
||||||
:bind ("C-c p 1" . imalison:set-helm-ag-extra-options)
|
|
||||||
:preface
|
|
||||||
(progn
|
|
||||||
(defun imalison:set-helm-ag-extra-options ()
|
|
||||||
(interactive)
|
|
||||||
(let ((option (read-string "Extra options: " (or helm-ag--extra-options "")
|
|
||||||
'helm-ag--extra-options-history)))
|
|
||||||
(setq helm-ag--extra-options option))))
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(setq helm-ag-always-set-extra-option nil)))))
|
|
||||||
|
|
||||||
(use-package helm
|
|
||||||
:diminish helm-mode
|
|
||||||
:config
|
|
||||||
(helm-mode +1))
|
|
||||||
#+END_SRC
|
|
||||||
** helm-projectile
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-projectile
|
|
||||||
:defer 1
|
|
||||||
:commands (helm-projectile-on)
|
|
||||||
:bind (:map helm-projectile-projects-map
|
|
||||||
("M-s" . imalison:switch-to-project-and-search)
|
|
||||||
("M-t" . imalison:helm-term-projectile))
|
|
||||||
:preface
|
|
||||||
(progn
|
|
||||||
(defmacro imalison:do-in-project (project-dir &rest forms)
|
|
||||||
`(noflet ((projectile-project-root (&rest args) ,project-dir))
|
|
||||||
,@forms))
|
|
||||||
(defun imalison:invalidate-cache-and-open-file (_dir)
|
|
||||||
(projectile-invalidate-cache nil)
|
|
||||||
(projectile-find-file))
|
|
||||||
|
|
||||||
(defun imalison:switch-to-project-and-search (dir)
|
|
||||||
(imalison:do-in-project dir (helm-projectile-rg)))
|
|
||||||
|
|
||||||
(defun imalison:helm-term-projectile (dir)
|
|
||||||
(imalison:do-in-project dir (term-projectile-forward))))
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(shut-up (helm-projectile-on))
|
|
||||||
(helm-delete-action-from-source "Search in Project"
|
|
||||||
helm-source-projectile-projects)
|
|
||||||
(helm-delete-action-from-source "Open term for project"
|
|
||||||
helm-source-projectile-projects)
|
|
||||||
(helm-add-action-to-source "Search in Project"
|
|
||||||
'imalison:switch-to-project-and-search
|
|
||||||
helm-source-projectile-projects)
|
|
||||||
(helm-add-action-to-source "Open term for project"
|
|
||||||
'imalison:helm-term-projectile
|
|
||||||
helm-source-projectile-projects)
|
|
||||||
(helm-add-action-to-source "Invalidate Cache and Open File"
|
|
||||||
'imalison:invalidate-cache-and-open-file
|
|
||||||
helm-source-projectile-projects)))
|
|
||||||
#+END_SRC
|
|
||||||
** projectile
|
** projectile
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
@ -1889,22 +1758,29 @@ I use helm for almost all emacs completion
|
|||||||
("C-c p f" . imalison:projectile-find-file))
|
("C-c p f" . imalison:projectile-find-file))
|
||||||
:preface
|
:preface
|
||||||
(progn
|
(progn
|
||||||
(defun imalison:do-rg-default-directory ()
|
(defmacro imalison:projectile-do-in-project (project-dir &rest forms)
|
||||||
|
`(imalison:with-default-directory ,project-dir
|
||||||
|
(noflet ((projectile-project-root (&rest args) ,project-dir))
|
||||||
|
,@forms)))
|
||||||
|
|
||||||
|
(defmacro imalison:with-default-directory (directory &rest forms)
|
||||||
|
`(let ((default-directory ,directory))
|
||||||
|
,@forms))
|
||||||
|
|
||||||
|
(defun imalison:do-rg-default-directory (&rest args)
|
||||||
(interactive)
|
(interactive)
|
||||||
(helm-rg--do-helm-rg default-directory (car (projectile-parse-dirconfig-file))))
|
(apply consult-ripgrep default-directory args))
|
||||||
|
|
||||||
(emit-prefix-selector imalison:do-rg
|
(emit-prefix-selector imalison:do-rg
|
||||||
helm-projectile-rg
|
consult-ripgrep
|
||||||
imalison:do-rg-default-directory
|
imalison:do-rg-default-directory)
|
||||||
helm-rg--do-helm-rg)
|
|
||||||
|
|
||||||
(emit-prefix-selector imalison:projectile-find-file
|
(emit-prefix-selector imalison:projectile-find-file
|
||||||
projectile-find-file
|
projectile-find-file
|
||||||
projectile-find-file-other-window)
|
projectile-find-file-other-window)
|
||||||
|
|
||||||
(imalison:let-around imalison:set-options-do-rg
|
(imalison:let-around imalison:set-options-do-rg
|
||||||
imalison:do-rg
|
imalison:do-rg)
|
||||||
(helm-rg-always-set-extra-option t))
|
|
||||||
|
|
||||||
(defun imalison:projectile-make-all-subdirs-projects (directory)
|
(defun imalison:projectile-make-all-subdirs-projects (directory)
|
||||||
(cl-loop for file-info in (directory-files-and-attributes directory)
|
(cl-loop for file-info in (directory-files-and-attributes directory)
|
||||||
@ -1915,24 +1791,20 @@ I use helm for almost all emacs completion
|
|||||||
(nth 0 file-info) "/.projectile")))))))
|
(nth 0 file-info) "/.projectile")))))))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(use-package persp-projectile
|
|
||||||
:commands projectile-persp-switch-project)
|
|
||||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||||
|
|
||||||
(projectile-global-mode)
|
(projectile-global-mode)
|
||||||
(setq projectile-require-project-root nil)
|
(setq projectile-require-project-root nil)
|
||||||
(setq projectile-enable-caching nil)
|
(setq projectile-enable-caching nil)
|
||||||
(setq projectile-completion-system 'helm)
|
|
||||||
(setq projectile-git-submodule-command nil)
|
(setq projectile-git-submodule-command nil)
|
||||||
(add-to-list 'projectile-globally-ignored-files "Godeps")
|
|
||||||
(diminish 'projectile-mode)
|
(diminish 'projectile-mode)
|
||||||
(bind-key* "C-c p s" 'imalison:do-rg)
|
(bind-key* "C-c p s" 'imalison:do-rg)
|
||||||
(bind-key* "C-c p S" 'imalison:set-options-do-rg)
|
|
||||||
(bind-key* "C-c p f" 'imalison:projectile-find-file)))
|
(bind-key* "C-c p f" 'imalison:projectile-find-file)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** ido
|
** ido
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package ido
|
(use-package ido
|
||||||
|
:disabled t
|
||||||
:demand t
|
:demand t
|
||||||
:commands ido-mode
|
:commands ido-mode
|
||||||
:config
|
:config
|
||||||
@ -1943,8 +1815,7 @@ I use helm for almost all emacs completion
|
|||||||
ido-use-virtual-buffers t
|
ido-use-virtual-buffers t
|
||||||
ido-use-filename-at-point nil
|
ido-use-filename-at-point nil
|
||||||
ido-create-new-buffer 'always)
|
ido-create-new-buffer 'always)
|
||||||
;; This is incompatible with helm-mode
|
(ido-everywhere +1)
|
||||||
;; (ido-everywhere 1)
|
|
||||||
(setq ido-enable-flex-matching t)
|
(setq ido-enable-flex-matching t)
|
||||||
(use-package flx-ido
|
(use-package flx-ido
|
||||||
:defer 5
|
:defer 5
|
||||||
@ -1962,6 +1833,16 @@ I use helm for almost all emacs completion
|
|||||||
(setq ido-vertical-define-keys 'C-n-C-p-up-and-down)))
|
(setq ido-vertical-define-keys 'C-n-C-p-up-and-down)))
|
||||||
(use-package flx-ido)))
|
(use-package flx-ido)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** icomplete
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package icomplete
|
||||||
|
:disabled t
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(fido-mode +1)
|
||||||
|
(fido-vertical-mode)))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** avy
|
** avy
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package avy
|
(use-package avy
|
||||||
@ -1990,11 +1871,6 @@ Neotree is useless with frame mode for now, so I've disabled it.
|
|||||||
(use-package neotree
|
(use-package neotree
|
||||||
:disabled t)
|
:disabled t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** jump-char
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package jump-char
|
|
||||||
:bind (("C-;" . jump-char-forward)))
|
|
||||||
#+END_SRC
|
|
||||||
** flimenu
|
** flimenu
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package flimenu
|
(use-package flimenu
|
||||||
@ -2009,6 +1885,99 @@ Neotree is useless with frame mode for now, so I've disabled it.
|
|||||||
:bind ("C-s" . swiper))
|
:bind ("C-s" . swiper))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Completion
|
* Completion
|
||||||
|
** vertico
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package vertico
|
||||||
|
:demand t
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(vertico-mode +1)))
|
||||||
|
#+end_src
|
||||||
|
** orderless
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package orderless
|
||||||
|
:demand t
|
||||||
|
:config
|
||||||
|
(defun basic-remote-try-completion (string table pred point)
|
||||||
|
(and (vertico--remote-p string)
|
||||||
|
(completion-basic-try-completion string table pred point)))
|
||||||
|
|
||||||
|
(defun basic-remote-all-completions (string table pred point)
|
||||||
|
(and (vertico--remote-p string)
|
||||||
|
(completion-basic-all-completions string table pred point)))
|
||||||
|
|
||||||
|
(setq completion-styles '(orderless basic)
|
||||||
|
completion-category-overrides '((file (styles basic partial-completion)))))
|
||||||
|
#+end_src
|
||||||
|
** marginalia
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package marginalia
|
||||||
|
:demand t
|
||||||
|
:config (marginalia-mode +1))
|
||||||
|
#+end_src
|
||||||
|
** embark
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package embark
|
||||||
|
:demand t
|
||||||
|
:bind
|
||||||
|
(("C-." . embark-act) ;; pick some comfortable binding
|
||||||
|
("C-;" . embark-dwim)
|
||||||
|
("C-h B" . embark-bindings)) ;; alternative for `describe-bindings'
|
||||||
|
:init
|
||||||
|
;; Optionally replace the key help with a completing-read interface
|
||||||
|
(setq prefix-help-command #'embark-prefix-help-command)
|
||||||
|
(setq embark-prompter #'embark-completing-read-prompter)
|
||||||
|
|
||||||
|
;; Show the Embark target at point via Eldoc. You may adjust the Eldoc
|
||||||
|
;; strategy, if you want to see the documentation from multiple providers.
|
||||||
|
(add-hook 'eldoc-documentation-functions #'embark-eldoc-first-target)
|
||||||
|
;; (setq eldoc-documentation-strategy #'eldoc-documentation-compose-eagerly)
|
||||||
|
|
||||||
|
:config
|
||||||
|
(progn
|
||||||
|
(setq embark-mixed-indicator-delay 1.0)
|
||||||
|
(defmacro imalison:embark-projectile-act-for-file (file &rest forms)
|
||||||
|
`(let ((default-directory (projectile-project-root ,file)))
|
||||||
|
(imalison:projectile-do-in-project default-directory ,@forms)))
|
||||||
|
|
||||||
|
(defmacro imalison:build-embark-projectile-for-file (command)
|
||||||
|
`(defun ,(intern (concat "imalison:embark-projectile-file-" (symbol-name command))) (filepath)
|
||||||
|
(imalison:embark-projectile-act-for-file filepath (,command))))
|
||||||
|
|
||||||
|
(imalison:build-embark-projectile-for-file term-projectile-switch)
|
||||||
|
(imalison:build-embark-projectile-for-file magit-status)
|
||||||
|
(imalison:build-embark-projectile-for-file consult-ripgrep)
|
||||||
|
|
||||||
|
(setq embark-prompter #'embark-keymap-prompter)
|
||||||
|
|
||||||
|
(define-key embark-general-map (kbd "t")
|
||||||
|
#'imalison:embark-projectile-file-term-projectile-switch)
|
||||||
|
|
||||||
|
(define-key embark-general-map (kbd "m")
|
||||||
|
#'imalison:embark-projectile-file-magit-status)
|
||||||
|
|
||||||
|
(define-key embark-general-map (kbd "s")
|
||||||
|
#'imalison:embark-projectile-file-consult-ripgrep)
|
||||||
|
|
||||||
|
(defvar-keymap imalison:projectile-embark-map
|
||||||
|
:doc "Keymap for actions on projectile projects"
|
||||||
|
"m" #'imalison:embark-projectile-file-magit-status
|
||||||
|
"t" #'imalison:embark-projectile-file-term-projectile-switch
|
||||||
|
"s" #'imalison:embark-projectile-file-consult-ripgrep)))
|
||||||
|
|
||||||
|
(use-package embark-consult
|
||||||
|
:hook
|
||||||
|
(embark-collect-mode . consult-preview-at-point-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
| embark-consult--upgrade-markers | consult-preview-at-point-mode |
|
||||||
|
|
||||||
|
** consult
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package consult
|
||||||
|
:bind (("C-x C-b" . consult-buffer)))
|
||||||
|
#+end_src
|
||||||
** company
|
** company
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package company
|
(use-package company
|
||||||
@ -2021,6 +1990,9 @@ Neotree is useless with frame mode for now, so I've disabled it.
|
|||||||
company-yasnippet)
|
company-yasnippet)
|
||||||
|
|
||||||
(setq company-idle-delay .25)
|
(setq company-idle-delay .25)
|
||||||
|
(use-package company-prescient
|
||||||
|
:demand t
|
||||||
|
:config (company-prescient-mode +1))
|
||||||
(global-company-mode)
|
(global-company-mode)
|
||||||
(diminish 'company-mode))
|
(diminish 'company-mode))
|
||||||
:init
|
:init
|
||||||
@ -3185,7 +3157,6 @@ Intero seems to be causing hangs, so it has been disabled
|
|||||||
"STARTED(s!)" "WAIT(w!)" "BACKLOG(b!)" "|"
|
"STARTED(s!)" "WAIT(w!)" "BACKLOG(b!)" "|"
|
||||||
"DONE(d!)" "HANDLED(h!)" "EXPIRED(e!)" "CANCELED(c!)")))
|
"DONE(d!)" "HANDLED(h!)" "EXPIRED(e!)" "CANCELED(c!)")))
|
||||||
|
|
||||||
(setq helm-org-headings-fontify t)
|
|
||||||
(setq org-todo-repeat-to-state "TODO")
|
(setq org-todo-repeat-to-state "TODO")
|
||||||
|
|
||||||
(setq org-agenda-span 10)
|
(setq org-agenda-span 10)
|
||||||
@ -3634,10 +3605,6 @@ alphanumeric characters only."
|
|||||||
:capture-character "p"))
|
:capture-character "p"))
|
||||||
(setq org-confirm-elisp-link-function nil)
|
(setq org-confirm-elisp-link-function nil)
|
||||||
(imalison:add-to-org-agenda-files (org-projectile-todo-files))))
|
(imalison:add-to-org-agenda-files (org-projectile-todo-files))))
|
||||||
|
|
||||||
(use-package org-projectile-helm
|
|
||||||
:after org-projectile
|
|
||||||
:bind (("C-c n p" . org-projectile-helm-template-or-project)))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** org-pomodoro
|
**** org-pomodoro
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -3658,11 +3625,6 @@ alphanumeric characters only."
|
|||||||
:and (:regexp "State \"DONE\""
|
:and (:regexp "State \"DONE\""
|
||||||
:log t))))))))
|
:log t))))))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** helm-org-rifle
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-org-rifle
|
|
||||||
:bind ("C-c C-h" . helm-org-rifle-agenda-files))
|
|
||||||
#+END_SRC
|
|
||||||
**** org-notify
|
**** org-notify
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package org-notify
|
(use-package org-notify
|
||||||
@ -4084,54 +4046,22 @@ in term-mode. This makes term-mode 1000% more useful
|
|||||||
(:map term-mode-map
|
(:map term-mode-map
|
||||||
("C-c C-k" . imalison:term-char-mode)
|
("C-c C-k" . imalison:term-char-mode)
|
||||||
:map term-raw-escape-map
|
:map term-raw-escape-map
|
||||||
("M-x" . helm-M-x)
|
("M-x" . execute-extended-command)
|
||||||
("C-j" . imalison:avy-term)
|
("C-j" . imalison:avy-term)
|
||||||
:map term-raw-map
|
:map term-raw-map
|
||||||
("M-x" . helm-M-x)
|
("M-x" . execute-extended-command)
|
||||||
("C-j" . imalison:avy-term)
|
("C-j" . imalison:avy-term)
|
||||||
("M-:" . eval-expression)
|
("M-:" . eval-expression)
|
||||||
("C-y" . imalison:term-paste)
|
("C-y" . imalison:term-paste)
|
||||||
("M-y" . helm-show-kill-ring-for-term))
|
("M-y" . yank-pop))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(use-package helm-ring
|
|
||||||
:straight nil
|
|
||||||
:defer 1
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(defvar helm-kill-ring-for-term-actions
|
|
||||||
'(("Yank" . imalison:term-paste)
|
|
||||||
("Delete" . (lambda (_candidate)
|
|
||||||
(cl-loop for cand in (helm-marked-candidates)
|
|
||||||
do (setq kill-ring
|
|
||||||
(delete cand kill-ring)))))))
|
|
||||||
(defvar helm-source-kill-ring-for-term
|
|
||||||
(helm-build-sync-source "Kill Ring"
|
|
||||||
:init (lambda () (helm-attrset 'last-command last-command))
|
|
||||||
:candidates #'helm-kill-ring-candidates
|
|
||||||
:filtered-candidate-transformer #'helm-kill-ring-transformer
|
|
||||||
:action 'helm-kill-ring-for-term-actions
|
|
||||||
:persistent-action 'ignore
|
|
||||||
:persistent-help "DoNothing"
|
|
||||||
:migemo t
|
|
||||||
:multiline t))
|
|
||||||
|
|
||||||
(defun helm-show-kill-ring-for-term ()
|
|
||||||
"Preconfigured `helm' for `kill-ring'.
|
|
||||||
It is drop-in replacement of `yank-pop'.
|
|
||||||
|
|
||||||
First call open the kill-ring browser, next calls move to next line."
|
|
||||||
(interactive)
|
|
||||||
(let ((enable-recursive-minibuffers t))
|
|
||||||
(helm :sources helm-source-kill-ring-for-term
|
|
||||||
:buffer "*helm kill ring*"
|
|
||||||
:resume 'noresume
|
|
||||||
:allow-nest t)))))
|
|
||||||
|
|
||||||
(defun imalison:term-char-mode ()
|
(defun imalison:term-char-mode ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(term-char-mode)
|
(term-char-mode)
|
||||||
(goto-char (point-max)))
|
(goto-char (point-max)))
|
||||||
|
|
||||||
(define-key term-raw-map (kbd "C-h") help-map)
|
(define-key term-raw-map (kbd "C-h") help-map)
|
||||||
(add-hook 'term-mode-hook 'imalison:disable-linum-mode)
|
(add-hook 'term-mode-hook 'imalison:disable-linum-mode)
|
||||||
(add-hook 'term-mode-hook 'imalison:disable-yas-minor-mode)
|
(add-hook 'term-mode-hook 'imalison:disable-yas-minor-mode)
|
||||||
@ -4248,11 +4178,6 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
|||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package kdeconnect)
|
(use-package kdeconnect)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-systemd
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-systemd
|
|
||||||
:commands helm-systemd)
|
|
||||||
#+END_SRC
|
|
||||||
** aurel
|
** aurel
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package aurel
|
(use-package aurel
|
||||||
@ -4332,11 +4257,6 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
|
|||||||
(define-key isearch-mode-map [remap isearch-query-replace-regexp]
|
(define-key isearch-mode-map [remap isearch-query-replace-regexp]
|
||||||
#'anzu-isearch-query-replace-regexp)))
|
#'anzu-isearch-query-replace-regexp)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** fontawesome
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package fontawesome
|
|
||||||
:commands helm-fontawesome)
|
|
||||||
#+END_SRC
|
|
||||||
** shell-history
|
** shell-history
|
||||||
I think that shell-history is causing projectile to be very slow so I have disabled it.
|
I think that shell-history is causing projectile to be very slow so I have disabled it.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -4444,7 +4364,7 @@ Disabled because it makes it hard to redo things
|
|||||||
(setq recentf-max-saved-items 1000
|
(setq recentf-max-saved-items 1000
|
||||||
recentf-max-menu-items 1000)
|
recentf-max-menu-items 1000)
|
||||||
(advice-add 'recentf-cleanup :around 'imalison:shut-up-around)
|
(advice-add 'recentf-cleanup :around 'imalison:shut-up-around)
|
||||||
(recentf-mode 1)))
|
(recentf-mode +1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** key-chord
|
** key-chord
|
||||||
I have currently disabled key-chord because it may cause typing lag.
|
I have currently disabled key-chord because it may cause typing lag.
|
||||||
@ -4482,11 +4402,6 @@ I have currently disabled key-chord because it may cause typing lag.
|
|||||||
(progn
|
(progn
|
||||||
(setq calc-context-sensitive-enter t)))
|
(setq calc-context-sensitive-enter t)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-spotify
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-spotify
|
|
||||||
:commands helm-spotify)
|
|
||||||
#+END_SRC
|
|
||||||
** jabber
|
** jabber
|
||||||
Disabled because it has its own version of hexrgb which might cause conflicts
|
Disabled because it has its own version of hexrgb which might cause conflicts
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -4799,16 +4714,6 @@ This is useful with server mode when editing gmail messages. I think that it is
|
|||||||
("gtl" . "\\.cql\\'")))))
|
("gtl" . "\\.cql\\'")))))
|
||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-themes
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-themes)
|
|
||||||
#+END_SRC
|
|
||||||
** helm-swoop
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-swoop
|
|
||||||
:bind ("C-S-s" . helm-swoop)
|
|
||||||
:commands helm-swoop)
|
|
||||||
#+END_SRC
|
|
||||||
** perspective
|
** perspective
|
||||||
I've disabled perspective because I just don't use it much.
|
I've disabled perspective because I just don't use it much.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -4858,15 +4763,6 @@ I've disabled perspective because I just don't use it much.
|
|||||||
(define-key persp-mode-map (kbd "C-x b") 'persp-mode-switch-buffers))
|
(define-key persp-mode-map (kbd "C-x b") 'persp-mode-switch-buffers))
|
||||||
:bind ("C-c 9" . persp-switch))
|
:bind ("C-c 9" . persp-switch))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** smex
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package smex
|
|
||||||
;; Using helm-M-x instead
|
|
||||||
:disabled t
|
|
||||||
:commands smex
|
|
||||||
;; This is here because smex feels like part of ido
|
|
||||||
:bind ("M-x" . smex))
|
|
||||||
#+END_SRC
|
|
||||||
** android-mode
|
** android-mode
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package android-mode
|
(use-package android-mode
|
||||||
@ -4910,29 +4806,6 @@ This also adds syntax highlighting for gradle
|
|||||||
(use-package rinari
|
(use-package rinari
|
||||||
:after ruby-mode)
|
:after ruby-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-gtags
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-gtags
|
|
||||||
:config
|
|
||||||
(progn
|
|
||||||
(setq helm-gtags-ignore-case t
|
|
||||||
helm-gtags-auto-update t
|
|
||||||
helm-gtags-use-input-at-cursor t
|
|
||||||
helm-gtags-pulse-at-cursor t
|
|
||||||
helm-gtags-prefix-key "\C-cg"
|
|
||||||
helm-gtags-suggested-key-mapping t)
|
|
||||||
(cl-loop for hook in '(dired-mode-hook eshell-mode-hook c-mode-hook
|
|
||||||
c++-mode-hook asm-mode-hook)
|
|
||||||
do (add-hook hook 'helm-gtags-mode)))
|
|
||||||
:bind (:map helm-gtags-mode-map
|
|
||||||
("C-c g a" . helm-gtags-tags-in-this-function)
|
|
||||||
("C-j" . helm-gtags-select)
|
|
||||||
("M-." . helm-gtags-dwim)
|
|
||||||
("M-," . helm-gtags-pop-stack)
|
|
||||||
("C-c <" . helm-gtags-previous-history)
|
|
||||||
("C-c >" . helm-gtags-next-history)))
|
|
||||||
|
|
||||||
#+END_SRC
|
|
||||||
** sgml-mode
|
** sgml-mode
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package sgml-mode
|
(use-package sgml-mode
|
||||||
@ -4999,12 +4872,6 @@ Ensure all themes that I use are installed:
|
|||||||
(add-to-list 'page-break-lines-modes 'prog-mode)
|
(add-to-list 'page-break-lines-modes 'prog-mode)
|
||||||
(global-page-break-lines-mode +1)))
|
(global-page-break-lines-mode +1)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** helm-themes
|
|
||||||
helm-themes provides an easy way to switch between emacs-themes.
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(use-package helm-themes
|
|
||||||
:after helm)
|
|
||||||
#+END_SRC
|
|
||||||
** window-number
|
** window-number
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package window-number
|
(use-package window-number
|
||||||
|
Loading…
Reference in New Issue
Block a user