Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.83k stars 252 forks source link

manual auto-complete list? #788

Closed handrake0724 closed 7 years ago

handrake0724 commented 7 years ago

sometimes, auto-complete list call makes emacs unresponsive for a while. So, I want to call auto-complete list when I need it. is it possible? FYI, below is my emacs setup

;; company mode (add-hook 'after-init-hook 'global-company-mode) (company-quickhelp-mode 1) ;; rtags (defun setup-flycheck-rtags () (interactive) (flycheck-select-checker 'rtags) ;; RTags creates more accurate overlays. (setq-local flycheck-highlighting-mode nil) (setq-local flycheck-check-syntax-automatically nil))

;; only run this if rtags is installed (when (require 'rtags nil :noerror) ;; make sure you have company-mode installed (require 'company) (require 'company-rtags) (add-hook 'c-mode-common-hook 'rtags-start-process-unless-running) (add-hook 'c++-mode-common-hook 'rtags-start-process-unless-running)

;; install standard rtags keybindings. Do M-. on the symbol below to ;; jump to definition and see the keybindings. (rtags-enable-standard-keybindings) ;; comment this out if you don't have or don't use helm (setq rtags-use-helm t) ;; company completion setup (setq rtags-autostart-diagnostics t) (rtags-diagnostics) (setq rtags-completions-enabled t) ;; (push 'company-rtags company-backends) (add-to-list 'company-backends 'company-rtags) ;; use rtags flycheck mode -- clang warnings shown inline (require 'flycheck-rtags) ;; c-mode-common-hook is also called by c++-mode (add-hook 'c-mode-common-hook 'setup-flycheck-rtags) (add-hook 'c++-mode-common-hook 'setup-flycheck-rtags) )

(when (require 'rtags nil 'noerror) (add-hook 'c-mode-common-hook (lambda () (when (rtags-is-indexed) (local-set-key (kbd "") (function company-complete)) ))))

Thanks in advance.

casch-at commented 7 years ago

You can set company-idle-delay to nil.

(setq company-idle-delay nil)

Type C-h v company-idle-delay for more information about company-idle-delay. Maybe also of interest is company-minimum-prefix-length.

regards,

Christian

PS: Closing this issue