Compare commits

...

5 Commits

Author SHA1 Message Date
Jeremy Dormitzer
d662a31e5a Configure org-mode 2021-02-23 11:09:07 -05:00
Jeremy Dormitzer
02bc64639a Delete eval hook for old org init file 2021-02-23 11:08:53 -05:00
Jeremy Dormitzer
3d08f2ad65 Set up autoloads for deferred 2021-02-23 11:07:47 -05:00
Jeremy Dormitzer
8c6b0c4568 Get rid of tree sitter 2021-02-23 11:07:38 -05:00
Jeremy Dormitzer
c690a853e8 Add binding to switch to most recent buffer 2021-02-23 11:07:23 -05:00
6 changed files with 123 additions and 13 deletions

View File

@ -6,7 +6,15 @@
(interactive)
(mapc 'kill-buffer (delq (current-buffer) (buffer-list))))
(defun switch-to-previous-buffer ()
"Switch to previously open buffer.
Repeated invocations toggle between the two most recently open buffers."
(interactive)
(switch-to-buffer (other-buffer (current-buffer) 1)))
(leader-def-key
"TAB" #'switch-to-previous-buffer
"b" '(nil :which-key "buffer")
"bb" #'switch-to-buffer
"bd" #'kill-buffer

View File

@ -70,15 +70,4 @@
:general
("C-c f" #'apheleia-format-buffer))
;; Tree-sitter is a C framework for generating ASTs
;; This emacs plugin provides nicer syntax highlighting for supported modes
(use-package tree-sitter
:defer 1
:config
(global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
(use-package tree-sitter-langs
:defer 1)
(provide 'init-ide)

View File

@ -1,7 +1,34 @@
;; -*- lexical-binding: t; -*-
;; Helper packages
(use-package deferred
:defer t)
(:commands (deferred:next
deferred:nextc
deferred:error
deferred:cancel
deferred:watch
deferred:wait
deferred:$
deferred:loop
deferred:parallel
deferred:earlier
deferred:call
deferred:apply
deferred:process
deferred:process-buffer
deferred:wait-idle
deferred:url-retrieve
deferred:url-get
deferred:url-post
deferred:new
deferred:succeed
deferred:fail
deferred:callback
deferred:callback-post
deferred:errorback
deferred:errorback-post
deferred:try
deferred:timeout
deferred:process)))
(use-package s
:defer t)

View File

@ -0,0 +1,86 @@
;; The all-powerful Org mode
(use-package org
:straight org-plus-contrib
:mode (("\\.org\\'" . org-mode))
:init
(leader-def-key "o" '(nil :which-key "org"))
:custom
(org-agenda-files `(,(expand-file-name "~/org/todo.org")
,(expand-file-name "~/org/deft/unifydb.org")
,(expand-file-name "~/org/lola-gcal.org")
,(expand-file-name "~/org/personal-gcal.org")
,(expand-file-name "~/org/j-n-gcal.org")))
(org-todo-keywords '((sequence
"TODO(t)"
"IN PROGRESS(i)"
"BLOCKED(b)"
"|"
"DONE(d)"
"CANCELLED(c)")))
(org-return-follows-link t)
(org-ellipsis "")
(org-src-fontify-natively t)
(org-log-done 'time)
(org-agenda-custom-commands '(("t" "TODOs"
((agenda)
(alltodo)))))
(org-agenda-span 'day)
(org-agenda-todo-ignore-scheduled 'future)
(org-agenda-tags-todo-honor-ignore-options t)
:general
(leader-map "oa" #'org-agenda)
(leader-map "oc" #'org-capture))
(use-package evil-org
:after org
:hook ((org-mode . evil-org-mode)
(org-agenda-mode . (lambda ()
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)))))
(use-package org-super-agenda
:after (org)
:defer 1
:config
(org-super-agenda-mode)
;; Nuke the header keybindings
(setq org-super-agenda-header-map (make-sparse-keymap))
:custom
(org-super-agenda-groups '((:name "In progress"
:todo "IN PROGRESS")
(:name "Lola"
:tag "@lola")
(:name "unifyDB"
:tag "@unifydb")
(:name "Personal"
:tag "@personal"))))
(use-package org-gcal
:commands (org-gcal-sync
org-gcal-fetch
org-gcal-post-at-point
org-gcal-delete-at-point
org-gcal-request-token)
:after (org evil-org)
:init
(defun org-agenda-redo-and-fetch-gcal (&optional all)
(interactive "P")
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
(deferred:nextc (org-gcal-fetch) cb)))
(advice-add 'evil-org-agenda-set-keys :after
(lambda ()
(general-def 'motion org-agenda-mode-map
"gR" #'org-agenda-redo-and-fetch-gcal)))
:config
(setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id")
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
,(expand-file-name "~/org/lola-gcal.org"))
("jeremy.dormitzer@gmail.com" .
,(expand-file-name "~/org/personal-gcal.org"))
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
,(expand-file-name "~/org/j-n-gcal.org")))
org-gcal-notify-p nil))
(provide 'init-org)

View File

@ -57,6 +57,7 @@
(require 'init-keybindings)
(require 'init-auth)
(require 'init-lib)
(require 'init-org)
(require 'init-profiler)
(require 'init-built-ins)
(require 'init-dashboard)

View File

@ -1,4 +1,3 @@
-*- eval: (add-hook 'after-save-hook 'org-babel-tangle 0 t) -*-
#+PROPERTY: header-args :results silent
#+PROPERTY: header-args:emacs-lisp :lexical t :tangle ~/.emacs.d/config/base.el