Zach Hannum2 downloadsLink plugin folders on disk into the vault, and reload the plugins when they rebuild.
Local Linker lets you develop an Obsidian plugin in its own folder, anywhere on your computer, and run it in a real vault. You link the folder one time. Each time your build writes new files, Local Linker reloads the plugin, so you see your change without a restart.
A link is a symlink (a pointer to your folder) in the plugins folder of your vault. Local Linker makes and removes it for you from the settings.
You can also link a folder over a plugin that you installed from the store or from BRAT. While the link is on, your folder replaces the installed version. When you turn off the link, the installed version comes back.
Local Linker works only on desktop.
~/git/my-plugin. The field suggests folders as you type.npm run dev.Local Linker turns on the plugin. When main.js, styles.css or manifest.json changes in the folder, Local Linker reloads the plugin.
If this setting is on, Local Linker reloads a linked plugin each time its files change. It is on by default. If you turn it off, reload the plugin with the reload button or the command.
If this setting is on, Local Linker turns off BRAT while a link overrides a plugin that BRAT installed. When no such link is on, Local Linker turns BRAT back on. It is off by default. See Plugins installed by BRAT for more information.
The list shows each linked plugin and the path of its folder.
Reload linked plugins reloads each plugin that has its link on.
You can link a folder for a plugin that is already in your vault. In that case, Local Linker moves the installed plugin folder to .obsidian/plugins/local-plugin-linker/stash/. Then it puts the symlink where the plugin was. When you turn off or remove the link, Local Linker removes the symlink and moves the installed version back. It never deletes a folder.
Before you uninstall Local Linker, turn off each link. If you uninstall it while a link is on, you lose the installed version that it saved.
Each time Obsidian starts, BRAT updates its plugins. If BRAT updates a plugin while its link is on, BRAT writes the release files into your folder, over your build. If this can occur, the list of linked plugins shows a warning.
To prevent this, do one of these:
Local Linker finds a plugin that BRAT installed from the GitHub remote in the .git/config file of your folder.
To get pre-release versions of Local Linker, add zachhannum/obsidian-local-plugin-linker in BRAT.
This plugin uses Node's file system module, because the folders that you link are outside your vault.
It reads only these files and folders:
.git/config file.It writes only in your vault's plugins folder. It makes and removes a symlink for each link, and it moves an installed plugin into its own stash folder and back. It never changes a file in a folder that you link.
It also uses Obsidian's internal plugin API to turn plugins on, turn them off and reload them. A future Obsidian version can change that API.
Build and release steps are in CONTRIBUTING.md.
MIT