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 ;; diminish
(use-package diminish (use-package diminish
:config :config
(diminish 'visual-line-mode)
(diminish 'abbrev-mode)) (diminish 'abbrev-mode))
;; basic stuff ;; basic stuff
@ -79,6 +80,9 @@
;; No scroll bars ;; No scroll bars
(scroll-bar-mode -1) (scroll-bar-mode -1)
;; Some better scrolling
(pixel-scroll-mode 1)
;; Visual line mode ;; Visual line mode
(global-visual-line-mode 1) (global-visual-line-mode 1)
@ -87,9 +91,7 @@
;; Some settings for programming ;; Some settings for programming
(setq-default indent-tabs-mode nil (setq-default indent-tabs-mode nil
tab-width 4 tab-width 4)
c-basic-offset 4
indent-line-function 'insert-tab)
;; Tree sitter download locations ;; Tree sitter download locations
(setq treesit-language-source-alist (setq treesit-language-source-alist
@ -101,9 +103,18 @@
;; Tree sitter major mode conversions ;; Tree sitter major mode conversions
(setq major-mode-remap-alist (setq major-mode-remap-alist
'((c-mode . c-ts-mode) '((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) (java-mode . java-ts-mode)
(rust-mode . rust-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 (use-package recentf
:config :config
(recentf-mode 1)) (recentf-mode 1))
@ -127,6 +138,12 @@
(evil-collection-init)) (evil-collection-init))
(use-package evil-surround (use-package evil-surround
:config :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)) (global-evil-surround-mode 1))
(use-package evil-terminal-cursor-changer (use-package evil-terminal-cursor-changer
:config :config
@ -180,6 +197,7 @@ visual states."
("RET" . vertico-directory-enter) ("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char) ("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word)) ("M-DEL" . vertico-directory-delete-word))
:hook (minibuffer-setup . cursor-intangible-mode)
:init :init
(setq vertico-cycle t (setq vertico-cycle t
enable-recursive-minibuffers t enable-recursive-minibuffers t
@ -187,7 +205,6 @@ visual states."
minibuffer-prompt-properties '(read-only t minibuffer-prompt-properties '(read-only t
cursor-intangible t cursor-intangible t
face minibuffer-prompt)) face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
(vertico-mode 1)) (vertico-mode 1))
;; orderless ;; orderless
@ -244,7 +261,10 @@ visual states."
("M-g i" . consult-imenu) ("M-g i" . consult-imenu)
("M-g I" . consult-imenu-multi) ("M-g I" . consult-imenu-multi)
("M-g r" . consult-imenu-multi)) ("M-g r" . consult-imenu-multi))
:hook (minibuffer-setup . my/consult-setup-minibuffer-completion)
:init :init
(defun my/consult-setup-minibuffer-completion ()
(setq-local completion-in-region-function #'consult-completion-in-region))
(defun my/consult-emacs-info () (defun my/consult-emacs-info ()
"`consult-info' for emacs specific pages." "`consult-info' for emacs specific pages."
(interactive) (interactive)
@ -328,7 +348,7 @@ visual states."
;; eglot ;; eglot
(use-package eglot (use-package eglot
:hook (((c-ts-mode c++-ts-mode java-ts-mode rust-ts-mode :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)) (eglot-managed-mode . my/-eglot-setup))
:init :init
(defun my/-eglot-setup () (defun my/-eglot-setup ()
@ -389,3 +409,26 @@ visual states."
(use-package solaire-mode (use-package solaire-mode
:config :config
(solaire-global-mode 1)) (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))