Micron Document
when the AI is less than helpful

tl;dr: I've learned a little more about module creation as a result of the AI trying to make broken edits. As a result, I've cleaned up my module code and added a new feature, but the tests aren't quite right.

I was trying to make some simple fixes to my markdown navigate plugin. I wanted to have a function that would add new reference links from a T383838Telescope live_grep so that I could more easily insert links. It's sort of beyond the scope of something for navigating markdown, but I didn't have another place or plugin to put it in, so I added to mrkdown navigate.

My tests were broken, but the AI (glm-4.7-flash) kept running me in circles with a fake solution, so the tests are still broken. It also kept running me in circles with lua expression matching. While trying to add the new link insertion logic I noticed thta it wasn't parsing reference links properly for the purposes of navigation. That is, I couldn't T383838<Leader>lg on a reference link to follow the reference. I could get to the footnote where the reference lived, but then it wouldn't follow that link to the backing document.

I fixed the reference link following logic and added new link insertion logic. Both I did manually because the generated code wasn't working right. And since I was already in the file, started refactoring the logic to put the bulk of the module content into the T383838lua/markdown-navigate.lua file and get stuff out of the T383838plugin/markdown-navigate.lua file.

I think the latter (plugin/markdown-navigate.lua) is the entry point as used by Lazy and that the code backing the module really should live in T383838lua/markdown-navigate.lua anyway.

I have a fix for one of the tests, but I'm going to look at adding real tests inside the module instead of calling everything from bats.

Tags: index

Tags
Navigation





created: 2026-07-05

(re)generated: 2026-07-17