Dailying Visual Studio Code Insiders

Published July 7, 2024

I’ve been trying the Insiders version of VS Code recently. Essentially, it’s their name for a daily release distribution channel. I do this with other software, most notably Firefox Developer Edition. I also use the beta release of Signal. Living on the bleeding edge can be fun, though I probably wouldn’t do it if my livlihood depended on it. It’s a generally less stable experience, as I’ve recently encountered.

Friday night, I went to install operating system updates on my laptop. As the OS was terminating programs so it could restart and apply the updates, I noticed that the syntax highlighting for Markdown files in VS Code Insiders was super broken.

Malformed Markdown syntax highlighting, mostly red and striked-out. A sneak peak at an upcoming post, too.Malformed Markdown syntax highlighting, mostly red and striked-out. A sneak peak at an upcoming post, too.

I initially thought this was just a snafu with the OS update: maybe VS Code was in the middle of writing to some files and got interrupted. So, I continued on with restarting the computer but that didn’t fix it. I next tried to see if there was any obvious cache-related directories I could clear out. Still, no dice. Finally, my last ditch effort was uninstall VS Code and manually wipe the two directories it writes to:

rm -rf ~/.vscode-insiders # plain ~/.vscode if you're on the stable channel
rm -rf ~/Library/Application\ Support/Code\ -\ Insiders # just "Code" for stable

And still, even with a fresh install, the problem persisted. I turned to GitHub to see if there were any reports of similar behavior (in hindsight, I should have started here, but I was convinced it was a fluke given the timing) and quickly found a few related threads:

It seems the cause is this recent change: https://github.com/microsoft/vscode/pull/219833

I didn’t dig into the root cause deeply, but it seems like the YAML frontmatter e.g. the key: values inside the --- which begin the file, are causing the syntax highlighter to treat the entire file as (invalid) YAML.

And this is the fix: https://github.com/microsoft/vscode-markdown-tm-grammar/pull/162

In the interim, I installed the Stable version of VS Code. While I use the builtin settings sync feature, I wasn’t able to use it because you can only sync Insiders with Stable, not the other way around. So, I manually copy and pasted my settings.json and used the following command to transfer all of the extensions I had from Insiders to Stable:

code-insiders --list-extensions | xargs -L 1 code --install-extension

Note code-insiders vs code. Source: https://stackoverflow.com/a/49398449


I love hearing from readers so please feel free to reach out.

Reply via email

Last modified July 6, 2024  #dev 


← Newer post  •  Older post →