Foam is open to contributions of any kind, including but not limited to code, documentation, ideas, and feedback. This guide aims to help guide new and seasoned contributors getting around the Foam codebase.
Before you start contributing we recommend that you read the following links:
We understand that diving in an unfamiliar codebase may seem scary, to make it easier for new contributors we provide some resources:
If you’re interested in contributing, this short guide will help you get things set up locally.
Clone the repo locally:
git clone https://github.com/foambubble/foam.git
Install the necessary dependencies by running this command from the root:
This project uses Yarn workspaces.
foam-vscode relies on
foam-core. This means we need to compile it before we do any extension development. From the root, run the command:
You should now be ready to start working!
Code needs to come with tests. We use the following convention in Foam:
Also, note that tests in
foam-cli live in the
foam-vscode live alongside the code in
This guide assumes you read the previous instructions and you’re set up to work on Foam.
Now we’ll use the launch configuration defined at
.vscode/launch.json to start a new extension host of VS Code. From the root, or the
foam-vscode workspace, press f5.
In the new extension host of VS Code that launched, open a Foam workspace (e.g. your personal one, or a test-specific one created from foam-template). This is strictly not necessary, but the extension won’t auto-run unless it’s in a workspace with a
Test a command to make sure it’s working as expected. Open the Command Palette (Ctrl/Cmd + Shift + P) and select “Foam: Update Markdown Reference List”. If you see no errors, it’s good to go!
For more resources related to the VS Code Extension, check out the links below:
Feel free to modify and submit a PR if this guide is out-of-date or contains errors!