Here's a few minor tweaks I've made to my Emacs setup recently. Limiting enabled tree-sitter modes After reading Rahul's post Emacs 31 Is Around the Corner: The Changes I'm Already Daily Driving I simplified my setup and turned on all the tree-sitter modes ( treesit-enabled-modes t ) I regretted that as soon as I opened a YAML file though. It turns out the yaml-ts-mode is rather unusable. 1 I…
Recently I realised that it'd be really nice if jumping to errors would store the previous location in the Evil jump list. These definitions do just that ( evil-define-motion mes/evil-goto-next-error ( count ) :jump t ( unless ( bound-and-true-p flymake-mode ) ( signal 'search-failed nil ) ) ( flymake-goto-next-error count ) ) ( evil-define-motion mes/evil-goto-prev-error ( count ) :jump t (…
Jan G sent me a two-part comment. Part one I was under the impression that when using elpaca you needed to disable use-package, and that when using elpaca-use-package, you were redefining the macro. I’m not 100% sure about this, but the documentation has an example of use-package and how it actually expands to an elpaca command. I wouldn't know. All I can say is that it would be nice if package…
I should have dealt with comments I got to my posts on how I deal with secrets in my work notes, here , and here . Better late than never though, I hope. Comment from Stefano R The first one is a link to post titled How I use :dbconnection in org files . It describes a nice way of setting sql-connection-alist based on the contents of a file, in his case ~/.pgppass . Comment from Harald J The other…
I've used projectile ever since I created my own Emacs config. I have a vague memory choosing it because some other package only supported it. (It might have been lsp-mode , but I'm not sure.) Anyway, now that I'm trying out eglot , again , I thought I might as well see if I can switch to project.el , which is included in Emacs nowadays. A non-VC project marker Projectile allows using a file,…
I've switched back to lsp-mode temporarily until I've had time to fix a few things with my eglot setup. Returning prompted me to finally address an irritating behaviour with lsp-ui-doc . No matter what I set lsp-ui-doc-position to it ends up covering information that I want to see. While waiting for a fix I decided to work around it. It seems to me that this is exactly what advice is for. I came…
Since the switching to eglot I've ended up making a few related changes. Replacing flycheck with flymake Since eglot it's written to work with other packages in core, which means it integrates with flymake . The switch comprised Use :ensure nil to make sure elpaca knows there's nothing to download. Add a call to flymake-mode to prog-mode-hook . Define two functions to toggle showing a list of…
I've been using lsp-mode since I switched to Emacs several years ago. When eglot made into Emacs core I used it very briefly but quickly switched back. Mainly I found eglot a bit too bare-bones; I liked some of the bells and whistles of lsp-ui . Fast-forward a few years and I've grown a bit tired of those bells and whistles. Specifically that it's difficult to make lsp-ui-sideline and lsp-ui-doc…
I've been playing around with adding more validation of data received by an HTTP endpoint in a servant server. Defining a type with a FromJSON instance is very easy, just derive a Generic instance and it just works. Here's a simple example data Person = Person { name :: Text , age :: Int , occupation :: Occupation } deriving (Generic, Show) deriving (FromJSON, ToJSON) via (Generically Person) data…
In modus-theme 5.0.0 Prot introduced a structured way to build a theme based on modus. Just a few days ago he released version 5.1.0 with some improvements in this area. The official documentation of how to build on top of the Modus themes is very good. It's focused on how to make sure your theme fits in with the rest of the "modus universe". However, after reading it I still didn't have a good…