Vellu01 · 2022-03-25 07:56
I'm a total beginner, I can't figure out lsp-mode or company or that stuff, in vs-code I just click a button, is there something similar in emacs?
theMachine0094 · 2022-03-25 08:26
https://emacs-lsp.github.io/lsp-mode/tutorials/CPP-guide/
I followed this tutorial. There are similar ones for other languages. I don't think there is a one click solution other than copy pasting from someone else's init files.
I was in a similar position as you not too long ago. I didn't know enough about emacs or elisp to follow these tutorials. I continued using vscode and slowly learned about emacs and elisp. Even after I started switching to emacs, I still had vscode around as backup. Eventually I uninstalled vscode completely and never looked back since. I kept adding more features to my emacs setup so its now far more powerful and optimized for my workflows that vscode ever was.
peabody · 2022-03-25 09:20
As someone who likes both emacs and vscode I don't think you're ever going to find something with as easy an out-of-the-box setup as vscode. You're going to have to work a lot to get similar functionality in emacs even with things like company and lsp-mode. It might be worth the effort, but you'll need to be willing to put in the time. Otherwise I would stick with vscode. As a long time emacs user, I'm finding myself using vscode for everything more and more, and using emacs for special case editing, like org-mode and macros, etc.
Vellu01 · 2022-03-25 11:43
That's unfortunate
aaronemassey · 2022-03-25 13:34
eglot and language servers are my go-to for autocomplete and the like. I'd say it's fairly pain free. DM if you want any advice or help setting that up.
Sudo_Brew · 2022-03-25 14:10
First of all, you're on exactly the right path to get the autocompletion you're thinking of. I use lsp-mode and company every day for exactly this, and without a lot of configuration required. You'll also find additional features you might want in the lsp-ui and lsp-treemacs packages.
Now, for total beginners I highly recommend using a framework like [Spacemacs](https://www.spacemacs.org/) (my preference) or [Doom](https://github.com/hlissner/doom-emacs). Both of these come with a ton of useful packages, including both lsp-mode and company, and have lots of beginner-friendly documentation. While you're not going to have a "just click a button" experience in Emacs, frameworks like these let you just set a variable to true, which is just about as easy.
oantolin · 2022-03-25 17:28
> You're going to have to work a lot to get similar functionality in emacs even with things like company and lsp-mode.
I don't use LSP (yet?). Does this statement mean that the instructions for installing and configuring lsp-mode or eglot don't actually work? Or when you said "work a lot" did you just mean "follow the instructions"?
wargxs · 2022-03-25 22:28
It is pretty easy to get things working in emacs ; besides - these things break easily in vs code .. and when things don’t work it is much easier in eMacs to fix it .
TheFrenchPoulp · 2022-03-26 12:42
How much is *a lot*? And did you configure your setup without looking at the README for the respective packages? (who doesn't like a challenge)
Personally, I enabled `corfu` and `eglot` following the instructions and it *just* worked. Optimizations I brought later on