reddit / emacs

Questions about implementing VSCode Emmet like web development functionality in Emacs:

zeta_00 · 2022-01-29 04:44
Greetings, In Emacs I'm using Eglot as a language server, and it now supports HTML, CSS, and JavaScript really well. The only thing that I'm missing, is how to setup Emmet in Emacs to work alongside Eglot. Having nice scripts will make it easier for me, like when writing HTML templates. Attached below is my config passed to VSCode's settings.json file(different syntax but close): \` userSettings = { "emmet.triggerExpansionOnTab" = true; "emmet.showSuggestionsAsSnippets" = true; "emmet.showExpandedAbbreviation" = "always"; "editor.snippetSuggestions" = "top"; "files.associations" = { "\*html" = "html"; }; "emmet.includeLanguages" = { "javascript" = "html"; "django-html" = "html"; }; }; \` So what Emacs packages and use-package/ELisp configurations will I need to get this equivalent Emmet functionality in Emacs. Thanks in advance for the help.
dpoggio · 2022-01-29 04:58
I think you should try YASnippet. Also, it would be nice if you state the behavior you want, instead of assuming we all know your actual tools.
graduale · 2022-01-29 05:43
Also, there’s an Emmett package for Emacs. You may want to check it out. https://github.com/smihica/emmet-mode
TheFrenchPoulp · 2022-01-29 14:29
What you want probably exists in emmet-mode already, but it's hard to tell since many of us (read I) aren't VS Code literate. Instead try to tell us what behavior you want exactly Here is my own setup where I use the same keybinding `C-RET` to trigger Emmet and snippets based on context https://github.com/angrybacon/dotemacs/blob/master/dotemacs.org#expand
zeta_00 · 2022-01-29 18:10
Thank you , I just wanted to see other people's Emmet configurations, so that I can use them as a reference. Thanks again for sharing your config.