Knowledge Lab
Today I'm spending a little bit more time on the application's UI which thanks to Fable is pretty fun. I'm finding myself clicking through the application to find UX gaps.
I'm also implementing a base16 powered theming engine for maximum extensibility and to support a few popular built-in themes like Catppuccin.
Solidifying the initialization and lifecycle of the application
Beacon
Working on import & export analysis extensions today before I'm able to extend workspace level LSP features. It feels like it's been forever since I touched LSP specific code.
I worked on a couple of span related bug fixes today that were annoying but also interesting:
There's an error code, PM002 (unreachable/subsumed patterns), with error spans coming from the entire case clause because the parser never kept track of where the pattern itself started and ended. So what was happening when the error was translated to send to the client, everything between case and the end of the line (which include's : and potentially a comment) would be highlighted. The MatchCase construct/ast node tracks the case's positioning so the reachability constraint now uses just the pattern’s slice.
You can read more about these diagnostic codes here.
The second was a misaligned span in the linter. Basically, I addedan end column attribute through the analyzer’s diagnostics, symbol table, and AST so that LSP diagnostics and semantic tokens can report precise ranges, and to support import-related spans, I made a struct for ImportNames to hold the ranges.
You can read about the linting rules Beacon has over here.
Meta
Working on this blog and seeing some other interesting work helped me get over my fear around making some YouTube videos. The first one I made is just my post from a couple of days ago with a little more rambling than in the writing. I'd been working on a short script and some slides about okapinote and so that will likely be my next video with a little blurb in the beginning about what I'm up to.
The title is a double entendre referring to span alignment and move more in alignment with my goals. There's a lot of information in my head and a great deal of affection towards the software engineering and programming communities. I hope I can continue to share knowledge and give back.