1

I got these lines:

;; turn on semantic
(semantic-mode 1)

;; define a function which adds semantic as backup to auto-complete
(defun my:add-semantic-to-autocomplete()
  (add-to-list 'ac-sources 'ac-sources-semantic))

(add-hook 'c-mode-common-hook 'my:add-semantic-to-autocomplete)

From this video here.But for me it does not work at all.Save me please,i lost all day fighting with it...

  • Have you installed auto-complete? Please try to detail what you do, what you expect and what happens instead. – JeanPierre Feb 18 '16 at 16:18
0

You mistyped your auto-complete source symbol.

It should be 'ac-source-semantic, not 'ac-source(S)-semantic

| improve this answer | |
  • I'm such an idiot,thank you very much tho,appreciate your help. – Gabriel Răducan Feb 18 '16 at 16:47
  • What do you think about irony mode,is it the best mode for c/c++? – Gabriel Răducan Feb 18 '16 at 16:50
  • I have not used it, I use company-clang with flycheck. However, I do not frequently write C or C++ so my knowledge of what is best is limited. – Jordon Biondo Feb 18 '16 at 17:12
  • Not fly-make? @Jordon Biondo – Gabriel Răducan Feb 18 '16 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.