;;; init.el -*- lexical-binding: t; -*- (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/") t) (package-initialize) (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) (require 'use-package) (setq use-package-always-ensure t) ;; update packages (use-package auto-package-update :config (setq auto-package-update-delete-old-versions t) (setq auto-package-update-hide-results t) (auto-package-update-maybe)) ;; rust mode (use-package rust-mode :ensure t) ;; Notes (use-package org :ensure t :bind (("\C-cl" . org-store-link) ("\C-ca" . org-agenda) ("\C-cb" . org-iswtichb))) ;; Helm, for easy access to commands ; (use-package helm ; :ensure t ; :init (progn (require 'helm-config) ; (setq helm-mode-fuzzy-match t) ; (helm-mode)) ; ) ;; Evil ; (use-package evil ; :ensure t ; :after (helm) ; :config (progn ; (evil-mode 1) ; (define-key evil-normal-state-map (kbd "C-w ") 'evil-window-up) ; (define-key evil-normal-state-map (kbd "C-w ") 'evil-window-down) ; (define-key evil-normal-state-map (kbd "C-w ") 'evil-window-left) ; (define-key evil-normal-state-map (kbd "C-w ") 'evil-window-right) ; (define-key evil-normal-state-map (kbd "-") 'helm-find-files) ; ) ; ; Evil-leader so we can use the leader key ; (use-package evil-leader ; :ensure t ; :config (progn (global-evil-leader-mode) ; (evil-leader/set-leader "") ; (evil-leader/set-key ; "q" 'kill-buffer-and-window ; "w" 'save-buffer ; "o" 'helm-find-files ; "a" 'org-agenda))) ; ; Commentary to comment out code ; (use-package evil-commentary ; :ensure t ; :bind (:map evil-normal-state-map ("gc" . evil-commentary)) ; ) ; ) ;; Markdown mode ; (use-package markdown-mode ; :ensure t) ;; install goto last change (opens the file in the last position) ; (use-package goto-last-change ; :ensure t) ;; install fill-column-indicador: right side gutter ; (use-package fill-column-indicator ; :ensure t) ;; install powerline (use-package powerline :ensure t :config (powerline-center-theme)) ;; colorschemes (use-package doom-themes :ensure t :config (setq doom-themes-enable-bold t doom-themes-enable-italic t) (load-theme 'doom-molokai t) ) (menu-bar-mode 0) (tool-bar-mode 0) (show-paren-mode 1) (require 'whitespace) (setq whitespace-style '(face empty tabs lines-tail trailing)) (global-whitespace-mode t) ; (setq-default fill-column 80) ; (define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) ; (global-fci-mode 1) ;; line numbers (global-linum-mode 1) (defun configure-linum-colors () (set-face-foreground 'linum "#555555")) (configure-linum-colors) (setq linum-format " %4d ") ;; highlights the current line (use-package hlinum :ensure t) (set-face-foreground 'linum-highlight-face "white") (set-face-background 'linum-highlight-face nil) (hlinum-activate) ;; display line and column in the statusbar (line-number-mode 1) (column-number-mode 1) ;; don't show startup messages (setq inhibit-startup-message t) (setq initial-scratch-message nil) ;; auto-pairs (electric-pair-mode 1) ;; git gutters (use-package diff-hl :ensure t :init (setq diff-hl-side 'right)) (global-diff-hl-mode 1) (diff-hl-margin-mode 1) (diff-hl-flydiff-mode 1) ;; install editorconfig (use-package editorconfig :ensure t :config (editorconfig-mode 1)) ;; answer questions with 'y' instead of full 'yes' (defalias 'yes-or-no-p 'y-or-n-p) (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 '(editorconfig diff-hl hlinum use-package rust-mode doom-themes auto-package-update))) (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. )