This commit is contained in:
2025-09-02 11:16:25 -04:00
2 changed files with 113 additions and 79 deletions

View File

@@ -42,14 +42,7 @@ replacement for defining configs and relations between packages etc.
#+begin_src elisp :tangle yes :exports code
(eval-and-compile
(customize-set-variable
'package-archives '(("org" . "https://orgmode.org/elpa/")
("melpa" . "https://melpa.org/packages/")
("gnu" . "https://elpa.gnu.org/packages/")))
(package-initialize)
(unless (package-installed-p 'leaf)
(package-refresh-contents)
(package-install 'leaf))
(straight-use-package 'leaf)
(leaf leaf-keywords
:init
@@ -81,9 +74,16 @@ replacement for defining configs and relations between packages etc.
*** Garbage Collection
This makes the garbage collection thresholds variable based on emacs
usage. I don't know how well this plays with LSPs or similarly RAM hungry
features. This was useful when I used a very restricted netbook w/ ~2GiB of
RAM.
Disabled for now. (May add flags to enable on specific systems)
#+begin_src elisp :tangle yes :exports code
(leaf gcmh :ensure t
:hook (after-init-hook))
; (leaf gcmh :ensure t
; :hook (after-init-hook))
#+end_src
*** Profiling
@@ -99,6 +99,7 @@ Ensure that the =custom.el= resides in the users' emacs directory.
#+begin_src elisp :tangle yes :exports code
(leaf custom-el
:leaf-defer nil
:config
;; Ensure custom writes to specific file
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
@@ -111,6 +112,7 @@ Set the backups directory to reside in the users' emacs directory.
#+begin_src elisp :tangle yes :exports code
(leaf backup
:leaf-defer nil
:config
;; Change the location of file backups/locks into the emacs.d/backups/
(setq backup-directory-alist
@@ -134,6 +136,7 @@ Visual Theme of Emacs config: defined in the =themes= directory.
#+begin_src elisp :tangle yes :exports code
(leaf visual
:leaf-defer nil
:doc "Visual Changes to Emacs"
:tag "builtin" "internal"
:custom ((menu-bar-mode . nil)
@@ -150,7 +153,9 @@ Visual Theme of Emacs config: defined in the =themes= directory.
* Version Control
#+begin_src elisp :tangle yes :exports code
(leaf magit :ensure t :require t)
(leaf magit
:leaf-defer nil
:ensure t :require t)
#+end_src
* Nix Related
@@ -161,15 +166,16 @@ In order to support direnv (loading =nix-shell= / =nix develop=)
#+begin_src elisp :tangle yes :exports code
(leaf direnv
:ensure t
:config
(direnv-mode))
:global-minor-mode direnv-mode)
#+end_src
** Nix-mode
=.nix= file mode
#+begin_src elisp :tangle yes :exports code
(leaf nix-mode :ensure t)
(leaf nix-mode
:ensure t
:mode "\\.nix\\'")
#+end_src
* IDE Like Things
@@ -177,8 +183,9 @@ In order to support direnv (loading =nix-shell= / =nix develop=)
** Which Key Again?
#+begin_src elisp :tangle yes :exports code
(leaf which-key :ensure t
:config (which-key-mode))
(leaf which-key
:ensure t
:global-minor-mode which-key-mode)
#+end_src
** Company Completion!
@@ -190,7 +197,7 @@ We like autocomplete, it... is nice, okay?
:bind
(("C-<tab>" . company-complete))
:hook after-init-hook
:config (global-company-mode))
:global-minor-mode global-company-mode)
#+end_src
** Language Server Protocol
@@ -203,9 +210,9 @@ We love language features that make languages nice
:init
(setq lsp-keymap-prefix "C-c l")
:commands lsp lsp-deferred
:hook
:hook (
;; which key support v v v
((lsp-mode-hook . lsp-enable-which-key-integration)
(lsp-mode-hook . lsp-enable-which-key-integration)
#+end_src
*** IDE Languages
@@ -244,7 +251,7 @@ We love language features that make languages nice
**** Rust
#+begin_src elisp :tangle yes :exports code
(rust-mode-hook . lsp-deferred))
(rust-mode-hook . lsp-deferred)
#+end_src
#+begin_src elisp :tangle yes :exports code
@@ -255,6 +262,10 @@ We love language features that make languages nice
We do want some nice to haves of course
#+begin_src elisp :tangle yes :exports code
:init
#+end_src
- A pretty UI:
#+begin_src elisp :tangle yes :exports code
(leaf lsp-ui :ensure t
@@ -278,6 +289,12 @@ We do want some nice to haves of course
(projectile-mode +1))
#+end_src
END LSP CONFIG
#+begin_src elisp :tangle yes :exports code
)
#+end_src
* WEB
We all know the web is the future, obviously, of course.
@@ -291,21 +308,29 @@ We all know the web is the future, obviously, of course.
"\\.jsx?\\'"
"\\.tsx?\\'")
(leaf php-mode
:mode "\\.php\\'"
:ensure t)
(leaf rainbow-mode
:leaf-defer nil
:ensure t)
#+end_src
* D2
#+begin_src elisp :tangle yes :exports code
(leaf d2-mode :ensure t)
(leaf d2-mode
:ensure t
:mode "\\.d2\\'"
)
#+end_src
* YAML
#+begin_src elisp :tangle yes :exports code
(leaf yaml-mode :ensure t)
(leaf yaml-mode
:ensure t
:mode "\\.yaml\\'"
)
#+end_src
* Python Things
@@ -316,7 +341,9 @@ Using python-mode is to have more up to date features (and
highlighting) compared to builtin python-mode.
#+begin_src elisp :tangle yes :exports code
(leaf python-mode :ensure t
(leaf python-mode
:ensure t
:mode "\\.py\\'"
:config
(setq python-shell-interpreter "ipython"
python-shell-interpreter-args "-i --simple-prompt --InteractiveShell.display_page=True"))
@@ -349,15 +376,19 @@ Who even needs C++, not me, no way, no how.
* Haskell
#+begin_src elisp :tangle yes :exports code
(leaf haskell-mode :ensure t)
(leaf lsp-haskell :ensure t)
(leaf company-ghci :ensure t)
(leaf haskell-mode
:ensure t
:mode "\\.hs\\'"
:init
(leaf lsp-haskell :ensure t)
(leaf company-ghci :ensure t))
#+end_src
* Rust
#+begin_src elisp :tangle yes :exports code
(leaf rust-mode :ensure t
:mode "\\.rs\\'"
:init
(leaf slint-mode :ensure t))
#+end_src
@@ -368,7 +399,7 @@ Minecraft =mcfunction= support, because, it can be annoying to type
this stuff otherwise.
#+begin_src elisp :tangle yes :exports code
(leaf mcf-mode
:el-get rasensuihei/mcf)
:straight (mcf-mode :type git :host github :repo "rasensuihei/mcf"))
#+end_src
* Lisps
@@ -414,6 +445,7 @@ conflict with the builtin version of Org)
:config
(setq document-dir (expand-file-name (if (eq system-type 'darwin) "~/Nextcloud" "~/Documents")))
(setq org-directory (concat document-dir "/org"))
(when (not (file-exists-p org-directory)) (mkdir org-directory))
(set-fill-column 100)
(setq org-src-fontify-natively t
org-confirm-babel-evaluate nil
@@ -711,7 +743,7 @@ taking package.
#+begin_src elisp :tangle yes :exports code
(leaf bqn-mode
:el-get "museoa/bqn-mode"
:ensure (bqn-mode :type git :host github :repo "museoa/bqn-mode")
:defer-config
(set-face-attribute 'bqn-default nil :family 'unspecified))
#+end_src