initial commit
This commit is contained in:
commit
6e565ee542
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*~
|
3
early-init.el
Normal file
3
early-init.el
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
;; And disable package at startup
|
||||
(setq package-enable-at-startup nil)
|
74
init.el
Normal file
74
init.el
Normal file
@ -0,0 +1,74 @@
|
||||
;; Add our custom site dir
|
||||
(add-to-list 'load-path (expand-file-name "lib" user-emacs-directory))
|
||||
(add-to-list 'load-path (expand-file-name "thwap.d" user-emacs-directory))
|
||||
|
||||
;; bootstrap straight, which we will use for everything
|
||||
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name
|
||||
"straight/repos/straight.el/bootstrap.el"
|
||||
(or (bound-and-true-p straight-base-dir)
|
||||
user-emacs-directory)))
|
||||
(bootstrap-version 7))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
;; custom set stuff
|
||||
(custom-set-variables
|
||||
;; custom-set-variables 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.
|
||||
'(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.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(default ((t (:family "Noto Sans Mono" :foundry "GOOG" :slant normal :weight regular :height 90 :width normal)))))
|
||||
|
||||
(global-auto-revert-mode t)
|
||||
(global-display-line-numbers-mode 1)
|
||||
(setq warning-minimum-level :error)
|
||||
(setq-default tab-width 2
|
||||
mode-line-format
|
||||
'("%e"
|
||||
mode-line-buffer-identification " "
|
||||
mode-line-modified " "
|
||||
mode-line-frame-identification " "
|
||||
mode-line-mode))
|
||||
(setq tab-width 2)
|
||||
(setq indent-tabs-mode 1)
|
||||
|
||||
;; The T.H.W.A.P. Map
|
||||
;; This is the base starting point for the T.H.W.A.P. keybindings
|
||||
(define-prefix-command 'thwap-map)
|
||||
(global-set-key (kbd "C-t") 'thwap-map)
|
||||
|
||||
;; theme configuration
|
||||
|
||||
(require 'thwap-theme)
|
||||
|
||||
;; company configuration
|
||||
|
||||
(require 'thwap-co)
|
||||
|
||||
;; LSP configuration
|
||||
|
||||
(require 'thwap-lsp)
|
||||
|
||||
;; org configuration
|
||||
|
||||
(require 'thwap-org)
|
||||
|
||||
;; golang configuration
|
||||
|
||||
(require 'thwap-go)
|
5
lib/thwap-co.el
Normal file
5
lib/thwap-co.el
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
(straight-use-package 'company)
|
||||
(add-hook 'after-init-hook 'global-company-mode)
|
||||
|
||||
(provide 'thwap-co)
|
8
lib/thwap-go.el
Normal file
8
lib/thwap-go.el
Normal file
@ -0,0 +1,8 @@
|
||||
(require 'thwap-lsp)
|
||||
|
||||
(straight-use-package 'go-mode)
|
||||
|
||||
(setq lsp-go-analyses '((shadow . t)
|
||||
(simplifycompositelit . :json-false)))
|
||||
|
||||
|
10
lib/thwap-lsp.el
Normal file
10
lib/thwap-lsp.el
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
(straight-use-package 'lsp-mode)
|
||||
|
||||
(setq gc-cons-threshold 100000000)
|
||||
(setq read-process-output-max (* 1024 1024))
|
||||
|
||||
(define-key thwap-map (kbd "l") 'lsp-keymap-prefix)
|
||||
;; (lsp-enable-which-key-integration t)
|
||||
|
||||
(provide 'thwap-lsp)
|
129
lib/thwap-org.el
Normal file
129
lib/thwap-org.el
Normal file
@ -0,0 +1,129 @@
|
||||
|
||||
;;
|
||||
;; Ensure Org mode is installed and loaded
|
||||
;;
|
||||
|
||||
;; base
|
||||
(straight-use-package 'org)
|
||||
;; functionality / configuration
|
||||
(straight-use-package 'org-bullets)
|
||||
(straight-use-package 'org-modern)
|
||||
(straight-use-package 'org-super-agenda)
|
||||
(straight-use-package 'org-timeblock)
|
||||
;; content related packages
|
||||
(straight-use-package 'org-download)
|
||||
(straight-use-package 'ob-mermaid)
|
||||
;; org-roam stuff
|
||||
(straight-use-package 'org-roam)
|
||||
(straight-use-package 'org-roam-ui)
|
||||
(straight-use-package 'org-transclusion)
|
||||
|
||||
;;
|
||||
;; Helper functions
|
||||
;;
|
||||
|
||||
;; Function to get a unique filename for Org-capture
|
||||
(defun thwap/org-capture-get-unique-filename ()
|
||||
"Generate a unique filename for Org-capture."
|
||||
(let ((filename (format "~/.org-agenda/syncup__issue__%s.org" (format-time-string "%Y%m%d%H%M%S"))))
|
||||
(message "Inside function: Generated filename: %s" filename)
|
||||
filename))
|
||||
|
||||
(defun thwap/list-files-with-extension (dir extension)
|
||||
"Recursively list all files in DIR with the given EXTENSION, suitable for org-agenda-files."
|
||||
(let ((files '()))
|
||||
(dolist (file (directory-files-recursively dir (concat "\\." extension "\\'")))
|
||||
(push file files))
|
||||
(nreverse files)))
|
||||
|
||||
;; (defun thwap/list-files-with-extension (dir extension)
|
||||
;; "Recursively list all files in DIR with the given EXTENSION."
|
||||
;; (let ((files '()))
|
||||
;; (dolist (file (directory-files-recursively dir (concat "\\." extension "\\'")))
|
||||
;; (push file files))
|
||||
;; files))
|
||||
|
||||
(defun thwap/org-agenda-files-update ()
|
||||
"Update the org-agenda-files variable."
|
||||
(setq org-agenda-files (thwap/list-files-with-extension "~/.org-agenda" "org"))
|
||||
(setq org-timeblock-files (thwap/list-files-with-extension "~/.org-agenda" "org"))
|
||||
(setq org-timeblock-inbox-file "~/.org-agenda/tasks.org"))
|
||||
|
||||
;;
|
||||
;; Org mode configuration
|
||||
;;
|
||||
|
||||
(setq browse-url-browser-function 'browse-url-generic
|
||||
browse-url-generic-program "firefox-esr")
|
||||
|
||||
;; Basic Org mode settings
|
||||
(setq org-log-done 'time
|
||||
org-startup-indented t
|
||||
org-hide-leading-stars t
|
||||
org-directory "~/.org-agenda"
|
||||
org-default-notes-file "~/.org-agenda/notes.org")
|
||||
|
||||
;; Configure Org agenda
|
||||
(thwap/org-agenda-files-update)
|
||||
|
||||
;; Configure TODO keywords
|
||||
(setq org-todo-keywords
|
||||
'((sequence "TODO" "IN-PROGRESS" "EPIC" "WAITING" "WONTDO" "DONE")))
|
||||
|
||||
;; Set up capture templates
|
||||
(setq org-capture-templates
|
||||
`(("T" "THWAP TODO" entry (file+headline "~/.org-agenda/tasks.org" "THWAP Tasks")
|
||||
"* TODO %?\n %i\n %a")
|
||||
("A" "APFM TODO" entry (file+headline "~/.org-agenda/tasks.org" "APFM Tasks")
|
||||
"* TODO %?\n %i\n %a")
|
||||
("L" "LIFE TODO" entry (file+headline "~/.org-agenda/tasks.org" "LIFE Tasks")
|
||||
"* TODO %?\n %i\n %a")
|
||||
("a" "Appointment" entry (file+headline "~/.org-agenda/events.org" "Appointments")
|
||||
"* %?\n %i\n %a" :clock-in t :clock-resume t)
|
||||
("e" "Schedule Event" entry (file+headline "~/.org-agenda/events.org" "Events")
|
||||
"* %?\n %i\n %a" :clock-in t :clock-resume t)
|
||||
("m" "Schedule Meeting" entry (file+headline "~/.org-agenda/events.org" "Meetings")
|
||||
"* %?\n %i\n %a" :clock-in t :clock-resume t)
|
||||
("n" "Note" entry (file "~/.org-agenda/notes.org")
|
||||
"* %?\n %i\n %a" :clock-in t :clock-resume t)
|
||||
("i" "Idea" entry (file "~/.org-agenda/ideas.org")
|
||||
"* %? :IDEA: \n%t" :clock-in t :clock-resume t)))
|
||||
|
||||
;; Configure Org export settings
|
||||
(setq org-export-with-sub-superscripts t)
|
||||
(setq org-export-with-toc t)
|
||||
|
||||
;; Enable Babel languages
|
||||
(org-babel-do-load-languages
|
||||
'org-babel-load-languages
|
||||
'((emacs-lisp . t)
|
||||
(python . t)
|
||||
(org . t)
|
||||
(ruby . t)
|
||||
(shell . t)))
|
||||
|
||||
|
||||
;; Visual line mode for Org mode
|
||||
(add-hook 'org-mode-hook 'thwap/org-agenda-files-update)
|
||||
(add-hook 'org-mode-hook 'visual-line-mode)
|
||||
|
||||
;; org-bullets hooks
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
|
||||
|
||||
;; Org mode stuff
|
||||
(define-key thwap-map (kbd "o l") 'org-store-link)
|
||||
(define-key thwap-map (kbd "o C-l") 'org-toggle-link-display)
|
||||
;; agenda stuff
|
||||
(define-key thwap-map (kbd "o n") 'org-capture)
|
||||
(define-key thwap-map (kbd "o a") 'org-agenda)
|
||||
(define-key thwap-map (kbd "o t") 'org-todo-list)
|
||||
;; time management stuff
|
||||
(define-key thwap-map (kbd "o c i") 'org-clock-in)
|
||||
(define-key thwap-map (kbd "o c o") 'org-clock-out)
|
||||
(define-key thwap-map (kbd "o c r") 'org-clock-report)
|
||||
;; refile stuff
|
||||
(define-key thwap-map (kbd "o r") 'org-refile)
|
||||
;; export stuff
|
||||
(define-key thwap-map (kbd "o e") 'org-export-dispatch)
|
||||
|
||||
(provide 'thwap-org)
|
8
lib/thwap-theme.el
Normal file
8
lib/thwap-theme.el
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
;; theme bits
|
||||
|
||||
(straight-use-package 'modus-themes)
|
||||
(require 'modus-themes)
|
||||
(load-theme 'modus-vivendi-tritanopia :no-confirm)
|
||||
|
||||
(provide 'thwap-theme)
|
0
thwap.d/.placeholder
Normal file
0
thwap.d/.placeholder
Normal file
Loading…
Reference in New Issue
Block a user