Hung-Yi’s Journal

Front-end Developer, Emacs Adventurer, Home Cook

03 Mar 2021

Convolute Lisp S-Expressions With Smartparens

"Convoluting a lisp s-expression" sounds like computer science ivory tower bollocks, but after I actually learned what it was and how to use it, I'm seeing it pop up quite regularly when writing lisp. Let me show you the magic; I promise every time you get to use it, you'll feel like a king!

01 Mar 2021

How to Emojify Selectrum Candidates

If you use both emacs-emojify and selectrum and you're having trouble getting emoji to show up properly in the list of completion candidates, especially after the latest round of selectrum updates (commit bcf3714) then I have an elisp configuration snippet that may help you. Read on to see it.

24 Feb 2021

The Programmer's Way to Write in Title Case Using Emacs Lisp

It turns out that writing in proper title case can be important for a front-end developer, since there are often things on screen that need to appear as a title to convey importance: dialog headers, menu items, buttons labels, to name a few.

The problem is I had always dismissed it as something for school, academics or "real" writers, so I never bothered to learn the rules properly. This meant many distracting trips to https://titlecase.com/. Realising this, I used Emacs to make a quick way to convert something to title case without relying on my brain. This post is my journey on how I wrote that thing.

25 Jan 2021

Authentication Issues with MSAL.NET on WSL2

I've found that Microsoft's Azure AD MSAL Extensions for .NET don't seem to work very well under WSL2. In particular, there is this this issue that's reportedly been fixed as of November 2020 but, even with Azure.Identity v1.3.0, it remains a problem for me. The error can look something like value cannot be null: attributeValue1 or Unable to load shared library 'libsecret-1.so.0'.

13 Oct 2020

Use Emacs-Tree-Sitter for Highlighting in Doom Emacs

Tree-sitter is a general programming language parser that efficiently builds and updates Abstract Syntax Trees (AST) for your code. Basically, it can read programming languages and understand the structure and meaning of code without having to execute it. Among many amazing things, one of its best and simplest features to take advantage of is richer syntax highlighting, which is what I use it for in Emacs. Today I'll show you how to set up emacs-tree-sitter in Doom Emacs1 so you can quickly get prettier code with next to no effort.