mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-28 11:41:46 +01:00
feat: emacs - GUI mode by default, increase font size
This commit is contained in:
3
Justfile
3
Justfile
@@ -183,8 +183,8 @@ reload-emacs-cmd := if os() == "macos" {
|
||||
emacs-test:
|
||||
rm -rf $"($env.HOME)/.config/doom"
|
||||
rsync -avz --copy-links --chmod=D2755,F744 home/base/desktop/editors/emacs/doom/ $"($env.HOME)/.config/doom"
|
||||
doom sync
|
||||
doom clean
|
||||
doom sync
|
||||
|
||||
emacs-clean:
|
||||
rm -rf $"($env.HOME)/.config/doom/"
|
||||
@@ -195,4 +195,5 @@ emacs-purge:
|
||||
doom sync
|
||||
|
||||
emacs-reload:
|
||||
doom sync
|
||||
{{reload-emacs-cmd}}
|
||||
|
||||
@@ -36,13 +36,15 @@ when in doubt, run `doom sync`!
|
||||
|
||||
Here is the cheetsheet related to my DoomEmacs configs. Please read vim's common cheetsheet at [../README.md](../README.md) before reading the following.
|
||||
|
||||
### Terminal Related
|
||||
### Basics
|
||||
|
||||
> Terminal(vterm) is useful in GUI mode, I use Zellij instead in terminal mode.
|
||||
|
||||
| Action | Shortcut |
|
||||
| ---------------------- | ------------- |
|
||||
| Open file tree sidebar | `SPC + o + p` |
|
||||
| Popup Terminal | `SPC + o + t` |
|
||||
| Popup Terminal(vterm) | `SPC + o + t` |
|
||||
| Open Terminal | `SPC + o + T` |
|
||||
| Open file tree sidebar | `SPC + o + p` |
|
||||
| Exit | `M-x C-c` |
|
||||
|
||||
### Window Navigation
|
||||
@@ -109,6 +111,10 @@ And bookmarks:
|
||||
| Find files by keyword in path | `<Space> + <Space>` |
|
||||
| Grep string in files (vertico + ripgrep) | `<Space> + sd` |
|
||||
|
||||
### Image Preview(GUI mode only)
|
||||
|
||||
Use `-`, `+` to resize the image, `r` to rotate the image.
|
||||
|
||||
### Search & replace
|
||||
|
||||
```bash
|
||||
|
||||
@@ -19,7 +19,8 @@ with lib; let
|
||||
export PATH="${config.xdg.configHome}/emacs/bin:$PATH"
|
||||
'';
|
||||
shellAliases = {
|
||||
e = "emacsclient --create-frame --tty";
|
||||
e = "emacsclient --create-frame"; # gui
|
||||
et = "emacsclient --create-frame --tty"; # termimal
|
||||
};
|
||||
librime-dir = "${config.xdg.dataHome}/librime";
|
||||
parinfer-rust-lib-dir = "${config.xdg.dataHome}/parinfer-rust";
|
||||
@@ -82,7 +83,7 @@ in {
|
||||
# Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode.
|
||||
# pgtk (pure gtk) build add native support for wayland.
|
||||
# https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html#Releases
|
||||
emacsPkg = pkgs.emacs29-pgtk;
|
||||
emacsPkg = (pkgs.emacsPackagesFor pkgs.emacs29-pgtk).emacsWithPackages (epkgs: [epkgs.vterm]);
|
||||
in {
|
||||
home.packages = [emacsPkg];
|
||||
services.emacs = {
|
||||
@@ -97,7 +98,7 @@ in {
|
||||
let
|
||||
# macport adds some native features based on GNU Emacs 29
|
||||
# https://bitbucket.org/mituharu/emacs-mac/src/master/README-mac
|
||||
emacsPkg = pkgs.emacs29-macport;
|
||||
emacsPkg = (pkgs.emacsPackagesFor pkgs.emacs29-macport).emacsWithPackages (epkgs: [epkgs.vterm]);
|
||||
in {
|
||||
home.packages = [emacsPkg];
|
||||
launchd.enable = true;
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
;; See 'C-h v doom-font' for documentation and more examples of what they
|
||||
;; accept. For example:
|
||||
;;
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 15 :weight 'light)
|
||||
doom-variable-pitch-font (font-spec :family "DejaVu Sans" :size 16)
|
||||
(setq doom-font (font-spec :family "JetBrainsMono Nerd Font" :size 17 :weight 'light)
|
||||
doom-variable-pitch-font (font-spec :family "DejaVu Sans" :size 18)
|
||||
doom-symbol-font (font-spec :family "JuliaMono")
|
||||
doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size 26))
|
||||
doom-big-font (font-spec :family "JetBrainsMono Nerd Font" :size 28))
|
||||
;;
|
||||
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
|
||||
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
|
||||
@@ -76,13 +76,13 @@
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
|
||||
(use-package! nerd-icons
|
||||
;; :custom
|
||||
;; The Nerd Font you want to use in GUI
|
||||
;; "Symbols Nerd Font Mono" is the default and is recommended
|
||||
;; but you can use any other Nerd Font if you want
|
||||
;; (nerd-icons-font-family "Symbols Nerd Font Mono")
|
||||
)
|
||||
(use-package! nerd-icons)
|
||||
;; :custom
|
||||
;; The Nerd Font you want to use in GUI
|
||||
;; "Symbols Nerd Font Mono" is the default and is recommended
|
||||
;; but you can use any other Nerd Font if you want
|
||||
;; (nerd-icons-font-family "Symbols Nerd Font Mono")
|
||||
|
||||
|
||||
(use-package! lsp-bridge
|
||||
:config
|
||||
|
||||
Reference in New Issue
Block a user