Use company instead of auto-complete

And some other semi-related tweaks
This commit is contained in:
2015-10-04 12:00:07 +01:00
parent c9553f2435
commit 28e2d19c1b
4 changed files with 18 additions and 18 deletions

View File

@@ -6,9 +6,11 @@
(require 'company)
(setq company-idle-delay 0.5
company-tooltip-limit 10
company-minimum-prefix-length 2)
(setq company-idle-delay 0.3
company-tooltip-limit 20
company-minimum-prefix-length 2
company-echo-delay 0
company-begin-commands '(self-insert-command))
;; invert the navigation direction if the the completion popup-isearch-match
;; is displayed on top (happens near the bottom of windows)

View File

@@ -14,10 +14,10 @@
(eval-after-load 'go-mode
'(progn
(siren-require-packages
'(go-mode go-autocomplete go-eldoc go-projectile gotest))
'(go-mode company-go go-eldoc go-projectile gotest))
(require 'go-projectile)
(require 'go-autocomplete)
(require 'company-go)
(defun siren-go-mode-defaults ()
(siren-prog-mode-defaults)
@@ -39,15 +39,16 @@
;; gofmt on save
(add-hook 'before-save-hook 'gofmt-before-save nil t)
;; enable company-mode
(set (make-local-variable 'company-backends) '(company-go))
(company-mode +1)
;; enable hide/show
(hs-minor-mode 1)
;; stop whitespace being highlighted
(whitespace-toggle-options '(tabs))
;; enable auto-complete
(auto-complete-mode +1)
;; make tabs 4 spaces wide
(setq tab-width 4)

View File

@@ -4,7 +4,7 @@
(require 'siren-programming)
(siren-require-packages '(ruby-tools inf-ruby yari company-inf-ruby))
(siren-require-packages '(ruby-tools inf-ruby yari))
;; Force-load custom vendored ruby-mode fetched from:
;; - https://raw.github.com/ruby/ruby/trunk/misc/ruby-mode.el
@@ -43,14 +43,10 @@
,(rx (or "#" "=begin")) ;; Comment start
ruby-forward-sexp nil))
(eval-after-load 'company
'(add-to-list 'company-backends 'company-inf-ruby))
(eval-after-load 'ruby-mode
'(progn
(defun siren-ruby-mode-defaults ()
(siren-prog-mode-defaults)
(inf-ruby-minor-mode +1)
(ruby-tools-mode +1)
(setq tab-width 2)
(hs-minor-mode 1)
@@ -62,10 +58,11 @@
(setq ruby-deep-indent-paren nil)
(setq c-tab-always-indent nil)
(setq ruby-use-encoding-map nil)
(define-key ruby-mode-map (kbd "C-j") 'newline-and-indent)
(define-key ruby-mode-map (kbd "RET") 'newline-and-indent)
(define-key ruby-mode-map (kbd "C-c C-h") 'toggle-hiding)
(define-key ruby-mode-map (kbd "C-c C-l") 'goto-line))
(let ((map ruby-mode-map))
(define-key map (kbd "C-j") 'newline-and-indent)
(define-key map (kbd "RET") 'newline-and-indent)
(define-key map (kbd "C-c C-h") 'toggle-hiding)
(define-key map (kbd "C-c C-l") 'goto-line)))
(setq siren-ruby-mode-hook 'siren-ruby-mode-defaults)

View File

@@ -5,7 +5,7 @@
;; Modules
(require 'siren-aliases)
(require 'siren-avy)
(require 'siren-auto-complete)
;; (require 'siren-auto-complete)
(require 'siren-company)
(require 'siren-dired)
(require 'siren-exec-path-from-shell)