meta: refactor a bunch of the config

i was having an unbelievable annoyance with

spacious-padding until i realised i could

just use the :init keyword, rolfcopter
This commit is contained in:
Artur Manuel 2024-08-30 10:33:00 +01:00
commit 35e5d38e54
Failed to generate hash of commit
4 changed files with 53 additions and 37 deletions

2
.gitignore vendored
View file

@ -1,5 +1,7 @@
/* /*
/**/*~ /**/*~
/**/#*#
/**/.#*
!/flake.* !/flake.*
!/package !/package
!/.gitignore !/.gitignore

24
flake.lock generated
View file

@ -9,11 +9,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1721495293, "lastModified": 1724951607,
"narHash": "sha256-L6U8CEsRNfz3SeJGlKNgga4O89z4QNmU577Eyq9PVCU=", "narHash": "sha256-cOCOZOilbAtW29FaYZEP/K/Tf8E6VeWGrKJlK+GRe2M=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "173aa23e22b32c9d3585a96df74ec7c53d64de92", "rev": "33812cad36ad7826d7eb9bd72eb11995be20cff6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -42,11 +42,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1721466660, "lastModified": 1724748588,
"narHash": "sha256-pFSxgSZqZ3h+5Du0KvEL1ccDZBwu4zvOil1zzrPNb3c=", "narHash": "sha256-NlpGA4+AIf1dKNq76ps90rxowlFXUsV9x7vK/mN37JM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6e14bbce7bea6c4efd7adfa88a40dac750d80100", "rev": "a6292e34000dc93d43bccf78338770c1c5ec8a99",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,11 +58,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1721226092, "lastModified": 1724727824,
"narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=", "narHash": "sha256-0XH9MJk54imJm+RHOLTUJ7e+ponLW00tw5ke4MTVa1Y=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c716603a63aca44f39bef1986c13402167450e0a", "rev": "36bae45077667aff5720e5b3f1a5458f51cf0776",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -79,11 +79,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1719994518, "lastModified": 1722555600,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -5,19 +5,38 @@
* Emacs window stuff * Emacs window stuff
Things like turning off the menubar, etc. Things like turning off the menubar, etc.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package emacs (use-package emacs
:config :init
(menu-bar-mode -1) (setq frame-resize-pixelwise t
(scroll-bar-mode -1) frame-inhibit-implied-resize t)
(tool-bar-mode -1) (menu-bar-mode -1)
(recentf-mode 1) (scroll-bar-mode -1)
:custom (tool-bar-mode -1)
(inhibit-startup-message t) (recentf-mode 1)
(initial-scratch-message nil) (fringe-mode -1)
(org-startup-with-inline-images t)) :custom
(inhibit-startup-message t)
(initial-scratch-message nil)
(org-startup-with-inline-images t)
(use-short-answers t)
(frame-title-format '("%b"))
(ring-bell-function 'ignore)
(use-dialog-box nil)
(use-file-dialog nil))
#+END_SRC #+END_SRC
* Theming * Theming
** Spacious Padding
#+BEGIN_SRC emacs-lisp
(use-package spacious-padding :ensure t
:hook (after-init . spacious-padding-mode)
:bind ("<f8>" . spacious-padding-mode))
#+END_SRC
** Mood-line
#+BEGIN_SRC emacs-lisp
(use-package mood-line :ensure t
:hook (after-init . mood-line-mode))
#+END_SRC
** Nerd Fonts ** Nerd Fonts
May or may not need nerd fonts for some of the below packages. 8) May or may not need nerd fonts for some of the below packages. 8)
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -42,25 +61,18 @@ Using doom-themes here because Tokyo Night isn't on MELPA.
;; Enable custom neotree theme (all-the-icons must be installed!) ;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config) (doom-themes-neotree-config)
;; or for treemacs users ;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme (setq doom-themes-treemacs-theme "doom-tokyo-night") ; use "doom-colors" for less minimal icon theme
(doom-themes-treemacs-config) (doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification. ;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config)) (doom-themes-org-config))
#+END_SRC #+END_SRC
** Doom Modeline ** Mood-line
Also may not need doom modeline.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package doom-modeline (use-package mood-line :ensure t
:ensure t :custom (mood-line-glyph-alist mood-line-glyphs-fira-code)
:hook (after-init . doom-modeline-mode) :hooks (after-init . mood-line-mode))
:config #+END_SRC emacs-lisp
(setq doom-modeline-height 29)
(custom-set-faces
'(mode-line ((t (:family "Noto Sans" :height 1.0))))
'(mode-line-active ((t (:family "Noto Sans" :height 1.0)))) ; For 29+
'(mode-line-inactive ((t (:family "Noto Sans" :height 1.0))))))
#+END_SRC
* Vertico, Orderless, and more stuff * Vertico, Orderless, and more stuff
Personal favourite emacs completer, and my computer can run it! 8) Personal favourite emacs completer, and my computer can run it! 8)
@ -277,7 +289,7 @@ Enabling Emacs-LSP to use LSPs, I am very dry on syntax highlighters right now.
** SPECIFIC LANGUAGES ** SPECIFIC LANGUAGES
*** Nix *** Nix
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package nix-ts-mode (use-package nix-mode
:mode "\\.nix\\'") :mode "\\.nix\\'")
(use-package lsp-mode (use-package lsp-mode
:custom :custom

View file

@ -9,7 +9,7 @@ let
extraEmacsPackages = extraEmacsPackages =
e: (builtins.attrValues { e: (builtins.attrValues {
inherit (e) inherit (e)
nix-ts-mode nix-mode
doom-themes doom-themes
vertico vertico
orderless orderless
@ -40,6 +40,8 @@ let
envrc envrc
ccls ccls
org-roam org-roam
spacious-padding
mood-line
; ;
}) ++ [ }) ++ [
e.treesit-grammars.with-all-grammars e.treesit-grammars.with-all-grammars