… I went down it last night and this morning.
I’m back on Doom after patiently dismantling a bunch of cruft I’d added to it. I set a goal of getting my package count under 200 (including all the batteries Doom includes). Because its default stance is that you want emacs-lsp and not eglot I went along with that initially, and it drove me a little bonkers. I think these things assume a much more organized person than I am, and LSP began to nag pretty much constantly until I made the mistake of telling it to blocklist ~/
, at which point it pretty much stopped working, because there’s an implicit -r
in there.
So I toggled eglot in init.el
, and the nagging stopped. It seems to need less explicit guidance.
Something I like about eglot as it works in Doom vs. emacs-lsp is that if it doesn’t have a needed server for a given mode, it just tells you that in the minibuffer. It doesn’t steal focus, demand action, or try to download anything for you. emacs-lsp (at least as Doom handles it) does all of that stuff and it’s disruptive. I think it’s an attempt to help you keep flow by just handling the matter, but about 1 time in 10 in the past it causes a hang and that sucks way worse than “first time editing this code, pause, install, resume.”
That brought me to “now that it is not driving me to distraction, why do we even want LSPs?”
With Markdown it’s to have Marksman, which does this very cool thing where if you lead with [[
it offers autocompletions of all the Markdown files in your project and creates a wiki link to the file you can then hop over to with C-c C-o
or just by tapping return
if you toggle wiki links
in markdown-mode.
With everything else, it’s just sort of educational to have something smarter about the code than me providing running commentary.
Next up, I had turned on Doom’s support for code formatting/prettification, and that was causing everything to barf errors on save, most because I hadn’t installed an expected formatter. Doom uses apheleia, which is pretty well behaved but was not working with Ruby. That got annoying because you have to grab the formatter (prettier), then deal with some errors that’d seem to have nothing to do at all with the fact that it wants a .prettierrc
either in project root or ~/
.
I knew I got it working because I ran it on this:
#!/bin/env ruby
fruits = ["apple","banana","orange"]
fruits.each do |f|
puts f
end
apples = ["golden delicious", "honeycrisp", "fuji"]
apples.each do |a|
puts a
end
… and got back:
#!/bin/env ruby
fruits = %w[apple banana orange]
fruits.each { |f| puts f }
apples = ["golden delicious", "honeycrisp", "fuji"]
apples.each { |a| puts a }
I sat with my feelings about that for a few seconds and decided it was educational. It’s never really been about being particularly good or sound or correct, just about getting the thing to run.