Elecritc + disable some linenumbers + add rainbow

This commit is contained in:
Love 2025-01-29 16:15:17 +01:00
parent 6f14f6db88
commit ed4bfe44c2

40
.emacs
View File

@ -3,7 +3,7 @@
;; =========================== ;; ===========================
(require 'package) (require 'package)
;(setq package-check-signature nil); Add MELPA, Org, and GNU package archives ;; Add MELPA, Org, and GNU package archives
(setq package-archives '(("melpa" . "https://melpa.org/packages/") (setq package-archives '(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/") ("org" . "https://orgmode.org/elpa/")
("gnu" . "https://elpa.gnu.org/packages/"))) ("gnu" . "https://elpa.gnu.org/packages/")))
@ -101,13 +101,7 @@
;; UI Customizations ;; UI Customizations
;; =========================== ;; ===========================
;; Revert buffers when the underlying file has changed ;; Replace yes-no prompts to y-n
(global-auto-revert-mode 1)
;; Electric Pair Mode - Completes parentheses, quotes, etc.
(electric-pair-mode 1)
;; Replace yes-no prompts with y-n
(defalias 'yes-or-no-p 'y-or-n-p) (defalias 'yes-or-no-p 'y-or-n-p)
;; Disable unnecessary UI elements ;; Disable unnecessary UI elements
@ -122,6 +116,20 @@
;; Enable visual line mode globally ;; Enable visual line mode globally
(global-visual-line-mode 1) (global-visual-line-mode 1)
;; Disable line numbers for some modes
(dolist (mode '(dired-mode-hook
doc-view-mode-hook
eshell-mode-hook
comint-mode-hook
inferior-python-mode-hook
org-mode-hook
shell-mode-hook
term-mode-hook))
(add-hook mode (lambda () (display-line-numbers-mode 0))))
;; Complete parentheses, quotes, etc
(electric-pair-mode 1)
;; Set Default Font to Iosevka 18pt ;; Set Default Font to Iosevka 18pt
;;(set-face-attribute 'default nil :family "Iosevka" :height 150) ;;(set-face-attribute 'default nil :family "Iosevka" :height 150)
;; Set font ;; Set font
@ -155,7 +163,6 @@
(add-to-list 'exec-path "/opt/homebrew/bin") (add-to-list 'exec-path "/opt/homebrew/bin")
) )
;; =========================== ;; ===========================
;; Evil Mode Configuration ;; Evil Mode Configuration
;; =========================== ;; ===========================
@ -196,11 +203,10 @@
;; Install and configure Projectile ;; Install and configure Projectile
(use-package projectile (use-package projectile
:config :init
(projectile-mode +1) (projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) :bind (:map projectile-mode-map
(setq projectile-project-search-path '("~/Documents/Code/")) ("s-p" . projectile-command-map)))
)
;; Install and bind Magit ;; Install and bind Magit
(use-package magit (use-package magit
@ -211,6 +217,10 @@
:config :config
(which-key-mode)) (which-key-mode))
(use-package rainbow-delimiters
:ensure t
:hook (prog-mode . rainbow-delimiters-mode))
;; =========================== ;; ===========================
;; LSP Configuration ;; LSP Configuration
;; =========================== ;; ===========================
@ -287,7 +297,7 @@
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(helm-minibuffer-history-key "M-p") '(helm-minibuffer-history-key "M-p")
'(package-selected-packages '(package-selected-packages
'(catppuccin-theme lsp-pyright zenburn-theme which-key solarized-theme rust-mode projectile poetry magit lsp-ui lsp-treemacs kotlin-mode helm flycheck evil-collection dracula-theme company better-defaults))) '(rainbow-delimiters rainbow-delimiter catppuccin-theme lsp-pyright zenburn-theme which-key solarized-theme rust-mode projectile poetry magit lsp-ui lsp-treemacs kotlin-mode helm flycheck evil-collection dracula-theme company better-defaults)))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces 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.