1

I want to be able to get a drop-down list of partial matches to Elisp function names (installed or those already defined in the buffer) as shown in the screen-shot below from the YouTube video: https://youtu.be/QaX3AaK3_Lk?t=332

How do I achieve this? Is there a standard library for this?

enter image description here

Drew
  • 75,699
  • 9
  • 109
  • 225
smilingbuddha
  • 1,131
  • 10
  • 26
  • 1
    Possible duplicate of [Emacs - elisp code autocompletion in emacs-lisp-mode](https://emacs.stackexchange.com/questions/30778/emacs-elisp-code-autocompletion-in-emacs-lisp-mode) – Drew Nov 16 '18 at 22:12

2 Answers2

3

I'd like to recommend the package company-mode. I found it easier to setup and config. For beginners, using the following configuration will enable the autocomplete out of box.

(use-package company
  :ensure t
  :config
  (progn
    (add-hook 'after-init-hook 'global-company-mode)))

Moreover, there's a lot of backends you can use for specific programming languages. The following is how to config auto complete for python.

(use-package company-jedi
  :ensure t
  :config
  (progn 
    (setq jedi:complete-on-dot t
          jedi:use-shortcuts t)
    (defun user/python-mode-hook ()
      (add-to-list 'company-backends 'company-jedi))
    (add-hook 'python-mode-hook 'user/python-mode-hook)))
yaodong
  • 144
  • 3
  • 1
    This is essentially a link-only answer, so it may be deleted. To avoid that, please summarize information from the target, or otherwise explain why/how using that package answers the question. – Drew Nov 16 '18 at 22:09
  • This answer assumes that `use-package` is installed. Correct? – ephsmith Aug 10 '19 at 02:19
  • @ephsmith yes, it assumes that `use-package` is installed. – yaodong Jan 07 '20 at 21:37
1

Without using external packages you can get autocompletion visible in minibuffer. Add this to config:

(setq tab-always-indent 'complete)
slk500
  • 461
  • 2
  • 14