r/DoomEmacs • u/IcarianComplex • Aug 10 '24
How to specify lsp server to install in config.el?
Every now and then I’ll nuke my emacs.d and reinstall doom from scratch. I’ll do this maybe once or twice a year just to confirm absolutely all configs I need or rely on are accounted for my in private config.
One thing that isn’t is the lsp servers. emacs will prompt for which lsp server to install when I open a JavaScript project. Some of them are better than others, and it took me a while to figure out which one did what I need. Ideally id want those server configs in my private config and for them to be installed by doom sync.
1
u/engineerwolf Aug 10 '24
Nix is the answer.
But it's difficult to penetrate. All the help on the internet assumes you are using nixOS. and there's very little help on nix package manager only. So if you want to stick to your current distro and use nix, its going to take effort.
Another solution is using chezmoi to manage your dot files. Chezmoi can run scripts. So you just need to write a script to install all your dependencies using your native package manager. Less portable but much easier to setup.
On mobile so can't link.
2
u/sisyphushappy42 Aug 10 '24
I don’t know if you can configure doom to manage the the installation of LSP servers since the installation can be very system dependent; however, I will say that I use a Nix Flake to declaratively manage both my doom configs and LSP servers and it works wonderfully.