mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
chore(emacs): Use :custom to set vars
This commit is contained in:
parent
d504fe0aa0
commit
6edc23c656
4 changed files with 16 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# https://github.com/microsoft/WSL/issues/11261
|
# https://github.com/microsoft/WSL/issues/11261
|
||||||
# ~/.config/systemd/user/symlink-wayland-socket.service
|
# ~/.config/systemd/user/symlink-wayland-socket.service
|
||||||
# Usage:
|
# Usage:
|
||||||
#
|
# systemctl --user enable symlink-wayland-socket.service
|
||||||
# Cannot use GUI apps/tools as Wayland socket doesn't exist in `XDG_RUNTIME_DIR`
|
# Cannot use GUI apps/tools as Wayland socket doesn't exist in `XDG_RUNTIME_DIR`
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@
|
||||||
;; Vim-like relativenumber
|
;; Vim-like relativenumber
|
||||||
;; fix: work for folded region (visual relative line instead of physical)
|
;; fix: work for folded region (visual relative line instead of physical)
|
||||||
(use-package display-line-numbers
|
(use-package display-line-numbers
|
||||||
:config
|
:custom
|
||||||
(setq display-line-numbers-type 'visual)
|
(display-line-numbers-type 'visual)
|
||||||
(setq display-line-numbers-current-absolute t)
|
(display-line-numbers-current-absolute t)
|
||||||
:hook
|
:hook
|
||||||
(prog-mode . display-line-numbers-mode))
|
(prog-mode . display-line-numbers-mode))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
:bind (:map company-active-map ; TODO: Seems does not work
|
:bind (:map company-active-map ; TODO: Seems does not work
|
||||||
("C-n" . company-select-next)
|
("C-n" . company-select-next)
|
||||||
("C-p" . company-select-previous))
|
("C-p" . company-select-previous))
|
||||||
:config
|
:custom
|
||||||
(setq company-minimum-prefix-length 1 ; 设置最短补全前缀
|
(company-minimum-prefix-length 1) ; 设置最短补全前缀
|
||||||
company-idle-delay 0.2)) ; 设置补全延迟(秒)
|
(company-idle-delay 0.2)) ; 设置补全延迟(秒)
|
||||||
|
|
||||||
;; minibuffer 补全增强
|
;; minibuffer 补全增强
|
||||||
(use-package vertico
|
(use-package vertico
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:init
|
:init
|
||||||
(which-key-mode)
|
(which-key-mode)
|
||||||
:config
|
:custom
|
||||||
(setq which-key-idle-delay 0.3))
|
(which-key-idle-delay 0.1))
|
||||||
|
|
||||||
;; Dashboard
|
;; Dashboard
|
||||||
(use-package dashboard
|
(use-package dashboard
|
||||||
|
|
@ -46,17 +46,22 @@
|
||||||
;; Buffer switching
|
;; Buffer switching
|
||||||
("H" . previous-buffer)
|
("H" . previous-buffer)
|
||||||
("I" . next-buffer))
|
("I" . next-buffer))
|
||||||
|
:custom
|
||||||
|
(dashboard-center-content t)
|
||||||
:config
|
:config
|
||||||
(dashboard-setup-startup-hook)
|
(dashboard-setup-startup-hook)
|
||||||
(setq dashboard-center-content t)
|
|
||||||
;; Use Emacs mode to use number to navigate dashboard
|
;; Use Emacs mode to use number to navigate dashboard
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
(use-package wakatime-mode
|
(use-package wakatime-mode
|
||||||
:ensure t
|
:ensure t
|
||||||
|
:custom
|
||||||
|
;; Use expand-file-name to prevent from error parsing on windows-nt
|
||||||
|
(wakatime-cli-path (expand-file-name "~/.local/bin/wakatime"))
|
||||||
:config
|
:config
|
||||||
(global-wakatime-mode))
|
(global-wakatime-mode)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
(provide 'init-package)
|
(provide 'init-package)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue