Adding pdf-tools
This commit is contained in:
		
							parent
							
								
									b51776f0d2
								
							
						
					
					
						commit
						a59b853c75
					
				
					 2 changed files with 77 additions and 22 deletions
				
			
		
							
								
								
									
										57
									
								
								README.org
									
										
									
									
									
								
							
							
						
						
									
										57
									
								
								README.org
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -15,6 +15,7 @@
 | 
			
		|||
  - [[#format][Format]]
 | 
			
		||||
  - [[#org-mode][Org Mode]]
 | 
			
		||||
  - [[#magit][Magit]]
 | 
			
		||||
  - [[#pdf-tools][PDF-Tools]]
 | 
			
		||||
  - [[#garbage-collection][Garbage Collection]]
 | 
			
		||||
- [[#early-init][Early Init]]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -89,6 +90,11 @@ Then let's make sure line-numbers are relative and on. And let's turn on visual-
 | 
			
		|||
  (global-visual-line-mode +1)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Let's make doc-view better
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(setq doc-view-resolution 192)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Also, real quick let's make sure that ~<escape>~ works as the same as ~<C-g>~
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
 | 
			
		||||
| 
						 | 
				
			
			@ -200,13 +206,14 @@ This evil-collection package includes a lot of other evil based things.
 | 
			
		|||
   "n" '(:ignore t :which-key "notes")
 | 
			
		||||
   "bs" '(consult-buffer :which-key "buffer search")
 | 
			
		||||
   "bd" '(kill-this-buffer :which-key "kill buffer")
 | 
			
		||||
   "nf" '(org-roam-find-file :which-key "org roam ff")
 | 
			
		||||
   "tt" '(consult-theme :which-key "choose theme")
 | 
			
		||||
   "ff" '(find-file :which-key "find file")
 | 
			
		||||
   "fr" '(consult-recent-file :which-key "recent file")
 | 
			
		||||
   "fs" '(save-buffer :which-key "save")
 | 
			
		||||
   "hf" '(helpful-callable :which-key "describe-function")
 | 
			
		||||
   "hf" '(helpful-function :which-key "describe-function")
 | 
			
		||||
   "hv" '(helpful-variable :which-key "describe-variable")
 | 
			
		||||
   "hk" '(helpful-key :which-key "describe-key")
 | 
			
		||||
   "hi" '(info :which-key "info manual")
 | 
			
		||||
   "od" '(dired-jump :which-key "dired jump")
 | 
			
		||||
   "ss" '(consult-line :which-key "consult search")
 | 
			
		||||
   "ww" '(other-window :which-key "other window")
 | 
			
		||||
| 
						 | 
				
			
			@ -215,16 +222,24 @@ This evil-collection package includes a lot of other evil based things.
 | 
			
		|||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
    (use-package evil-escape
 | 
			
		||||
      :after evil
 | 
			
		||||
      :init (evil-escape-mode +1)
 | 
			
		||||
      :config (setq evil-escape-key-sequence "fd"))
 | 
			
		||||
(use-package evil-escape
 | 
			
		||||
  :after evil
 | 
			
		||||
  :init (evil-escape-mode +1)
 | 
			
		||||
  :config
 | 
			
		||||
  (setq evil-escape-key-sequence "fd"
 | 
			
		||||
	evil-escape-delay 0.3))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Undo-Tree
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(use-package undo-tree
 | 
			
		||||
  :defer 1)
 | 
			
		||||
  :defer 1
 | 
			
		||||
  :config
 | 
			
		||||
  (global-undo-tree-mode +1)
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def 'normal undo-tree-visualize-mode-map
 | 
			
		||||
   "j" 'undo-tree-visualize-redo
 | 
			
		||||
   "k" 'undo-tree-visualize-undo))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Better UI
 | 
			
		||||
| 
						 | 
				
			
			@ -462,6 +477,9 @@ This is the use-package definition with a lot of customization. Need to setup au
 | 
			
		|||
    (setq org-imenu-depth 4)
 | 
			
		||||
    (setq org-odt-styles-file "/home/chris/org/style.odt")
 | 
			
		||||
 | 
			
		||||
    (setq org-export-with-toc nil)
 | 
			
		||||
    (setq org-export-with-author nil)
 | 
			
		||||
    
 | 
			
		||||
    (setq org-todo-keywords
 | 
			
		||||
          '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
 | 
			
		||||
            (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")))
 | 
			
		||||
| 
						 | 
				
			
			@ -471,8 +489,8 @@ This is the use-package definition with a lot of customization. Need to setup au
 | 
			
		|||
          '("/home/chris/org/DMPREADME.org" "/home/chris/org/DMPTODO.org" "/home/chris/org/inbox.org" "/home/chris/org/notes.org" "/home/chris/org/repetition.org" "/home/chris/org/tasks.org" "/home/chris/org/tfc_plans.org" "/home/chris/org/ministry_team.org" "/home/chris/org/todo.org" "/home/chris/org/newsletter.org"))
 | 
			
		||||
    (setq org-id-method 'ts)
 | 
			
		||||
    :general
 | 
			
		||||
    (chris/leader-keys "o a" 'org-agenda)
 | 
			
		||||
    (chris/leader-keys "c" 'org-capture))
 | 
			
		||||
    (chris/leader-keys "o a" 'org-agenda
 | 
			
		||||
      "c" 'org-capture))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
We need to create a lesson capture function to find our lesson files differently each time we run our TFC plan capture.
 | 
			
		||||
| 
						 | 
				
			
			@ -537,7 +555,11 @@ We also need to setup some capture templates to use some specific setups with my
 | 
			
		|||
          ("b" "biblical daily" plain #'org-roam-capture--get-point ""
 | 
			
		||||
           :immediate-finish t
 | 
			
		||||
           :file-name "%<%Y-%m-%d>-bib"
 | 
			
		||||
           :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun"))))
 | 
			
		||||
           :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
   "nf" '(org-roam-find-file :which-key "org roam ff")
 | 
			
		||||
   "nr" 'org-roam))
 | 
			
		||||
 | 
			
		||||
#+END_SRC
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -571,6 +593,18 @@ Use magit, because why wouldn't you? duh!
 | 
			
		|||
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** PDF-Tools
 | 
			
		||||
Let's use pdf-tools for a lot better interaction with pdfs.
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
(use-package pdf-tools
 | 
			
		||||
  :straight (:host github
 | 
			
		||||
		 :repo "flatwhatson/pdf-tools"
 | 
			
		||||
		 :branch "fix-macros")
 | 
			
		||||
  :defer 1
 | 
			
		||||
  :config
 | 
			
		||||
  (pdf-tools-install))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
** Garbage Collection
 | 
			
		||||
 | 
			
		||||
We set the =gc-cons-threshold= variable to really high, now lets set it back low to make sure emacs performs properly.
 | 
			
		||||
| 
						 | 
				
			
			@ -578,9 +612,6 @@ We set the =gc-cons-threshold= variable to really high, now lets set it back low
 | 
			
		|||
(setq gc-cons-threshold 2000000)
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
#+begin_src emacs-lisp
 | 
			
		||||
 | 
			
		||||
#+end_src
 | 
			
		||||
* Early Init
 | 
			
		||||
:PROPERTIES:
 | 
			
		||||
:header-args: emacs-lisp :tangle early-init.el
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										42
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										42
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -32,6 +32,8 @@
 | 
			
		|||
(display-line-numbers-mode +1)
 | 
			
		||||
(global-visual-line-mode +1)
 | 
			
		||||
 | 
			
		||||
(setq doc-view-resolution 192)
 | 
			
		||||
 | 
			
		||||
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
 | 
			
		||||
 | 
			
		||||
(defvar bootstrap-version)
 | 
			
		||||
| 
						 | 
				
			
			@ -115,13 +117,14 @@
 | 
			
		|||
   "n" '(:ignore t :which-key "notes")
 | 
			
		||||
   "bs" '(consult-buffer :which-key "buffer search")
 | 
			
		||||
   "bd" '(kill-this-buffer :which-key "kill buffer")
 | 
			
		||||
   "nf" '(org-roam-find-file :which-key "org roam ff")
 | 
			
		||||
   "tt" '(consult-theme :which-key "choose theme")
 | 
			
		||||
   "ff" '(find-file :which-key "find file")
 | 
			
		||||
   "fr" '(consult-recent-file :which-key "recent file")
 | 
			
		||||
   "fs" '(save-buffer :which-key "save")
 | 
			
		||||
   "hf" '(helpful-callable :which-key "describe-function")
 | 
			
		||||
   "hf" '(helpful-function :which-key "describe-function")
 | 
			
		||||
   "hv" '(helpful-variable :which-key "describe-variable")
 | 
			
		||||
   "hk" '(helpful-key :which-key "describe-key")
 | 
			
		||||
   "hi" '(info :which-key "info manual")
 | 
			
		||||
   "od" '(dired-jump :which-key "dired jump")
 | 
			
		||||
   "ss" '(consult-line :which-key "consult search")
 | 
			
		||||
   "ww" '(other-window :which-key "other window")
 | 
			
		||||
| 
						 | 
				
			
			@ -131,10 +134,18 @@
 | 
			
		|||
(use-package evil-escape
 | 
			
		||||
  :after evil
 | 
			
		||||
  :init (evil-escape-mode +1)
 | 
			
		||||
  :config (setq evil-escape-key-sequence "fd"))
 | 
			
		||||
  :config
 | 
			
		||||
  (setq evil-escape-key-sequence "fd"
 | 
			
		||||
	evil-escape-delay 0.3))
 | 
			
		||||
 | 
			
		||||
(use-package undo-tree
 | 
			
		||||
  :defer 1)
 | 
			
		||||
  :defer 1
 | 
			
		||||
  :config
 | 
			
		||||
  (global-undo-tree-mode +1)
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def 'normal undo-tree-visualize-mode-map
 | 
			
		||||
   "j" 'undo-tree-visualize-redo
 | 
			
		||||
   "k" 'undo-tree-visualize-undo))
 | 
			
		||||
 | 
			
		||||
(use-package olivetti
 | 
			
		||||
  :after org
 | 
			
		||||
| 
						 | 
				
			
			@ -265,6 +276,9 @@
 | 
			
		|||
    (setq org-imenu-depth 4)
 | 
			
		||||
    (setq org-odt-styles-file "/home/chris/org/style.odt")
 | 
			
		||||
 | 
			
		||||
    (setq org-export-with-toc nil)
 | 
			
		||||
    (setq org-export-with-author nil)
 | 
			
		||||
    
 | 
			
		||||
    (setq org-todo-keywords
 | 
			
		||||
          '((sequence "TODO(t)" "PROJ(p)" "STRT(s)" "WAIT(w)" "HOLD(h)" "|" "DONE(d)" "CNCL(c)")
 | 
			
		||||
            (sequence "[ ](T)" "[-](S)" "[?](W)" "|" "[X](D)")))
 | 
			
		||||
| 
						 | 
				
			
			@ -274,8 +288,8 @@
 | 
			
		|||
          '("/home/chris/org/DMPREADME.org" "/home/chris/org/DMPTODO.org" "/home/chris/org/inbox.org" "/home/chris/org/notes.org" "/home/chris/org/repetition.org" "/home/chris/org/tasks.org" "/home/chris/org/tfc_plans.org" "/home/chris/org/ministry_team.org" "/home/chris/org/todo.org" "/home/chris/org/newsletter.org"))
 | 
			
		||||
    (setq org-id-method 'ts)
 | 
			
		||||
    :general
 | 
			
		||||
    (chris/leader-keys "o a" 'org-agenda)
 | 
			
		||||
    (chris/leader-keys "c" 'org-capture))
 | 
			
		||||
    (chris/leader-keys "o a" 'org-agenda
 | 
			
		||||
      "c" 'org-capture))
 | 
			
		||||
 | 
			
		||||
(defun chris/org-roam-capture-lesson-file ()
 | 
			
		||||
  "Function to return the lesson file that is needed for TFC plan capture and move to correct position for plan insertion"
 | 
			
		||||
| 
						 | 
				
			
			@ -327,7 +341,11 @@
 | 
			
		|||
          ("b" "biblical daily" plain #'org-roam-capture--get-point ""
 | 
			
		||||
           :immediate-finish t
 | 
			
		||||
           :file-name "%<%Y-%m-%d>-bib"
 | 
			
		||||
           :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun"))))
 | 
			
		||||
           :head "#+TITLE: %<%Y-%m-%d> - Biblical\n#+AUTHOR: Chris Cochrun")))
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
   "nf" '(org-roam-find-file :which-key "org roam ff")
 | 
			
		||||
   "nr" 'org-roam))
 | 
			
		||||
 | 
			
		||||
(use-package org-roam-server
 | 
			
		||||
  :config
 | 
			
		||||
| 
						 | 
				
			
			@ -350,6 +368,12 @@
 | 
			
		|||
  :custom
 | 
			
		||||
  (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))
 | 
			
		||||
 | 
			
		||||
(use-package pdf-tools
 | 
			
		||||
  :straight (:host github
 | 
			
		||||
		 :repo "flatwhatson/pdf-tools"
 | 
			
		||||
		 :branch "fix-macros")
 | 
			
		||||
  :defer 1
 | 
			
		||||
  :config
 | 
			
		||||
  (pdf-tools-install))
 | 
			
		||||
 | 
			
		||||
(setq gc-cons-threshold 2000000)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue