reddit / emacs

Setting up emacs for front end web development work

liebermen · 2022-03-28 14:36
Hello Everybody I switched to emacs after using vscode for a few years and am currently enjoying using keyboard for everything rather ,I was learning how to setup emacs from uncle dave on youtube and unfortunately he has stopped uploading :( . How do I setup emacs for front end web development (for html,css and javascript) , I tried following guides on blogs but they all failed unfortunately . I have company setup for auto completion ,what else do I need ?
orzechod · 2022-03-28 14:59
this question gets asked once every couple of months here, so there should be plenty of threads with recent information in them for you to find and read. which of them have you tried already (so nobody points you to them again) and if "they all failed" then what specifically did you do and how specifically did it not work (so that we can actually help you instead of making wild guesses)?
emoarmy · 2022-03-28 15:17
What sort of front-end development world do you live in? React/Vue? Typescript? Javascript? Clojurescript? Elm? You have company mode working, but do you have [LSP](https://emacs-lsp.github.io/lsp-mode/) integration setup? While you learn more about Emacs config, have you tried seeing if things like https://github.com/hlissner/doom-emacs do what you want for front-end development?
brurucy · 2022-03-28 15:38
The true way to go about emacs is to not use it as your ONLY tool. 1. Install eglot 2. Learn how to debug with gdb or lldb through the terminal interface
stayclassytally · 2022-03-28 22:02
*laughs in EXWM*
7890yuiop · 2022-03-28 23:44
Is gdb somehow relevant to front-end web-development?
adeldude13 · 2022-03-29 01:54
wtf does gdb has to do with front end
liebermen · 2022-03-29 02:28
>What sort of front-end development world do you live in? React/Vue? Typescript? Javascript? Clojurescript? Elm? right now just html,css and vanilla JS. I don't have LSP setup Ill work on that
J-ky · 2022-03-29 06:33
I would use eglot. Install a JavaScript lsp. Enable company mode. That is most of the work. I found web-mode quite handy to use, especially for web template.
Horrih · 2022-03-29 06:53
On my side i installed web mode as the common mode for css/js/html. It supports well the complex stuff like react template and vue.js single file components for example. For completion install lsp-mode, with typescript-language-server as backend (it supports javascript as well, and should be installed through npm/yarn). If you do some vue.js you'll need to npm install vls for .vue files For formatting i use prettier.js (there is a front end for emacs) For debugging I use dap-mode (it supports vscode's launch.json). My only issue was for firefox debugging, the included setup does not work anymore, i had to manually download the vscode extension and unzip it. Here is my [personal emacs config](https://github.com/Horrih/config/blob/main/.emacs), feel free to reuse what you want to help you get started
redguardtoo · 2022-03-29 13:09
You could use my setup, https://github.com/redguardtoo/emacs.d I'm a javascript developer. Please note I use plugins based on ctags for code navigation/completion.
dpoggio · 2022-03-29 14:21
I would recommend you to work with web-mode right now. And YASnippet for tags. That will really speed you up.
liebermen · 2022-03-29 15:30
thanks Ill check this out :)
[deleted] · 2022-04-11 11:34
[removed]
xmawja · 2022-12-09 11:02
you can try my personal configuration may fit your need [Funmacs](https://github.com/xmawja/funmacs.git)