From 52cd03fdb1ac7b82de7fd9fbcae9e4b8ab705635 Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Sat, 11 Mar 2023 11:01:07 -0500 Subject: [PATCH] updating config because moom-mode won't run automatically anymore --- config.el | 74 ++++++++------------------------- custom.el | 9 ++-- init.el | 5 ++- modules/editor/meow/config.el | 5 ++- modules/editor/meow/packages.el | 2 +- obsidian-config.el | 42 +++++++++++++++++++ packages.el | 18 ++++---- 7 files changed, 77 insertions(+), 78 deletions(-) create mode 100644 obsidian-config.el diff --git a/config.el b/config.el index 299ed2a..38fa845 100644 --- a/config.el +++ b/config.el @@ -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") diff --git a/custom.el b/custom.el index eae5688..885d77b 100644 --- a/custom.el +++ b/custom.el @@ -7,9 +7,7 @@ '(column-number-mode t) '(context-menu-mode t) '(size-indication-mode t) - '(tool-bar-mode nil) - '(warning-suppress-log-types '((lsp-mode) (lsp-mode) (lsp-mode) (defvaralias))) - '(warning-suppress-types '((lsp-mode) (lsp-mode) (defvaralias)))) + '(tool-bar-mode nil)) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -20,14 +18,13 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - + ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - + ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - diff --git a/init.el b/init.el index 74c04df..960c3f5 100644 --- a/init.el +++ b/init.el @@ -33,7 +33,7 @@ doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs ;;doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; 🙂 + ;; (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra ;; indent-guides ; highlighted indent columns @@ -118,7 +118,8 @@ ;;agda ; types of types of types of types... ;;beancount ; mind the GAAP (cc +lsp) ; java with a lisp - (common-lisp +lsp) ; if you've seen one lisp, you've seen them all + common-lisp ; if you've seen one lisp, you've seen them all + (clojure +lsp) ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c ;;csharp ; unity, .NET, and mono shenanigans diff --git a/modules/editor/meow/config.el b/modules/editor/meow/config.el index 84b0b83..dafb800 100644 --- a/modules/editor/meow/config.el +++ b/modules/editor/meow/config.el @@ -5,8 +5,9 @@ ;; Leader Key (defun meow/setup-leader () (map! :leader - "?" #'meow-cheatsheet)) - "/" #'meow-keypad-describe-key + :desc "Meow Cheatsheet" + "?" #'meow-cheatsheet)) + ;; "/" #'meow-keypad-describe-key)) ;; "1" #'meow-digit-argument ;; "2" #'meow-digit-argument ;; "3" #'meow-digit-argument diff --git a/modules/editor/meow/packages.el b/modules/editor/meow/packages.el index 6889fc2..9181868 100644 --- a/modules/editor/meow/packages.el +++ b/modules/editor/meow/packages.el @@ -1,4 +1,4 @@ ;; -*- no-byte-compile: t; -*- ;;; editor/meow/packages.el -(package! meow :pin "dae2baa8228ee0a5cb37c6707057160c57bfe5f2") +(package! meow) diff --git a/obsidian-config.el b/obsidian-config.el new file mode 100644 index 0000000..5603df9 --- /dev/null +++ b/obsidian-config.el @@ -0,0 +1,42 @@ +;;; obsidian-config.el -*- lexical-binding: t; -*- + +;; 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 + "C-c C-o" #'obsidian-follow-link-at-point + "C-c C-b" #'obsidian-backlink-jump + "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 + :desc "Obsidian Insert Wikilink" + "l" #'obsidian-insert-wikilink + :desc "Obsidian Backlink Jump" + "j" #'obsidian-backlink-jump + "a" nil + "d" nil)) diff --git a/packages.el b/packages.el index 6855aa6..819f6f7 100644 --- a/packages.el +++ b/packages.el @@ -5,22 +5,21 @@ ;; on the command line, then restart Emacs for the changes to take effect -- or ;; use 'M-x doom/reload'. -(unpin! compat) +;; (unpin! compat) ;; (:host github :repo "emacs-compat/compat") -(unpin! doom-themes) -(unpin! lsp-mode) -(unpin! sly) -(unpin! corfu) -(unpin! cape) -(unpin! markdown-mode) +;; (unpin! doom-themes) +;; (unpin! lsp-mode) +;; (unpin! sly) +;; (unpin! corfu) +;; (unpin! cape) +;; (unpin! markdown-mode) ;; (unpin! consult) ;; (unpin! vertico) ;; (unpin! embark) ;; (unpin! orderless) -(package! meow) - (package! obsidian) + (package! terminal-here) (package! processing-mode) (package! ob-p5js) @@ -29,7 +28,6 @@ (package! smart-tabs-mode) (package! arduino-mode) (package! arduino-cli-mode) -(package! w3m) (package! supercollider :recipe (:local-repo "/Users/emenel/Library/Application Support/SuperCollider/downloaded-quarks/scel/el")) ;; (package! ijanet