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 doesn't update completion base on the fly #42

Open
steughar opened this issue Jun 26, 2018 · 0 comments
Open

Irony doesn't update completion base on the fly #42

steughar opened this issue Jun 26, 2018 · 0 comments

Comments

@steughar
Copy link

** company
#+begin_src emacs-lisp :tangle yes

  (use-package company
    :ensure t
    :config
    (setq company-idle-delay 0)
    (setq company-minimum-prefix-length 1))



  (with-eval-after-load 'company
    (define-key company-active-map (kbd "M-n") nil)
    (define-key company-active-map (kbd "M-p") nil)
    (define-key company-active-map (kbd "C-n")  #'company-select-next)
    (define-key company-active-map (kbd "C-p")  #'company-select-previous))
#+end_src

** irony
#+begin_src emacs-lisp :tangle yes
  (use-package company-irony
    :ensure t
    :config
    (require 'company)
    (add-to-list 'company-backends 'company-irony))

  (use-package irony
    :ensure t
    :config
    (add-hook 'c++-mode-hook 'irony-mode)
    (add-hook 'c-mode-hook 'irony-mode)
    (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))

  (with-eval-after-load 'company
    (add-hook 'c++-mode-hook 'company-mode)
    (add-hook 'c-mode-hook 'company-mode)
    (add-hook 'emacs-lisp-mode-hook 'company-mode))

  (when (boundp 'w32-pipe-read-delay)
    (setq w32-pipe-read-delay 0))
  (when (boundp 'w32-pipe-buffer-size)
    (setq irony-server-w32-pipe-buffer-size (* 64 1024)))
#+end_src

Part of config that set up company\irony\company-irony.

The problem is: when i type a new function for example:

int
bar(int a, int b) {
return(0);
}

in my main-function company doesn't propose my newly created function for auto-completion. Only when i kill buffer and after reopen this buffer, it will be available. When new variables come up in the scope it's add it to base on the fly.

int
main(void) {
int a;
a = 4; // on this point company will show me auto-completion for a
return(0);
}

What can i do, to make irony update base on the fly?

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