Add perspective mode

This commit is contained in:
Evie Litherland-Smith 2023-11-16 12:50:37 +00:00
parent 10744ecb2d
commit f597ccd59c
3 changed files with 46 additions and 27 deletions

View file

@ -31,7 +31,6 @@
# ide-packages # ide-packages
vterm vterm
ibuffer-project
treesit-grammars.with-all-grammars treesit-grammars.with-all-grammars
treesit-auto treesit-auto
apheleia apheleia
@ -58,6 +57,8 @@
khalel khalel
# project-packages # project-packages
ibuffer-project
perspective
magit magit
forge forge

View file

@ -30,13 +30,8 @@
(delete-selection-mode) (delete-selection-mode)
(recentf-mode -1) (recentf-mode -1)
;; Misc useful keymaps
(keymap-global-set "M-#" #'dictionary-lookup-definition) (keymap-global-set "M-#" #'dictionary-lookup-definition)
(keymap-global-set "C-c b" #'ibuffer)
(keymap-global-set "C-c p l" #'list-packages)
(keymap-global-set "C-c p r" #'package-refresh-contents)
(keymap-global-set "C-c p i" #'package-install)
(keymap-global-set "C-c p d" #'package-delete)
;; turn on spell checking, if available. ;; turn on spell checking, if available.
(when (and (require 'ispell nil :noerror) (executable-find ispell-program-name)) (when (and (require 'ispell nil :noerror) (executable-find ispell-program-name))
@ -75,6 +70,18 @@
;; Bind extra `describe-*' commands ;; Bind extra `describe-*' commands
(keymap-global-set "C-h K" #'describe-keymap) (keymap-global-set "C-h K" #'describe-keymap)
(use-package ibuffer
:ensure t
:bind (("C-c b" . ibuffer)))
(use-package ibuffer-project
:ensure t
:after ibuffer
:hook ((ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))))
(use-package link-hint (use-package link-hint
:ensure t :ensure t
:bind (("C-c l o" . link-hint-open-link) :bind (("C-c l o" . link-hint-open-link)
@ -402,13 +409,6 @@
:bind (("C-c c f" . apheleia-format-buffer)) :bind (("C-c c f" . apheleia-format-buffer))
:config (apheleia-global-mode +1)) :config (apheleia-global-mode +1))
(use-package ibuffer-project
:ensure t
:hook ((ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))))
(use-package treesit-auto (use-package treesit-auto
:config (global-treesit-auto-mode +1)) :config (global-treesit-auto-mode +1))
@ -432,6 +432,12 @@
(project-find-dir "Find directory") (project-find-dir "Find directory")
(project-eshell "Eshell"))) (project-eshell "Eshell")))
(use-package perspective
:ensure t
:demand t
:bind (("C-c p p" . persp-switch)
("C-c p r" . persp-rename)))
(setq magit-define-global-key-bindings nil (setq magit-define-global-key-bindings nil
magit-clone-default-directory "~/Projects/" magit-clone-default-directory "~/Projects/"
magit-commit-show-diff nil magit-commit-show-diff nil

View file

@ -38,13 +38,8 @@
(delete-selection-mode) (delete-selection-mode)
(recentf-mode -1) (recentf-mode -1)
;; Misc useful keymaps
(keymap-global-set "M-#" #'dictionary-lookup-definition) (keymap-global-set "M-#" #'dictionary-lookup-definition)
(keymap-global-set "C-c b" #'ibuffer)
(keymap-global-set "C-c p l" #'list-packages)
(keymap-global-set "C-c p r" #'package-refresh-contents)
(keymap-global-set "C-c p i" #'package-install)
(keymap-global-set "C-c p d" #'package-delete)
;; turn on spell checking, if available. ;; turn on spell checking, if available.
(when (and (require 'ispell nil :noerror) (executable-find ispell-program-name)) (when (and (require 'ispell nil :noerror) (executable-find ispell-program-name))
@ -93,6 +88,21 @@
(keymap-global-set "C-h K" #'describe-keymap) (keymap-global-set "C-h K" #'describe-keymap)
#+end_src #+end_src
** ibuffer
#+begin_src emacs-lisp
(use-package ibuffer
:ensure t
:bind (("C-c b" . ibuffer)))
(use-package ibuffer-project
:ensure t
:after ibuffer
:hook ((ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))))
#+end_src
** Link hint keymaps ** Link hint keymaps
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package link-hint (use-package link-hint
@ -472,13 +482,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
:bind (("C-c c f" . apheleia-format-buffer)) :bind (("C-c c f" . apheleia-format-buffer))
:config (apheleia-global-mode +1)) :config (apheleia-global-mode +1))
(use-package ibuffer-project
:ensure t
:hook ((ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))))
(use-package treesit-auto (use-package treesit-auto
:config (global-treesit-auto-mode +1)) :config (global-treesit-auto-mode +1))
@ -507,6 +510,15 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
(project-find-dir "Find directory") (project-find-dir "Find directory")
(project-eshell "Eshell"))) (project-eshell "Eshell")))
#+END_SRC #+END_SRC
*** Perspective
#+begin_src emacs-lisp
(use-package perspective
:ensure t
:demand t
:bind (("C-c p p" . persp-switch)
("C-c p r" . persp-rename)))
#+end_src
** Version control ** Version control
*** Magit *** Magit
#+begin_src emacs-lisp #+begin_src emacs-lisp