0

I have latest YASnippet package installed on GNU Emacs 27.2 via MELPA. Snippets work, for example in *.js files, let expands to snippet after hitting TAB. However, when I edit HTML file (in html-mode), the JS inside <script> tag does not use YAS. Also, CSS snippets don't work in <style>.

I tried web-mode, but it fixes only JS.

Are there other solutions?

2
  • 1
    I did not further look into it, but this general answer might help you on your way. Aug 24 at 11:56
  • @dalanicolai Thank you, it seems to solve the problem
    – Vlad
    Aug 24 at 12:00
1

The answer mentioned by @dalanicolai helped a lot: I just had to edit ~/.emacs.d/snippets/html-mode/.yas-parents to contain css-mode js-mode.

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.