configurations: emacs

This commit is contained in:
2024-11-03 14:03:17 +01:00
parent 729dce48c5
commit ec15512b0e
7 changed files with 68 additions and 34 deletions
@@ -37,16 +37,15 @@
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
(setq auto-save-default nil)
(setq backup-directory-alist
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
(setq auto-save-file-name-transforms
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
;;. Graphical
(setq frame-resize-pixelwise t)
(setq window-resize-pixelwise t)
(when (display-graphic-p)
(set-frame-font "Hack Nerd Font" nil t)
)
@@ -70,6 +70,9 @@
(straight-use-package 'nix-mode)
(straight-use-package 'no-littering)
(straight-use-package 'right-click-context)
(straight-use-package 'moe-theme)
(straight-use-package 'dracula-theme)
(straight-use-package 'doom-themes)
(straight-use-package 'orderless)
(straight-use-package 'orderless)
(straight-use-package 'undo-tree)
(straight-use-package 'bash-completion)
(straight-use-package 'consult)
+41 -24
View File
@@ -6,9 +6,8 @@
(require 'elcord)
(require 'dashboard)
(require 'minions)
(require 'doom-themes)
(require 'dracula-theme)
(require 'nerd-icons)
(require 'centaur-tabs)
(require 'projectile)
(require 'treemacs)
(require 'treemacs-projectile)
@@ -16,20 +15,43 @@
(require 'vertico)
(require 'orderless)
(require 'marginalia)
(require 'undo-tree)
(require 'consult)
(cua-mode 0)
;Keybinds
(keymap-set cua--cua-keys-keymap "C-z" 'undo-tree-undo)
(keymap-set cua--cua-keys-keymap "C-y" 'undo-tree-redo)
(keymap-set global-map "TAB" #'indent-rigidly-right-to-tab-stop)
(keymap-set global-map "<backtab>" #'indent-rigidly-left-to-tab-stop)
(keymap-set global-map "C-<tab>" #'indent-for-tab-commandn)
(keymap-set vertico-map "TAB" #'vertico-insert)
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "") 'event-apply-hyper-modifier )
(global-set-key (kbd "C-H-t") 'treemacs)
(setq completion-in-region-function
(lambda (&rest args)
(apply (if vertico-mode
#'consult-completion-in-region
#'completion--in-region)
args)))
(tool-bar-mode -1)
(if (daemonp)
(add-hook 'after-make-frame-functions
(lambda (frame)
(with-selected-frame frame (load-theme 'doom-horizon t))))
(load-theme 'doom-horizon t))
(with-selected-frame frame (load-theme 'dracula t))))
(load-theme 'dracula t))
(setq-default cursor-type '(bar . 1))
@@ -64,38 +86,33 @@
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
)
;Enable Centaur tabs
(centaur-tabs-mode t)
(setq centaur-tabs-set-bar 'over)
(setq centaur-tabs-set-modified-marker t)
;(setq centaur-tabs-modified-marker "*")
;Enable treemacs
(global-set-key (kbd "C-H-t") 'treemacs)
(setq-default display-line-numbers-width 4)
(cua-mode 1)
;(global-set-key (kbd "C-∇") (kbd "C-H"))
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
;; Enable vertico
(vertico-mode 1)
(marginalia-mode 1)
;(setq completion-styles '(orderless basic)
; completion-category-defaults nil
; completion-category-overrides '((file (styles partial-completion))))
;CUA
(cua-mode 1)
(global-set-key (kbd "C-y") 'undo-redo)
(electric-pair-mode 1)
(global-set-key (kbd "C-<tab>") 'indent-rigidly-right-to-tab-stop)
(global-set-key (kbd "<backtab>") 'indent-rigidly-left-to-tab-stop)
(global-undo-tree-mode 1)
(global-tab-line-mode 1)
(setq-default tab-width 4)
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
(define-key key-translation-map (kbd "") 'event-apply-hyper-modifier )
;(global-set-key (kbd "C-∇") (kbd "C-H"))
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
(load (concat materus/cfg "/lsp/default"))