Update emacs init

Signed-off-by: Marcin Woźniak <marcin.wozniak@wundermanthompson.com>
This commit is contained in:
Marcin Woźniak 2021-11-02 12:26:30 +01:00 committed by Marcin Woźniak
parent 8bc72ea0da
commit 02baf6d072

View File

@ -14,18 +14,32 @@
(package-initialize) (package-initialize)
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
;; UTF-8
(set-language-environment "UTF-8")
;; Packages list refresh
(when (not package-archive-contents)
(package-refresh-contents))
;; Auto Package Update
(use-package auto-package-update
:ensure t
:config
(progn
(setq
auto-package-update-delete-old-verions t
auto-package-update-interval 5
)
(auto-package-update-maybe)
)
)
;; Remove welcome screen ;; Remove welcome screen
(setq inhibit-startup-screen t) (setq inhibit-startup-screen t)
;; Disable menu ;; Disable menu
(menu-bar-mode 0) (menu-bar-mode 0)
;; Enable IDO mode
(setq ido-enable-flex-matching t)
;;(setq ido-everywhere t)
(ido-mode 1)
(global-set-key (kbd "C-x b") 'ido-switch-buffer)
;; Remove working cl ;; Remove working cl
(require 'cl-lib) (require 'cl-lib)
(setq byte-compile-warnings '(cl-functions)) (setq byte-compile-warnings '(cl-functions))
@ -79,6 +93,20 @@
(setq browse-url-browser-function 'browse-url-generic (setq browse-url-browser-function 'browse-url-generic
browse-url-generic-program "browser-x") browse-url-generic-program "browser-x")
;; Amx
(use-package amx
:ensure t
:after ivy
:custom
(
(amx-backend 'ivy)
(amx-show-key-bindings t)
)
:config
(amx-mode t)
)
;; Custom theme ;; Custom theme
(add-to-list 'custom-theme-load-path (add-to-list 'custom-theme-load-path
"~/.emacs.d/plugins/") "~/.emacs.d/plugins/")
@ -172,15 +200,10 @@
(add-to-list 'default-frame-alist `(font . ,(rc/get-default-font))) (add-to-list 'default-frame-alist `(font . ,(rc/get-default-font)))
;; Theme ;; Theme
;;(use-package dracula-theme (use-package gruvbox-theme
;; :ensure t
;; :config
;; (load-theme 'dracula t))
(use-package zenburn-theme
:ensure t :ensure t
:config :config
(load-theme 'zenburn t)) (load-theme 'gruvbox-dark-hard t))
;; Sitebar dirred ;; Sitebar dirred
(use-package dired-sidebar (use-package dired-sidebar
@ -193,15 +216,19 @@
;; Smex ;; Smex
(require 'smex) (require 'smex)
(smex-initialize) (smex-initialize)
(global-set-key (kbd "M-x") 'smex) (global-set-key (kbd "M-x") 'counsel-M-x)
;;buffer-move ;;buffer-move
(require 'buffer-move) (require 'buffer-move)
(global-set-key (kbd "C-x b") 'counsel-buffer-or-recentf)
(global-set-key (kbd "<C-S-up>") 'buf-move-up) (global-set-key (kbd "<C-S-up>") 'buf-move-up)
(global-set-key (kbd "<C-S-down>") 'buf-move-down) (global-set-key (kbd "<C-S-down>") 'buf-move-down)
(global-set-key (kbd "<C-S-left>") 'buf-move-left) (global-set-key (kbd "<C-S-left>") 'buf-move-left)
(global-set-key (kbd "<C-S-right>") 'buf-move-right) (global-set-key (kbd "<C-S-right>") 'buf-move-right)
;; Files
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
;; Multiple-cursors ;; Multiple-cursors
(use-package multiple-cursors (use-package multiple-cursors
:ensure t :ensure t
@ -588,3 +615,4 @@
(other-window 1) (other-window 1)
) )
(global-set-key (kbd "C-x x") 'kill-and-remove-split) (global-set-key (kbd "C-x x") 'kill-and-remove-split)
(global-set-key (kbd "<escape>") 'keyboard-escape-quit)