General cleanup
This commit is contained in:
parent
9a5f3cad10
commit
53879f2528
11 changed files with 96 additions and 101 deletions
|
@ -191,6 +191,14 @@ enable multiple minor modes for the same regexp.")
|
|||
;; Plugins
|
||||
;;
|
||||
|
||||
(use-package editorconfig
|
||||
:config
|
||||
;; Don't affect lisp indentation (only `tab-width')
|
||||
(setq editorconfig-indentation-alist
|
||||
(delq (assq 'emacs-lisp-mode editorconfig-indentation-alist)
|
||||
editorconfig-indentation-alist))
|
||||
(editorconfig-mode +1))
|
||||
|
||||
(use-package ace-window
|
||||
:commands ace-window
|
||||
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
|
||||
|
@ -202,12 +210,6 @@ enable multiple minor modes for the same regexp.")
|
|||
:config (setq avy-all-windows nil
|
||||
avy-background t))
|
||||
|
||||
(use-package editorconfig
|
||||
:config
|
||||
;; Don't affect lisp indentation (just `tab-width')
|
||||
(setq editorconfig-indentation-alist (delq (assq 'emacs-lisp-mode editorconfig-indentation-alist) editorconfig-indentation-alist))
|
||||
(editorconfig-mode +1))
|
||||
|
||||
(use-package emr
|
||||
:commands (emr-initialize emr-show-refactor-menu emr-declare-command)
|
||||
:config (define-key popup-menu-keymap [escape] 'keyboard-quit))
|
||||
|
@ -215,8 +217,7 @@ enable multiple minor modes for the same regexp.")
|
|||
(use-package expand-region
|
||||
:commands (er/expand-region er/contract-region er/mark-symbol er/mark-word))
|
||||
|
||||
(use-package goto-last-change
|
||||
:commands goto-last-change)
|
||||
(use-package goto-last-change :commands goto-last-change)
|
||||
|
||||
(use-package hideshow
|
||||
:commands (hs-minor-mode hs-toggle-hiding hs-already-hidden-p)
|
||||
|
@ -300,13 +301,14 @@ enable multiple minor modes for the same regexp.")
|
|||
|
||||
(use-package re-builder
|
||||
:commands (re-builder reb-mode-buffer-p)
|
||||
:init (add-hook! reb-mode 'narf|reb-cleanup)
|
||||
:init
|
||||
(add-hook 'reb-mode-hook 'narf|reb-cleanup)
|
||||
(evil-set-initial-state 'reb-mode 'insert)
|
||||
:config
|
||||
(setq reb-re-syntax 'string)
|
||||
(evil-set-initial-state 'reb-mode 'insert)
|
||||
|
||||
(map! :map rxt-help-mode-map :n [escape] 'kill-buffer-and-window)
|
||||
(map! :map reb-mode-map
|
||||
(map! :map rxt-help-mode-map
|
||||
:n [escape] 'kill-buffer-and-window
|
||||
:map reb-mode-map
|
||||
:n "C-g" 'reb-quit
|
||||
:n [escape] 'reb-quit
|
||||
:n [backtab] 'reb-change-syntax))
|
||||
|
|
|
@ -5,6 +5,14 @@
|
|||
;; code to make a permanent frame header to display these some day)
|
||||
;; 2. Session persistence
|
||||
|
||||
(defvar narf-wg-frames '()
|
||||
"A list of all the frames opened as separate workgroups. See
|
||||
defuns/defuns-workgroups.el.")
|
||||
|
||||
(defvar narf-wg-names '()
|
||||
"A list of fixed names for workgroups. If a name is set, workgroup names aren't
|
||||
automatically renamed to the project name.")
|
||||
|
||||
(use-package workgroups2
|
||||
:when (display-graphic-p)
|
||||
:init
|
||||
|
@ -36,18 +44,11 @@
|
|||
wg-list-display-decor-previous-left ""
|
||||
wg-list-display-decor-previous-right "")
|
||||
|
||||
(add-hook! emacs-startup (workgroups-mode +1))
|
||||
(add-hook 'emacs-startup-hook 'workgroups-mode)
|
||||
:config
|
||||
(unless (file-exists-p wg-workgroup-directory)
|
||||
(mkdir wg-workgroup-directory))
|
||||
|
||||
(defvar narf-wg-frames '()
|
||||
"A list of all the frames opened as separate workgroups. See
|
||||
defuns/defuns-workgroups.el.")
|
||||
(defvar narf-wg-names '()
|
||||
"A list of fixed names for workgroups. If a name is set, workgroup names aren't
|
||||
automatically renamed to the project name.")
|
||||
|
||||
;; Remember the set names in between sessions
|
||||
(add-to-list 'savehist-additional-variables 'narf-wg-names)
|
||||
|
||||
|
@ -55,14 +56,11 @@ automatically renamed to the project name.")
|
|||
;; Create a new workgroup on switch-project
|
||||
(setq projectile-switch-project-action 'narf/wg-projectile-switch-project))
|
||||
|
||||
;; Seriously, don't mess with the modeline! `wg-mode-line-display-on' isn't enough
|
||||
;; `wg-mode-line-display-on' wasn't enough
|
||||
(advice-add 'wg-change-modeline :override 'ignore)
|
||||
|
||||
;; Don't remember popup and neotree windows
|
||||
(add-hook! kill-emacs
|
||||
(narf/popup-close-all)
|
||||
(when (and (featurep 'neotree) (neo-global--window-exists-p))
|
||||
(neotree-hide)))
|
||||
(add-hook 'kill-emacs-hook 'narf|wg-cleanup)
|
||||
|
||||
;; This helps abstract some of the underlying functions away, just in case I want to
|
||||
;; switch to a different package in the future, like persp-mode, eyebrowse or wconf.
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
;;; defuns-workgroup.el
|
||||
|
||||
;;;###autoload
|
||||
(defun narf|wg-cleanup ()
|
||||
(narf/popup-close-all)
|
||||
(when (and (featurep 'neotree) (neo-global--window-exists-p))
|
||||
(neotree-hide)))
|
||||
|
||||
;;;###autoload
|
||||
(defun narf/wg-projectile-switch-project ()
|
||||
(narf:workgroup-new nil (file-name-nondirectory (directory-file-name (narf/project-root))) t))
|
||||
|
@ -9,6 +15,7 @@
|
|||
(interactive "<!><a>")
|
||||
(unless (wg-workgroup-list)
|
||||
(wg-create-workgroup wg-first-wg-name))
|
||||
(narf|wg-cleanup)
|
||||
(wg-save-session-as (if session-name
|
||||
(concat wg-workgroup-directory session-name)
|
||||
(if bang
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue