mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-08-10 01:51:15 +10:00
Updating dotfiles.
This commit is contained in:
@@ -52,8 +52,6 @@ us know!
|
||||
- [[#disabling-packages][Disabling packages]]
|
||||
- [[#changing-a-recipe-for-a-included-package][Changing a recipe for a included package]]
|
||||
- [[#usingloading-local-packages][Using/loading local packages]]
|
||||
- [[#adjust-your-load-path][Adjust your ~load-path~]]
|
||||
- [[#local-repo][:local-repo]]
|
||||
- [[#configuring-doom][Configuring Doom]]
|
||||
- [[#configuring-packages][Configuring packages]]
|
||||
- [[#reloading-your-config][Reloading your config]]
|
||||
@@ -155,8 +153,7 @@ pacman -S git emacs ripgrep
|
||||
pacman -S fd
|
||||
#+END_SRC
|
||||
|
||||
The above installs Emacs 26.3 (at the time of writing). To acquire Emacs 27
|
||||
[[https://aur.archlinux.org/packages/emacs27-git/][emacs27-git]] is available on the AUR.
|
||||
The above installs Emacs 27 (at the time of writing).
|
||||
|
||||
**** NixOS
|
||||
On NixOS Emacs 26.3 can be installed via ~nix-env -Ai nixos.emacs~, or
|
||||
@@ -248,8 +245,6 @@ to least recommended for Doom (based on compatibility).
|
||||
ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app
|
||||
#+END_SRC
|
||||
|
||||
Replace =emacs-plus= with =emacs-plus@27= to install Emacs 27.x instead.
|
||||
|
||||
- [[https://bitbucket.org/mituharu/emacs-mac/overview][emacs-mac]] is another acceptable option. It offers slightly better integration
|
||||
with macOS, native emojis and better childframe support. However, at the time
|
||||
of writing, it [[https://github.com/railwaycat/homebrew-emacsmacport/issues/52][lacks multi-tty support]] (which impacts daemon usage):
|
||||
@@ -917,40 +912,42 @@ changes.
|
||||
#+end_quote
|
||||
|
||||
*** Using/loading local packages
|
||||
Say you have a local elisp package that you are developing, and want to
|
||||
"install" it for live testing. You have two options:
|
||||
|
||||
**** Adjust your ~load-path~
|
||||
Emacs searches for packages in your ~load-path~. Add the path to your package
|
||||
and Emacs will find it when it tries to load it. e.g.
|
||||
|
||||
Say you are developing an Emacs package locally and want to "install" it for
|
||||
live testing. To do this specify a ~:local-repo~ in that package's recipe:
|
||||
#+BEGIN_SRC elisp
|
||||
(add-load-path! "lisp/package")
|
||||
(package! my-package
|
||||
:recipe (:local-repo "/path/to/my/package"))
|
||||
|
||||
;; Relative paths are expanded to ~/.emacs.d/.local/straight/repos/{local-repo}
|
||||
;; or ~/.doom.d/{local-repo} -- the first that is found.
|
||||
(package! my-package
|
||||
:recipe (:local-repo "my/package")) ; looks for ~/.doom.d/my/package/my-package.el
|
||||
|
||||
(package! my-package
|
||||
:recipe (:local-repo "/path/to/my/package"
|
||||
|
||||
;; By default, the package manager grabs all *.el files at the root
|
||||
;; of the project and nothing else. To include other files, or
|
||||
;; accommodate unconventional project structures, specify what :files
|
||||
;; you want:
|
||||
:files ("*.el" "src/lisp/*.el")
|
||||
|
||||
;; With ':no-byte-compile t' you can avoid having to run 'doom sync'
|
||||
;; every time you change the package.
|
||||
:no-byte-compile t))
|
||||
#+END_SRC
|
||||
|
||||
Alternatively, add the package's location to Emacs' ~load-path~. Do this if you
|
||||
don't need/care for autoload cookies or byte-compilation:
|
||||
#+BEGIN_SRC elisp
|
||||
;; Doom has modified `use-package's `:load-path' to expand relative paths from
|
||||
;; your DOOMDIR. e.g. ~/.doom.d/lisp/package
|
||||
(use-package my-package
|
||||
:load-path "lisp/package")
|
||||
|
||||
;; or
|
||||
|
||||
(use-package my-package
|
||||
:load-path "/path/to/my/package")
|
||||
#+END_SRC
|
||||
|
||||
**** :local-repo
|
||||
Alternatively, you can specify a ~:local-repo~ in a ~package!~'s ~:recipe~
|
||||
declaration:
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(package! my-package :recipe (:local-repo "/path/to/my/package"))
|
||||
|
||||
;; Don't forget to use :files to include files in an unconventional project structure:
|
||||
(package! my-package
|
||||
:recipe (:local-repo "/path/to/my/package"
|
||||
:files ("*.el" "src/lisp/*.el")))
|
||||
|
||||
;; It is recommended you use ':no-byte-compile t' as well, so you don't have to
|
||||
;; run `doom build -r` every time you make a change to your package.
|
||||
(package! my-package
|
||||
:recipe (:local-repo "/path/to/my/package"
|
||||
:files ("*.el" "src/lisp/*.el")
|
||||
:no-byte-compile t))
|
||||
(add-load-path! "lisp/package")
|
||||
#+END_SRC
|
||||
|
||||
#+begin_quote
|
||||
|
||||
Reference in New Issue
Block a user