cidra_ · 2022-06-08 10:24
Hi all. I want to use emacs for development but configuring it for development purposes is much harsher than configuring it for writing (markdown and org).
​
The languages I use are the following:
* C
* Java
* Python
* Haskell
* Elisp (duh)
For each of these I'd like to have some basic but essential features:
* Syntax highlighting
* Code completion
* Folding
* Interactively compile and run from an emacs buffer
* Everything else one should except from a decent editor
​
The problem is that there are so many modes that I really do not know which one to use. Also, there are LSPs which i did not really understand quite well what they are and how they differentiate from common modes. Does someone have any advice or easy to read config file to share me?
akirakom · 2022-06-08 10:49
If you want something that provides an IDE-like experience out of the box, you can try out [Doom Emacs](https://github.com/doomemacs/doomemacs).
However, I don't consider Doom Emacs *simple*, because it is a community-developed Emacs distribution with many custom features. There are many simpler ones which are maintained by individuals. You can find them on GitHub. Some of them are listed in [awesome-emacs](https://github.com/emacs-tw/awesome-emacs#starter-kit).
mtk000 · 2022-06-08 12:11
LSP along with a good default config supporting each language should become part of the core.
paretoOptimalDev · 2022-06-08 15:22
I think eglot would be good. If you need more features or encounter issues try lsp-mode.
cidra_ · 2022-06-08 16:44
My main concern is whether I need stuff like "haskell-mode" *together* with Haskell Language Server or i have to choose between one of the two, for example
Extension_Try_6870 · 2022-06-08 18:18
I'm confused about what you mean about multiple major mode. For example for python, the major mode is python and lsp is a minor mode. You can see that with the command describe-mode.
For python I have python-mode which is built-in, lsp-mode with pylsp which provides completion candidates, diagnostics, rename,..., projectile which provides commands to compile, install, package,... and pyenv to deal with virtual environment.
Each part can be replaced. For exemple projectile ->project.el, lsp-mode->eglot, pyenv -> poetry
__deetz__ · 2022-06-08 19:27
They are orthogonal. At least mostly. Eg python indentation and Code navigation is provided by python mode, but linting, code completion etc by elpy.
L-Szos · 2022-06-09 12:13
For code folding you could try hs-minor-mode.
7890yuiop · 2022-06-09 21:23
LSP/language servers are a very recent development, and I would be awfully surprised if there are ANY major modes which require you to use one.
So to begin with, use the appropriate major mode for the language you are using. For many languages this is built into Emacs and will be enabled by default. For some languages you will need to install a third-party package to get a major mode. In a small number of cases (but Python is one of them) you have more than one choice of major mode, so you might need to do some research to decide which one is best for you.
LSP (using a third-party language server and the eglot package from GNU ELPA, or lsp-mode from MELPA) is something you can optionally layer on top.