Feedback: re-load configuration #303

Closed
opened 2026-10-05 02:38:59 +02:00 by adam · 9 comments
Owner

I have a system where my frontmatter.json is built automatically. After I rebuilt my frontmatter.json, while VSCode is open it does not seem to reload the configuration file. "Watch"ing and automatically reloading on frontmatter.json might be too resource-using, but there is also no "reload configuration and reload VSCode" in the CTRL+P menu. I would somehow expect Frontmatter to have either automatic reload of the config (on change) or some form of manual reload (via CTRL+P or other means).

Currently I am closing down VSCode and restart to load the changes.

If it is intended to reload the configuration on change, it's not working in my case ;)

  1. https://github.com/davidsneighbour/kollitsch.dev - clone
  2. run npm install and npm run build:frontmatter to recreate frontmatter.json
I have a system where my frontmatter.json is built automatically. After I rebuilt my frontmatter.json, while VSCode is open it does not seem to reload the configuration file. "Watch"ing and automatically reloading on frontmatter.json might be too resource-using, but there is also no "reload configuration and reload VSCode" in the CTRL+P menu. I would somehow expect Frontmatter to have either automatic reload of the config (on change) or some form of manual reload (via CTRL+P or other means). Currently I am closing down VSCode and restart to load the changes. If it is intended to reload the configuration on change, it's not working in my case ;) 1) https://github.com/davidsneighbour/kollitsch.dev - clone 2) run `npm install` and `npm run build:frontmatter` to recreate frontmatter.json <!-- github-sync-id:1328927812 -->
adam closed this issue 2026-10-05 02:38:59 +02:00
Author
Owner

Interesting @davidsneighbour there is both a watcher and a VS Code listener bound to the frontmatter.json file. I'll try and see what is going on.

Interesting @davidsneighbour there is both a watcher and a VS Code listener bound to the `frontmatter.json` file. I'll try and see what is going on. <!-- github-comment-id:1205639022 -->
Author
Owner

I can only reproduce it when you start without any frontmatter.json file, and run your npm run build:frontmatter script. In that case, the listeners are not bound to any file and will not trigger an update. Looking for a fix / new command to rebind these.

I can only reproduce it when you start without any `frontmatter.json` file, and run your `npm run build:frontmatter` script. In that case, the listeners are not bound to any file and will not trigger an update. Looking for a fix / new command to rebind these. <!-- github-comment-id:1205663201 -->
Author
Owner
https://user-images.githubusercontent.com/2900833/182934280-997fff16-599f-40db-a6a0-748411160035.mov <!-- github-comment-id:1205670467 -->
Author
Owner

The beta has a new frontMatter.config.reload (Front Matter: Reload config) command. An additional thing not shown in the above video is an auto-binding mechanism.

When there is no frontmatter.json file in the project, the listeners will go to a listeners pool. Waiting until there is a file created. Once created, they will be automatically bound.

The beta has a new `frontMatter.config.reload` (Front Matter: Reload config) command. An additional thing not shown in the above video is an auto-binding mechanism. When there is no `frontmatter.json` file in the project, the listeners will go to a listeners pool. Waiting until there is a file created. Once created, they will be automatically bound. <!-- github-comment-id:1205687144 -->
Author
Owner

I am testing around with this. I have the feeling that maybe wireit might have an influence here. I need to simplify my project ;)

I always have the frontmatter.json created before I start, so in the case where I feel it does not update there is always a frontmatter.json created and gets changed while running the watch-job.

I am testing around with this. I have the feeling that maybe `wireit` might have an influence here. I need to simplify my project ;) I always have the frontmatter.json created before I start, so in the case where I feel it does not update there is always a frontmatter.json created and gets changed while running the watch-job. <!-- github-comment-id:1207417514 -->
Author
Owner

You wrote

Interesting @davidsneighbour there is both a watcher and a VS Code listener bound to the frontmatter.json file. I'll try and see what is going on.

Could it be that wireit and VSCode compete for the file(s) to watch? I am still every now and then experiencing this whole "it doesn't seem to update" situation.

I'll try to remove wireit from my frontmatter setup, might bring some insights.

You wrote > Interesting @davidsneighbour there is both a watcher and a VS Code listener bound to the frontmatter.json file. I'll try and see what is going on. Could it be that wireit and VSCode compete for the file(s) to watch? I am still every now and then experiencing this whole "it doesn't seem to update" situation. I'll try to remove wireit from my frontmatter setup, might bring some insights. <!-- github-comment-id:1214392725 -->
Author
Owner

Have you tried out the new: frontMatter.config.reload command?

Have you tried out the new: `frontMatter.config.reload` command? <!-- github-comment-id:1214394910 -->
Author
Owner

That actually works. I wonder if one can run this from outside of VSCode (maybe via npm scripts). We should close this issue as it's obviously just an issue in my chaotic project ;)

That actually works. I wonder if one can run this from outside of VSCode (maybe via npm scripts). We should close this issue as it's obviously just an issue in my chaotic project ;) <!-- github-comment-id:1214396952 -->
Author
Owner

I have an extension for that, you might be able to combine it.

https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-remote-control

I have an extension for that, you might be able to combine it. https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-remote-control <!-- github-comment-id:1214401515 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#303