chore(config): Add some config for android device
This commit is contained in:
13
custom.el
13
custom.el
@@ -0,0 +1,13 @@
|
||||
;;; -*- lexical-binding: t -*-
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(safe-local-variable-values '((org-use-tag-inheritance))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
||||
|
||||
@@ -24,41 +24,41 @@
|
||||
completion-at-point-functions))))))
|
||||
|
||||
;; corfu
|
||||
(if (display-graphic-p)
|
||||
(use-package corfu
|
||||
:autoload
|
||||
(corfu-quit consult-completion-in-region)
|
||||
:functions
|
||||
(persistent-scratch-save)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-prefix 2)
|
||||
(corfu-count 12)
|
||||
(corfu-preview-current nil)
|
||||
(corfu-on-exact-match nil)
|
||||
(corfu-auto-delay 0.2)
|
||||
(corfu-popupinfo-delay '(0.4 . 0.2))
|
||||
(global-corfu-modes '((not erc-mode
|
||||
circe-mode
|
||||
help-mode
|
||||
gud-mode
|
||||
vterm-mode)
|
||||
t))
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-history-mode)
|
||||
:config
|
||||
;;Quit completion before saving
|
||||
(add-hook 'before-save-hook #'corfu-quit)
|
||||
(advice-add #'persistent-scratch-save :before #'corfu-quit)
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
(use-package corfu
|
||||
:autoload
|
||||
(corfu-quit consult-completion-in-region)
|
||||
:functions
|
||||
(persistent-scratch-save)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-prefix 2)
|
||||
(corfu-count 12)
|
||||
(corfu-preview-current nil)
|
||||
(corfu-on-exact-match nil)
|
||||
(corfu-auto-delay 0.2)
|
||||
(corfu-popupinfo-delay '(0.4 . 0.2))
|
||||
(global-corfu-modes '((not erc-mode
|
||||
circe-mode
|
||||
help-mode
|
||||
gud-mode
|
||||
vterm-mode)
|
||||
t))
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-history-mode)
|
||||
:config
|
||||
;;Quit completion before saving
|
||||
(add-hook 'before-save-hook #'corfu-quit)
|
||||
(advice-add #'persistent-scratch-save :before #'corfu-quit)
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
|
||||
(unless (display-graphic-p)
|
||||
(use-package corfu-terminal
|
||||
:init
|
||||
(corfu-terminal-mode)))
|
||||
(add-hook 'global-corfu-mode-hook 'corfu-terminal-mode)))
|
||||
|
||||
;; 在eshell中使用tab打开补全
|
||||
(add-hook 'eshell-mode-hook
|
||||
|
||||
@@ -297,6 +297,10 @@
|
||||
"C-x r b" 'consult-bookmark
|
||||
"C-;" 'embark-act)
|
||||
|
||||
(when *is-android*
|
||||
(general-def
|
||||
"C-M-w" 'popper-toggle-type-delete-other-window))
|
||||
|
||||
;; expand region
|
||||
(setq expand-region-reset-fast-key "r")
|
||||
(setq expand-region-contract-fast-key "c")
|
||||
|
||||
@@ -76,7 +76,9 @@
|
||||
:init
|
||||
(denote-rename-buffer-mode)
|
||||
:config
|
||||
(setq denote-directory "~/org/my-org-note/")
|
||||
(if *is-android*
|
||||
(setq denote-directory "~/storage/shared/my-org-note/")
|
||||
(setq denote-directory "~/org/my-org-note/"))
|
||||
(setq denote-prompts '(title signature keywords))
|
||||
(setq denote-title-history nil)
|
||||
(setq denote-signature-history
|
||||
|
||||
@@ -331,8 +331,10 @@ targets."
|
||||
|
||||
;; god-mode,模态编辑
|
||||
(use-package god-mode
|
||||
:init
|
||||
(if *is-android* (god-mode-all))
|
||||
:config
|
||||
(which-key-enable-god-mode-support)
|
||||
(unless *is-android* (which-key-enable-god-mode-support))
|
||||
(setq god-mode-enable-function-key-translation nil)
|
||||
|
||||
(defun my-sync-line-numbers-with-god-mode ()
|
||||
|
||||
@@ -51,9 +51,9 @@
|
||||
(global-auto-revert-mode 1)
|
||||
|
||||
;; 开启recent file mode
|
||||
(when (display-graphic-p)
|
||||
(when (or (display-graphic-p) *is-android*)
|
||||
(recentf-mode)
|
||||
(setq recentf-max-saved-items 30)) ;; 最大保存数量
|
||||
(setq recentf-max-saved-items 30))
|
||||
|
||||
;; 启用select delete
|
||||
(delete-selection-mode)
|
||||
|
||||
@@ -59,18 +59,30 @@
|
||||
'(solarized-emacs :fork (:host github :repo "Andsy10/solarized-emacs")))
|
||||
|
||||
;; 把主题加载延迟到frame创建之后,防止daemon模式下宏不能正常展开
|
||||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame
|
||||
(load-theme 'my-base16-dark t))))
|
||||
(load-theme 'my-base16-dark t))
|
||||
(if *is-android*
|
||||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame
|
||||
(load-theme 'my-base16-light t))))
|
||||
(load-theme 'my-base16-light t))
|
||||
(if (daemonp)
|
||||
(add-hook 'after-make-frame-functions
|
||||
(lambda (frame)
|
||||
(with-selected-frame frame
|
||||
(load-theme 'my-base16-dark t))))
|
||||
(load-theme 'my-base16-dark t)))
|
||||
|
||||
;; 很多主题
|
||||
;; (use-package doom-themes)
|
||||
;; (use-package color-theme-modern)
|
||||
(use-package naysayer-theme)
|
||||
|
||||
(if *is-android*
|
||||
(use-package simple-modeline
|
||||
:init
|
||||
(simple-modeline-mode)))
|
||||
|
||||
;; eshell高亮
|
||||
(use-package eshell-syntax-highlighting
|
||||
:hook
|
||||
|
||||
Reference in New Issue
Block a user