feat[lsp,org,cite]: Added better citation icons
I added some snazzy icons to citar. Corrected several org-latex classes to avoid hyperlink highlights. Added (potentially) better LSP settings with syntax flags
This commit is contained in:
parent
0073afd67f
commit
f5caccd7f7
66
config.el
66
config.el
@ -15,10 +15,6 @@
|
|||||||
(setq fancy-splash-image (concat doom-private-dir "emacs.png"))
|
(setq fancy-splash-image (concat doom-private-dir "emacs.png"))
|
||||||
|
|
||||||
(map! :desc "Switch to normal mode" :i "C-c" #'evil-normal-state)
|
(map! :desc "Switch to normal mode" :i "C-c" #'evil-normal-state)
|
||||||
(use-package! noCtrlC
|
|
||||||
:after org-mode)
|
|
||||||
|
|
||||||
(setq org-pretty-entities 0)
|
|
||||||
|
|
||||||
(defun bash ()
|
(defun bash ()
|
||||||
(interactive)
|
(interactive)
|
||||||
@ -579,8 +575,6 @@ If nil it defaults to `split-string-default-separators', normally
|
|||||||
(citar-file-note-extensions '(".org"))
|
(citar-file-note-extensions '(".org"))
|
||||||
(org-cite-global-bibliography '("~/org/references.bib"))
|
(org-cite-global-bibliography '("~/org/references.bib"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(org-cite-csl-styles-dir
|
(org-cite-csl-styles-dir
|
||||||
(expand-file-name "~/Zotero/styles/"))
|
(expand-file-name "~/Zotero/styles/"))
|
||||||
(org-cite-export-processors
|
(org-cite-export-processors
|
||||||
@ -589,15 +583,61 @@ If nil it defaults to `split-string-default-separators', normally
|
|||||||
:hook
|
:hook
|
||||||
(LaTeX-mode . citar-capf-setup)
|
(LaTeX-mode . citar-capf-setup)
|
||||||
(org-mode . citar-capf-setup))
|
(org-mode . citar-capf-setup))
|
||||||
(after! org-mode
|
|
||||||
(org-cite-global-bibliography '("~/org/references.bib"))
|
|
||||||
)
|
|
||||||
|
|
||||||
(citar-org-roam-mode)
|
(citar-org-roam-mode)
|
||||||
|
|
||||||
|
(after! citar
|
||||||
|
(setq citar-indicator-files-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-file_o"
|
||||||
|
:face 'nerd-icons-green
|
||||||
|
:v-adjust -0.1)
|
||||||
|
:function #'citar-has-files
|
||||||
|
:padding " " ; need this because the default padding is too low for these icons
|
||||||
|
:tag "has:files"))
|
||||||
|
|
||||||
|
(setq citar-indicator-links-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-link"
|
||||||
|
:face 'nerd-icons-orange
|
||||||
|
:v-adjust 0.01)
|
||||||
|
:function #'citar-has-links
|
||||||
|
:padding " "
|
||||||
|
:tag "has:links"))
|
||||||
|
|
||||||
|
(setq citar-indicator-notes-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-codicon
|
||||||
|
"nf-cod-note"
|
||||||
|
:face 'nerd-icons-blue
|
||||||
|
:v-adjust -0.3)
|
||||||
|
:function #'citar-has-notes
|
||||||
|
:padding " "
|
||||||
|
:tag "has:notes"))
|
||||||
|
|
||||||
|
(setq citar-indicator-cited-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-circle_o"
|
||||||
|
:face 'nerd-icon-green)
|
||||||
|
:function #'citar-is-cited
|
||||||
|
:padding " "
|
||||||
|
:tag "is:cited"))
|
||||||
|
|
||||||
|
(setq citar-indicators
|
||||||
|
(list citar-indicator-files-icons
|
||||||
|
citar-indicator-links-icons
|
||||||
|
citar-indicator-notes-icons
|
||||||
|
citar-indicator-cited-icons)))
|
||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("student-apa7"
|
'("student-apa7"
|
||||||
"\\documentclass[stu]{apa7}"
|
"\\documentclass[stu]{apa7}
|
||||||
|
\\hypersetup{hidelinks}
|
||||||
|
\\usepackage{times}
|
||||||
|
[NO-DEFAULT-PACKAGES]
|
||||||
|
[NO-PACKAGES]"
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
@ -618,7 +658,9 @@ If nil it defaults to `split-string-default-separators', normally
|
|||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("student-mla"
|
'("student-mla"
|
||||||
"\\documentclass[stu]{mla}"
|
"\\documentclass[stu]{mla}
|
||||||
|
\\hypersetup{hidelinks}
|
||||||
|
\\usepackage{times} "
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
|
78
config.org
78
config.org
@ -45,13 +45,8 @@ Set a sweet splash image
|
|||||||
I want a non-ESC way to get back to normal mode:
|
I want a non-ESC way to get back to normal mode:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(map! :desc "Switch to normal mode" :i "C-c" #'evil-normal-state)
|
(map! :desc "Switch to normal mode" :i "C-c" #'evil-normal-state)
|
||||||
(use-package! noCtrlC
|
|
||||||
:after org-mode)
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(setq org-pretty-entities 0)
|
|
||||||
#+END_SRC
|
|
||||||
* Terminal setup
|
* Terminal setup
|
||||||
I like to just use bash:
|
I like to just use bash:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
@ -785,8 +780,11 @@ We'll want a handy shortcut for this.
|
|||||||
: /home/user/.config/doom/
|
: /home/user/.config/doom/
|
||||||
|
|
||||||
** Automatic Citations with *citar* and *org-cite*
|
** Automatic Citations with *citar* and *org-cite*
|
||||||
Citar is a sweet little package for managing citations. Right here we'll set it up
|
Citar is a sweet little package for managing citations.
|
||||||
We want a general bibliography file, a styles directory, and a default set of styles.
|
We want a general [[file:~/org/references.bib][bibliography file]], a [[file:~/Zotero/styles/][styles directory]],
|
||||||
|
and a default set of styles.
|
||||||
|
*** Citar setup
|
||||||
|
First of all, we must configure citar.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package! citar
|
(use-package! citar
|
||||||
:ensure t
|
:ensure t
|
||||||
@ -796,8 +794,6 @@ We want a general bibliography file, a styles directory, and a default set of st
|
|||||||
(citar-file-note-extensions '(".org"))
|
(citar-file-note-extensions '(".org"))
|
||||||
(org-cite-global-bibliography '("~/org/references.bib"))
|
(org-cite-global-bibliography '("~/org/references.bib"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(org-cite-csl-styles-dir
|
(org-cite-csl-styles-dir
|
||||||
(expand-file-name "~/Zotero/styles/"))
|
(expand-file-name "~/Zotero/styles/"))
|
||||||
(org-cite-export-processors
|
(org-cite-export-processors
|
||||||
@ -806,20 +802,70 @@ We want a general bibliography file, a styles directory, and a default set of st
|
|||||||
:hook
|
:hook
|
||||||
(LaTeX-mode . citar-capf-setup)
|
(LaTeX-mode . citar-capf-setup)
|
||||||
(org-mode . citar-capf-setup))
|
(org-mode . citar-capf-setup))
|
||||||
(after! org-mode
|
|
||||||
(org-cite-global-bibliography '("~/org/references.bib"))
|
|
||||||
)
|
|
||||||
|
|
||||||
(citar-org-roam-mode)
|
(citar-org-roam-mode)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
*** Icons for some prettification
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(after! citar
|
||||||
|
(setq citar-indicator-files-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-file_o"
|
||||||
|
:face 'nerd-icons-green
|
||||||
|
:v-adjust -0.1)
|
||||||
|
:function #'citar-has-files
|
||||||
|
:padding " " ; need this because the default padding is too low for these icons
|
||||||
|
:tag "has:files"))
|
||||||
|
|
||||||
|
(setq citar-indicator-links-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-link"
|
||||||
|
:face 'nerd-icons-orange
|
||||||
|
:v-adjust 0.01)
|
||||||
|
:function #'citar-has-links
|
||||||
|
:padding " "
|
||||||
|
:tag "has:links"))
|
||||||
|
|
||||||
|
(setq citar-indicator-notes-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-codicon
|
||||||
|
"nf-cod-note"
|
||||||
|
:face 'nerd-icons-blue
|
||||||
|
:v-adjust -0.3)
|
||||||
|
:function #'citar-has-notes
|
||||||
|
:padding " "
|
||||||
|
:tag "has:notes"))
|
||||||
|
|
||||||
|
(setq citar-indicator-cited-icons
|
||||||
|
(citar-indicator-create
|
||||||
|
:symbol (nerd-icons-faicon
|
||||||
|
"nf-fa-circle_o"
|
||||||
|
:face 'nerd-icon-green)
|
||||||
|
:function #'citar-is-cited
|
||||||
|
:padding " "
|
||||||
|
:tag "is:cited"))
|
||||||
|
|
||||||
|
(setq citar-indicators
|
||||||
|
(list citar-indicator-files-icons
|
||||||
|
citar-indicator-links-icons
|
||||||
|
citar-indicator-notes-icons
|
||||||
|
citar-indicator-cited-icons)))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
|
||||||
** Scholarly Writing Environment with Org-mode
|
** Scholarly Writing Environment with Org-mode
|
||||||
I like to keep formatting simple.
|
I like to keep formatting simple.
|
||||||
Let's use a package or two to set a decent document class:
|
Let's use a package or two to set a decent document class:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("student-apa7"
|
'("student-apa7"
|
||||||
"\\documentclass[stu]{apa7}"
|
"\\documentclass[stu]{apa7}
|
||||||
|
\\hypersetup{hidelinks}
|
||||||
|
\\usepackage{times}
|
||||||
|
[NO-DEFAULT-PACKAGES]
|
||||||
|
[NO-PACKAGES]"
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
@ -840,7 +886,9 @@ Let's use a package or two to set a decent document class:
|
|||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("student-mla"
|
'("student-mla"
|
||||||
"\\documentclass[stu]{mla}"
|
"\\documentclass[stu]{mla}
|
||||||
|
\\hypersetup{hidelinks}
|
||||||
|
\\usepackage{times} "
|
||||||
("\\section{%s}" . "\\section*{%s}")
|
("\\section{%s}" . "\\section*{%s}")
|
||||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
|
6
init.el
6
init.el
@ -80,13 +80,13 @@
|
|||||||
;;vterm ; the best terminal emulation in Emacs
|
;;vterm ; the best terminal emulation in Emacs
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
(syntax +flymake +childframe) ; tasing you for every semicolon you forget
|
||||||
(spell +flyspell +everywhere) ; tasing you for misspelling mispelling
|
(spell +flyspell +everywhere) ; tasing you for misspelling mispelling
|
||||||
grammar ; tasing grammar mistake every you make
|
grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
;;ansible
|
;;ansible
|
||||||
biblio ; Writes a PhD for you (citation needed)
|
(biblio +icons) ; Writes a PhD for you (citation needed)
|
||||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||||
;;direnv
|
;;direnv
|
||||||
;;docker
|
;;docker
|
||||||
@ -153,7 +153,7 @@
|
|||||||
;;nim ; python + lisp at the speed of c
|
;;nim ; python + lisp at the speed of c
|
||||||
;;nix ; I hereby declare "nix geht mehr!"
|
;;nix ; I hereby declare "nix geht mehr!"
|
||||||
;;ocaml ; an objective camel
|
;;ocaml ; an objective camel
|
||||||
(org +roam2 +gnuplot +hugo +pomodoro +noter) ; organize your plain life in plain text
|
(org +roam2 +gnuplot +hugo +pomodoro +noter +present +pretty) ; organize your plain life in plain text
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
;;purescript ; javascript, but functional
|
;;purescript ; javascript, but functional
|
||||||
|
Loading…
Reference in New Issue
Block a user