diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-02-17 22:59:16 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-02-17 22:59:16 +0100 |
commit | c249b85397c66e6c1092a291912ce05ed628ddaf (patch) | |
tree | 9017e92847bd1069c0d4613ed9398f35795fc55b | |
parent | Nix: Initial darwin setup (diff) | |
download | nixos-config-c249b85397c66e6c1092a291912ce05ed628ddaf.tar.gz nixos-config-c249b85397c66e6c1092a291912ce05ed628ddaf.tar.bz2 nixos-config-c249b85397c66e6c1092a291912ce05ed628ddaf.zip |
Dotfiles: Emacs: Use straight as package manager
-rw-r--r-- | dotfiles/.emacs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/dotfiles/.emacs b/dotfiles/.emacs index bc329e8..47a1577 100644 --- a/dotfiles/.emacs +++ b/dotfiles/.emacs @@ -1,13 +1,16 @@ -;; load package manager, add the Melpa package registry -(require 'package) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) -(package-initialize) - -;; bootstrap use-package -(unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) -(require 'use-package) +;; bootstrap straight +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) (use-package evil :ensure t @@ -117,9 +120,10 @@ :ensure t) (yas-global-mode 1) +;; TODO: Install with straight tho (use-package lsp-bridge :ensure t - :hook ((haskell-mode nix-mode jq-mode c-mode c++-mode c-or-c++-mode rust-mode) . lsp-deferred) + :hook (prog-mode . lsp-deferred) :commands (lsp lsp-deferred) :config (setq lsp-clients-clangd-args '("-j=4" "-background-index" "--log=error" "--clang-tidy" "--enable-config")) |