Advertisement
Guest User

Untitled

a guest
Nov 1st, 2024
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 2.35 KB | None | 0 0
  1. ;;; init.el --- a file generated from Readme.org
  2. ;; -*- lexical-binding: t; -*-
  3. ;;; Commentary:
  4. ;;;     Org tangled from Readme.org. Edit the org file to change this configuration
  5. ;;; Code:
  6.  
  7. (setq gc-cons-threshold 100000000) ;; for lsp-mode
  8. ;; (add-hook 'after-init-hook
  9. ;;    (lambda ()
  10. ;;      (setq gc-cons-threshold 800000)))
  11. (setq debug-on-error t)
  12. (setq use-package-verbose t)
  13. (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
  14. (prefer-coding-system 'utf-8) ;; is it really has to be placed here?
  15. (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
  16.  
  17. (setq package-user-dir "~/.emacs.d/elpa/")
  18. ;; (require 'use-package)
  19. (package-initialize)
  20. (add-to-list 'package-archives
  21.           '("melpa" . "https://melpa.org/packages/") t)
  22. (package-refresh-contents)
  23. (setq package-check-signature nil)
  24. ;;(package-install (elt (cdr (assoc 'gnu-elpa-keyring-update package-archive-contents)) 0))
  25. ;;(package-install (elt (cdr (assoc 'use-package package-archive-contents)) 0))
  26. (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
  27.  
  28. ;; (unless (boundp 'package-archive-contents)
  29.  
  30. ;;   (package-initialize)
  31. ;;   (add-to-list 'package-archives
  32. ;;         '("melpa" . "https://melpa.org/packages/") t))
  33.      (unless (assoc 'use-package package-archive-contents)
  34.         (when (not package-archive-contents)
  35.             (package-refresh-contents))
  36.         (when (not (require 'gnu-elpa-keyring-update  nil 'noerror))
  37.             (setq package-check-signature nil)
  38.             (package-install (elt (cdr (assoc 'gnu-elpa-keyring-update package-archive-contents)) 0)))
  39.         (when (not (require 'use-package nil 'noerror))
  40.             (package-install (elt (cdr (assoc 'use-package package-archive-contents)) 0))))
  41.  
  42. ;;(assoc-delete-all 'org package--builtins)
  43. (setq use-package-enable-imenu-support t)
  44.  
  45. (require 'use-package)
  46. (use-package org :ensure t :pin gnu)
  47.  
  48. (defcustom my/literate-file (concat user-emacs-directory "Readme.org")
  49.        "The file to tangle all .el files from."
  50.        :group 'my-configuration
  51.        :type 'string)
  52.  
  53. (defcustom my/cfg-file (concat user-emacs-directory "custom.el")
  54.        "The file with all the customization."
  55.        :group 'my-configuration
  56.        :type 'string)
  57.  
  58. ;; (when (file-newer-than-file-p my/literate-file my/cfg-file)
  59. ;;       (org-babel-tangle-file my/literate-file))
  60.  
  61. (org-babel-tangle-file my/literate-file)
  62. (load my/cfg-file)
  63.  
  64. ;;; init.el ends here
  65.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement