about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
Diffstat (limited to 'configs')
-rw-r--r--configs/.emacs49
-rw-r--r--configs/.vimrc51
2 files changed, 91 insertions, 9 deletions
diff --git a/configs/.emacs b/configs/.emacs
index 48bedbc23886..71b43f730c80 100644
--- a/configs/.emacs
+++ b/configs/.emacs
@@ -27,7 +27,7 @@
  '(neo-window-width 35)
  '(package-selected-packages
    (quote
-    (typescript-mode evil-surround erlang elixir-mode golden-ratio flycheck-credo flycheck command-log-mode atom-one-dark-theme exec-path-from-shell clues-theme gotham-theme dracula-theme zenburn-theme fill-column-indicator neotree evil helm-swoop iedit vimrc-mode helm-ispell transpose-frame helm-projectile helm-ack nyan-mode alchemist helm magit dockerfile-mode elm-mode ack)))
+    (evil-leader flycheck-mix flycheck-elixir evil-matchit typescript-mode evil-surround erlang elixir-mode golden-ratio flycheck-credo flycheck command-log-mode atom-one-dark-theme exec-path-from-shell clues-theme gotham-theme dracula-theme zenburn-theme fill-column-indicator neotree evil helm-swoop iedit vimrc-mode helm-ispell transpose-frame helm-projectile helm-ack nyan-mode alchemist helm magit dockerfile-mode elm-mode ack)))
  '(popwin-mode t)
  '(popwin:popup-window-height 25)
  '(tool-bar-mode nil))
@@ -70,6 +70,9 @@
 ;; Enable autocompletion
 (add-hook 'after-init-hook 'global-company-mode)
 
+;; Remove company delay
+(setq-default company-idle-delay 0)
+
 
 ;; View stream of Emacs commands
 (require 'command-log-mode)
@@ -81,12 +84,14 @@
 
 
 ;; Flycheck Settings
-;; (add-hook 'after-init-hook #'global-flycheck-mode)
+(require 'flycheck)
+(add-hook 'after-init-hook 'global-flycheck-mode)
 
 
-;; Elixir (Credo) Settings
-;; (require 'flycheck-credo)
-;; (add-hook 'elixir-mode-hook 'flycheck-credo-setup)
+;; Elixir flycheck compile-time errors
+(require 'flycheck-mix)
+(require 'flycheck-credo)
+(eval-after-load 'flycheck (lambda () (flycheck-credo-setup) (flycheck-mix-setup)))
 
 
 ;; Magit Settings
@@ -137,6 +142,13 @@
 (global-set-key (kbd "C-x p") 'helm-projectile-ack)
 
 
+;; Ansi Term Settings
+;; (define-key 'term-mode-map (kbd "C-h") 'window-left)
+;; (define-key 'term-mode-map (kbd "C-l") 'window-right)
+;; (define-key 'term-mode-map (kbd "C-k") 'window-up)
+;; (define-key 'term-mode-map (kbd "C-j") 'window-down)
+
+
 ;; disable popwin-mode in an active Helm session It should be disabled
 ;; otherwise it will conflict with other window opened by Helm persistent
 ;; action, such as *Help* window.
@@ -201,6 +213,7 @@
 
 ;; Evil Settings
 (require 'evil)
+(require 'evil-leader)
 
 (defun register-evil-keybindings-for-neotree ()
   "Registers keybindings for Evil mode for NeoTree plugin."
@@ -209,10 +222,13 @@
   (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
   (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter))
 
-
-;; Evil Surround
-(require 'evil-surround)
-(global-evil-surround-mode 1)
+;; Evil colored-cursors
+(setq evil-emacs-state-cursor '("red" box))
+(setq evil-normal-state-cursor '("green" box))
+(setq evil-visual-state-cursor '("orange" box))
+(setq evil-insert-state-cursor '("red" bar))
+(setq evil-replace-state-cursor '("red" bar))
+(setq evil-operator-state-cursor '("red" hollow))
 
 
 ;; Display column number alongside row number
@@ -239,6 +255,17 @@
 (add-hook 'neotree-mode-hook (lambda () (bootstrap-evil-mode) (hl-line-mode)) )
 
 
+;; Evil Plugins
+
+;; Evil Match-it
+(require 'evil-matchit)
+(global-evil-matchit-mode 1)
+
+;; Evil Surround
+(require 'evil-surround)
+(global-evil-surround-mode 1)
+
+
 ;; Window movement
 (global-set-key (kbd "C-c w f") 'windmove-right)
 (global-set-key (kbd "C-c w b") 'windmove-left)
@@ -271,6 +298,10 @@ when in Vim's `insert` mode, favoring native Emacs bindings instead."
   (interactive)
   (evil-local-mode t)
 
+  ;; Evil-leader
+  (global-evil-leader-mode)
+  (evil-leader/set-leader (kbd "SPC"))
+
   ;; Toggle off Emacs bindings when in Vim `normal` mode except:
   ;;   * `M-x`
   ;; (setcdr global-map nil)
diff --git a/configs/.vimrc b/configs/.vimrc
index d58c2b38c924..e0476e3f12d1 100644
--- a/configs/.vimrc
+++ b/configs/.vimrc
@@ -158,6 +158,57 @@ let g:neomake_elixir_credo_maker = {
       \ }
 
 
+let g:neomake_elixir_enabled_makers = ['mix', 'credo']
+
+augroup my_error_signs
+  au!
+  autocmd ColorScheme * hi NeomakeErrorSign ctermfg=203 guifg=#ff5f5f
+  autocmd ColorScheme * hi NeomakeWarningSign ctermfg=209 guifg=#ffaf00
+  autocmd ColorScheme * hi NeomakeInfoSign ctermfg=183 guifg=#dfafff
+  autocmd ColorScheme * hi NeomakeMessageSign ctermfg=27 guifg=#0087ff
+augroup END
+
+
+let g:neomake_error_sign = {
+            \ 'text': '>>',
+            \ 'texthl': 'NeoMakeErrorSign',
+            \ }
+
+let g:neomake_warning_sign = {
+            \ 'text': '>>',
+            \ 'texthl': 'NeoMakeWarningSign',
+            \ }
+
+let g:neomake_info_sign = {
+            \ 'text': '>>',
+            \ 'texthl': 'NeoMakeInfoSign',
+            \ }
+
+let g:neomake_message_sign = {
+            \ 'text': '>>',
+            \ 'texthl': 'NeoMakeMessageSign',
+            \ }
+
+function! <SID>LocationPrevious()
+  try
+    lprev
+  catch /^Vim\%((\a\+)\)\=:E553/
+    llast
+  endtry
+endfunction
+
+function! <SID>LocationNext()
+  try
+    lnext
+  catch /^Vim\%((\a\+)\)\=:E553/
+    lfirst
+  endtry
+endfunction
+
+nnoremap <Leader>[ :call <SID>LocationPrevious()<CR>
+nnoremap <Leader>] :call <SID>LocationNext()<CR>
+
+
 " Alchemist settings
 let g:alchemist#elixir_erlang_src = '/usr/local/share/src'