move general config to the general block?
Signed-off-by: Xe <me@christine.website>
This commit is contained in:
parent
8e2ef1948a
commit
e1ae60aac1
|
@ -117,15 +117,6 @@ in {
|
||||||
"C-c l" = "counsel-locate";
|
"C-c l" = "counsel-locate";
|
||||||
"M-y" = "counsel-yank-pop";
|
"M-y" = "counsel-yank-pop";
|
||||||
};
|
};
|
||||||
|
|
||||||
general = ''
|
|
||||||
(general-nmap
|
|
||||||
:prefix "SPC"
|
|
||||||
"SPC" '(counsel-M-x :which-key "M-x")
|
|
||||||
"ff" '(counsel-find-file :which-key "find file")
|
|
||||||
"s" '(:ignore t :which-key "search")
|
|
||||||
"sc" '(counsel-unicode-char :which-key "find character"))
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
direnv = {
|
direnv = {
|
||||||
|
@ -157,11 +148,6 @@ in {
|
||||||
after = [ "evil" ];
|
after = [ "evil" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
evil-magit = {
|
|
||||||
enable = true;
|
|
||||||
after = [ "magit" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
flycheck = {
|
flycheck = {
|
||||||
enable = true;
|
enable = true;
|
||||||
diminish = [ "flycheck-mode" ];
|
diminish = [ "flycheck-mode" ];
|
||||||
|
@ -197,8 +183,9 @@ in {
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
enable = true;
|
enable = true;
|
||||||
after = [ "evil" "which-key" ];
|
after = [ "evil" "which-key" "ivy" "projectile" "swiper" "counsel" ];
|
||||||
config = ''
|
config = ''
|
||||||
|
(progn
|
||||||
(general-evil-setup)
|
(general-evil-setup)
|
||||||
|
|
||||||
(general-mmap
|
(general-mmap
|
||||||
|
@ -217,13 +204,14 @@ in {
|
||||||
"bd" '(kill-this-buffer :which-key "kill buffer")
|
"bd" '(kill-this-buffer :which-key "kill buffer")
|
||||||
|
|
||||||
"f" '(:ignore t :which-key "file")
|
"f" '(:ignore t :which-key "file")
|
||||||
"ff" '(find-file :which-key "find")
|
|
||||||
"fs" '(save-buffer :which-key "save")
|
"fs" '(save-buffer :which-key "save")
|
||||||
|
|
||||||
"m" '(:ignore t :which-key "mode")
|
"m" '(:ignore t :which-key "mode")
|
||||||
|
|
||||||
"t" '(:ignore t :which-key "toggle")
|
"t" '(:ignore t :which-key "toggle")
|
||||||
"tf" '(toggle-frame-fullscreen :which-key "fullscreen")
|
"tf" '(toggle-frame-fullscreen :which-key "fullscreen")
|
||||||
|
|
||||||
|
"m" '(:ignore t :which-key "window")
|
||||||
"wv" '(split-window-horizontally :which-key "split vertical")
|
"wv" '(split-window-horizontally :which-key "split vertical")
|
||||||
"ws" '(split-window-vertically :which-key "split horizontal")
|
"ws" '(split-window-vertically :which-key "split horizontal")
|
||||||
"wk" '(evil-window-up :which-key "up")
|
"wk" '(evil-window-up :which-key "up")
|
||||||
|
@ -234,6 +222,33 @@ in {
|
||||||
|
|
||||||
"q" '(:ignore t :which-key "quit")
|
"q" '(:ignore t :which-key "quit")
|
||||||
"qq" '(save-buffers-kill-emacs :which-key "quit"))
|
"qq" '(save-buffers-kill-emacs :which-key "quit"))
|
||||||
|
|
||||||
|
(general-nmap
|
||||||
|
:prefix "SPC"
|
||||||
|
"g" '(:ignore t :which-key "Git")
|
||||||
|
"gs" 'magit-status)
|
||||||
|
|
||||||
|
(general-nmap
|
||||||
|
:prefix "SPC"
|
||||||
|
"bb" '(ivy-switch-buffer :which-key "switch buffer")
|
||||||
|
"fr" '(ivy-recentf :which-key "recent file"))
|
||||||
|
|
||||||
|
(general-nmap
|
||||||
|
:prefix "SPC"
|
||||||
|
"p" '(:ignore t :which-key "Project")
|
||||||
|
"pf" '(projectile-find-file :which-key "Find in project")
|
||||||
|
"pl" '(projectile-switch-project :which-key "Switch project"))
|
||||||
|
|
||||||
|
(general-nmap
|
||||||
|
:prefix "SPC"
|
||||||
|
"SPC" '(counsel-M-x :which-key "M-x")
|
||||||
|
"ff" '(counsel-find-file :which-key "find file")
|
||||||
|
"s" '(:ignore t :which-key "search")
|
||||||
|
"sc" '(counsel-unicode-char :which-key "find character"))
|
||||||
|
|
||||||
|
(general-nmap
|
||||||
|
:prefix "SPC"
|
||||||
|
"ss" '(swiper :which-key "swiper")))
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -248,24 +263,9 @@ in {
|
||||||
ivy-count-format "(%d/%d) "
|
ivy-count-format "(%d/%d) "
|
||||||
ivy-initial-inputs-alist nil)
|
ivy-initial-inputs-alist nil)
|
||||||
'';
|
'';
|
||||||
general = ''
|
|
||||||
(general-nmap
|
|
||||||
:prefix "SPC"
|
|
||||||
"bb" '(ivy-switch-buffer :which-key "switch buffer")
|
|
||||||
"fr" '(ivy-recentf :which-key "recent file"))
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
magit = {
|
magit.enable = true;
|
||||||
enable = true;
|
|
||||||
|
|
||||||
general = ''
|
|
||||||
(general-nmap
|
|
||||||
:prefix "SPC"
|
|
||||||
"g" '(:ignore t :which-key "Git")
|
|
||||||
"gs" 'magit-status)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
markdown-mode = {
|
markdown-mode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -289,13 +289,6 @@ in {
|
||||||
(setq projectile-completion-system 'ivy)
|
(setq projectile-completion-system 'ivy)
|
||||||
(add-to-list 'projectile-globally-ignored-files ".DS_Store"))
|
(add-to-list 'projectile-globally-ignored-files ".DS_Store"))
|
||||||
'';
|
'';
|
||||||
general = ''
|
|
||||||
(general-nmap
|
|
||||||
:prefix "SPC"
|
|
||||||
"p" '(:ignore t :which-key "Project")
|
|
||||||
"pf" '(projectile-find-file :which-key "Find in project")
|
|
||||||
"pl" '(projectile-switch-project :which-key "Switch project"))
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rainbow-delimiters = {
|
rainbow-delimiters = {
|
||||||
|
@ -309,12 +302,6 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
bind = { "C-s" = "swiper"; };
|
bind = { "C-s" = "swiper"; };
|
||||||
|
|
||||||
general = ''
|
|
||||||
(general-nmap
|
|
||||||
:prefix "SPC"
|
|
||||||
"ss" '(swiper :which-key "swiper"))
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
which-key = {
|
which-key = {
|
||||||
|
@ -387,7 +374,6 @@ in {
|
||||||
org-roam-ui.enable = true;
|
org-roam-ui.enable = true;
|
||||||
org-roam-protocol.enable = true;
|
org-roam-protocol.enable = true;
|
||||||
|
|
||||||
weechat.enable = true;
|
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
|
|
||||||
gemini-mode.enable = true;
|
gemini-mode.enable = true;
|
||||||
|
|
|
@ -222,7 +222,6 @@ let
|
||||||
let mkMap = n: v: mkBindHelper "bind" ":map ${n}" v;
|
let mkMap = n: v: mkBindHelper "bind" ":map ${n}" v;
|
||||||
in flatten (mapAttrsToList mkMap bs);
|
in flatten (mapAttrsToList mkMap bs);
|
||||||
mkBindKeyMap = mkBindHelper "bind-keymap" "";
|
mkBindKeyMap = mkBindHelper "bind-keymap" "";
|
||||||
extraAfter = optional (config.general != "") "general";
|
|
||||||
mkChords = mkBindHelper "chords" "";
|
mkChords = mkBindHelper "chords" "";
|
||||||
mkHook = map (v: ":hook ${v}");
|
mkHook = map (v: ":hook ${v}");
|
||||||
mkDefer = v:
|
mkDefer = v:
|
||||||
|
@ -241,8 +240,7 @@ let
|
||||||
++ mkMode config.mode
|
++ mkMode config.mode
|
||||||
++ optionals (config.init != "") [ ":init" config.init ]
|
++ optionals (config.init != "") [ ":init" config.init ]
|
||||||
++ optionals (config.config != "") [ ":config" config.config ]
|
++ optionals (config.config != "") [ ":config" config.config ]
|
||||||
++ optionals (config.general != "") [ ":general" config.general ]
|
++ optional (config.extraConfig != "") config.extraConfig ++ [ ")" ]);
|
||||||
++ optional (config.extraConfig != "") config.extraConfig) + ")";
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue