Moving from lsp-mode in GNU Emacs to Eglot

20 points by fanf


technomancy

Eglot officially recommends that you start it by hand (cf), but I'm too lazy for that. Instead, as I did with lsp-mode, I arranged to start it automatically for local files in the relevant modes.

Depending on the language, this is catastrophically bad advice. LSP servers in many languages cannot be safely used on untrusted code; opening a Rust or Elixir file in a project controlled by an attacker can easily cause your machine to be compromised. Unless you're working in a language with a known-safe LSP server, never automatically activate LSP.

edit: citation: https://rust-analyzer.github.io/book/security.html