Thank you for your interest in contributing to the QuickMark VSCode extension! This guide will help you get started with development, testing, and contributing to the project.
Before you begin, ensure you have the following installed:
- Node.js (v16 or later)
- npm (comes with Node.js)
- Visual Studio Code
- Rust (for building the language server)
- Git
git clone https://github.com/quickmark/quickmark.git
cd quickmark/vscode-quickmarknpm installThe extension requires the quickmark-server binary. You have two options:
Option A: Download from GitHub releases (Recommended)
./scripts/download-binaries.shThis automatically downloads the correct binaries for all platforms from the GitHub releases.
Option B: Build from source
cd .. # Go to project root
cargo build --release --bin quickmark-serverThen manually copy the built binary to the bin/ directory with the correct platform-specific name.
npm run compile-
Open the extension project in VSCode:
code . -
Start development mode:
- Press
F5or use the "Run Extension" launch configuration - This opens a new VSCode window (Extension Development Host) with your extension loaded
- Press
-
Test the extension:
- In the new window, open or create a Markdown file (
.md) - The extension should automatically start and begin linting
- Check the Output panel (
View > Output > QuickMark) for logs
- In the new window, open or create a Markdown file (
-
TypeScript changes:
# Option 1: Compile once npm run compile # Option 2: Watch mode (auto-compile on changes) npm run watch
-
After making changes:
- Press
Ctrl+R(orCmd+Ron Mac) in the Extension Development Host window to reload - Or restart the debugging session (
Ctrl+Shift+F5)
- Press
-
Server changes:
-
If you modify the
quickmark-serverRust code:cd .. && cargo build --release --bin quickmark-server
-
Manually copy the binary to
bin/with correct naming -
Restart the extension development session
-
-
Create test Markdown files with various linting issues:
# Test Document This line is way too long and exceeds the default 80 character limit which should trigger MD013 ### This heading skips H2 (should trigger MD001) ## Duplicate Heading ## Duplicate Heading
-
Test different scenarios:
- Files with various rule violations
- Configuration files (
quickmark.toml) - Different file extensions (
.markdown,.mdown, etc.) - Workspace folders and multi-root workspaces
# Run linting
npm run lint
# Run tests (when available)
npm test# Compile TypeScript
npm run compile
# Get binaries (choose one):
./scripts/download-binaries.sh # Download from releases
# OR build from source and copy manually# Create VSIX package for installation
npm run packageThis creates a .vsix file that can be installed in VSCode.
For creating a release with all platform binaries:
# Download binaries from GitHub releases
./scripts/download-binaries.sh
# Package extension with all binaries
npm run packageThe download-binaries.sh script automatically:
- Reads the server version from
package.json(quickmarkServer.version) - Downloads platform-specific binaries from GitHub releases
- Extracts and names them correctly for the extension
- Build the package:
npm run package - Install via Command Palette:
Extensions: Install from VSIX... - Select the generated
.vsixfile
code --install-extension vscode-quickmark-0.0.1.vsix# Find VSCode extensions directory
# Windows: %USERPROFILE%\.vscode\extensions
# macOS/Linux: ~/.vscode/extensions
# Create symlink (example for macOS/Linux)
ln -s $(pwd) ~/.vscode/extensions/quickmark.vscode-quickmark-dev- Follow the ESLint configuration (
.eslintrc.json) - Use strict TypeScript settings
- Prefer modern async/await over callbacks
- Use meaningful variable and function names
# Run linting
npm run lint
# Fix auto-fixable issues
npx eslint src --ext ts --fixvscode-quickmark/
├── src/
│ └── extension.ts # Main extension code
├── bin/ # Bundled binaries (generated)
├── scripts/
│ └── download-binaries.sh # Downloads release binaries
├── .vscode/
│ ├── launch.json # Debug configurations
│ └── tasks.json # Build tasks
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
├── .eslintrc.json # ESLint configuration
└── README.md # User documentation
- Extension Activation: Triggered when opening Markdown files
- Binary Resolution: Automatically finds bundled or custom server binary
- LSP Client: Communicates with
quickmark_servervia Language Server Protocol - Configuration: Handles VSCode settings and
quickmark.tomlfiles - Commands: Restart server, show output, etc.
getBundledServerPath(): Platform-specific binary detection (expectsquickmark-server-*naming)startLanguageServer(): LSP client initializationrestartServer(): Server restart functionality
- Test thoroughly on your platform
- Run linting:
npm run lint - Update documentation if needed
- Follow existing code style
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and test them
- Commit with clear messages: Follow conventional commits
- Push to your fork:
git push origin feature/your-feature - Open a pull request with a clear description
type(scope): description
Examples:
feat(extension): add support for custom server binary paths
fix(binary): correct platform detection for Apple Silicon
docs(readme): update installation instructions
- Set breakpoints in TypeScript code
- Press
F5to start debugging - Use the Debug Console in VSCode
-
Enable trace logging in settings:
{ "quickmark.trace.server": "verbose" } -
Check the Output panel for detailed LSP communication
- Binary not found: Ensure you've run
./scripts/download-binaries.shor built from source - Server won't start: Check Output panel for error messages
- Extension not loading: Verify
package.jsonactivation events - TypeScript errors: Run
npm run compileto see detailed errors
- Update version in
package.json - Update CHANGELOG.md with new features/fixes
- Build all platform binaries:
npm run build-binaries - Test on multiple platforms
- Create release package:
npm run package - Tag the release:
git tag v0.0.2 - Publish to marketplace:
vsce publish
- Issues: Report bugs and feature requests on GitHub Issues
- Discussions: Use GitHub Discussions for questions
- Documentation: Check the main QuickMark project documentation
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.