2015-07-08 17:59:42 +01:00
|
|
|
;; Functions -------------------------------------------------
|
|
|
|
|
|
|
|
;; Quick fix for company-mode and yasnippet clashing
|
|
|
|
(defun company-yasnippet-or-completion ()
|
|
|
|
(interactive)
|
|
|
|
(if (yas/expansion-at-point)
|
|
|
|
(progn (company-abort)
|
|
|
|
(yas/expand))
|
|
|
|
(company-complete-common)))
|
|
|
|
|
|
|
|
(defun yas/expansion-at-point ()
|
|
|
|
"Tested with v0.6.1. Extracted from `yas/expand-1'"
|
|
|
|
(first (yas/current-key)))
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun extension/development-initialize ()
|
|
|
|
"Development plugin initialization."
|
|
|
|
(message "Initializing 'development' extension.")
|
|
|
|
|
|
|
|
(ability code-completion ()
|
2015-07-08 18:38:40 +01:00
|
|
|
"Use company mode to provides a complete auto completion framwork."
|
2015-07-08 17:59:42 +01:00
|
|
|
(global-company-mode t)
|
|
|
|
(define-key company-active-map "\t" 'company-yasnippet-or-completion))
|
|
|
|
|
|
|
|
(ability yas ()
|
2015-07-08 18:38:40 +01:00
|
|
|
"Snippet configuration."
|
2015-07-08 17:59:42 +01:00
|
|
|
(yas-global-mode 1))
|
|
|
|
|
|
|
|
(ability project-management ()
|
2015-07-08 18:38:40 +01:00
|
|
|
"Ability to manage projects and project navigation."
|
2015-07-08 17:59:42 +01:00
|
|
|
(projectile-global-mode)
|
|
|
|
(setq projectile-enable-caching t))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)
|
|
|
|
(provide 'extensions/development/init)
|