Variosu small emacs tweaks & fixes

This commit is contained in:
Tristan D. 2025-02-27 17:04:02 +01:00
parent a48f613f6f
commit 1dafd171cc
Signed by: tristan
SSH key fingerprint: SHA256:9oFM1J63hYWJjCnLG6C0fxBS15rwNcWwdQNMOHYKJ/4
6 changed files with 363 additions and 11 deletions

View file

@ -24,10 +24,11 @@
(setq nerd-icons-font-names '("SymbolsNerdFontMono-Regular.ttf"))
(setq doom-font (font-spec :family "Iosevka Nerd Font Mono" :size 16)
doom-variable-pitch-font (font-spec :family "Iosevka Nerd Font Mono" :size 16)
;; doom-symbol-font (font-spec :family "all-the-icons" :size 13)
doom-big-font (font-spec :family "Iosevka Nerd Font Mono" :size 20 :weight 'demibold))
;; NOTE Floats are important for dpi support for some reason
(setq doom-font (font-spec :family "Iosevka Nerd Font Mono" :size 16.0)
doom-variable-pitch-font (font-spec :family "Iosevka Nerd Font Mono" :size 16.0)
;; doom-symbol-font (font-spec :family "all-the-icons" :size 13.0)
doom-big-font (font-spec :family "Iosevka Nerd Font Mono" :size 20.0 :weight 'demibold))
(defun add-back-emoji-fallback-font-families ()
(when (fboundp 'set-fontset-font)
@ -78,6 +79,17 @@
;;
)
(after! evil-goggles
(setq! evil-goggles-duration 0.15
evil-goggles-pulse 't ; too slow
;; evil-goggles provides a good indicator of what has been affected.
;; delete/change is obvious, so I'd rather disable it for these.
evil-goggles-enable-delete 't
evil-goggles-enable-change 't)
(evil-goggles-use-diff-faces))
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
@ -125,6 +137,37 @@
;; )
;; (setq! tramp-default-method "ssh")
;; (use-package treesit-auto
;; :custom
;; (treesit-auto-install 'prompt)
;; :config
;; (treesit-auto-langs '(python rust go))
;; ;; (treesit-auto-add-to-auto-mode-alist 'all)
;; (global-treesit-auto-mode))
(use-package ultra-scroll
:init
(setq scroll-conservatively 101 ;; important!
scroll-margin 0)
:config
(ultra-scroll-mode 1))
(use-package! codemetrics)
(use-package! cognitive-complexity) ;; codemetrics for treesit
;; TODO Add fn bound to `SPC t ???` which toggles cog-compl mode for treesit-buffers & codemetrics for normal ones
;; Eat (Native Term Emu)
(use-package! eat
:custom
(eat-shell "fish")
(explicit-shell-file-name "/etc/profiles/per-user/tristand/bin/fish") ;; TODO username dependant
:config
(add-hook 'eshell-first-time-mode-hook
#'eat-eshell-visual-command-mode)
(add-hook 'eshell-first-time-mode-hook #'eat-shell-mode))
;; awatch
(use-package! activity-watch-mode
@ -458,7 +501,9 @@
(forward-char)))
(use-package! tabby
:hook (rustic-mode . tabby-mode)
:hook
(rustic-mode . tabby-mode)
(rust-ts-mode . tabby-mode)
:init
(setq tabby-idle-delay 0.5)
(setq tabby--connection "http://100.64.0.3:8083")

View file

@ -31,7 +31,7 @@
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
;; doom-dashboard ; a nifty splash screen for Emacs
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;; (emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW

View file

@ -66,7 +66,25 @@
(package! eglot-x :recipe (:host github :repo "nemethf/eglot-x"))
(package! eglot-booster :recipe (:type git :host nil :repo "https://github.com/jdtsmith/eglot-booster.git" :branch "main"))
;;;;;;
(package! eat :recipe (:type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el" ("term" "term/*.el") "*.texi"
"*.ti" ("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el"))))
;;
;; B-D
(package! cognitive-complexity
:recipe (:host github :repo "emacs-vs/cognitive-complexity"))
(use-package codemetrics
:recipe (:host github :repo "jcs-elpa/codemetrics"))
(package! treesit-auto)
(package! tabby
:recipe (:host github :files ("*.el" "node_scripts")

286
flake.lock generated
View file

@ -1,5 +1,21 @@
{
"nodes": {
"agda-lib-mode": {
"flake": false,
"locked": {
"lastModified": 1738433795,
"narHash": "sha256-a6E8X+pWJHBLToKOwNk1MqiCGuLtuCUtYhcZkriks7g=",
"ref": "refs/heads/main",
"rev": "3a9eb9c114bb0503b55f94114c15cb9867a1a1ad",
"revCount": 4,
"type": "git",
"url": "https://codeberg.org/heraplem/agda-lib-mode.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/heraplem/agda-lib-mode.git"
}
},
"agenix": {
"inputs": {
"darwin": "darwin",
@ -224,6 +240,41 @@
"type": "github"
}
},
"doom-dashboard": {
"flake": false,
"locked": {
"lastModified": 1716817456,
"narHash": "sha256-Y51NflgKZ+K8zGOu0v43Wsr9gfyRKhKPXToqLlIK2tc=",
"owner": "emacs-dashboard",
"repo": "doom-dashboard",
"rev": "397b77419a618da9ca45191570949f5fbcc869c8",
"type": "github"
},
"original": {
"owner": "emacs-dashboard",
"repo": "doom-dashboard",
"type": "github"
}
},
"elisp": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1738821643,
"narHash": "sha256-hLonrO2pX6R3muC6XWIkG0Ny94Y97nSZoAjOf8IuYWE=",
"ref": "refs/heads/main",
"rev": "593f7f7a19ef00c7bb6018d765c60a7028250b99",
"revCount": 19,
"type": "git",
"url": "https://codeberg.org/heraplem/nix-elisp.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/heraplem/nix-elisp.git"
}
},
"emacs-overlay": {
"inputs": {
"flake-utils": [
@ -381,6 +432,24 @@
"type": "github"
}
},
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-schemas": {
"locked": {
"lastModified": 1721999734,
@ -618,6 +687,22 @@
"type": "github"
}
},
"hs-to-coq": {
"flake": false,
"locked": {
"lastModified": 1689276073,
"narHash": "sha256-qOleYTZBhVjQiaYm+nSPJ/F3kZq1AhuFTWGrDewaiAA=",
"owner": "plclub",
"repo": "hs-to-coq",
"rev": "03e823972fc7c5f85a300e554c691563f89a3e5f",
"type": "github"
},
"original": {
"owner": "plclub",
"repo": "hs-to-coq",
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
@ -670,6 +755,22 @@
"type": "github"
}
},
"lean4-mode": {
"flake": false,
"locked": {
"lastModified": 1733861382,
"narHash": "sha256-DLgdxd0m3SmJ9heJ/pe5k8bZCfvWdaKAF0BDYEkwlMQ=",
"owner": "leanprover-community",
"repo": "lean4-mode",
"rev": "76895d8939111654a472cfc617cfd43fbf5f1eb6",
"type": "github"
},
"original": {
"owner": "leanprover-community",
"repo": "lean4-mode",
"type": "github"
}
},
"lix": {
"flake": false,
"locked": {
@ -730,6 +831,22 @@
"url": "https://git.vlt81.de/tristan/llama.cpp.git"
}
},
"nano-emacs": {
"flake": false,
"locked": {
"lastModified": 1694425853,
"narHash": "sha256-LmPj48mNpo4aa5O8iZzlKJfa0L804E7vm+QU7/SEV4M=",
"owner": "rougier",
"repo": "nano-emacs",
"rev": "b8631088220dbbcd885ad1353bdc52b569655f85",
"type": "github"
},
"original": {
"owner": "rougier",
"repo": "nano-emacs",
"type": "github"
}
},
"nix-alien": {
"inputs": {
"flake-compat": [
@ -756,6 +873,44 @@
"type": "github"
}
},
"nix-emacs-extra": {
"inputs": {
"agda-lib-mode": "agda-lib-mode",
"doom-dashboard": "doom-dashboard",
"elisp": "elisp",
"flake-parts": [
"flake-parts"
],
"home-manager": [
"home-manager"
],
"hs-to-coq": "hs-to-coq",
"lean4-mode": "lean4-mode",
"nano-emacs": "nano-emacs",
"nixpkgs": [
"nixpkgs"
],
"org-linker": "org-linker",
"org-modern-indent": "org-modern-indent",
"snax": "snax",
"tecosaur-org-mode": "tecosaur-org-mode",
"typst-ts-mode": "typst-ts-mode",
"ultra-scroll": "ultra-scroll"
},
"locked": {
"lastModified": 1740100784,
"narHash": "sha256-hvte/+42wbusEyUWQo+Irtkg/4w5MC6cV9KFXZhlRDU=",
"ref": "refs/heads/main",
"rev": "fe6dfd81db4b47d0d21f0b0699da72c0d441d040",
"revCount": 60,
"type": "git",
"url": "https://codeberg.org/heraplem/nix-emacs-extra"
},
"original": {
"type": "git",
"url": "https://codeberg.org/heraplem/nix-emacs-extra"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@ -934,6 +1089,18 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1735774519,
"narHash": "sha256-CewEm1o2eVAnoqb6Ml+Qi9Gg/EfNAxbRx1lANGVyoLI=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/e9b51731911566bbf7e4895475a87fe06961de0b.tar.gz"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
@ -999,6 +1166,22 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1737942377,
"narHash": "sha256-8Eo/jRAgT3CbAloyqOj6uPN1EqBvLI/Tv2g+RxHjkhU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88a55dffa4d44d294c74c298daf75824dc0aafb5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1740126099,
"narHash": "sha256-ozoOtE2hGsqh4XkTJFsrTkNxkRgShxpQxDynaPZUGxk=",
@ -1014,7 +1197,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1724819573,
"narHash": "sha256-GnR7/ibgIH1vhoy8cYdmXE6iyZqKqFxQSVkFgosBh6w=",
@ -1056,6 +1239,38 @@
"type": "github"
}
},
"org-linker": {
"flake": false,
"locked": {
"lastModified": 1709729780,
"narHash": "sha256-KNxpNJ0gNDYOlbDABI30EDHbp55m19sDmniSkQqgWXk=",
"owner": "jcguu95",
"repo": "org-linker.el",
"rev": "8da25320b1616f8df445ac6595b02374dadf319f",
"type": "github"
},
"original": {
"owner": "jcguu95",
"repo": "org-linker.el",
"type": "github"
}
},
"org-modern-indent": {
"flake": false,
"locked": {
"lastModified": 1734400276,
"narHash": "sha256-9aaaPGCvt51FknRKB5zT8AdHjhH/sQMc1IyQS3KnJsU=",
"owner": "jdtsmith",
"repo": "org-modern-indent",
"rev": "52b46c6ecd63e627ab5bfb83c580b51f68a23774",
"type": "github"
},
"original": {
"owner": "jdtsmith",
"repo": "org-modern-indent",
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
@ -1171,12 +1386,13 @@
"lix-module": "lix-module",
"llama-cpp": "llama-cpp",
"nix-alien": "nix-alien",
"nix-emacs-extra": "nix-emacs-extra",
"nix-index-database": "nix-index-database",
"nix-ld-rs": "nix-ld-rs",
"nix-wallpaper": "nix-wallpaper",
"nixos-hardware": "nixos-hardware",
"nixos-images": "nixos-images",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable_3",
"nur": "nur",
"plasma-manager": "plasma-manager",
@ -1224,6 +1440,22 @@
"type": "github"
}
},
"snax": {
"flake": false,
"locked": {
"lastModified": 1718883490,
"narHash": "sha256-U1fEOkDR+7956Hxdm9J57FE+JCGq8GnAJd62FKh9Yz8=",
"ref": "refs/heads/main",
"rev": "fcafe991c2d458f5160ebcb498a4323d19aed16b",
"revCount": 240,
"type": "git",
"url": "https://fpfenning@bitbucket.org/fpfenning/snax.git"
},
"original": {
"type": "git",
"url": "https://fpfenning@bitbucket.org/fpfenning/snax.git"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -1284,6 +1516,22 @@
"type": "github"
}
},
"tecosaur-org-mode": {
"flake": false,
"locked": {
"lastModified": 1726842390,
"narHash": "sha256-u7RdOhtcH4EAx631TlPIZfYryEgYzOVIkgtUZvtgl8Y=",
"ref": "refs/heads/dev",
"rev": "684b01e6a29fd8eb31d721245774c3a127a03d15",
"revCount": 28085,
"type": "git",
"url": "https://code.tecosaur.net/tec/org-mode.git"
},
"original": {
"type": "git",
"url": "https://code.tecosaur.net/tec/org-mode.git"
}
},
"tinted-foot": {
"flake": false,
"locked": {
@ -1386,6 +1634,38 @@
"type": "github"
}
},
"typst-ts-mode": {
"flake": false,
"locked": {
"lastModified": 1737163458,
"narHash": "sha256-oZ4uq87PeqXGIy8Dmx7ppGzrxDhiJEGOH8nXerZ03ik=",
"ref": "refs/heads/main",
"rev": "aee8ff090cff6f39a70ac2c9035b1eb2b69924d7",
"revCount": 244,
"type": "git",
"url": "https://codeberg.org/meow_king/typst-ts-mode.git"
},
"original": {
"type": "git",
"url": "https://codeberg.org/meow_king/typst-ts-mode.git"
}
},
"ultra-scroll": {
"flake": false,
"locked": {
"lastModified": 1736544825,
"narHash": "sha256-32jXz4ek3CsW8JKZ5W1xOv6+UufAMcfZenjoqWc9U4g=",
"owner": "jdtsmith",
"repo": "ultra-scroll",
"rev": "f5a6e8e8c411d58860f0dec2dccefc689924a8cb",
"type": "github"
},
"original": {
"owner": "jdtsmith",
"repo": "ultra-scroll",
"type": "github"
}
},
"winapps": {
"inputs": {
"flake-compat": [
@ -1394,7 +1674,7 @@
"flake-utils": [
"flake-utils"
],
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1739719197,

View file

@ -16,6 +16,12 @@
# url = "github:NixOS/nixpkgs/nixos-unstable-small";
# url = "github:mschwaig/nixpkgs/fix-rocm-build-by-disabling-test";
};
nix-emacs-extra = {
url = "git+https://codeberg.org/heraplem/nix-emacs-extra";
inputs.home-manager.follows = "home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
nixpkgs-stable = {
url = "github:NixOS/nixpkgs/nixos-24.05";
};

View file

@ -3,6 +3,7 @@
, pkgs
, lib
, inputs
, system
, ...
}:
let
@ -16,10 +17,12 @@ let
ref = "main";
rev = "c7392136bed264258c9b8788b14410e1ff06d602";
};
myEmacs = (pkgs.emacsPackagesFor pkgs.emacs-unstable-pgtk).emacsWithPackages (epkgs:
myEmacs = (pkgs.emacsPackagesFor pkgs.emacs-unstable).emacsWithPackages (epkgs:
with epkgs; [
vterm
treesit-grammars.with-all-grammars
inputs.nix-emacs-extra.packages."${system}".doom-dashboard
inputs.nix-emacs-extra.packages."${system}".ultra-scroll
]);
in
{