I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.0 KiB

4 years ago
4 years ago
4 years ago
4 years ago
  1. (setq user-emacs-directory dotfiles/cache)
  2. (setq create-lockfiles nil
  3. make-backup-files nil)
  4. (setq straight-repository-branch "develop"
  5. straight-use-package-by-default t)
  6. (defvar bootstrap-version)
  7. (let ((bootstrap-file
  8. (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
  9. (bootstrap-version 5))
  10. (unless (file-exists-p bootstrap-file)
  11. (with-current-buffer
  12. (url-retrieve-synchronously
  13. "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
  14. 'silent 'inhibit-cookies)
  15. (goto-char (point-max))
  16. (eval-print-last-sexp)))
  17. (load bootstrap-file nil 'nomessage))
  18. (straight-use-package 'use-package)
  19. (use-package no-littering)
  20. (setq inhibit-startup-message t)
  21. (global-prettify-symbols-mode)
  22. (scroll-bar-mode -1)
  23. (menu-bar-mode -1)
  24. (tool-bar-mode -1)
  25. (tooltip-mode -1)
  26. (use-package org
  27. :hook (org-mode . (lambda ()
  28. (org-indent-mode)
  29. (visual-line-mode 1)
  30. (variable-pitch-mode 1)))
  31. :custom (org-ellipsis "")
  32. (org-log-done 'time)
  33. (org-log-into-drawer t)
  34. (org-image-actual-width nil)
  35. (org-directory dotfiles/home)
  36. (org-src-preserve-indentation t)
  37. (org-todo-keywords '((sequence "TODO" "START" "WAIT" "DONE")))
  38. :config (require 'org-tempo)
  39. (add-to-list 'org-structure-template-alist '("s" . "src"))
  40. (add-to-list 'org-structure-template-alist '("q" . "quote"))
  41. (add-to-list 'org-structure-template-alist '("e" . "example"))
  42. (add-to-list 'org-structure-template-alist '("sh" . "src shell"))
  43. (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp"))
  44. (org-babel-do-load-languages 'org-babel-load-languages '((shell . t)
  45. (emacs-lisp . t))))
  46. (defun dotfiles/tangle (dir)
  47. "Recursively tangle the Org files within a directory."
  48. (let ((org-files (directory-files-recursively dir "org")))
  49. (dolist (f org-files)
  50. (org-babel-tangle-file f))))