emacs: add julia, spell checking, adapt latex
This commit is contained in:
parent
32eb67ed95
commit
aad8888eab
@ -112,8 +112,8 @@
|
|||||||
|
|
||||||
** TeX
|
** TeX
|
||||||
#+begin_src emacs-lisp :tangle yes
|
#+begin_src emacs-lisp :tangle yes
|
||||||
(map! :map TeX-mode-map :nvi "<backtab>" #'outline-cycle-buffer)
|
;; (map! :map TeX-mode-map :nvi "<backtab>" #'outline-cycle-buffer)
|
||||||
(map! :map TeX-mode-map :nvi "<tab>" #'outline-cycle)
|
;; (map! :map TeX-mode-map :nvi "<tab>" #'outline-cycle)
|
||||||
(map! :map TeX-mode-map :nvi "C-k" #'outline-backward-same-level)
|
(map! :map TeX-mode-map :nvi "C-k" #'outline-backward-same-level)
|
||||||
(map! :map TeX-mode-map :nvi "C-j" #'outline-forward-same-level)
|
(map! :map TeX-mode-map :nvi "C-j" #'outline-forward-same-level)
|
||||||
(map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading)
|
(map! :map TeX-mode-map :nvi "C-h" #'outline-up-heading)
|
||||||
@ -124,15 +124,17 @@
|
|||||||
(use-package! langtool-ignore-fonts
|
(use-package! langtool-ignore-fonts
|
||||||
:config
|
:config
|
||||||
(langtool-ignore-fonts-add 'latex-mode '(font-lock-comment-face
|
(langtool-ignore-fonts-add 'latex-mode '(font-lock-comment-face
|
||||||
;; font-latex-math-face
|
;; font-latex-math-face
|
||||||
;; font-latex-string-face
|
;; font-latex-string-face
|
||||||
font-lock-keyword-face
|
font-lock-keyword-face
|
||||||
font-lock-constant-face
|
font-lock-constant-face
|
||||||
font-lock-function-name-face
|
font-lock-function-name-face
|
||||||
font-lock-variable-name-face
|
font-lock-variable-name-face
|
||||||
;; font-lock-type-face ;; figure captions
|
font-lock-type-face ;; figure captions
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
;; Fixes latexindent not finding perl libraries
|
||||||
|
(setenv "PERL5LIB" "/home/julian/perl5/lib/perl5")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Spell Checking
|
** Spell Checking
|
||||||
@ -167,6 +169,29 @@
|
|||||||
(ispell-change-dictionary change)
|
(ispell-change-dictionary change)
|
||||||
(message "Dictionary switched from %s to %s" dic change)
|
(message "Dictionary switched from %s to %s" dic change)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
(set-flyspell-predicate! '(latex-mode)
|
||||||
|
#'+latex-flyspell-word-p)
|
||||||
|
|
||||||
|
(defun +latex-flyspell-word-p ()
|
||||||
|
"Return t if point is on a word that should be spell checked.
|
||||||
|
|
||||||
|
Return nil if on a link url, markup, html, or references."
|
||||||
|
(let ((faces (ensure-list (get-text-property (point) 'face))))
|
||||||
|
(or (and (memq 'font-lock-comment-face faces)
|
||||||
|
(memq 'markdown-code-face faces))
|
||||||
|
(not (cl-loop with unsafe-faces = '(font-lock-comment-face
|
||||||
|
;; font-latex-math-face
|
||||||
|
;; font-latex-string-face
|
||||||
|
font-lock-keyword-face
|
||||||
|
font-lock-constant-face
|
||||||
|
font-lock-function-name-face
|
||||||
|
font-lock-variable-name-face
|
||||||
|
font-lock-type-face ;; figure captions
|
||||||
|
)
|
||||||
|
for face in faces
|
||||||
|
if (memq face unsafe-faces)
|
||||||
|
return t)))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Flutter
|
** Flutter
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
(spell +flyspell +everywhere) ; tasing you for misspelling mispelling
|
(spell +flyspell +aspell +everywhere) ; tasing you for misspelling mispelling
|
||||||
grammar ; tasing grammar mistake every you make
|
grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
@ -106,6 +106,7 @@
|
|||||||
;;terraform ; infrastructure as code
|
;;terraform ; infrastructure as code
|
||||||
;;tmux ; an API for interacting with tmux
|
;;tmux ; an API for interacting with tmux
|
||||||
;;upload ; map local to remote projects via ssh/ftp
|
;;upload ; map local to remote projects via ssh/ftp
|
||||||
|
tree-sitter
|
||||||
|
|
||||||
:os
|
:os
|
||||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||||
@ -127,7 +128,7 @@
|
|||||||
;;elm ; care for a cup of TEA?
|
;;elm ; care for a cup of TEA?
|
||||||
emacs-lisp ; drown in parentheses
|
emacs-lisp ; drown in parentheses
|
||||||
;;erlang ; an elegant language for a more civilized age
|
;;erlang ; an elegant language for a more civilized age
|
||||||
;;ess ; emacs speaks statistics
|
ess ; emacs speaks statistics
|
||||||
;;factor
|
;;factor
|
||||||
;;faust ; dsp, but you get to keep your soul
|
;;faust ; dsp, but you get to keep your soul
|
||||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||||
@ -142,7 +143,7 @@
|
|||||||
json ; At least it ain't XML
|
json ; At least it ain't XML
|
||||||
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
;;(java +lsp) ; the poster child for carpal tunnel syndrome
|
||||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||||
;;julia ; a better, faster MATLAB
|
(julia +lsp +tree-sitter) ; a better, faster MATLAB
|
||||||
;;kotlin ; a better, slicker Java(Script)
|
;;kotlin ; a better, slicker Java(Script)
|
||||||
(latex) ; writing papers in Emacs has never been so fun
|
(latex) ; writing papers in Emacs has never been so fun
|
||||||
;;lean ; for folks with too much to prove
|
;;lean ; for folks with too much to prove
|
||||||
|
@ -5,6 +5,11 @@ export PATH=/home/julian/.cargo/bin:$PATH
|
|||||||
export PATH=/home/julian/perl5/bin:$PATH
|
export PATH=/home/julian/perl5/bin:$PATH
|
||||||
[ -f "/home/julian/.ghcup/env" ] && source "/home/julian/.ghcup/env" # ghcup-env
|
[ -f "/home/julian/.ghcup/env" ] && source "/home/julian/.ghcup/env" # ghcup-env
|
||||||
|
|
||||||
|
PERL5LIB="/home/julian/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||||
|
PERL_LOCAL_LIB_ROOT="/home/julian/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||||
|
PERL_MB_OPT="--install_base \"/home/julian/perl5\""; export PERL_MB_OPT;
|
||||||
|
PERL_MM_OPT="INSTALL_BASE=/home/julian/perl5"; export PERL_MM_OPT;
|
||||||
|
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH="$HOME/.oh-my-zsh"
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
@ -109,4 +114,3 @@ follow_du () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user