configurations: emacs
This commit is contained in:
parent
729dce48c5
commit
ec15512b0e
|
@ -170,7 +170,7 @@
|
|||
dub
|
||||
]);
|
||||
|
||||
editor.emacs.enable = false;
|
||||
editor.emacs.enable = true;
|
||||
|
||||
};
|
||||
xdg.desktopEntries.brave-browser =
|
||||
|
|
|
@ -14,7 +14,6 @@ let
|
|||
avy
|
||||
corfu
|
||||
vterm
|
||||
centaur-tabs
|
||||
projectile
|
||||
company
|
||||
clipetty
|
||||
|
@ -61,9 +60,13 @@ let
|
|||
nix-mode
|
||||
no-littering
|
||||
right-click-context
|
||||
moe-theme
|
||||
dracula-theme
|
||||
doom-themes
|
||||
orderless
|
||||
popper
|
||||
undo-tree
|
||||
bash-completion
|
||||
consult
|
||||
];
|
||||
|
||||
default-config = ''
|
||||
|
@ -96,6 +99,7 @@ let
|
|||
(setenv "PATH" (concat (getenv "PATH") ":${emacsEnv}/bin"))
|
||||
(setq exec-path (append exec-path '("${emacsEnv}/bin")))
|
||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
||||
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
|
|
@ -36,3 +36,9 @@
|
|||
(startup-redirect-eln-cache
|
||||
(convert-standard-filename
|
||||
(expand-file-name "var/eln-cache/" user-emacs-directory))))
|
||||
|
||||
(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)))
|
|
@ -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)
|
|
@ -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"))
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
(setq-default materus/nix-packages (require 'evil nil 'noerror))
|
||||
|
||||
|
||||
|
||||
(unless materus/nix-packages (load (concat user-emacs-directory "etc/materus/packages")))
|
||||
(load (concat user-emacs-directory "etc/materus/internals"))
|
||||
(load (concat user-emacs-directory "etc/materus/start"))
|
||||
(when (file-exists-p custom-file)
|
||||
(load custom-file))
|
||||
|
|
Loading…
Reference in New Issue