Merge branch 'master' of gitlab.com:chriscochrun/dotemacs
This commit is contained in:
commit
d5146d9bd5
66
README.org
66
README.org
|
@ -53,31 +53,32 @@ As of right now I haven't fully setup my early-init file, this does not export i
|
||||||
#+PROPERTY: header-args:emacs-lisp :tangle init.el
|
#+PROPERTY: header-args:emacs-lisp :tangle init.el
|
||||||
** Set basic UI config
|
** Set basic UI config
|
||||||
Let's start by making some basic ui changes like turning off the scrollbar, toolbar, menu, tooltips, and setting our font and some things.
|
Let's start by making some basic ui changes like turning off the scrollbar, toolbar, menu, tooltips, and setting our font and some things.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
;;; init.el -*- lexical-binding: t; -*-
|
;;; init.el -*- lexical-binding: t; -*-
|
||||||
(setq inhibit-startup-message t)
|
(setq inhibit-startup-message t)
|
||||||
|
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(tooltip-mode -1)
|
(tooltip-mode -1)
|
||||||
(set-fringe-mode 10)
|
(set-fringe-mode 10)
|
||||||
|
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(blink-cursor-mode -1)
|
(blink-cursor-mode -1)
|
||||||
(column-number-mode +1)
|
(column-number-mode +1)
|
||||||
|
|
||||||
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 120)
|
(if (string-equal (system-name) "chris-linuxlaptop")
|
||||||
(setq display-line-numbers-type 'relative)
|
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 240)
|
||||||
|
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 120))
|
||||||
|
(setq display-line-numbers-type 'relative)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Let's bootstrap straight.el
|
** Let's bootstrap straight.el
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
|
|
||||||
(defvar bootstrap-version)
|
(defvar bootstrap-version)
|
||||||
(let ((bootstrap-file
|
(let ((bootstrap-file
|
||||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||||
|
@ -96,15 +97,15 @@ Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
||||||
(straight-use-package 'use-package)
|
(straight-use-package 'use-package)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package command-log-mode)
|
(use-package command-log-mode)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package all-the-icons)
|
(use-package all-the-icons)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
|
@ -114,18 +115,18 @@ Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
||||||
all-the-icons-scale-factor 0.9))
|
all-the-icons-scale-factor 0.9))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package doom-themes
|
(use-package doom-themes
|
||||||
:ensure t
|
:ensure t
|
||||||
:init (load-theme 'doom-snazzy t))
|
:init (load-theme 'doom-snazzy t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook (prog-mode . rainbow-delimiters-mode))
|
:hook (prog-mode . rainbow-delimiters-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package which-key
|
(use-package which-key
|
||||||
:init (which-key-mode)
|
:init (which-key-mode)
|
||||||
:config
|
:config
|
||||||
|
@ -134,7 +135,7 @@ Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
|
||||||
|
|
||||||
** Keybindings
|
** Keybindings
|
||||||
There are two major packages we need to get the functionality I desire. Evil and general.
|
There are two major packages we need to get the functionality I desire. Evil and general.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package evil
|
(use-package evil
|
||||||
:init
|
:init
|
||||||
(setq evil-want-integration t
|
(setq evil-want-integration t
|
||||||
|
@ -147,13 +148,13 @@ There are two major packages we need to get the functionality I desire. Evil and
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
This evil-collection package includes a lot of other evil based things.
|
This evil-collection package includes a lot of other evil based things.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package evil-collection
|
(use-package evil-collection
|
||||||
:after evil
|
:after evil
|
||||||
:config (evil-collection-init))
|
:config (evil-collection-init))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package general
|
(use-package general
|
||||||
:init
|
:init
|
||||||
(general-evil-setup)
|
(general-evil-setup)
|
||||||
|
@ -178,7 +179,7 @@ This evil-collection package includes a lot of other evil based things.
|
||||||
))
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package evil-escape
|
(use-package evil-escape
|
||||||
:after evil
|
:after evil
|
||||||
:init (evil-escape-mode +1)
|
:init (evil-escape-mode +1)
|
||||||
|
@ -189,7 +190,7 @@ This evil-collection package includes a lot of other evil based things.
|
||||||
*** SELECTRUM
|
*** SELECTRUM
|
||||||
I prefer selectrum over Ivy or Helm for completions. It is using the basic completing read system and therefore it is more inline with basic emacs. Also, let's add prescient to be able to filter selectrum well. We'll add some keybindings too for easier navigation on the home row.
|
I prefer selectrum over Ivy or Helm for completions. It is using the basic completing read system and therefore it is more inline with basic emacs. Also, let's add prescient to be able to filter selectrum well. We'll add some keybindings too for easier navigation on the home row.
|
||||||
|
|
||||||
#+BEGIN_SRC elisp :tangle yes
|
#+BEGIN_SRC elisp
|
||||||
(use-package selectrum
|
(use-package selectrum
|
||||||
:init
|
:init
|
||||||
(selectrum-mode +1)
|
(selectrum-mode +1)
|
||||||
|
@ -205,13 +206,13 @@ I prefer selectrum over Ivy or Helm for completions. It is using the basic compl
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
We need prescient so we can have smarter sorting and filtering by default. Ontop of that, setting persistance in prescient makes it get better over time.
|
We need prescient so we can have smarter sorting and filtering by default. Ontop of that, setting persistance in prescient makes it get better over time.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package prescient
|
(use-package prescient
|
||||||
:config
|
:config
|
||||||
(prescient-persist-mode +1))
|
(prescient-persist-mode +1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+BEGIN_SRC elisp :tangle yes
|
#+BEGIN_SRC elisp
|
||||||
(use-package selectrum-prescient
|
(use-package selectrum-prescient
|
||||||
:init
|
:init
|
||||||
(selectrum-prescient-mode +1))
|
(selectrum-prescient-mode +1))
|
||||||
|
@ -246,7 +247,6 @@ Here we use posframe to make a prettier minibuffer. Posframe will work with EXWM
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
| exwm-input--on-minibuffer-exit | posframe-delete-all |
|
|
||||||
|
|
||||||
This is similar but using mini-frame. Mini-frame works well, but not if using exwm. With exwm the X windows get displayed above the mini-frame, so the minibuffer isn't visible. Best to let Selectrum or Consult push the frame up and view the vertical completions below the frame.
|
This is similar but using mini-frame. Mini-frame works well, but not if using exwm. With exwm the X windows get displayed above the mini-frame, so the minibuffer isn't visible. Best to let Selectrum or Consult push the frame up and view the vertical completions below the frame.
|
||||||
#+BEGIN_SRC elisp :tangle no
|
#+BEGIN_SRC elisp :tangle no
|
||||||
|
@ -280,7 +280,7 @@ This is similar but using mini-frame. Mini-frame works well, but not if using ex
|
||||||
|
|
||||||
*** CONSULT
|
*** CONSULT
|
||||||
Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searching functions), lets set some of them in the keymap so they are easily used.
|
Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searching functions), lets set some of them in the keymap so they are easily used.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package consult)
|
(use-package consult)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searc
|
||||||
|
|
||||||
*** MARGINALIA
|
*** MARGINALIA
|
||||||
Marginalia makes for some great decoration to our minibuffer completion items. Works great with Selectrum which does not have this out of the box.
|
Marginalia makes for some great decoration to our minibuffer completion items. Works great with Selectrum which does not have this out of the box.
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
;; Enable richer annotations using the Marginalia package
|
;; Enable richer annotations using the Marginalia package
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
:bind (:map minibuffer-local-map
|
:bind (:map minibuffer-local-map
|
||||||
|
@ -317,14 +317,14 @@ Marginalia makes for some great decoration to our minibuffer completion items. W
|
||||||
|
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
** Help
|
** Help
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package helpful
|
(use-package helpful
|
||||||
:config
|
:config
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
** Org Mode
|
** Org Mode
|
||||||
Need to setup auto tangle yes
|
Need to setup auto tangle yes
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp
|
||||||
(use-package org
|
(use-package org
|
||||||
:config
|
:config
|
||||||
(setq org-startup-indented t)
|
(setq org-startup-indented t)
|
||||||
|
|
38
init.el
38
init.el
|
@ -1,17 +1,19 @@
|
||||||
;;; init.el -*- lexical-binding: t; -*-
|
;;; init.el -*- lexical-binding: t; -*-
|
||||||
(setq inhibit-startup-message t)
|
(setq inhibit-startup-message t)
|
||||||
|
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
(tooltip-mode -1)
|
(tooltip-mode -1)
|
||||||
(set-fringe-mode 10)
|
(set-fringe-mode 10)
|
||||||
|
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(blink-cursor-mode -1)
|
(blink-cursor-mode -1)
|
||||||
(column-number-mode +1)
|
(column-number-mode +1)
|
||||||
|
|
||||||
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 120)
|
(if (string-equal (system-name) "chris-linuxlaptop")
|
||||||
(setq display-line-numbers-type 'relative)
|
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 240)
|
||||||
|
(set-face-attribute 'default nil :font "VictorMono Nerd Font" :height 120))
|
||||||
|
(setq display-line-numbers-type 'relative)
|
||||||
|
|
||||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
||||||
|
|
||||||
|
@ -134,19 +136,3 @@
|
||||||
(org-babel-tangle))))
|
(org-babel-tangle))))
|
||||||
|
|
||||||
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config))))
|
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config))))
|
||||||
|
|
||||||
(use-package selectrum
|
|
||||||
:init
|
|
||||||
(selectrum-mode +1)
|
|
||||||
:config
|
|
||||||
(general-define-key
|
|
||||||
:keymaps 'selectrum-minibuffer-map
|
|
||||||
"C-j" 'selectrum-next-candidate
|
|
||||||
"C-k" 'selectrum-previous-candidate
|
|
||||||
"C-S-j" 'selectrum-goto-end
|
|
||||||
"C-S-k" 'selectrum-goto-beginning
|
|
||||||
"TAB" 'selectrum-insert-current-candidate))
|
|
||||||
|
|
||||||
(use-package selectrum-prescient
|
|
||||||
:init
|
|
||||||
(selectrum-prescient-mode +1))
|
|
||||||
|
|
Loading…
Reference in a new issue