Restore emacs and magit keybind w zed

This commit is contained in:
Emmet 2025-12-05 14:52:53 -06:00
parent d91cdb6f93
commit e3ac21a61d
3 changed files with 173 additions and 117 deletions

View file

@ -1,8 +1,15 @@
{ config, lib, pkgs, pkgs-stable, ... }:
{
config,
lib,
pkgs,
pkgs-stable,
...
}:
let
cfg = config.userSettings.emacs;
in {
in
{
options = {
userSettings.emacs = {
enable = lib.mkEnableOption "Enable emacs";
@ -15,30 +22,55 @@ in {
};
## THIS IS BROKEN BECAUSE THEY CHANGED EMACS IN NIXPKGS I THINK
config = lib.mkIf false {
#config = lib.mkIf cfg.enable {
#config = lib.mkIf false {
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
(pkgs.emacsWithPackagesFromUsePackage {
config = ./init.el;
package = pkgs.emacs-pgtk;
alwaysEnsure = false;
extraEmacsPackages = epkgs: with epkgs; [
org-modern olivetti
extraEmacsPackages =
epkgs: with epkgs; [
org-modern
olivetti
command-log-mode
vertico corfu hotfuzz orderless
evil evil-collection evil-snipe evil-owl evil-vimish-fold
dashboard doom-themes doom-modeline
nerd-icons nerd-icons-dired nerd-icons-corfu
nerd-icons-ibuffer nerd-icons-completion
yasnippet shackle
projectile treemacs treemacs-projectile
treemacs-evil treemacs-nerd-icons
vertico
corfu
hotfuzz
orderless
evil
evil-collection
evil-snipe
evil-owl
evil-vimish-fold
dashboard
doom-themes
doom-modeline
nerd-icons
nerd-icons-dired
nerd-icons-corfu
nerd-icons-ibuffer
nerd-icons-completion
yasnippet
shackle
projectile
treemacs
treemacs-projectile
treemacs-evil
treemacs-nerd-icons
treesit-grammars.with-all-grammars
git-timemachine wgrep
magit magit-todos
undo-fu undo-fu-session
org-roam org-node org-node-fakeroam
vterm vterm-toggle sudo-edit
git-timemachine
wgrep
magit
magit-todos
undo-fu
undo-fu-session
org-roam
org-node
org-node-fakeroam
vterm
vterm-toggle
sudo-edit
direnv
svelte-mode
typescript-mode
@ -68,8 +100,12 @@ in {
) { })
gdscript-mode
nix-mode
python python-mode
lsp-mode flycheck lsp-ui lsp-treemacs
python
python-mode
lsp-mode
flycheck
lsp-ui
lsp-treemacs
# fix ultra-scroll
(epkgs.callPackage (
{ lib, trivialBuild }:
@ -166,6 +202,8 @@ in {
;;; sysvars.el ends here
'';
wayland.windowManager.hyprland.settings.exec-once = lib.optionals config.wayland.windowManager.hyprland.enable [ "emacs --daemon" ];
wayland.windowManager.hyprland.settings.exec-once =
lib.optionals config.wayland.windowManager.hyprland.enable
[ "emacs --daemon" ];
};
}

View file

@ -452,13 +452,14 @@
;; Enable corfu
(use-package corfu
:custom
(corfu-auto t)
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
;; (corfu-preview-current nil) ;; Disable current candidate preview
(corfu-preview-current t) ;; Disable current candidate preview
(corfu-preselect 'prompt) ;; Preselect the prompt
(corfu-on-exact-match 'insert) ;; Configure handling of exact matches
(corfu-auto nil) ;; auto complete
(corfu-auto-delay 1.2) ;; wait half a second though
(corfu-auto-prefix 5) ;; also only for words 3 or more
(corfu-auto-delay 0.15) ;; wait half a second though
(corfu-auto-prefix 2) ;; also only for words 2 or more
(corfu-min-width 120)
(defun corfu-lsp-setup ()
(setq-local completion-styles '(orderless flex hotfuzz)
completion-category-defaults nil))
@ -1094,5 +1095,7 @@ Made for `org-tab-first-hook' in evil-mode."
(use-package rainbow-mode)
(set-frame-font "FiraCode Nerd Font")
(provide 'init)
;;; init.el ends here

View file

@ -128,6 +128,12 @@ in
"task_name" = "gitu";
}
];
"space g G" = [
"task::Spawn"
{
"task_name" = "magit";
}
];
"space o d" = [
"task::Spawn"
{
@ -221,6 +227,15 @@ in
use_new_terminal = false;
hide = "on_success";
}
{
label = "magit";
command = "emacsclient -c --eval '(magit-status)' &> /dev/null & disown; exit;";
reveal = "always";
reveal_target = "center";
allow_concurrent_runs = false;
use_new_terminal = false;
hide = "on_success";
}
{
label = "yazi";
command = "yazi";