Compare commits

...

4 Commits

72
init.el
View File

@ -1,10 +1,10 @@
;;; init.el --- basic initial declarations ;;; init.el --- basic initial declarations
;;; Commentary: ;;; Commentary:
;; _ _ _ _ ;; _ _ _ _
;; (_) _ __ (_)| |_ ___ | | ;; (_) _ __ (_)| |_ ___ | |
;; | || '_ \ | || __| / _ \| | ;; | || ' \ | || __| / _ \| |
;; | || | | || || |_ _| __/| | ;; | || | | || || | _ | __/| |
;; |_||_| |_||_| \__|(_)\___| |_| ;; |_||_| |_||_| \__| (_)\___| |_|
;; ;;
;; '((above text graphic generated with command `figlet -k "init.el"')) ;; '((above text graphic generated with command `figlet -k "init.el"'))
@ -287,47 +287,15 @@ If the current window occupies the whole frame, split it."
(end (- (re-search-forward "\n```") 3))) (end (- (re-search-forward "\n```") 3)))
(write-region start end elpaca-bootstrap-file)))) (write-region start end elpaca-bootstrap-file))))
(load-file elpaca-bootstrap-file) (load-file elpaca-bootstrap-file)
(elpaca 'dash) (elpaca 'dash (require 'dash))
(elpaca elpaca-use-package (elpaca elpaca-use-package
(elpaca-use-package-mode) (elpaca-use-package-mode)
(setq elpaca-use-package-by-default t)) (setq elpaca-use-package-by-default t))
(elpaca-wait) ;; (elpaca-wait)
(require 'dash)
;; (setq use-package-git-keyword :ensure)
) )
(defun nix-bootstrap ()
"placeholder function. Ideally, load nix packages"
(message "you never set up nix packages, baka!")
(require 'dash)
;(setq use-package-git-keyword :nix)
(straight-bootstrap)
)
(defun plist-remove (key plist)
"Remove KEY and its immediately following value from PLIST."
(if (member key plist)
(let ((index (cl-position key plist)))
(-remove-at-indices `(,index ,(1+ index)) plist))
plist))
;; (plist-remove :ensure '(use-package package))
;; (if (executable-find "home-manager")
;; ;; (nix-bootstrap)
;; (straight-bootstrap)
;; (if (eq system-type 'windows-nt)
;; (straight-bootstrap)
;; (elpaca-bootstrap)))
;; (straight-bootstrap)
(elpaca-bootstrap) (elpaca-bootstrap)
;; (fset #'use-package--orig (symbol-function #'use-package))
;; (defmacro use-package (&rest args)
;; "re-definition of use-package to replace the downloader depending on system"
;; ;; (require 'dash)
;; (if (eq use-package-git-keyword :nix)
;; `(use-package--orig ,@(plist-remove :ensure args))
;; `(use-package--orig ,@(-replace :ensure use-package-git-keyword args))))
;; (use-package lua-mode :ensure nil)
(setq init-hook 'elpaca-after-init-hook) (setq init-hook 'elpaca-after-init-hook)
;; do the things ;; do the things
(add-hook 'server-after-make-frame-hook #'mir/graphical-setup) (add-hook 'server-after-make-frame-hook #'mir/graphical-setup)
@ -537,7 +505,7 @@ If the current window occupies the whole frame, split it."
(dirvish-side-display-alist '((window-width . 0.15) (dirvish-side-display-alist '((window-width . 0.15)
(slot . -1) (slot . -1)
(side . left))) (side . left)))
;; :init (dirvish-override-dired-mode t) :init (dirvish-override-dired-mode t)
:config :config
(general-define-key (general-define-key
:states 'normal :states 'normal
@ -1032,18 +1000,18 @@ Return nil if DIR is not in a hugo project at all."
(use-package pcmpl-args (use-package pcmpl-args
:after eshell) :after eshell)
(use-package popon (unless (display-graphic-p)
:ensure (:type git (use-package popon
:repo "https://codeberg.org/akib/emacs-popon") :ensure ( :type git
:if (not (display-graphic-p))) :repo "https://codeberg.org/akib/emacs-popon"))
(use-package corfu-terminal (use-package corfu-terminal
:ensure (corfu-terminal :ensure (corfu-terminal
:type git :type git
:repo "https://codeberg.org/akib/emacs-corfu-terminal") :repo "https://codeberg.org/akib/emacs-corfu-terminal")
:after popon :after popon
:init (unless :init (unless
(display-graphic-p) (display-graphic-p)
(corfu-terminal-mode +1))) (corfu-terminal-mode +1))))
(use-package transient :ensure t) (use-package transient :ensure t)
(use-package magit (use-package magit