setup emacs for note-taking

This commit is contained in:
Aria Nolan 2023-10-15 18:55:25 -04:00
parent c08898e5be
commit d8c1f55ec2
2 changed files with 46 additions and 15 deletions

View file

@ -1,36 +1,64 @@
{pkgs, ...}:
{
{pkgs, ...}: {
programs.emacs = {
enable = true;
package = pkgs.emacs29-pgtk;
package = pkgs.emacs29-gtk3;
extraConfig = ''
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(load-theme 'catppuccin :no-confirm)
(blink-cursor-mode 0)
;; scale headings in org-mode
(setq zenburn-scale-org-headlines t)
;; scale headings in outline-mode
(setq zenburn-scale-outline-headlines t)
(load-theme 'zenburn :no-confirm)
(add-to-list 'default-frame-alist
'(font . "ComicMono Nerd Font-12"))
'(font . "Comic Mono-13"))
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c f") #'recentf-open)
(global-hl-line-mode 1)
(require 'evil)
(evil-mode 1)
(define-key evil-normal-state-map (kbd "j") 'next-line)
(define-key evil-normal-state-map (kbd "k") 'previous-line)
(require 'evil-org)
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(textobjects insert navigation additional shift todo heading))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)
(global-visual-line-mode 1)
(require 'smooth-scrolling)
(smooth-scrolling-mode 1)
'';
extraPackages = epkgs: with epkgs; [
base16-theme
catppuccin-theme
(setq org-startup-with-inline-images 1)
(setq org-startup-indented 1)
(global-display-line-numbers-mode 1)
(setq display-line-numbers-type 'visual)
(require 'org-download)
;; Drag-and-drop to `dired`
(add-hook 'dired-mode-hook 'org-download-enable)
(setq org-image-actual-width nil)
''; # TODO move plugin setup into a seperate file to keep things organized
# also add autoloading so emacs starts faster
extraPackages = epkgs:
with epkgs; [
zenburn-theme
color-theme-tangotango
evil
evil-org
org-download
adaptive-wrap
smooth-scrolling
];
};

View file

@ -25,9 +25,12 @@
wineWowPackages.unstable
eza
bat
comic-mono
];
};
fonts.fontconfig.enable = true;
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment: