Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

irony mode not working in spacemacs #533

Open
pyang-1981 opened this issue May 24, 2019 · 0 comments
Open

irony mode not working in spacemacs #533

pyang-1981 opened this issue May 24, 2019 · 0 comments

Comments

@pyang-1981
Copy link

My spacemacs c-c++ layer package.el looks like this

(setq c-c++-packages
'(
cc-mode
disaster
clang-format
cmake-mode
company
(company-c-headers :toggle (configuration-layer/package-usedp 'company))
company-ycmd
flycheck
gdb-mi
ggtags
helm-cscope
helm-gtags
semantic
srefactor
stickyfunc-enhance
ycmd
xcscope
irony
company-irony
company-irony-c-headers
flycheck-irony
))

(defun c-c++/init-flycheck-irony ()
(use-package flycheck-irony
:defer t
)
)

(defun c-c++/post-init-flycheck-irony ()
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-irony-setup))
)

(defun c-c++/init-irony ()
(use-package irony
:defer t
)
)

(defun c-c++/post-init-irony ()
(spacemacs/add-to-hooks 'irony-mode '(c-mode-hook c++-mode-hook))
(defun my-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))
(spacemacs/add-to-hooks 'my-irony-mode-hook '(irony-mode-hook))
(spacemacs/add-to-hooks 'irony-cdb-autosetup-compile-options '(irony-mode-hook))
)

(defun c-c++/init-company-irony ()
(use-package company-irony
:defer t
)
)

(defun c-c++/post-init-company-irony ()
(eval-after-load 'company
'(add-to-list 'company-backends 'company-irony))
)

(defun c-c++/init-company-irony-c-headers ()
(use-package company-irony-c-headers
:defer t
)
)

(defun c-c++/post-init-company-irony-c-headers ()
;; Load with irony-mode as a grouped backend
(eval-after-load 'company
'(add-to-list
'company-backends 'company-irony-c-headers))
)

When I open a C++ file, the irony mode and company-irony are enabled. However I am only able to get some functions defined by irony, such as irony-get-type, other functions like irony-cdb-compilation-database are not defined. Also, code completion for the most part does not work. Any help is greatly appreciated. The irony version is 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant