I'm using spacemacs devel.
I've added following private layer using M-x configuration-layer/create-layer
(setq irony-packages '( company-irony company-irony-c-headers irony irony-eldoc ;; flycheck-irony ;; I'm not using it. )) (defun irony/init-irony () (use-package irony :defer t :commands (irony-mode irony-install-server) :init (progn (add-hook 'c-mode-hook 'irony-mode) (add-hook 'c++-mode-hook 'irony-mode)) :config (progn (setq irony-user-dir (f-slash (f-join user-home-directory "bin" "irony"))) (setq irony-server-install-prefix irony-user-dir) (add-hook 'c++-mode-hook (lambda () (setq irony-additional-clang-options '("-std=c++11")))) (defun irony/irony-mode-hook () (define-key irony-mode-map [remap completion-at-point] 'irony-completion-at-point-async) (define-key irony-mode-map [remap complete-symbol] 'irony-completion-at-point-async)) (add-hook 'irony-mode-hook 'irony/irony-mode-hook) (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)))) (when (configuration-layer/layer-usedp 'auto-completion) (defun irony/init-company-irony () (use-package company-irony :if (configuration-layer/package-usedp 'company) :defer t :commands company-irony :init (progn ;;(add-to-list 'company-backends 'company-irony) (add-hook 'irony-mode-hook 'company-irony-setup-begin-commands))))) (when (configuration-layer/layer-usedp 'auto-completion) (defun irony/init-company-irony-c-headers () (use-package company-irony-c-headers :if (configuration-layer/package-usedp 'company) :defer t :commands company-irony-c-headers :init (push 'company-irony-c-headers company-backends-c-mode-common)))) (when (configuration-layer/layer-usedp 'syntax-checking) (defun irony/init-flycheck-irony () (use-package flycheck-irony :if (configuration-layer/package-usedp 'flycheck) :defer t :init (add-hook 'irony-mode-hook 'flycheck-irony-setup)))) (defun irony/init-irony-eldoc () (use-package irony-eldoc :commands (irony-eldoc) :init (add-hook 'irony-mode-hook 'irony-eldoc)))
then added irony to dotspacemacs-configuration-layers. After restart all is working well.
What I need to do is to use my github versions of all the packages listed above:
So what I did.
- removed irony from dotspacemacs-configuration-layers.
- restared emacs. This removed all the 4 irony packages from my system, which is OK.
- edited dotspacemacs-additional-packages, then restared emacs:
dotspacemacs-additional-packages '(w3m google-c-style flycheck-google-cpplint
;; I added the following.
(irony :location (recipe :fetcher github :repo "vibrys/irony-mode"))
(company-irony :location (recipe :fetcher github :repo "vibrys/company-irony"))
(company-irony-c-headers :location (recipe :fetcher github :repo "vibrys/company-irony-c-headers"))
(irony-eldoc :location (recipe :fetcher github :repo "vibrys/irony-eldoc"))
Messages log tells the following about the source of packages' installation:
(Spacemacs) --> installing package: company-irony@dotfile... [1/4] Fetcher: github Source: vibrys/company-irony
(Spacemacs) --> installing package: company-irony-c-headers@dotfile... [2/4] Fetcher: github Source: vibrys/company-irony-c-headers
(Spacemacs) --> installing package: irony@dotfile... [3/4] ;; this on does NOT go from github.com. THis is my problem.
(Spacemacs) --> installing package: irony-eldoc@dotfile... [4/4] Fetcher: github Source: vibrys/irony-eldoc
The problem is that irony@dotfile does NOT go from github. It is taken from standard repository.
What am I doing wrong?