Parsing Helix logs in Nushell

16 December 2025

Updated: 16 December 2025

A super quick one today - I was doing some debugging on a Language Server for Helix and it was getting really annoying trying to find the data I was looking for so I wrote this quick Nushell command:

Terminal window
1
cat ~/.cache/helix/helix.log |
2
lines |
3
parse "{date} helix_lsp::transport [{type}] {source} <- {data}"

This will parse the Helix logs using the given format.

The data portion is also JSON, so adding the JSON parsing can be done with:

Terminal window
1
cat ~/.cache/helix/helix.log |
2
lines |
3
parse "{date} helix_lsp::transport [{type}] {source} <- {data}" |
4
each {update data {|e| $e.data | from json}}

I also prefer normal JSON to the helix data view for this kind of data, so you can tac on | to json | jq to pipe it to jq for some nice JSON rendering and querying:

Terminal window
1
cat ~/.cache/helix/helix.log |
2
lines |
3
parse "{date} helix_lsp::transport [{type}] {source} <- {data}" |
4
each {update data {|e| $e.data | from json}} |
5
to json | jq