The Joy of Hackable Tools
Tags: opensource, tinkering, neovim, obsidian
Published: 2024-01-27 00:15:00

---
title: The Joy of Hackable Tools
subtitle: Discovering how the joy of hacking weighs in favour of tools that allow it
published: true
description: "We often consider a lot of factors when selecting the tools that make our lives tick. However, there is one thing that is likely overlooked during these contemplations: The joy that one gets from being able to hack away at the tools, being able to code into existence whatever you can think of. A tale recounting the discovery of this joy through a couple experiences."
date: 2024-01-21 13:18:43 UTC
published_at: 2024-01-27 00:15:00 UTC
tags: opensource,tinkering,neovim,obsidian
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gpipw28nw2let9w1thba.jpg
canonical_url: https://aksh.dev/the-joy-of-hackable-tools/
---

I just got my first neovim related MR merged!

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cdhrkmgrpfwwlu4s93fc.png"
       alt="Screenshot showing a merged pull request on github titled 'Fixed get_xp and get_level'">
  <figcaption>#FeelsGoodMan</figcaption>
</figure>

This got me thinking about the joy that is hackable tools: tools that allow you not just to customize, but to hack around and create stuff that you want. Customizability is becoming more and more an expectation these days, even if only at a very elementary level: it’s uncommon, for example, to find a website that doesn’t have a dark mode toggle. And I have really enjoyed customization with a lot of things, such as my android phone[^1], my OS (arch, btw), my terminal[^2], my browser[^3], my editors, my shell, the list goes on.

However, customization can only take you so far. Here I was customizing lualine for my neovim setup, excited about adding Code::Stats xp[^4] to it for a light dose of self gratification. But alas it wasn’t to be. After banging my head against some plugin configurations, it became clear that it was more than just a configuration issue. I was up against a bug.

Remembering lazy’s dev directory option from ThePrimeagen’s neovim revamp stream[^5], I decided to take a look under the hood of the codestats plugin[^6] itself. After tripping myself up by adding both the short name and the directory where lazy had cloned it by default (yep, it loops), I finally got a print statement in the plugin code to show up in neovim. Awesome! A few print statements later, I had the bug cornered, and a couple minutes later I had submitted a PR[^7].

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vrfatkle5sxz1m6eec5.png"
       alt="Screenshot showing a diff where the short github url has been replaced by a local directory in a lazy.nvim plugin config">
  <figcaption>The barrier to entry: A single line change</figcaption>
</figure>

This little incident brought joy to me. The barrier to entry was actually that low: just a single line change and you’re off to the races. All of my lua knowledge was just the Learn X in Y minutes page[^8] that I had gone through quickly before starting my setup. And getting my hands dirty with the plugin code made neovim plugin creation seem so much more approachable. If I wanted x feature I could just write my own plugin, et voilà, the feature is ready!

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5j866gkxlpaq5kdowv6.png"
       alt="Screenshot showing CodeStats XP for lua with value 9431 in lualine.nvim">
  <figcaption>Getting pretty good at lua</figcaption>
</figure>

The debate on whether switching to vim et al is going to improve your productivity, or just lead to time being wasted in setting it up, is timeless. Even though I myself had been tending to the former side of this debate already, the thing that finally tipped me over was an unexpected one: the joy that comes from being able to get into the code that makes your tool work and change how a part of it functions. This joy is highly underrated in my opinion, and makes the debate entirely one-sided, at least for me.

---

I had been hearing a lot about Obsidian. More and more people I tend to agree with or look to for inspiration had been talking about it. I can’t place the tipping point exactly, but it was probably a mix of No Boilerplate’s pitch[^9], jonhoo’s usage of it[^10] and kepano’s philosophy[^11]. But there was the thing of Notion hosting all my current knowledge-base, work journal and task management. So when the official migration plugin[^12] was released, I decided to take the plunge.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dd4rhbfii1oxe029epiy.png"
       alt="Screenshot showing graph view generated by obsidian">
  <figcaption>Obligatory Obsidian Graph Screenshot</figcaption>
</figure>

I exported my workspace, selected it in the migration tool, and gleefully looked at all my notes getting translated and The Graph™ populating. However, once I went to see a couple notes, all was not well. My ToC were gone, and so were the intricately chosen emojis for each page. But most importantly, all my code blocks were weird and unhighlighted. I was taken aback for a moment. It was not to be after all. I remembered seeing a github link for the migration plugin, and went to see if there was an issue for this. Sure enough, there was one[^13], but it looked like it was already resolved. After double-checking the versions etc., I submitted another one[^14]. Now to wait.

And then it clicked. It’s an open source plugin! I don’t _have_ to wait, I can just fix it myself! Hmm, it’s typescript. I have coded all of 0 lines of javascript in my life. But maybe I can still give it a go? I just have to find and fix a bug. And the plugin being well-written, with all steps being nicely structured as separate functions, inspired some confidence. But now I’ll have to set it up :/ I don’t want a bunch of node modules on my laptop, eww. But it’s 2023, surely I can just open it up in some cloud IDE? Maybe codespaces won’t bug out this time and actually successfully open a project for once?

It did. A few minutes of tinkering around (it wasn’t a couple hours at all), and I had figured out the commands and the built package file and where to place it to make it work in my obsidian. A couple iterations of change + build + copy-paste later, I had the code blocks formatting fixed.

That joy again! The possibilities were endless: even though not that simple this time due to my complete lack of knowledge of the JS ecosystem, I could hack around and fix anything I wanted, or even add features to make things work the way I wanted: which is exactly what I did over the next few days[^15]. Even though my MR was rejected[^16] in favour of the actual Notion migration contributor’s much more elegant and sensible fix[^17], I went on to add support for random things that bothered me about the imported notes[^15].

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anc1s9i64fj7fpr6775k.png"
       alt="Screenshot of obsidian importer window showing 2 configuration options for Notion import and hacked version of it showing 4 extra options related to code highlighting, removing ToC and adding emoji as sticker">
  <figcaption>Official Version vs My Hacked Version</figcaption>
</figure>

Again, there is the debate of whether you should get into Obsidian, with the added overhead of setting it up with plugins that might go unmaintained any day and overpriced or over-complicated syncing, or just stay with Notion and focus on doing your thing instead. Here it’s easier to tend to the former side for me. But when I went through the experience of hacking away and adding a bunch of features that resulted in an importing experience that was arguably an upgrade from Notion even visually, there was no doubt left.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1g7fhlivyetd4kxc5s9g.png"
       alt="Screenshot of a note on Kotlin Coroutines open in 3 side by side windows: first in obsidian with unhacked importer (with unhighlighted code and unlinked ToC), second in Notion (with ToC linked and code lightly highlighted) and third in obsidian with hacked importer (with nicely highlighted code and auto-generated ToC in a hovering side panel)">
  <figcaption>Imported note before hacking | Original Notion page | Imported note after hacking</figcaption>
</figure>

And even though right now I’m writing this blog in Notion (sorry for not giving you a perfect ending[^18]), I’m going to switch away this year to Obsidian without a doubt. I’ve already enlisted my wife as a test subject (albeit with partial success) by forcing her to switch over from Evernote (eww) and Notion to Obsidian and setting up hacky syncing via dropbox. It’s even part of my resolution for 2024, so of course it’s bound to happen no matter what.

<figure>
  <img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc56t1sos9igselsi1rj.png"
       alt="Screenshot of my tweet (umm X post?) showing a list of three tech resolutions for 2024: neovim, obsidian and split keyboard; with 24 views">
  <figcaption>Can't let those 24 people down</figcaption>
</figure>

But for now I’m going to proceed with my neovim setup, with part of me hoping to encounter a bug that I can just go ahead and fix and be on my way with a bunch of joy.

---

Thanks for reading, and don't forget to spread the joy! Share this on the [~~bird~~ unicode character site](http://twitter.com/share?url=https://aksh.dev/the-joy-of-hackable-tools/&text=An%20interesting%20read%2C%20thought%20I%27d%20spread%20the%20joy%21), the [elephant site](http://your-server.probably-social/share?url=https://aksh.dev/the-joy-of-hackable-tools/&text=An%20interesting%20read%2C%20thought%20I%27d%20spread%20the%20joy%21) or maybe even the [orange site](https://en.wikipedia.org/wiki/Nope)?

_Originally published at_ [_https://aksh.dev_](https://aksh.dev/the-joy-of-hackable-tools/) _on January 21, 2024._

[^1]: [A\_K\_S\_H\_ | XDA Forums](https://xdaforums.com/m/a_k_s_h_.8009238/#recent-content)
[^2]: [Cycling tabs in recently used order · kovidgoyal/kitty · Discussion #3720 · GitHub](https://github.com/kovidgoyal/kitty/discussions/3720)
[^3]: [userchrome](https://www.reddit.com/r/FirefoxCSS), anyone?
[^4]: [Code::Stats](https://codestats.net/users/aksh)
[^5]: [Neovim Config - Part 1 - Lazy Vim - YouTube](https://youtu.be/ZWWxwwUsPNw?si=xJQ4b1RgPqvzcgfz&t=3620)
[^6]: [GitHub - liljaylj/codestats.nvim: Code::Stats plugin for Neovim](https://github.com/liljaylj/codestats.nvim)
[^7]: [Fixed get\_xp & get\_level by aksh1618 · Pull Request #3 · liljaylj/codestats.nvim · GitHub](https://github.com/liljaylj/codestats.nvim/pull/3)
[^8]: [Learn Lua in Y Minutes](https://learnxinyminutes.com/docs/lua/)
[^9]: [Hack your brain with Obsidian.md - YouTube](https://www.youtube.com/watch?v=DbsAQSIKQXk)
[^10]: [Hardware and software [2024 edition] - YouTube](https://youtu.be/xmqpzpzdjI8?si=OZiS8BZBoIzkS6ZT&t=4880)
[^11]: [File over app — Steph Ango](https://stephango.com/file-over-app), see also: [Obsidian's manifesto](https://obsidian.md/about)
[^12]: [Free your notes - Obsidian](https://obsidian.md/blog/free-your-notes/)
[^13]: [Notion code blocks are imported without line breaks · Issue #82 · obsidianmd/obsidian-importer · GitHub](https://github.com/obsidianmd/obsidian-importer/issues/82)
[^14]: [Notion code blocks still being imported without line breaks · Issue #107 · obsidianmd/obsidian-importer · GitHub](https://github.com/obsidianmd/obsidian-importer/issues/107)
[^15]: I got so excited that I went completely overboard and actually created a release! [Release 1.3.1-aksh-0.1.0 · aksh1618/obsidian-importer · GitHub](https://github.com/aksh1618/obsidian-importer/releases/tag/1.3.1-aksh-0.1.0)
[^16]: [Notion: Fix codeblocks being imported without line breaks by aksh1618 · Pull Request #108 · obsidianmd/obsidian-importer · GitHub](https://github.com/obsidianmd/obsidian-importer/pull/108)
[^17]: [fix newlines in notion codeblocks by joshuatazrein · Pull Request #118 · obsidianmd/obsidian-importer · GitHub](https://github.com/obsidianmd/obsidian-importer/pull/118)
[^18]: I did end up editing it in Obsidian before publishing, so I guess there was a happy ending after all! I wanted to go for footnotes instead of links for this one to enhance readability, and a [couple of](https://github.com/MichaBrugger/obsidian-footnotes) [Obsidian](https://github.com/charliecm/obsidian-tidy-footnotes) [plugins](https://github.com/heycalmdown/navigate-cursor-history) came in really handy