updating config because moom-mode won't run automatically anymore

This commit is contained in:
Matt Nish-Lapidus 2023-03-11 11:01:07 -05:00
parent ea2a09f50b
commit 52cd03fdb1
7 changed files with 77 additions and 78 deletions

View file

@ -11,8 +11,7 @@
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
(setq doom-font (font-spec :family "JetBrains Mono" :size 14))
(setq fancy-splash-image (concat doom-private-dir "splash.png"))
(setq fancy-splash-image (concat doom-user-dir "splash.png"))
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
@ -24,6 +23,8 @@
(setq display-line-numbers-type t)
(setq scroll-preserve-screen-position t)
(setq org-directory "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Primary/org/")
;; quick function for removing all blank lines in a buffer
(defun mnl/remove-all-blank-lines ()
(flush-lines "^$"))
@ -47,8 +48,6 @@
;; remove org agenda from the splash screen
(assoc-delete-all "Open org-agenda" +doom-dashboard-menu-sections)
(setq +tree-sitter-hl-enabled-modes t) ; REVIEW highlight using tree-sitter ... maybe? still testing
;; nicer resizing
(cond
((string-equal system-type "darwin")
@ -56,7 +55,7 @@
window-resize-pixelwise t)))
;; tabs! i like them
(setq-default indent-tabs-mode t)
;; (setq-default indent-tabs-mode t)
(setq-default tab-width 2)
;; import all my customized keybindings based on doom evil mode, but without evil.
@ -125,7 +124,18 @@
(moom-recommended-keybindings '(all wof))
(setq moom-user-margin '(50 50 50 50))
(setq moom-command-with-centering '(single double delete split))
(when (display-graphic-p) (defun my-moom-default-frame-size () (set-frame-width (selected-frame) 150) (set-frame-height (selected-frame) 48) (moom-move-frame-to-center)) (add-hook! 'moom-mode-hook #'my-moom-default-frame-size) (moom-mode 1)))
(map! :leader
:prefix "t"
:desc "Moom Mode"
"m" #'moom-mode)
(when (display-graphic-p)
(defun my-moom-default-frame-size ()
(set-frame-width (selected-frame) 150)
(set-frame-height (selected-frame) 48)
(moom-move-frame-to-center))
(add-hook! 'moom-mode-hook #'my-moom-default-frame-size)))
(setq default-frame-alist '( (left . 0) (top . 0) (height . 48) (width . 150) ))
;; use kitty for terminal-here
(setq terminal-here-mac-terminal-command '("kitty"))
@ -145,57 +155,6 @@
"gnus-.*-mode"
"occur-mode"))
;; configure obsidian integration for note taking fun times
(use-package! obsidian
:config
(obsidian-specify-path "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Primary")
(setq obsidian-inbox-directory "_Inbox")
(global-obsidian-mode t)
(map! :map obsidian-mode-map
;; Replace C-c C-o with Obsidian.el's implementation.
"C-c C-o" #'obsidian-follow-link-at-point
;; Jump to backlinks
"C-c C-b" #'obsidian-backlink-jump
;; If you prefer you can use `obsidian-insert-link'
"C-c C-l" #'obsidian-insert-wikilink))
;; custom quick capture template for obsidian daily note
(defun mnl/obsidian-capture ()
"Create new obsidian note. In the `obsidian-inbox-directory' if set otherwise in `obsidian-directory' root."
(interactive)
(let* ((title (read-from-minibuffer "Title: " (format-time-string "%Y-%m-%d")))
(filename (s-concat obsidian-directory "/" obsidian-inbox-directory "/" title ".md"))
(clean-filename (s-replace "//" "/" filename)))
(find-file (expand-file-name clean-filename) t)))
(map! :leader
:desc "Obsidian Quick Capture"
"X" #'mnl/obsidian-capture)
(map! :leader
:prefix "n"
:desc "Obsidian Jump"
"f" #'obsidian-jump
:desc "Obsidian Search"
"s" #'obsidian-search
"*" #'obsidian-search
:desc "Obsidian Tag Search"
"m" #'obsidian-tag-find
:desc "Obsidian Capture"
"n" #'mnl/obsidian-capture
"a" nil
"d" nil)
(map! :after markdown-mode
:leader
:prefix "n"
:desc "Obsidian Insert Wikilink"
"l" #'obsidian-insert-wikilink
:desc "Obsidian Backlink Jump"
"j" #'obsidian-backlink-jump)
(setq org-directory "~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Primary/org/")
;; mouse support for vertico buffers
(after! vertico
(vertico-mouse-mode))
@ -230,3 +189,4 @@
;; (ciel-sbcl ("sbcl" "--core" "/path/to/ciel/ciel-core" "--eval" "(in-package :ciel-user)"))))
;; (setq slime-default-lisp 'ciel-sbcl)
(load! "obsidian-config.el")