Thank you for your interest in contributing to Doom Code! This guide explains how to set up your development environment and contribute to the project.
Open doomcode.code-workspace instead of opening the folder directly.
This multi-root workspace includes:
doomcode— the extensiondoomcode-workspace— companion package for workspace configs
The workspace file configures extensions to run on the workspace (remote) host instead of the local client host. This is required for proper debugging on Windows + WSL:
"remote.extensionKind": {
"bearylabs.doom": ["workspace"],
"vspacecode.whichkey": ["workspace"]
}UI-kind extensions default to running locally (on Windows), which breaks WSL debugging. The workspace file forces them remote.
If you open the folder directly, debugging will fail.
The project includes a flake.nix for reproducible development environments:
nix developThis shell includes Node.js, npm, and all required tools. All subsequent commands should be run inside this shell.
If you don't use Nix, ensure you have:
- Node.js 16+
- npm 7+
Then install dependencies:
npm installAll commands below assume you're inside the Nix shell (nix develop). If not using Nix, you can run them directly without the prefix.
nix develop -c npm run compileCompiles src/*.ts to out/*.js using TypeScript.
nix develop -c npm run watchWatches source files and recompiles on changes. Ideal when actively developing.
nix develop -c npm run lintRuns ESLint on the src/ directory. Fix automatically with:
nix develop -c npx eslint src --fixnix develop -c npm run testRuns the test suite using @vscode/test-cli. Tests are in src/test/.
nix develop -c npm run pretestRuns compile + lint (useful before submitting PRs).
Edit files in src/. The extension code is in src/extension.ts.
nix develop -c npm run watchThis compiles changes automatically.
Open the project in VS Code and press F5 to launch the extension in a test window. The test profile uses an isolated extensions directory to avoid conflicts.
After making TypeScript changes:
- With watch mode running (see step 2), just reload the test window (Ctrl+R / Cmd+R)
- Or restart debugging with F5
To create a .vsix file for manual testing:
nix develop -c npm run compile
nix develop -c npx @vscode/vsce packageThis generates doom-<version>.vsix which you can install in VS Code via:
code --install-extension doom-<version>.vsixsrc/
├── extension.ts # Main extension entry point
└── test/
└── extension.test.ts # Extension tests
package.json # Extension manifest & metadata
tsconfig.json # TypeScript configuration
.vscodeignore # Files excluded from .vsix package
eslint.config.mjs # ESLint configuration
flake.nix # Nix development environment
- package.json: Extension manifest (contributes, dependencies, metadata)
- src/extension.ts: Extension lifecycle (activate/deactivate) and command registration
- README.md: End-user documentation
- CHANGELOG.md: Version history and release notes
- Register the command in
src/extension.ts→activate() - Add to
package.json→contributes.commands - Add keybinding in
package.json→contributes.keybindings(optional) - Document in
README.md
Keybindings and which-key menu are defined in package.json → contributes.configurationDefaults → whichkey.bindings. Changes apply immediately after reinstalling the extension.
Core settings go in contributes.configurationDefaults. Settings that don't pass the manifest schema go in doomInstallDefaults (applied only when user runs doom.install command).
nix developnpm run watch(in one terminal)- Press F5 in VS Code to launch extension in test profile
- Make changes; reload window with Ctrl+R / Cmd+R
- Compile:
nix develop -c npm run compile - Lint:
nix develop -c npm run lint - Test:
nix develop -c npm run test - Build:
nix develop -c npm run pretest - All should pass with no errors
Only maintainers can publish. To publish a new version:
- Update
versioninpackage.json(follow semver). - Update
CHANGELOG.mdwith release notes. - Commit and push to
main. - Create and push a version tag that matches
package.jsonexactly:
git tag v0.x.y
git push origin v0.x.yWhen the tag is pushed, GitHub Actions will:
- Run compile, lint, and tests.
- Package a
.vsixartifact. - Create a GitHub Release for the tag and attach the
.vsix. - Publish that same package to VS Code Marketplace using
VSCE_PAT.
Open an issue on GitHub if you have questions or run into problems.
Happy contributing! 🚀