Merge branch 'master' of gitlab.com:chriscochrun/dotemacs
This commit is contained in:
commit
178638f314
53
README.org
53
README.org
|
@ -15,6 +15,7 @@
|
||||||
- [[#better-ui][Better UI]]
|
- [[#better-ui][Better UI]]
|
||||||
- [[#completion][Completion]]
|
- [[#completion][Completion]]
|
||||||
- [[#yasnippet][YASnippet]]
|
- [[#yasnippet][YASnippet]]
|
||||||
|
- [[#projectile][Projectile]]
|
||||||
- [[#navigation][Navigation]]
|
- [[#navigation][Navigation]]
|
||||||
- [[#window-management][Window Management]]
|
- [[#window-management][Window Management]]
|
||||||
- [[#help][Help]]
|
- [[#help][Help]]
|
||||||
|
@ -352,6 +353,7 @@ This evil-collection package includes a lot of other evil based things.
|
||||||
"of" '(:ignore t :which-key "elfeed")
|
"of" '(:ignore t :which-key "elfeed")
|
||||||
"h" '(:ignore t :which-key "help")
|
"h" '(:ignore t :which-key "help")
|
||||||
"n" '(:ignore t :which-key "notes")
|
"n" '(:ignore t :which-key "notes")
|
||||||
|
"l" '(:ignore t :which-key "lsp")
|
||||||
"sp" '(:ignore t :which-key "passwords")
|
"sp" '(:ignore t :which-key "passwords")
|
||||||
"bs" '(consult-buffer :which-key "buffer search")
|
"bs" '(consult-buffer :which-key "buffer search")
|
||||||
"bd" '(kill-this-buffer :which-key "kill buffer")
|
"bd" '(kill-this-buffer :which-key "kill buffer")
|
||||||
|
@ -627,17 +629,21 @@ Marginalia makes for some great decoration to our minibuffer completion items. W
|
||||||
*** Company
|
*** Company
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package company
|
(use-package company
|
||||||
:defer 1
|
|
||||||
:config
|
:config
|
||||||
(global-company-mode +1)
|
(global-company-mode +1)
|
||||||
(setq company-dabbrev-other-buffers t
|
:custom
|
||||||
company-minimum-prefix-length 1)
|
(company-dabbrev-other-buffers t)
|
||||||
|
(company-minimum-prefix-length 1)
|
||||||
|
(company-idle-delay 0.2)
|
||||||
:general
|
:general
|
||||||
(general-define-key
|
(general-def '(normal insert) company-active-map
|
||||||
:states 'normal
|
"TAB" 'company-complete-selection
|
||||||
:keymaps '(company-search-map)
|
"RET" 'company-complete-selection)
|
||||||
"TAB" 'company-complete-selection)
|
(general-def '(normal insert) lsp-mode-map
|
||||||
)
|
"TAB" 'company-indent-or-complete-common))
|
||||||
|
|
||||||
|
;; (use-package company-box
|
||||||
|
;; :hook (company-mode . company-box-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
@ -654,6 +660,12 @@ YASnippet is a templating system. It's powerful.
|
||||||
(yas-global-mode 1))
|
(yas-global-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Projectile
|
||||||
|
I'm going to use projectile to keep my projects inline.
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package projectile)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** Navigation
|
** Navigation
|
||||||
*** Avy
|
*** Avy
|
||||||
Avy provides a lot of functions to search through the current buffer. Most of the time I use evil or consult functions to find what I'm looking for, but avy provides a lot of small movements that are more useful for visible movements.
|
Avy provides a lot of functions to search through the current buffer. Most of the time I use evil or consult functions to find what I'm looking for, but avy provides a lot of small movements that are more useful for visible movements.
|
||||||
|
@ -763,11 +775,22 @@ Since I use the Awesome WM I thought it'd be good to have lua around. It's also
|
||||||
LSP is useful...
|
LSP is useful...
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
|
:commands (lsp lsp-deferred)
|
||||||
|
:init
|
||||||
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
:config
|
:config
|
||||||
(setq lsp-lens-enable t
|
(setq lsp-lens-enable t
|
||||||
lsp-signature-auto-activate nil))
|
lsp-signature-auto-activate nil
|
||||||
|
read-process-output-max (* 1024 1024))
|
||||||
|
(lsp-enable-which-key-integration t))
|
||||||
|
|
||||||
(use-package lsp-ui)
|
(use-package lsp-ui
|
||||||
|
:hook (lsp-mode . lsp-ui-mode)
|
||||||
|
:custom
|
||||||
|
(lsp-ui-doc-position 'bottom))
|
||||||
|
|
||||||
|
(use-package lsp-treemacs
|
||||||
|
:after lsp)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Fennel
|
*** Fennel
|
||||||
|
@ -874,9 +897,17 @@ I may get into flutter development over using felgo..... but i'm not happy about
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dart-mode
|
(use-package dart-mode
|
||||||
:mode ("\\.dart\\'" . dart-mode)
|
:mode ("\\.dart\\'" . dart-mode)
|
||||||
:config (add-hook 'dart-mode 'lsp))
|
:hook (dart-mode . lsp-deferred)
|
||||||
|
:general
|
||||||
|
(general-def 'normal dart-mode-map
|
||||||
|
"C-c r" 'lsp-dart-dap-flutter-hot-reload
|
||||||
|
"C-c R" 'lsp-dart-dap-flutter-hot-restart))
|
||||||
|
|
||||||
(use-package lsp-dart)
|
(use-package lsp-dart)
|
||||||
|
(use-package flutter
|
||||||
|
:after dart)
|
||||||
|
(use-package hover
|
||||||
|
:after dart)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Let's also add the android-sdk tools to emacs' path.
|
Let's also add the android-sdk tools to emacs' path.
|
||||||
|
|
150
init.el
150
init.el
|
@ -2,9 +2,9 @@
|
||||||
(defun chris/display-startup-time ()
|
(defun chris/display-startup-time ()
|
||||||
(message "Emacs loaded in %s with %d garbage collections."
|
(message "Emacs loaded in %s with %d garbage collections."
|
||||||
(format "%.2f seconds"
|
(format "%.2f seconds"
|
||||||
(float-time
|
(float-time
|
||||||
(time-subtract after-init-time before-init-time)))
|
(time-subtract after-init-time before-init-time)))
|
||||||
gcs-done))
|
gcs-done))
|
||||||
(add-hook 'emacs-startup-hook #'chris/display-startup-time)
|
(add-hook 'emacs-startup-hook #'chris/display-startup-time)
|
||||||
|
|
||||||
(setq inhibit-startup-message t)
|
(setq inhibit-startup-message t)
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
(with-selected-frame frame
|
(with-selected-frame frame
|
||||||
(chris/set-font-faces)
|
(chris/set-font-faces)
|
||||||
(chris/set-transparency)))
|
(chris/set-transparency)))
|
||||||
(chris/set-font-faces))
|
(chris/set-font-faces))
|
||||||
(chris/set-transparency))
|
(chris/set-transparency))
|
||||||
|
|
||||||
(setq display-line-numbers-type 'relative)
|
(setq display-line-numbers-type 'relative)
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
;; ...especially on linux
|
;; ...especially on linux
|
||||||
(setq x-gtk-use-system-tooltips nil)
|
(setq x-gtk-use-system-tooltips nil)
|
||||||
|
|
||||||
;; Favor vertical splits over horizontal ones. Screens are usually wide.
|
;; Favor vertical splits over horizontal ones. Screens are usually wide.
|
||||||
(setq split-width-threshold 160
|
(setq split-width-threshold 160
|
||||||
split-height-threshold nil)
|
split-height-threshold nil)
|
||||||
|
|
||||||
|
@ -99,8 +99,8 @@
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
(setq use-package-verbose t)
|
(setq use-package-verbose t)
|
||||||
|
|
||||||
(use-package command-log-mode
|
(use-package command-log-mode
|
||||||
:commands command-log-mode)
|
:commands command-log-mode)
|
||||||
|
|
||||||
(use-package all-the-icons)
|
(use-package all-the-icons)
|
||||||
|
|
||||||
|
@ -217,6 +217,7 @@
|
||||||
"of" '(:ignore t :which-key "elfeed")
|
"of" '(:ignore t :which-key "elfeed")
|
||||||
"h" '(:ignore t :which-key "help")
|
"h" '(:ignore t :which-key "help")
|
||||||
"n" '(:ignore t :which-key "notes")
|
"n" '(:ignore t :which-key "notes")
|
||||||
|
"l" '(:ignore t :which-key "lsp")
|
||||||
"sp" '(:ignore t :which-key "passwords")
|
"sp" '(:ignore t :which-key "passwords")
|
||||||
"bs" '(consult-buffer :which-key "buffer search")
|
"bs" '(consult-buffer :which-key "buffer search")
|
||||||
"bd" '(kill-this-buffer :which-key "kill buffer")
|
"bd" '(kill-this-buffer :which-key "kill buffer")
|
||||||
|
@ -293,19 +294,19 @@
|
||||||
|
|
||||||
;; We need to fix selectrums minibuffer handling for Emacs 28
|
;; We need to fix selectrums minibuffer handling for Emacs 28
|
||||||
(defun selectrum--set-window-height (window &optional height)
|
(defun selectrum--set-window-height (window &optional height)
|
||||||
"Set window height of WINDOW to HEIGHT pixel.
|
"Set window height of WINDOW to HEIGHT pixel.
|
||||||
If HEIGHT is not given WINDOW will be updated to fit its content
|
If HEIGHT is not given WINDOW will be updated to fit its content
|
||||||
vertically."
|
vertically."
|
||||||
(let* ((lines (length
|
(let* ((lines (length
|
||||||
(split-string
|
(split-string
|
||||||
(overlay-get selectrum--candidates-overlay 'after-string)
|
(overlay-get selectrum--candidates-overlay 'after-string)
|
||||||
"\n" t)))
|
"\n" t)))
|
||||||
(dheight (or height
|
(dheight (or height
|
||||||
(* lines selectrum--line-height)))
|
(* lines selectrum--line-height)))
|
||||||
(wheight (window-pixel-height window))
|
(wheight (window-pixel-height window))
|
||||||
(window-resize-pixelwise t))
|
(window-resize-pixelwise t))
|
||||||
(window-resize
|
(window-resize
|
||||||
window (- dheight wheight) nil nil 'pixelwise)))
|
window (- dheight wheight) nil nil 'pixelwise)))
|
||||||
|
|
||||||
|
|
||||||
:general
|
:general
|
||||||
|
@ -340,10 +341,10 @@ vertically."
|
||||||
|
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
:bind (:map minibuffer-local-map
|
:bind (:map minibuffer-local-map
|
||||||
("C-M-a" . marginalia-cycle)
|
("C-M-a" . marginalia-cycle)
|
||||||
;; :map embark-general-map
|
;; :map embark-general-map
|
||||||
;; ("A" . marginalia-cycle)
|
;; ("A" . marginalia-cycle)
|
||||||
)
|
)
|
||||||
|
|
||||||
;; The :init configuration is always executed (Not lazy!)
|
;; The :init configuration is always executed (Not lazy!)
|
||||||
:init
|
:init
|
||||||
|
@ -361,17 +362,21 @@ vertically."
|
||||||
:after selectrum)
|
:after selectrum)
|
||||||
|
|
||||||
(use-package company
|
(use-package company
|
||||||
:defer 1
|
|
||||||
:config
|
:config
|
||||||
(global-company-mode +1)
|
(global-company-mode +1)
|
||||||
(setq company-dabbrev-other-buffers t
|
:custom
|
||||||
company-minimum-prefix-length 1)
|
(company-dabbrev-other-buffers t)
|
||||||
|
(company-minimum-prefix-length 1)
|
||||||
|
(company-idle-delay 0.2)
|
||||||
:general
|
:general
|
||||||
(general-define-key
|
(general-def '(normal insert) company-active-map
|
||||||
:states 'normal
|
"TAB" 'company-complete-selection
|
||||||
:keymaps '(company-search-map)
|
"RET" 'company-complete-selection)
|
||||||
"TAB" 'company-complete-selection)
|
(general-def '(normal insert) lsp-mode-map
|
||||||
)
|
"TAB" 'company-indent-or-complete-common))
|
||||||
|
|
||||||
|
;; (use-package company-box
|
||||||
|
;; :hook (company-mode . company-box-mode))
|
||||||
|
|
||||||
(use-package company-dict
|
(use-package company-dict
|
||||||
:after company)
|
:after company)
|
||||||
|
@ -381,6 +386,8 @@ vertically."
|
||||||
(setq yas-snippet-dirs (list (expand-file-name "yasnippets/" user-emacs-directory)))
|
(setq yas-snippet-dirs (list (expand-file-name "yasnippets/" user-emacs-directory)))
|
||||||
(yas-global-mode 1))
|
(yas-global-mode 1))
|
||||||
|
|
||||||
|
(use-package projectile)
|
||||||
|
|
||||||
(use-package avy
|
(use-package avy
|
||||||
:after evil)
|
:after evil)
|
||||||
|
|
||||||
|
@ -454,18 +461,29 @@ vertically."
|
||||||
:mode ("\\.lua\\'" . lua-mode))
|
:mode ("\\.lua\\'" . lua-mode))
|
||||||
|
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
|
:commands (lsp lsp-deferred)
|
||||||
|
:init
|
||||||
|
(setq lsp-keymap-prefix "C-c l")
|
||||||
:config
|
:config
|
||||||
(setq lsp-lens-enable t
|
(setq lsp-lens-enable t
|
||||||
lsp-signature-auto-activate nil))
|
lsp-signature-auto-activate nil
|
||||||
|
read-process-output-max (* 1024 1024))
|
||||||
|
(lsp-enable-which-key-integration t))
|
||||||
|
|
||||||
(use-package lsp-ui)
|
(use-package lsp-ui
|
||||||
|
:hook (lsp-mode . lsp-ui-mode)
|
||||||
|
:custom
|
||||||
|
(lsp-ui-doc-position 'bottom))
|
||||||
|
|
||||||
|
(use-package lsp-treemacs
|
||||||
|
:after lsp)
|
||||||
|
|
||||||
(use-package fennel-mode
|
(use-package fennel-mode
|
||||||
:mode ("\\.fnl\\'" . fennel-mode))
|
:mode ("\\.fnl\\'" . fennel-mode))
|
||||||
|
|
||||||
(use-package friar
|
(use-package friar
|
||||||
:straight (:host github :repo "warreq/friar" :branch "master"
|
:straight (:host github :repo "warreq/friar" :branch "master"
|
||||||
:files (:defaults "*.lua" "*.fnl"))
|
:files (:defaults "*.lua" "*.fnl"))
|
||||||
:after fennel-mode)
|
:after fennel-mode)
|
||||||
|
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
|
@ -516,9 +534,17 @@ vertically."
|
||||||
|
|
||||||
(use-package dart-mode
|
(use-package dart-mode
|
||||||
:mode ("\\.dart\\'" . dart-mode)
|
:mode ("\\.dart\\'" . dart-mode)
|
||||||
:config (add-hook 'dart-mode 'lsp))
|
:hook (dart-mode . lsp-deferred)
|
||||||
|
:general
|
||||||
|
(general-def 'normal dart-mode-map
|
||||||
|
"C-c r" 'lsp-dart-dap-flutter-hot-reload
|
||||||
|
"C-c R" 'lsp-dart-dap-flutter-hot-restart))
|
||||||
|
|
||||||
(use-package lsp-dart)
|
(use-package lsp-dart)
|
||||||
|
(use-package flutter
|
||||||
|
:after dart)
|
||||||
|
(use-package hover
|
||||||
|
:after dart)
|
||||||
|
|
||||||
(add-to-list 'exec-path "/opt/android-sdk/cmdline-tools/latest/bin")
|
(add-to-list 'exec-path "/opt/android-sdk/cmdline-tools/latest/bin")
|
||||||
|
|
||||||
|
@ -793,17 +819,17 @@ vertically."
|
||||||
:after org
|
:after org
|
||||||
:init
|
:init
|
||||||
(setq org-super-agenda-groups '((:name "Today"
|
(setq org-super-agenda-groups '((:name "Today"
|
||||||
:time-grid t
|
:time-grid t
|
||||||
:scheduled today)
|
:scheduled today)
|
||||||
(:name "Due Today"
|
(:name "Due Today"
|
||||||
:deadline today)
|
:deadline today)
|
||||||
(:name "Important"
|
(:name "Important"
|
||||||
:priority "A")
|
:priority "A")
|
||||||
(:name "Overdue"
|
(:name "Overdue"
|
||||||
:time-grid t
|
:time-grid t
|
||||||
:scheduled today)
|
:scheduled today)
|
||||||
(:name "Due soon"
|
(:name "Due soon"
|
||||||
:deadline future)))
|
:deadline future)))
|
||||||
:config
|
:config
|
||||||
(org-super-agenda-mode)
|
(org-super-agenda-mode)
|
||||||
(setq org-super-agenda-header-map nil))
|
(setq org-super-agenda-header-map nil))
|
||||||
|
@ -1310,20 +1336,20 @@ If on a:
|
||||||
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
|
(add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
|
||||||
|
|
||||||
(setq eshell-command-aliases-list
|
(setq eshell-command-aliases-list
|
||||||
'(("ls" "exa $1")
|
'(("ls" "exa $1")
|
||||||
("la" "exa -la $1")
|
("la" "exa -la $1")
|
||||||
("q" "exit")
|
("q" "exit")
|
||||||
("f" "find-file $1")
|
("f" "find-file $1")
|
||||||
("ff" "find-file $1")
|
("ff" "find-file $1")
|
||||||
("d" "dired $1")
|
("d" "dired $1")
|
||||||
("bd" "eshell-up $1")
|
("bd" "eshell-up $1")
|
||||||
("rg" "rg --color=always $*")
|
("rg" "rg --color=always $*")
|
||||||
("ll" "ls -lah $*")
|
("ll" "ls -lah $*")
|
||||||
("gg" "magit-status")
|
("gg" "magit-status")
|
||||||
("clear" "clear-scrollback")
|
("clear" "clear-scrollback")
|
||||||
("!c" "eshell-previous-input 2")
|
("!c" "eshell-previous-input 2")
|
||||||
("yay" "paru $1")
|
("yay" "paru $1")
|
||||||
("yeet" "paru -Rns $1")))
|
("yeet" "paru -Rns $1")))
|
||||||
|
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
|
@ -1338,8 +1364,8 @@ If on a:
|
||||||
|
|
||||||
(use-package pdf-tools
|
(use-package pdf-tools
|
||||||
:straight (:host github
|
:straight (:host github
|
||||||
:repo "flatwhatson/pdf-tools"
|
:repo "flatwhatson/pdf-tools"
|
||||||
:branch "fix-macros")
|
:branch "fix-macros")
|
||||||
:defer 1
|
:defer 1
|
||||||
:config
|
:config
|
||||||
(pdf-tools-install)
|
(pdf-tools-install)
|
||||||
|
@ -1498,11 +1524,11 @@ interfere with the default `bongo-playlist-buffer'."
|
||||||
transmission-files-mode
|
transmission-files-mode
|
||||||
transmission-info-mode
|
transmission-info-mode
|
||||||
transmission-peers-mode)))
|
transmission-peers-mode)))
|
||||||
:general
|
:general
|
||||||
(chris/leader-keys
|
(chris/leader-keys
|
||||||
:states 'normal
|
:states 'normal
|
||||||
:keymaps 'override
|
:keymaps 'override
|
||||||
"ot" 'transmission))
|
"ot" 'transmission))
|
||||||
|
|
||||||
(use-package auth-source-pass
|
(use-package auth-source-pass
|
||||||
:defer 1
|
:defer 1
|
||||||
|
|
Loading…
Reference in a new issue