Improving Eglot performance

Yesterday I started to rewrite the mataroa-cli tool for the millionth time. This time I chose Rust to do it for three reasons:

  1. I like its type system1, even though I don’t really like the borrow checker
  2. I can statically compile to multiple architectures, nice for a CLI tool
  3. The toolchain is really good, the LSP and Cargo are a blessing

While writing the initial portion of the code, I noticed a mild input lag every time I added a new crate. Weird, I’m not writing a lot of code and it’s not my computer that is lagging. After a few minutes searching for the root cause, I discovered that Eglot prettifies the LSP’s JSON RPC output. You can read more on the GNU Emacs bug report #65760.

The solution is quite simple:

(use-package eglot
  :config
  (advice-add 'jsonrpc--log-event :override #'ignore))

  1. As much as I like Go and its toolchain, I really hate not having Discriminated Unions (called enums in Rust). ↩︎


Articles from blogs I follow around the net

Simpler encapsulation with immutability

A worked example. I've noticed that many software organizations struggle with encapsulation with 'bigger' problems. It may be understandable and easily applicable to define a NaturalNumber type or ensure that a minim…

via ploeh blog June 12, 2024

Update on our infrastructure plans

Now that Drew has provided an update on the general state of SourceHut, I would like to follow up with one focusing on our infrastructure. Much has happened under the hood, a lot has not happened, and plans come and go as reality changes its mind every now a…

via Blogs on Sourcehut June 12, 2024

OpenBSD extreme privacy setup

# Introduction This blog post explains how to configure an OpenBSD workstation with extreme privacy in mind. This is an attempt to turn OpenBSD into a Whonix or Tails alternative, although if you really need that level of privacy, use a system from this…

via Solene'% June 10, 2024

Generated by openring