about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2017-01-23T23·05-0500
committerWilliam Carroll <wpcarro@gmail.com>2017-01-23T23·05-0500
commit66345e287bd5ec01ab82c43c8633435c86322af3 (patch)
tree07f710b0bd2b1989b1eb83fd3800c4ab1f712748 /configs
parent8ca1874d1527f09336b758600e828ee1e5c74db5 (diff)
Adds colored cursors; better error handling for Emacs and Vim
Diffstat (limited to 'configs')
-rw-r--r--configs/.emacs49
-rw-r--r--configs/.vimrc56
2 files changed, 91 insertions, 14 deletions
diff --git a/configs/.emacs b/configs/.emacs
index 6588bad15eda..dd72ff9df20e 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
@@ -132,6 +137,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.
@@ -196,6 +208,7 @@
 
 ;; Evil Settings
 (require 'evil)
+(require 'evil-leader)
 
 (defun register-evil-keybindings-for-neotree ()
   "Registers keybindings for Evil mode for NeoTree plugin."
@@ -204,10 +217,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
@@ -234,6 +250,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)
@@ -266,6 +293,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 e7a06d70ec51..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'
 
@@ -428,11 +479,6 @@ nnoremap <leader>n :NERDTreeToggle<CR>
 nnoremap <leader>f :NERDTreeFind<CR>
 
 
-" Jump to the top / bottom of the Viewport
-nnoremap K H
-nnoremap J L
-
-
 " BOL and EOL
 nnoremap H ^
 vnoremap H ^