From 37529429bf9966fc2a0c2c47d3038cd8ea5f4b52 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Wed, 3 Jan 2024 09:53:14 +0800 Subject: [PATCH] fix: emacs - fix & add docs --- home/base/desktop/editors/emacs/README.md | 17 +++++++++++------ home/base/desktop/editors/emacs/doom/config.el | 10 +++++++++- modules/darwin/apps.nix | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/home/base/desktop/editors/emacs/README.md b/home/base/desktop/editors/emacs/README.md index 7dac09f5..eb83f029 100644 --- a/home/base/desktop/editors/emacs/README.md +++ b/home/base/desktop/editors/emacs/README.md @@ -8,6 +8,7 @@ - modal editing: - : evil mode, enabled by default in doom-emacs. - +- Emacs Wiki: Emacs daemon: @@ -32,6 +33,7 @@ zellij provides a more powerful and stable terminal experience, so here is zelli | Horizontal Split Terminal | `Ctrl +

+ ` | | Vertical Split Terminal | `Ctrl +

+ ` | | Open file tree sidebar | `SPC + o + p` | +| Exit | `M-x C-c` | ## Visual Modes @@ -68,12 +70,14 @@ The same as neovim/vim: ## Splitting and Buffers -| Action | Shortcut | -| --------------------- | ----------------- | -| Next Buffer (Tab) | `]b` | -| Previous Buffer (Tab) | `[b` | -| Buffer List | ` + ,` | -| Save all buffers(Tab) | ` + b + S` | +| Action | Shortcut | +| ----------------------- | ----------------- | +| Next Buffer (Tab) | `]b` | +| Previous Buffer (Tab) | `[b` | +| Buffer List | ` + ,` | +| Save all buffers(Tab) | ` + b + S` | +| Kill the current buffer | ` + b + k` | +| Kill all buffers | ` + b + K` | ## Editing and Formatting @@ -83,6 +87,7 @@ The same as neovim/vim: | Code Actions | ` + ca` | | Rename | ` + cr` | | Opening LSP symbols | ` + cS` | +| Show all LSP Errors | ` + c + x/X` | | (Un)Comment the selected context | `gc` | | (Un)Comment the current line | `gcc` | | Open filepath/URL at cursor | `gf` | diff --git a/home/base/desktop/editors/emacs/doom/config.el b/home/base/desktop/editors/emacs/doom/config.el index 0a77ecf4..59a1196d 100644 --- a/home/base/desktop/editors/emacs/doom/config.el +++ b/home/base/desktop/editors/emacs/doom/config.el @@ -36,7 +36,15 @@ ;; https://github.com/catppuccin/emacs/ (setq doom-theme 'catppuccin) (setq catppuccin-flavor 'mocha) ;; or 'latte, 'macchiato, or 'frappe -(catppuccin-reload) +;; make emacs transparent(do not works on terminal) +(set-frame-parameter nil 'alpha-background 70) +(add-to-list 'default-frame-alist '(alpha-background . 70)) + +;;(set-frame-parameter (selected-frame) 'alpha '( . )) +;;(set-frame-parameter (selected-frame) 'alpha ) +(set-frame-parameter (selected-frame) 'alpha '(85 . 50)) +(add-to-list 'default-frame-alist '(alpha . (85 . 50))) + ;; This determines the style of line numbers in effect. If set to `nil', line ;; numbers are disabled. For relative line numbers, set this to `relative'. diff --git a/modules/darwin/apps.nix b/modules/darwin/apps.nix index 8e9a4fa6..34df36f3 100644 --- a/modules/darwin/apps.nix +++ b/modules/darwin/apps.nix @@ -76,7 +76,7 @@ in { # homebrew need to be installed manually, see https://brew.sh # https://github.com/LnL7/nix-darwin/blob/master/modules/homebrew.nix homebrew = { - enable = true; + enable = false; # disable homebrew for fast deploy onActivation = { autoUpdate = false;