What does HackerNews think of eglot?

A client for Language Server Protocol servers

Language: Emacs Lisp

With lsp you don't need tags. You essentially have a lsp server like clangd [0] running in the background for finding references, definitions, code completion etc.

With the latest release 29.1, emacs comes with an in-built lsp client - eglot[1]. So you need to (a) Set up clangd or some other lsp server for c++. Make sure it's accessible from emacs (use something like exec-path-from-shell to get your shell paths into emacs) (b) Set up your project for clangd - this involves generating a compile_commands.json which basically lists the full compilation invocation of each and every file in your project. CMake has options to do that and likely many other build tools or maybe use something like bear[2]. (c) Enable eglot (install the package if needed on older versions of emacs) and configure appropriately.

I also use projectile for project mgmt though emacs now has something in built for that too.

I can post my configs if that helps.

[0] https://clangd.llvm.org/ [1] https://github.com/joaotavora/eglot [2] https://github.com/rizsotto/Bear

I use it at my current job in which I work in a large C++ codebase. I formerly used CLion.

Whether Emacs is an IDE or not depends how you define IDE. I use Eglot [0] for LSP integration; this gives me IDE-like features like "jump-to-definition", syntax error highlights, warnings, etc. and integrates with company-mode [1] for code completion. This handles most of my needs for writing code.

As for other things like a file tree, I've found that the built in `project-find-file` command combined with `vertico` [2] and `orderless` [3] makes finding files and navigating around projects easier; that pair behaves similarly to CMD+P in Sublime Text or VS Code. There are file tree packages out there, but I've found that I don't really need a file tree in practice and that I prefer navigating around projects with fuzzy file search and grep.

[0] https://github.com/joaotavora/eglot [1] https://github.com/company-mode/company-mode [2] https://github.com/minad/vertico [3] https://github.com/oantolin/orderless

Eglot is another excellent LSP client implementation: https://github.com/joaotavora/eglot

I slightly prefer Elgot's interface, which feels a bit more restrained, but both are excellent.

The emacs support is great. I use emacs 'racer' and 'lsp' packages full time for development.

There are two popular emacs packages for rust-analyzer: lsp[0] and eglot[1]. lsp (language server protocol) package is the default for racer. Eglot has far more features and is correspondingly resource hungry.

Detailed type information has a super helpful impact on my ability to review Rust code in general. I find reviewing rust code much more productive when I can see what owns a variable, how long it lives, and how it's being used (immutable vs mutable). So yea, lsp or eglot. Super helpful.

[0] https://emacs-lsp.github.io/lsp-mode/ [1] https://github.com/joaotavora/eglot

+1

https://github.com/joaotavora/eglot is developed by a core Emacs developer who plans to mainline it. It works great.

After 10+ years of Eclipse, Vim, Atom, and IntelliJ... I've bet on Emacs over the past few years on the basis of https://en.wikipedia.org/wiki/Lindy_effect and that it holds a unique space in computing re programmability: https://martinfowler.com/bliki/InternalReprogrammability.htm...

The authors mention "With code completion, Git control, and even automatic deployment systems, modern IDEs are a Swiss Army Knife of features.", perhaps without realising that:

* code completion has been standardised via LSP (e.g. https://github.com/joaotavora/eglot works great, and is planned to move into upstream Emacs )

* Emacs has great Git clients (Magit, vc-git)

Diversity of tooling shows we're experimenting. Good!

There are multiple LSP clients though, there's lsp-mode [1] and eglot [2].

After trying out both, I prefer Eglot, mainly because I find it faster and less intrusive than lsp-mode. It also composes better with built-in packages, such as flymake . I use gopls and pyls as language servers.

1. https://github.com/emacs-lsp/lsp-mode

2. https://github.com/joaotavora/eglot

The arrival of Language Server Protocol is going to make IDE-like functionality more evenly spread across traditional text editors, "modern" text editors and "IDEs". In Emacs I recommend eglot: https://github.com/joaotavora/eglot
I'm using it (with https://github.com/joaotavora/eglot in Emacs) and it's fantastic.

I imagine that it's evolving quite quickly, and it's also the sort of thing where it's probably both fun and fine to stay close to the bleeding edge. Should I just periodically download the latest released binary, or is it worth building from master?

I'm maintaining Delta and trying to help out a bit with Eglot -- an Emacs LSP (Language Server Protocol) project, and trying to improve my Rust and Lisp along the way. LSP in Emacs with Eglot is fantastic (especially for Rust, but also Python. Those are the only ones I've tried so far.)

https://github.com/dandavison/delta

https://github.com/joaotavora/eglot

The same engine that VSCode uses is open source [1]. With lsp-mode [2] or eglot [3], you can have the same stuff working inside emacs. I've actually been writing Java inside emacs lately --- yes, java, and I have had very few issues.

One caveat, development on the emacs LSP stuff is moving very quickly, so I don't recommend using ELPA/MELPA/etc. to install the plugins. I use straight.el [4] to manage my plugins, they're checked out from the upstream source and can be updated at-will. You'll also need an up to date version of emacs, ie: 26+. (That's the current release, but it's not available in some distributions ie: debian/ubuntu yet.)

---

[1]: https://github.com/Microsoft/python-language-server

[2]: https://github.com/emacs-lsp/lsp-mode

[3]: https://github.com/joaotavora/eglot

[4]: https://github.com/raxod502/straight.el