I'm struggling with a problem with Spacemacs and I don't know what I'm doing wrong (maybe a lot of things).

I have created a TAG file for my project. The tags seem to work well because I can navigate to the definition or find the tag with find-tag.

The problem is CSS autocomplete popup it's not showing. So when I'm editing an HTML file, I have not autocompletion for CSS classes. I can use helm complete at point, though.

For clarification, I want a popup similar to this:

enter image description here

I have tried to follow the advice on this blog post but without results.

Any help will be appreciated.


I was making some tests, and I have been able to prove that the problem is that company-gtags is not enabled within a string (a class element for example). Instead I have tried company-etags and if I start the backend manually with company-beging-backend, I can see the pop up with the CSS classes. As far I can see in this github PR company-etags has an option to enable code completion on strings. But I don't know how to add it to my .spacemas. I have tried into user-config and user-init but still not working.


1 Answer 1


I can finally solve my problem.

I have added this lines to user-init:

  (with-eval-after-load 'company-etags '(progn (add-to-list 'company-etags-modes 'web-mode)))
  (setq company-etags-everywhere '(html-mode web-mode nxml-mode))

But also it's necessary to add the company-etags backend to web-mode so I have also append this line to user-config:

 (push '(company-web-html company-etags company-css) company-backends-web-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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