update .emacs, fix evil bindings

This commit is contained in:
zongor 2024-11-22 23:26:41 -05:00
parent 6ee77b9ee7
commit 670bf2781b
1 changed files with 12 additions and 19 deletions

31
.emacs
View File

@ -141,8 +141,9 @@
(define-key evil-normal-state-map (kbd "C-M-u") 'eval-buffer) (define-key evil-normal-state-map (kbd "C-M-u") 'eval-buffer)
(define-key evil-normal-state-map (kbd "C-M-p") 'compile) (define-key evil-normal-state-map (kbd "C-M-p") 'compile)
(define-key evil-normal-state-map (kbd "M-/") 'dabbrev-expand) (define-key evil-normal-state-map (kbd "M-/") 'dabbrev-expand)
(define-key evil-normal-state-map (kbd "C-,") 'move-to-previous-window)
(define-key evil-normal-state-map (kbd "C-.") 'move-to-next-window)
(define-key evil-normal-state-map (kbd "C-M-\\") 'format-all-buffer) (define-key evil-normal-state-map (kbd "C-M-\\") 'format-all-buffer)
;; (evil-define-key 'normal Buffer-menu-mode-map (kbd "RET") ) ;; (evil-define-key 'normal Buffer-menu-mode-map (kbd "RET") )
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look) (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
@ -177,9 +178,19 @@
;; Corrects (and improves) org-mode's native fontification. ;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config)) (doom-themes-org-config))
(use-package solaire-mode
:config
(solaire-global-mode +1))
(use-package all-the-icons (use-package all-the-icons
:if (display-graphic-p)) :if (display-graphic-p))
(use-package nerd-icons)
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1))
(use-package treemacs (use-package treemacs
:ensure t :ensure t
:defer t :defer t
@ -537,24 +548,6 @@ Other buffer group by `centaur-tabs-get-group-name' with project name."
:ensure t :ensure t
:init (global-git-gutter-mode t)) :init (global-git-gutter-mode t))
(require 'display-line-numbers)
(defcustom display-line-numbers-exempt-modes
'(vterm-mode eshell-mode shell-mode term-mode ansi-term-mode)
"Major modes on which to disable line numbers."
:group 'display-line-numbers
:type 'list
:version "green")
(defun display-line-numbers--turn-on ()
"Turn on line numbers except for certain major modes.
Exempt major modes are defined in `display-line-numbers-exempt-modes'."
(unless (or (minibufferp)
(member major-mode display-line-numbers-exempt-modes))
(display-line-numbers-mode)))
;(global-column-enforce-mode)
(global-display-line-numbers-mode)
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.