DrolleryMedieval drollery of a knight on a horse
flowery border with man falling
flowery border with man falling

I’ve been using VS Code recently because working with Lit in Emacs has been unbearable. But I again hit the wall of “VS Code’s VI emulation sucks” and so I am looking for solutions that don’t involve the software devil. Vim has support for Lit to some extent with a plugin. But when I loaded up Neovim I was amazed at how slow it was. Probably something the matter with my config being out of date or something, but I just gave me pause and I thought to look into the Emacs+Lit thing again and I’m glad I did.

I love the marriage of my editor and a task manager. The integration between Orgmode and Emacs is wonderful. I can start a task in Orgmode, keep a clock running for it, and then get to work without having to switch context. I can take a quick note at the point at my cursor in Orgmode and it’ll link to that file, without polluting the repo. So getting Emacs working is something I’m very in favor of. I know it’s theoretically possible since I’ve spoken with people on the Doom Discord who insist they can use Lit. But the problem I was facing was that LSP and Treesitter were not really picking up the Lit syntax. web-mode is as close as I could get to Lit syntax support and that was lackluster.

Turns out the problem was pretty simple. When in web-mode, which I’d set as the default for JavaScript files because of the rudimentary support for Lit syntax, the langauge server would switch to either the CSS or HTML server and not load ts-ls. When I switched to say typescript-mode the LSP features kicked in. But then the syntax highlighting wasn’t working the way I expected with Treesitter. Another easy solution however, just enable treesitter for typescript-mode.

I’ve not used this for much more than a quick demo this weekend. But I’ll report back after using Emacs this week at work. Fingers crossed!