Browse Source

Organized packages and their bindings

master
Julio Biason 5 years ago
parent
commit
9e8f246173
  1. 138
      emacs.d/init.el

138
emacs.d/init.el

@ -2,21 +2,15 @@
(require 'package)
;;; either the stable version:
(add-to-list
'package-archives
;; '("melpa" . "http://stable.melpa.org/packages/") ; many packages won't show if using stable
'("melpa" . "http://melpa.milkbox.net/packages/")
t)
'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/")
t)
(add-to-list
'package-archives
'("org" . "https://orgmode.org/elpa/")
t)
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
'package-archives
'("org" . "https://orgmode.org/elpa/")
t)
(package-initialize)
(unless (package-installed-p 'use-package)
@ -26,60 +20,67 @@
(require 'use-package)
(setq use-package-always-ensure t)
; install evil
; install evil
(use-package evil
:ensure t
:config
(evil-mode 1))
; Org-mode
:config (evil-mode 1)
:bind ((:map evil-normal-state-map ("C-w <down>" . evil-window-down))
(:map evil-normal-state-map ("C-w <up>" . evil-window-up))
(:map evil-normal-state-map ("C-w <right>" . evil-window-right))
(:map evil-normal-state-map ("C-W <left>" . evil-window-left))
(:map evil-normal-state-map ("-" . find-file))))
; Org-mode
(use-package org
:ensure t)
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-set-key "\C-cb" 'org-iswtichb)
:ensure t
:bind (("\C-cl" . org-store-link)
("\C-ca" . org-agenda)
("\C-cb" . org-iswtichb)))
; Markdown mode
; Markdown mode
(use-package markdown-mode
:ensure t)
:ensure t)
; install goto last change (opens the file in the last position)
; install goto last change (opens the file in the last position)
(use-package goto-last-change
:ensure t)
:ensure t)
; install fill-column-indicador: right side gutter
; install fill-column-indicador: right side gutter
(use-package fill-column-indicator
:ensure t)
:ensure t)
; install powerline
; install powerline
(use-package powerline
:ensure t
:config (powerline-center-evil-theme))
:ensure t
:config (powerline-center-evil-theme))
; rust mode
; rust mode
(use-package rust-mode
:ensure t)
:ensure t)
; colorscheme
; (use-package monokai-theme
; :ensure t)
(use-package nord-theme
:ensure t)
; colorscheme
(use-package monokai-pro-theme
:ensure t)
(load-theme 'monokai-pro)
(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.
'(custom-enabled-themes (quote (nord)))
'(ansi-color-names-vector
["#2d2a2e" "#ff6188" "#a9dc76" "#ffd866" "#78dce8" "#ab9df2" "#a1efe4" "#fcfcfa"])
'(ansi-term-color-vector
[unspecified "#2d2a2e" "#ff6188" "#a9dc76" "#ffd866" "#78dce8" "#ab9df2" "#a1efe4" "#fcfcfa"])
'(custom-enabled-themes (quote (monokai-pro)))
'(custom-safe-themes
(quote
("bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" "039eb505cec29b4521ce5ecf5abf523492005f0c65d0640f62e53e2d3068b393" "6c0a087a4f49c04d4002393ffd149672f70e4ab38d69bbe8b39059b61682b61c" default)))
("f10e50d86ec09152a03fcc3b251ba698610b2e5baa73699297a8bb37a419f3c8" "11e57648ab04915568e558b77541d0e94e69d09c9c54c06075938b6abc0189d8" "7f6d4aebcc44c264a64e714c3d9d1e903284305fd7e319e7cb73345a9994f5ef" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" "039eb505cec29b4521ce5ecf5abf523492005f0c65d0640f62e53e2d3068b393" "6c0a087a4f49c04d4002393ffd149672f70e4ab38d69bbe8b39059b61682b61c" default)))
'(inhibit-startup-screen t)
'(org-agenda-files (quote ("~/Documents/index.org")))
'(package-selected-packages
(quote
(markdown-mode org-evil org-link-minor-mode rust-mode evil-quickscope evil-tabs ## scala-mode evil-leader editorconfig diff-hl neotree helm-ag helm-projectile projectile helm hlinum fill-column-indicator evil monokai-theme cider))))
(monokai-pro-theme markdown-mode org-evil org-link-minor-mode rust-mode evil-quickscope evil-tabs ## evil-leader editorconfig diff-hl neotree helm-ag helm-projectile projectile helm hlinum fill-column-indicator evil monokai-theme cider))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@ -100,76 +101,49 @@
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1)))
(global-fci-mode 1)
(define-key evil-normal-state-map (kbd "C-w <down>") 'evil-window-down)
(define-key evil-normal-state-map (kbd "C-w <up>") 'evil-window-up)
(define-key evil-normal-state-map (kbd "C-w <right>") 'evil-window-right)
(define-key evil-normal-state-map (kbd "C-w <left>") 'evil-window-left)
(define-key evil-normal-state-map (kbd "-") 'find-file)
; most of this stuff was taken from https://brainlessdeveloper.com/2017/12/27/making-emacs-work-like-my-vim-setup/
; and https://github.com/brainlessdeveloper/emacs.d
; line numbers
; 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
; 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
; display line and column in the statusbar
(line-number-mode 1)
(column-number-mode 1)
; don't show startup messages
; don't show startup messages
(setq inhibit-startup-message t)
(setq initial-scratch-message nil)
; auto-pairs
; auto-pairs
(electric-pair-mode 1)
; scala support
(use-package scala-mode
:interpreter
("scala" . scala-mode))
; rust support
; neotree is a nerdtree like
(use-package neotree :ensure t)
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look)
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
; git gutters
; git gutters
(use-package diff-hl
:ensure t
:init
(setq diff-hl-side 'right))
(setq diff-hl-side 'right))
(global-diff-hl-mode 1)
(diff-hl-margin-mode 1)
(diff-hl-flydiff-mode 1)
; install editorconfig
; install editorconfig
(use-package editorconfig
:ensure t
:config
(editorconfig-mode 1))
:config (editorconfig-mode 1))
; install evil-leader and set it as space
; install evil-leader and set it as space
(use-package evil-leader
:ensure t
:config
(global-evil-leader-mode))
:ensure t
:config (global-evil-leader-mode))
(evil-leader/set-leader "<SPC>")
(evil-leader/set-key
@ -178,7 +152,7 @@
"t" 'neotree-toggle
"o" 'org-capture
"O" 'org-agenda
)
)
; answer questions with 'y' instead of full 'yes'
; answer questions with 'y' instead of full 'yes'
(defalias 'yes-or-no-p 'y-or-n-p)

Loading…
Cancel
Save