A bunch of changes

This commit is contained in:
Alexander Rosenberg 2023-09-21 03:20:43 -07:00
parent 62bd3e312d
commit 1b72441d14
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730

53
init.el
View File

@ -30,6 +30,7 @@
;; diminish
(use-package diminish
:config
(diminish 'visual-line-mode)
(diminish 'abbrev-mode))
;; basic stuff
@ -79,6 +80,9 @@
;; No scroll bars
(scroll-bar-mode -1)
;; Some better scrolling
(pixel-scroll-mode 1)
;; Visual line mode
(global-visual-line-mode 1)
@ -87,9 +91,7 @@
;; Some settings for programming
(setq-default indent-tabs-mode nil
tab-width 4
c-basic-offset 4
indent-line-function 'insert-tab)
tab-width 4)
;; Tree sitter download locations
(setq treesit-language-source-alist
@ -101,9 +103,18 @@
;; Tree sitter major mode conversions
(setq major-mode-remap-alist
'((c-mode . c-ts-mode)
(c++-mode . c++-ts-mode)
(c-or-c++-mode . c-or-c++-ts-mode)
(objc-mode . objc-ts-mode)
(java-mode . java-ts-mode)
(rust-mode . rust-ts-mode))))
;; c-ts-mode
(use-package c-ts-mode
:init
(setq-default c-ts-mode-indent-offset 4))
;; recentf
(use-package recentf
:config
(recentf-mode 1))
@ -127,6 +138,12 @@
(evil-collection-init))
(use-package evil-surround
:config
(evil-define-key 'operator evil-surround-mode-map
"z" #'evil-surround-edit
"Z" #'evil-Sunrround-edit)
(evil-define-key 'visual evil-surround-mode-map
"g z" #'evil-surround-region
"g Z" #'evil-Surround-region)
(global-evil-surround-mode 1))
(use-package evil-terminal-cursor-changer
:config
@ -180,6 +197,7 @@ visual states."
("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word))
:hook (minibuffer-setup . cursor-intangible-mode)
:init
(setq vertico-cycle t
enable-recursive-minibuffers t
@ -187,7 +205,6 @@ visual states."
minibuffer-prompt-properties '(read-only t
cursor-intangible t
face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
(vertico-mode 1))
;; orderless
@ -244,7 +261,10 @@ visual states."
("M-g i" . consult-imenu)
("M-g I" . consult-imenu-multi)
("M-g r" . consult-imenu-multi))
:hook (minibuffer-setup . my/consult-setup-minibuffer-completion)
:init
(defun my/consult-setup-minibuffer-completion ()
(setq-local completion-in-region-function #'consult-completion-in-region))
(defun my/consult-emacs-info ()
"`consult-info' for emacs specific pages."
(interactive)
@ -328,7 +348,7 @@ visual states."
;; eglot
(use-package eglot
:hook (((c-ts-mode c++-ts-mode java-ts-mode rust-ts-mode
python-ts-mode) . eglot-ensure)
python-ts-mode latex-mode) . eglot-ensure)
(eglot-managed-mode . my/-eglot-setup))
:init
(defun my/-eglot-setup ()
@ -389,3 +409,26 @@ visual states."
(use-package solaire-mode
:config
(solaire-global-mode 1))
;; icons
(use-package nerd-icons)
(use-package nerd-icons-completion
:config
(nerd-icons-completion-mode))
(use-package nerd-icons-dired
:hook (dired-mode . nerd-icons-dired-mode))
(use-package kind-icon
:after corfu
:init
(setq kind-icon-default-face 'corfu-default
kind-icon-default-style
'(:padding -1 :stroke 0 :margin 0 :radius 0 :height 0.5 :scale 1))
:config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
;; modeline (doom-modeline)
(use-package doom-modeline
:init
(setq doom-modeline-support-imenu t)
(doom-modeline-mode 1))