0

I have tried a couple auto-completions engines on emacs, I had been working with auto-complete because it was the only one that I got working. I simply added some modes to a list and it was done:

(add-to-list 'ac-modes 'asm-mode)
(add-to-list 'ac-modes 'go-mode)
(add-to-list 'ac-modes 'tex-mode)

However, it always felt janky, and I never really liked the style. Corfu on the other hands, works wonder but the problem is:

  • It only works with elisp; how can I make it work with other programming buffers

I tried using dabbrev with the config on the github page:

;; Use Dabbrev with Corfu!
(use-package dabbrev
  ;; Swap M-/ and C-M-/
  :bind (("M-/" . dabbrev-completion)
         ("C-M-/" . dabbrev-expand))
  ;; Other useful Dabbrev configurations.
  :custom
  (dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'")))

But it doesn't follow my TAB-GO config, and only "works" if I press C-M-/. However, it did auto-complete, so if I could add dabbrev's suggestions to Corfu, everything should work. I am a complete Emacs novice, so I may have done things wrong. I have googled everywhere, but to no avail.

Drew
  • 75,699
  • 9
  • 109
  • 225

1 Answers1

1

To get more of corfu package, you need to add cape completion at point extension and configure it as shown on that page. The function needed for programming languages is cape-keyword (the others are also useful to be added).

As for asm-mode, you must provide some more info - there is a built-in package, asm-mode, but if you need/use Intel x_332/x_64, there is on Melpa a better package, masm-mode, which will clobber with asm-mode. Also if you need some cross-assembler, there are better tools/packages to use, just tell what you need.

Keep in mind there is also the lsp-mode package, which can also do completion. See this page.

Ian
  • 1,321
  • 10
  • 12