152 lines
4.3 KiB
EmacsLisp
152 lines
4.3 KiB
EmacsLisp
(setq inhibit-startup-message t)
|
|
(menu-bar-mode -1)
|
|
(tooltip-mode -1)
|
|
(tool-bar-mode -1)
|
|
(scroll-bar-mode -1)
|
|
(setq ring-bell-function 'ignore)
|
|
|
|
|
|
(global-display-line-numbers-mode 1)
|
|
(dolist (mode '(org-mode-hook
|
|
shell-mode-hook
|
|
term-mode-hook
|
|
eshell-mode-hook))
|
|
(add-hook mode (lambda () (display-line-numbers-mode 0))))
|
|
|
|
(set-face-attribute 'default nil :font "JetBrains Mono" :height 130)
|
|
(load-theme 'leuven-dark)
|
|
|
|
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)
|
|
|
|
(require 'package)
|
|
|
|
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
|
("melpa-stable" . "https://stable.melpa.org/packages/")
|
|
("org" . "https://orgmode.org/elpa/")
|
|
("elpa" . "https://elpa.gnu.org/packages/")))
|
|
(package-initialize)
|
|
(unless package-archive-contents
|
|
(package-refresh-contents))
|
|
|
|
;; macos
|
|
(unless (package-installed-p 'use-package)
|
|
(package-install 'use-package))
|
|
|
|
(require 'use-package)
|
|
(setq use-package-always-ensure t)
|
|
(use-package swiper :ensure t)
|
|
|
|
(use-package ivy
|
|
:diminish
|
|
:bind (("C-s" . swiper)
|
|
:map ivy-minibuffer-map
|
|
("TAB" . ivy-alt-done)
|
|
("C-l" . ivy-alt-done)
|
|
("C-j" . ivy-next-line)
|
|
("C-k" . ivy-previous-line)
|
|
:map ivy-switch-buffer-map
|
|
("C-k" . ivy-previous-line)
|
|
("C-l" . ivy-done)
|
|
("C-d" . ivy-switch-buffer-kill)
|
|
:map ivy-reverse-i-search-map
|
|
("C-k" . ivy-previous-line)
|
|
("C-d" . ivy-reverse-i-search-kill))
|
|
:config
|
|
(ivy-mode 1))
|
|
(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.
|
|
'(package-selected-packages
|
|
'(all-the-icons counsel doom-modeline doom-themes evil evil-collection
|
|
general helpful ivy ivy-rich swiper)))
|
|
(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.
|
|
)
|
|
|
|
(use-package doom-modeline
|
|
:ensure t
|
|
:hook (after-init . doom-modeline-mode))
|
|
|
|
(use-package which-key
|
|
:init (which-key-mode)
|
|
:diminish which-key-mode
|
|
:config
|
|
(setq which-key-idle-delay 0.3))
|
|
|
|
(use-package ivy-rich
|
|
:init
|
|
(ivy-rich-mode 1))
|
|
|
|
(use-package counsel
|
|
:bind (("M-x" . counsel-M-x)
|
|
("C-x b" . counsel-ibuffer)
|
|
("C-x C-f" . counsel-find-file)
|
|
:map minibuffer-local-map
|
|
("C-r" . counsel-minibuffer-history))
|
|
:config
|
|
(setq ivi-initial-inputs-alist nil))
|
|
|
|
(use-package helpful
|
|
:commands (helpful-callable helpful-variable helpful-command helpful-key)
|
|
:custom
|
|
(counsel-describe-function-function #'helpful-callable)
|
|
(counsel-describe-variable-function #'helpful-variable)
|
|
:bind
|
|
([remap describe-function] . counsel-describe-function)
|
|
([remap describe-command] . helpful-command)
|
|
([remap describe-variable] . counsel-describe-variable)
|
|
([remap describe-key] . helpful-key))
|
|
|
|
(use-package doom-themes
|
|
:init (load-theme 'doom-palenight t))
|
|
;; run M-x all-the-icons-install-fonts once on new machine
|
|
(use-package all-the-icons)
|
|
|
|
|
|
(use-package general
|
|
:config
|
|
(general-create-definer rune/leader-keys
|
|
:keymaps '(normal insert visual emacs)
|
|
:prefix "SPC"
|
|
:global-prefix "C-SPC")
|
|
|
|
(rune/leader-keys
|
|
"f" '(:ignore t :which-key "find")
|
|
"ff" '(counsel-find-file :which-key "find file")
|
|
"t" '(:ignore t :which-key "toggles")
|
|
"tt" '(counsel-load-theme :which-key "choose theme")))
|
|
|
|
(general-define-key
|
|
"C-s" 'counsel-grep-or-swiper)
|
|
|
|
|
|
(use-package evil
|
|
:init
|
|
(setq evil-want-integration t)
|
|
(setq evil-want-keybinding nil)
|
|
(setq evil-want-C-u-scroll t)
|
|
(setq evil-want-C-i-jump nil)
|
|
:config
|
|
(evil-mode 1)
|
|
(define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
|
|
(define-key evil-insert-state-map (kbd "C-h") 'evil-delete-backward-char-and-join)
|
|
|
|
;; Use visual line motions even outside of visual-line-mode buffers
|
|
(evil-global-set-key 'motion "j" 'evil-next-visual-line)
|
|
(evil-global-set-key 'motion "k" 'evil-previous-visual-line)
|
|
|
|
(evil-set-initial-state 'messages-buffer-mode 'normal)
|
|
(evil-set-initial-state 'dashboard-mode 'normal))
|
|
|
|
(use-package evil-collection
|
|
:after evil
|
|
:config
|
|
(evil-collection-init))
|
|
|
|
|