diff --git a/init.d/10_packages.el b/init.d/10_packages.el index b86c50b..f11a68e 100644 --- a/init.d/10_packages.el +++ b/init.d/10_packages.el @@ -36,6 +36,7 @@ autopair smart-mode-line restclient + nlinum ;; Helm helm @@ -46,11 +47,14 @@ yasnippet ;; Auto-completion - auto-complete - go-autocomplete + ;; auto-complete + ;; go-autocomplete + company + ;; Themes - flatui-theme + smyx-theme + ; flatui-theme ;; ample-theme ;; darcula-theme ;; tangotango-theme diff --git a/init.d/ZZ_complete_setup.el b/init.d/ZZ_complete_setup.el index 9da2893..8a840ac 100644 --- a/init.d/ZZ_complete_setup.el +++ b/init.d/ZZ_complete_setup.el @@ -12,7 +12,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (diminish 'anzu-mode) (diminish 'projectile-mode) -(diminish 'auto-complete-mode) +;; (diminish 'auto-complete-mode) (diminish 'autopair-mode) (diminish 'yas-minor-mode) (diminish 'ruby-end-mode) @@ -32,32 +32,47 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; auto-complete ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(setq exec-path - (append exec-path - '("/home/brady/gocode/bin" "/Users/brady/gocode/bin" "/usr/local/Cellar/go/1.3/bin/" "/usr/local/bin/"))) -(require 'go-autocomplete) -(require 'auto-complete-config) -(ac-config-default) +;; (setq exec-path +;; (append exec-path +;; '("/home/brady/gocode/bin" "/Users/brady/gocode/bin" "/usr/local/Cellar/go/1.3/bin/" "/usr/local/bin/"))) +;; (require 'go-autocomplete) +;; (require 'auto-complete-config) +;; (ac-config-default) -(setq ac-auto-start t) -(setq ac-auto-show-menu 0.0) -(ac-set-trigger-key "TAB") -(define-key ac-menu-map "\C-n" 'ac-next) -(define-key ac-menu-map "\C-p" 'ac-previous) +;; (setq ac-auto-start t) +;; (setq ac-auto-show-menu 0.0) +;; (ac-set-trigger-key "TAB") +;; (define-key ac-menu-map "\C-n" 'ac-next) +;; (define-key ac-menu-map "\C-p" 'ac-previous) -(add-to-list 'ac-modes 'enh-ruby-mode) -(add-to-list 'ac-modes 'js2-mode) -(add-to-list 'ac-modes 'css-mode) +;; (add-to-list 'ac-modes 'enh-ruby-mode) +;; (add-to-list 'ac-modes 'js2-mode) +;; (add-to-list 'ac-modes 'css-mode) -(global-auto-complete-mode +1) +;; (global-auto-complete-mode +1) -;; Add Go source to auto-complete -(add-hook 'go-mode-hook - (lambda () - (add-to-list 'ac-source ac-go-candidates))) +;; ;; Add Go source to auto-complete +;; (add-hook 'go-mode-hook +;; (lambda () +;; (add-to-list 'ac-source ac-go-candidates))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; helm () +;; nlinum-mode +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(global-nlinum-mode) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; company-mode (http://company-mode.github.io/) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(setq company-idle-delay 0) +(add-hook 'after-init-hook 'global-company-mode) + +;; (add-hook 'ruby-mode +;; (lambda () +;; (set (make-local-variable 'company-backends) '(company-ruby)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; helm (https://github.com/emacs-helm/helm) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'helm-config) diff --git a/init.d/relative_linums.el b/init.d/relative_linums.el index e09c4cb..3162f90 100644 --- a/init.d/relative_linums.el +++ b/init.d/relative_linums.el @@ -1,47 +1,47 @@ -(global-linum-mode t) -(setq linum-last-pos 0) +;; (global-linum-mode t) +;; (setq linum-last-pos 0) -(eval-after-load "linum" - '(defun linum-update (buffer) - "Update line numbers for all windows displaying BUFFER." - ;; this is only change but couldn't find better way to do it, tried - ;; linum-before-update-hook but it runs in an excursion so I couldn't get - ;; current line number - (setq linum-last-pos (line-number-at-pos)) - (with-current-buffer buffer - (when linum-mode - (setq linum-available linum-overlays) - (setq linum-overlays nil) - (save-excursion - (mapc #'linum-update-window - (get-buffer-window-list buffer nil 'visible))) - (mapc #'delete-overlay linum-available) - (setq linum-available nil))))) +;; (eval-after-load "linum" +;; '(defun linum-update (buffer) +;; "Update line numbers for all windows displaying BUFFER." +;; ;; this is only change but couldn't find better way to do it, tried +;; ;; linum-before-update-hook but it runs in an excursion so I couldn't get +;; ;; current line number +;; (setq linum-last-pos (line-number-at-pos)) +;; (with-current-buffer buffer +;; (when linum-mode +;; (setq linum-available linum-overlays) +;; (setq linum-overlays nil) +;; (save-excursion +;; (mapc #'linum-update-window +;; (get-buffer-window-list buffer nil 'visible))) +;; (mapc #'delete-overlay linum-available) +;; (setq linum-available nil))))) -(defface linum-zero - '((t :inherit linum :foreground "white" :background "#FF0000" :weight bold)) - "Face for displaying line number 0" - :group 'linum) +;; (defface linum-zero +;; '((t :inherit linum :foreground "white" :background "#FF0000" :weight bold)) +;; "Face for displaying line number 0" +;; :group 'linum) -(defface linum-top - '((t :inherit linum :foreground "grey80" :background "grey40" :weight bold)) - "Face for displaying top line number" - :group 'linum) +;; (defface linum-top +;; '((t :inherit linum :foreground "grey80" :background "grey40" :weight bold)) +;; "Face for displaying top line number" +;; :group 'linum) -(defface linum-line - '((t :inherit linum :foreground "grey60" :background "grey30" :weight normal)) - "Face for displaying absolute line number" - :group 'linum) +;; (defface linum-line +;; '((t :inherit linum :foreground "grey60" :background "grey30" :weight normal)) +;; "Face for displaying absolute line number" +;; :group 'linum) -(defun linum-relativenumber-format (line-number) - (let ((diff (abs (- line-number linum-last-pos)))) - (concat (propertize (format "%3d" line-number) - 'face 'linum-line) - (propertize (format "%3d" diff) - 'face (cond ((zerop diff) 'linum-zero) - ((eq 1 line-number) 'linum-top) - (t 'linum)))))) +;; (defun linum-relativenumber-format (line-number) +;; (let ((diff (abs (- line-number linum-last-pos)))) +;; (concat (propertize (format "%3d" line-number) +;; 'face 'linum-line) +;; (propertize (format "%3d" diff) +;; 'face (cond ((zerop diff) 'linum-zero) +;; ((eq 1 line-number) 'linum-top) +;; (t 'linum)))))) -;; (setq linum-format 'dynamic) -(setq linum-format 'linum-relativenumber-format) -(setq linum-mode t) +;; ;; (setq linum-format 'dynamic) +;; (setq linum-format 'linum-relativenumber-format) +;; (setq linum-mode t)