Emacs as an IDE

The development of Visual Studio Code has led to several improvements that benefitted all editors for implementing IDE-like features: Debug Adapter Protocol (DAP) and Language Server Protocol (LSP).

Language server protocol

The community of Emacs was able to integrate the protocol enabling IDE features to be possible (e.g., autocompletion, Intellisense). Setting up LSP consists of installing the language server for a specific language and hoping for the best if a community member has implemented LSP support for that language and the editor of choice.

On Emacs, you simply have to do these things:

While certain language servers can be automatically installed with lsp-mode, it is better to be explicitly installed from the environment. Nix/Guix environments should be a good application here.

If you're enabling lsp-mode, there is a chance of encountering an error telling that the current project is not a workspace or something similar. You can bypass it by either setting the folder as a workspace with lsp-workspace-folders-add or running lsp which will run on a single file .

Debug Adapter Protocol

The same community of lsp-mode has gathered together to implement DAP as well.

Setting up DAP is mostly similar to setting up LSP: installing a debug adapter server for a language and hoping for the best if a community member has implemented DAP support for that language and the editor of choice.

On Emacs, you have to do the following: