integrate straight.el with use-package

This commit is contained in:
Anthony Rodriguez 2023-06-08 09:19:54 +02:00
parent d0a078dc87
commit 5a41b936b0
No known key found for this signature in database
GPG key ID: 838541960B42C340

View file

@ -17,7 +17,7 @@
(add-to-list 'default-frame-alist '(font . "Monospace 15")) (add-to-list 'default-frame-alist '(font . "Monospace 15"))
(add-hook 'text-mode-hook 'visual-line-mode) (add-hook 'text-mode-hook 'visual-line-mode)
;; Initialize package sources ;; initialize straight.el
(defvar bootstrap-version) (defvar bootstrap-version)
(let ((bootstrap-file (let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
@ -30,14 +30,15 @@
(goto-char (point-max)) (goto-char (point-max))
(eval-print-last-sexp))) (eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage)) (load bootstrap-file nil 'nomessage))
;; Initialize use-package on non-Linux platforms
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package) ;; initialize use-package
(straight-use-package 'use-package)
(setq use-package-always-ensure t) (setq use-package-always-ensure t)
;; Set theme (use-package straight
:custom
(straight-use-package-by-default t))
;; set theme
(use-package catppuccin-theme (use-package catppuccin-theme
:custom :custom
(catppuccin-flavor 'mocha) (catppuccin-flavor 'mocha)
@ -176,9 +177,7 @@
;; code completion ;; code completion
(use-package company (use-package company
:after lsp-mode :after lsp-mode)
:custom
(company-idle-delay 0.0))
(use-package company-box (use-package company-box
:hook (company-mode . company-box-mode)) :hook (company-mode . company-box-mode))