Skip to content

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

@steughar

Description

@steughar
** 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions