mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 19:57:19 +00:00
remove blank lines in emacs use-package defs
This commit is contained in:
parent
0d51070a1a
commit
f051150ac5
1 changed files with 1 additions and 72 deletions
73
emacs.nix
73
emacs.nix
|
@ -11,7 +11,6 @@ in {
|
||||||
packageQuickstart = false;
|
packageQuickstart = false;
|
||||||
recommendedGcSettings = true;
|
recommendedGcSettings = true;
|
||||||
usePackageVerbose = false;
|
usePackageVerbose = false;
|
||||||
|
|
||||||
earlyInit = ''
|
earlyInit = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
;; Disable Toolbar
|
;; Disable Toolbar
|
||||||
|
@ -20,74 +19,57 @@ in {
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
;; Disable menubar
|
;; Disable menubar
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
|
|
||||||
;; Increase garbage collector threshold before load
|
;; Increase garbage collector threshold before load
|
||||||
(setq gc-cons-threshold 640000000)
|
(setq gc-cons-threshold 640000000)
|
||||||
|
|
||||||
(setq debug-on-error t)
|
(setq debug-on-error t)
|
||||||
|
|
||||||
;; Use UTF-8
|
;; Use UTF-8
|
||||||
(set-terminal-coding-system 'utf-8)
|
(set-terminal-coding-system 'utf-8)
|
||||||
(set-keyboard-coding-system 'utf-8)
|
(set-keyboard-coding-system 'utf-8)
|
||||||
(prefer-coding-system 'utf-8)
|
(prefer-coding-system 'utf-8)
|
||||||
|
|
||||||
;; Minimize native-comp warnings
|
;; Minimize native-comp warnings
|
||||||
(setq native-comp-async-report-warnings-errors nil)
|
(setq native-comp-async-report-warnings-errors nil)
|
||||||
(setq warning-minimum-level 'error)
|
(setq warning-minimum-level 'error)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
prelude = ''
|
prelude = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
;; Disable startup message.
|
;; Disable startup message.
|
||||||
(setq inhibit-startup-screen t
|
(setq inhibit-startup-screen t
|
||||||
inhibit-startup-echo-area-message (user-login-name))
|
inhibit-startup-echo-area-message (user-login-name))
|
||||||
|
|
||||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||||
("melpa-stable" . "https://stable.melpa.org/packages/")
|
("melpa-stable" . "https://stable.melpa.org/packages/")
|
||||||
("gnu" . "https://elpa.gnu.org/packages/")
|
("gnu" . "https://elpa.gnu.org/packages/")
|
||||||
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
|
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
|
||||||
|
|
||||||
;; Empty initial scratch buffer.
|
;; Empty initial scratch buffer.
|
||||||
(setq initial-major-mode 'fundamental-mode
|
(setq initial-major-mode 'fundamental-mode
|
||||||
initial-scratch-message nil)
|
initial-scratch-message nil)
|
||||||
|
|
||||||
(setenv "PATH" (concat "${config.home.profileDirectory}/bin:" (getenv "PATH")))
|
(setenv "PATH" (concat "${config.home.profileDirectory}/bin:" (getenv "PATH")))
|
||||||
|
|
||||||
;; Accept 'y' and 'n' rather than 'yes' and 'no'.
|
;; Accept 'y' and 'n' rather than 'yes' and 'no'.
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
|
|
||||||
;; Typically, I only want spaces when pressing the TAB key. I also
|
;; Typically, I only want spaces when pressing the TAB key. I also
|
||||||
;; want 4 of them.
|
;; want 4 of them.
|
||||||
(setq-default indent-tabs-mode nil
|
(setq-default indent-tabs-mode nil
|
||||||
tab-width 4
|
tab-width 4
|
||||||
c-basic-offset 4)
|
c-basic-offset 4)
|
||||||
|
|
||||||
;; Increase emacs data read limit (default too low for LSP)
|
;; Increase emacs data read limit (default too low for LSP)
|
||||||
(setq read-process-output-max (* 1024 1024))
|
(setq read-process-output-max (* 1024 1024))
|
||||||
|
|
||||||
;; Reduce wrist pain
|
;; Reduce wrist pain
|
||||||
(global-set-key (kbd "M-n") "~")
|
(global-set-key (kbd "M-n") "~")
|
||||||
(global-set-key (kbd "M-N") "`")
|
(global-set-key (kbd "M-N") "`")
|
||||||
|
|
||||||
;; Stop creating backup and autosave files.
|
;; Stop creating backup and autosave files.
|
||||||
(setq make-backup-files nil
|
(setq make-backup-files nil
|
||||||
auto-save-default nil)
|
auto-save-default nil)
|
||||||
|
|
||||||
;; Always show line and column number in the mode line.
|
;; Always show line and column number in the mode line.
|
||||||
(line-number-mode)
|
(line-number-mode)
|
||||||
(column-number-mode)
|
(column-number-mode)
|
||||||
|
|
||||||
;; Soft wrap lines
|
;; Soft wrap lines
|
||||||
(visual-line-mode)
|
(visual-line-mode)
|
||||||
|
|
||||||
;; Use one space to end sentences.
|
;; Use one space to end sentences.
|
||||||
(setq sentence-end-double-space nil)
|
(setq sentence-end-double-space nil)
|
||||||
|
|
||||||
;; I typically want to use UTF-8.
|
;; I typically want to use UTF-8.
|
||||||
(prefer-coding-system 'utf-8)
|
(prefer-coding-system 'utf-8)
|
||||||
|
|
||||||
;; Enable highlighting of current line.
|
;; Enable highlighting of current line.
|
||||||
(global-hl-line-mode 1)
|
(global-hl-line-mode 1)
|
||||||
|
|
||||||
;; When finding file in non-existing directory, offer to create the
|
;; When finding file in non-existing directory, offer to create the
|
||||||
;; parent directory.
|
;; parent directory.
|
||||||
(defun with-buffer-name-prompt-and-make-subdirs ()
|
(defun with-buffer-name-prompt-and-make-subdirs ()
|
||||||
|
@ -95,41 +77,32 @@ in {
|
||||||
(when (and (not (file-exists-p parent-directory))
|
(when (and (not (file-exists-p parent-directory))
|
||||||
(y-or-n-p (format "Directory `%s' does not exist! Create it? " parent-directory)))
|
(y-or-n-p (format "Directory `%s' does not exist! Create it? " parent-directory)))
|
||||||
(make-directory parent-directory t))))
|
(make-directory parent-directory t))))
|
||||||
|
|
||||||
(add-to-list 'find-file-not-found-functions #'with-buffer-name-prompt-and-make-subdirs)
|
(add-to-list 'find-file-not-found-functions #'with-buffer-name-prompt-and-make-subdirs)
|
||||||
|
|
||||||
;; Bind Emacs built in completion using completion-at-point to "C-M-i"
|
;; Bind Emacs built in completion using completion-at-point to "C-M-i"
|
||||||
(global-set-key (kbd "C-M-i") 'completion-at-point)
|
(global-set-key (kbd "C-M-i") 'completion-at-point)
|
||||||
|
|
||||||
;; Keybind to format/prettify document, uses either format-all or
|
;; Keybind to format/prettify document, uses either format-all or
|
||||||
;; lsp-mode depending on availability
|
;; lsp-mode depending on availability
|
||||||
(global-set-key (kbd "C-c C-y") 'my/format-document)
|
(global-set-key (kbd "C-c C-y") 'my/format-document)
|
||||||
|
|
||||||
;; Don't warn when cannot guess python indent level
|
;; Don't warn when cannot guess python indent level
|
||||||
(setq-default python-indent-guess-indent-offset-verbose nil)
|
(setq-default python-indent-guess-indent-offset-verbose nil)
|
||||||
|
|
||||||
(defun my/define-multiple-keys (map keys)
|
(defun my/define-multiple-keys (map keys)
|
||||||
"Define multiple KEYS in a keymap.
|
"Define multiple KEYS in a keymap.
|
||||||
Argument MAP keymap in which to bind the keys."
|
Argument MAP keymap in which to bind the keys."
|
||||||
(dolist (key keys nil)
|
(dolist (key keys nil)
|
||||||
(define-key map (kbd (car key)) (nth 1 key))))
|
(define-key map (kbd (car key)) (nth 1 key))))
|
||||||
|
|
||||||
(defun my/customize-set-variables (variables)
|
(defun my/customize-set-variables (variables)
|
||||||
"Set multiple Customize VARIABLES at once."
|
"Set multiple Customize VARIABLES at once."
|
||||||
(dolist (variable variables nil)
|
(dolist (variable variables nil)
|
||||||
(customize-set-variable (car variable) (nth 1 variable))))
|
(customize-set-variable (car variable) (nth 1 variable))))
|
||||||
|
|
||||||
(defun my/find-file-in-folder-shortcut (folder)
|
(defun my/find-file-in-folder-shortcut (folder)
|
||||||
"Interactively call `find-file' after using 'cd' into 'FOLDER'."
|
"Interactively call `find-file' after using 'cd' into 'FOLDER'."
|
||||||
(cd (expand-file-name folder))
|
(cd (expand-file-name folder))
|
||||||
(call-interactively #'find-file))
|
(call-interactively #'find-file))
|
||||||
|
|
||||||
(defun my/electric-mode ()
|
(defun my/electric-mode ()
|
||||||
"Enable some basic features for coding."
|
"Enable some basic features for coding."
|
||||||
(interactive)
|
(interactive)
|
||||||
(electric-pair-local-mode)
|
(electric-pair-local-mode)
|
||||||
(electric-indent-local-mode))
|
(electric-indent-local-mode))
|
||||||
|
|
||||||
(defun dev ()
|
(defun dev ()
|
||||||
"Shortcut to '~/dev' folder."
|
"Shortcut to '~/dev' folder."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -204,11 +177,9 @@ in {
|
||||||
init = ''
|
init = ''
|
||||||
;; Align company-mode tooltips to the right hand side
|
;; Align company-mode tooltips to the right hand side
|
||||||
(setq company-tooltip-align-annotations t)
|
(setq company-tooltip-align-annotations t)
|
||||||
|
|
||||||
;; Display number of completions before and after current suggestions
|
;; Display number of completions before and after current suggestions
|
||||||
;; in company-mode
|
;; in company-mode
|
||||||
(setq company-tooltip-offset-display 'lines)
|
(setq company-tooltip-offset-display 'lines)
|
||||||
|
|
||||||
;; Display text icon of type in company popup
|
;; Display text icon of type in company popup
|
||||||
(setq company-format-margin-function #'company-text-icons-margin)
|
(setq company-format-margin-function #'company-text-icons-margin)
|
||||||
'';
|
'';
|
||||||
|
@ -292,7 +263,6 @@ in {
|
||||||
"(javascript-mode . lsp)"
|
"(javascript-mode . lsp)"
|
||||||
];
|
];
|
||||||
bind = { "C-c C-y" = "my/format-document"; };
|
bind = { "C-c C-y" = "my/format-document"; };
|
||||||
|
|
||||||
extraPackages = [ pkgs.nodePackages.bash-language-server ];
|
extraPackages = [ pkgs.nodePackages.bash-language-server ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -354,7 +324,6 @@ in {
|
||||||
(setq nix-executable "/nix/var/nix/profiles/default/bin/nix")
|
(setq nix-executable "/nix/var/nix/profiles/default/bin/nix")
|
||||||
'';
|
'';
|
||||||
bindLocal.nix-mode-map = { "C-c C-y" = "nix-format-buffer"; };
|
bindLocal.nix-mode-map = { "C-c C-y" = "nix-format-buffer"; };
|
||||||
|
|
||||||
extraPackages = [ pkgs.nixfmt ];
|
extraPackages = [ pkgs.nixfmt ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -372,7 +341,6 @@ in {
|
||||||
(org-edit-special)
|
(org-edit-special)
|
||||||
(indent-region (point-min) (point-max))
|
(indent-region (point-min) (point-max))
|
||||||
(org-edit-src-exit)))
|
(org-edit-src-exit)))
|
||||||
|
|
||||||
(defun my/org-force-open-current-window ()
|
(defun my/org-force-open-current-window ()
|
||||||
"Open a link using 'org-open-at-point' in current window."
|
"Open a link using 'org-open-at-point' in current window."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
@ -385,7 +353,6 @@ in {
|
||||||
(wl . wl)))
|
(wl . wl)))
|
||||||
))
|
))
|
||||||
(org-open-at-point)))
|
(org-open-at-point)))
|
||||||
|
|
||||||
(defun my/follow-org-link (arg)
|
(defun my/follow-org-link (arg)
|
||||||
"Follow a link in orgmode If ARG is given.
|
"Follow a link in orgmode If ARG is given.
|
||||||
Opens in new window otherwise opens in current window."
|
Opens in new window otherwise opens in current window."
|
||||||
|
@ -397,65 +364,49 @@ in {
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(defvar my/org-dir "~/Documents/org/")
|
(defvar my/org-dir "~/Documents/org/")
|
||||||
|
|
||||||
(require 'oc)
|
(require 'oc)
|
||||||
(require 'oc-basic)
|
(require 'oc-basic)
|
||||||
(require 'oc-csl)
|
(require 'oc-csl)
|
||||||
(require 'oc-natbib)
|
(require 'oc-natbib)
|
||||||
(require 'ox-latex)
|
(require 'ox-latex)
|
||||||
|
|
||||||
(setq org-src-window-setup 'current-window)
|
(setq org-src-window-setup 'current-window)
|
||||||
(setq org-confirm-babel-evaluate nil)
|
(setq org-confirm-babel-evaluate nil)
|
||||||
(setq org-src-fontify-natively t)
|
(setq org-src-fontify-natively t)
|
||||||
(setq org-src-tab-acts-natively t)
|
(setq org-src-tab-acts-natively t)
|
||||||
(setq org-src-preserve-indentation t)
|
(setq org-src-preserve-indentation t)
|
||||||
|
|
||||||
(setq org-export-with-tags nil)
|
(setq org-export-with-tags nil)
|
||||||
|
|
||||||
(setq org-publish-project-alist
|
(setq org-publish-project-alist
|
||||||
'(("root"
|
'(("root"
|
||||||
:base-directory (expand-file-name my/org-dir)
|
:base-directory (expand-file-name my/org-dir)
|
||||||
:publishing-function org-html-publish-to-html
|
:publishing-function org-html-publish-to-html
|
||||||
:publishing-directory (expand-file-name "~/public_html")
|
:publishing-directory (expand-file-name "~/public_html")
|
||||||
:section-numbers nil
|
:section-numbers nil
|
||||||
|
|
||||||
:with-author nil
|
:with-author nil
|
||||||
:with-creator t
|
:with-creator t
|
||||||
:with-toc t
|
:with-toc t
|
||||||
:time-stamp-file nil)))
|
:time-stamp-file nil)))
|
||||||
|
|
||||||
;; Configure HTML export
|
;; Configure HTML export
|
||||||
(setq org-html-validation-link nil)
|
(setq org-html-validation-link nil)
|
||||||
(setq org-html-head-include-scripts nil)
|
(setq org-html-head-include-scripts nil)
|
||||||
(setq org-html-head-include-default-style nil)
|
(setq org-html-head-include-default-style nil)
|
||||||
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
(setq org-html-head "<link rel=\"stylesheet\" href=\"https://cdn.simplecss.org/simple.min.css\" />")
|
||||||
(setq org-html-section)
|
(setq org-html-section)
|
||||||
|
|
||||||
(setq bibtex-completion-notes-path (expand-file-name "notes.org" my/org-dir))
|
(setq bibtex-completion-notes-path (expand-file-name "notes.org" my/org-dir))
|
||||||
|
|
||||||
(setq org-cite-global-bibliography '("~/Documents/org/zotero.bib"))
|
(setq org-cite-global-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
|
|
||||||
(setq org-cite-export-processors '((t basic)))
|
(setq org-cite-export-processors '((t basic)))
|
||||||
|
|
||||||
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
(setq org-cite-follow-processor 'ivy-bibtex-org-cite-follow)
|
||||||
|
|
||||||
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
(setq org-cite-csl-styles-dir "~/Zotero/styles")
|
||||||
|
|
||||||
(setq bibtex-completion-pdf-open-function
|
(setq bibtex-completion-pdf-open-function
|
||||||
(lambda (fpath)
|
(lambda (fpath)
|
||||||
(call-process "open" nil 0 nil "-a" "/Applications/Preview.app" fpath)))
|
(call-process "open" nil 0 nil "-a" "/Applications/Preview.app" fpath)))
|
||||||
|
|
||||||
(defun org-export-latex-no-toc (depth)
|
(defun org-export-latex-no-toc (depth)
|
||||||
(when depth
|
(when depth
|
||||||
(format "%% Org-mode is exporting headings to %s levels.\n"
|
(format "%% Org-mode is exporting headings to %s levels.\n"
|
||||||
depth)))
|
depth)))
|
||||||
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
(setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
|
||||||
|
|
||||||
(setq org-latex-pdf-process
|
(setq org-latex-pdf-process
|
||||||
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
'("latexmk -pdflatex='pdflatex -interaction nonstopmode' -pdf -bibtex -f %f"))
|
||||||
|
|
||||||
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
|
(add-to-list 'exec-path "/Users/willem/.nix-profile/bin")
|
||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("apa6"
|
'("apa6"
|
||||||
"\\documentclass{apa6}"
|
"\\documentclass{apa6}"
|
||||||
|
@ -464,7 +415,6 @@ in {
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||||
|
|
||||||
(add-to-list 'org-latex-classes
|
(add-to-list 'org-latex-classes
|
||||||
'("mla"
|
'("mla"
|
||||||
"\\documentclass{mla}"
|
"\\documentclass{mla}"
|
||||||
|
@ -473,14 +423,12 @@ in {
|
||||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||||
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
||||||
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
|
||||||
|
|
||||||
(setq org-agenda-files '("~/Documents/org" "~/Documents/org/ubc"))
|
(setq org-agenda-files '("~/Documents/org" "~/Documents/org/ubc"))
|
||||||
'';
|
'';
|
||||||
hook = [
|
hook = [
|
||||||
"(org-babel-after-execute . org-redisplay-inline-images)"
|
"(org-babel-after-execute . org-redisplay-inline-images)"
|
||||||
"(org-mode . visual-line-mode)"
|
"(org-mode . visual-line-mode)"
|
||||||
];
|
];
|
||||||
|
|
||||||
bind = {
|
bind = {
|
||||||
"C-c n c" = "org-id-get-create";
|
"C-c n c" = "org-id-get-create";
|
||||||
"C-c n a" = "org-agenda";
|
"C-c n a" = "org-agenda";
|
||||||
|
@ -490,7 +438,6 @@ in {
|
||||||
"C-c C-y" = "my/indent-org-block-automatically";
|
"C-c C-y" = "my/indent-org-block-automatically";
|
||||||
"<mouse-2>" = "my/follow-org-link";
|
"<mouse-2>" = "my/follow-org-link";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = [ pkgs.texlive.combined.scheme-full ];
|
extraPackages = [ pkgs.texlive.combined.scheme-full ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -500,14 +447,11 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
init = ''
|
init = ''
|
||||||
(require 'gnuplot)
|
(require 'gnuplot)
|
||||||
|
|
||||||
(autoload 'gnuplot-mode "gnuplot" "Gnuplot major mode" t)
|
(autoload 'gnuplot-mode "gnuplot" "Gnuplot major mode" t)
|
||||||
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot-mode" t)
|
(autoload 'gnuplot-make-buffer "gnuplot" "open a buffer in gnuplot-mode" t)
|
||||||
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
|
(setq auto-mode-alist (append '(("\\.gp$" . gnuplot-mode)) auto-mode-alist))
|
||||||
|
|
||||||
(require 'gnuplot-context)
|
(require 'gnuplot-context)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [ pkgs.gnuplot ];
|
extraPackages = [ pkgs.gnuplot ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -558,14 +502,11 @@ in {
|
||||||
ob-matlab = {
|
ob-matlab = {
|
||||||
enable = true;
|
enable = true;
|
||||||
after = [ "org" ];
|
after = [ "org" ];
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
|
|
||||||
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
|
(setq org-babel-octave-shell-command "${pkgs.octave}/bin/octave -q")
|
||||||
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
|
(setq org-babel-matlab-shell-command "~/Applications/MATLAB_R2022b.app/bin/matlab -nosplash")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [ pkgs.octave pkgs.texinfo4 ];
|
extraPackages = [ pkgs.octave pkgs.texinfo4 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -604,9 +545,7 @@ in {
|
||||||
|
|
||||||
company-math = {
|
company-math = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
after = [ "company" ];
|
after = [ "company" ];
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(add-to-list 'company-backends 'company-math-symbols-unicode)
|
(add-to-list 'company-backends 'company-math-symbols-unicode)
|
||||||
|
@ -644,7 +583,6 @@ in {
|
||||||
(setq ivy-re-builders-alist
|
(setq ivy-re-builders-alist
|
||||||
'((ivy-bibtex . ivy--regex-ignore-order)
|
'((ivy-bibtex . ivy--regex-ignore-order)
|
||||||
(t . ivy--regex-plus)))
|
(t . ivy--regex-plus)))
|
||||||
|
|
||||||
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
|
(setq ivy-bibtex-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
|
(setq reftex-default-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
(setq bibtex-completion-pdf-field "file")
|
(setq bibtex-completion-pdf-field "file")
|
||||||
|
@ -653,21 +591,16 @@ in {
|
||||||
|
|
||||||
org-ref = {
|
org-ref = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(setq org-ref-insert-cite-function
|
(setq org-ref-insert-cite-function
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(org-cite-insert nil)))
|
(org-cite-insert nil)))
|
||||||
|
|
||||||
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
|
(setq org-ref-default-bibliography "~/Documents/org/zotero.bib")
|
||||||
|
|
||||||
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
|
(setq bibtex-completion-bibliography '("~/Documents/org/zotero.bib"))
|
||||||
|
|
||||||
(require 'org-ref)
|
(require 'org-ref)
|
||||||
(require 'org-ref-ivy)
|
(require 'org-ref-ivy)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bindLocal.org-mode-map = { "C-c ]" = "org-ref-insert-link"; };
|
bindLocal.org-mode-map = { "C-c ]" = "org-ref-insert-link"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -675,14 +608,11 @@ in {
|
||||||
|
|
||||||
pdf-tools = {
|
pdf-tools = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
init = ''
|
init = ''
|
||||||
; -*-emacs-lisp-*-
|
; -*-emacs-lisp-*-
|
||||||
(setq-default pdf-view-display-size 'fit-width)
|
(setq-default pdf-view-display-size 'fit-width)
|
||||||
|
|
||||||
(setq pdf-annot-activate-created-annotations t)
|
(setq pdf-annot-activate-created-annotations t)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
extraPackages = [ pkgs.poppler pkgs.automake ];
|
extraPackages = [ pkgs.poppler pkgs.automake ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -800,7 +730,6 @@ in {
|
||||||
'("z" . meow-pop-selection)
|
'("z" . meow-pop-selection)
|
||||||
'("'" . repeat)
|
'("'" . repeat)
|
||||||
'("<escape>" . ignore)))
|
'("<escape>" . ignore)))
|
||||||
|
|
||||||
(meow-setup)
|
(meow-setup)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue