diff --git a/emacs/.emacs.d/custom.el b/emacs/.emacs.d/custom.el new file mode 100644 index 0000000..0eaa4a0 --- /dev/null +++ b/emacs/.emacs.d/custom.el @@ -0,0 +1,14 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages + (quote + (projectile evil-leader use-package evil-surround evil-escape)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index b4c9d01..c462c41 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -1,38 +1,87 @@ +;; UI +(scroll-bar-mode 1) +(tool-bar-mode -1) +(tooltip-mode 1) +(menu-bar-mode 1) + +(add-to-list 'default-frame-alist '(font . "Fira Code-13")) + +;; package config (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) (package-initialize) -(eval-when-compile - (require 'use-package)) +;; bootstrap use-package +(unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) +(require 'use-package) -(use-package evil +;; packages +(use-package magit + :ensure t) + +(use-package editorconfig :ensure t :config - (evil-mode 1) + (editorconfig-mode 1)) + +(use-package helm + :ensure t :init - (setq evil-shift-width 4)) + (setq helm-M-x-fuzzy-match t + helm-mode-fuzzy-match t + helm-buffers-fuzzy-matching t + helm-recentf-fuzzy-match t + helm-locate-fuzzy-match t + helm-semantic-fuzzy-match t + helm-imenu-fuzzy-match t + helm-completion-in-region-fuzzy-match t + helm-candidate-number-list 150 + ;helm-split-window-in-side-p t + helm-move-to-line-cycle-in-source t + helm-echo-input-in-header-line t + helm-autoresize-max-height 0 + helm-autoresize-min-height 20) + :config + (helm-mode 1)) + +(use-package projectile + :ensure t + ;:pin melpa-stable + :config + (define-key projectile-mode-map (kbd "s-p") 'projectile-command-map) + (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) + (projectile-mode +1)) (use-package evil-escape :ensure t :init - (setq evil-escape-key-sequence "jk") - (setq evil-escape-delay 0.3)) + (setq-default evil-escape-key-sequence "jk") + (setq-default evil-escape-delay 0.2) + :config + (evil-escape-mode 1)) + +(use-package evil-leader + :ensure t + :config + (evil-leader/set-leader "") + (evil-leader/set-key + "f" 'find-file + "b" 'switch-to-buffer + "d" 'kill-buffer) + (global-evil-leader-mode)) (use-package evil-surround :ensure t :config (global-evil-surround-mode 1)) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages (quote (evil-surround use-package evil evil-surround)))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) +(use-package evil + :ensure t + :config + (evil-mode 1)) + +(setq custom-file "~/.emacs.d/custom.el") +(load custom-file) diff --git a/emacs/.gitignore b/emacs/.gitignore new file mode 100644 index 0000000..c7a9c57 --- /dev/null +++ b/emacs/.gitignore @@ -0,0 +1,4 @@ +elpa +games +transient +projectile-bookmarks.eld