Contributing to Pike LSP
Thank you for your interest in contributing to Pike LSP. This document provides guidelines and instructions for contributors.
note
This project is in active development. Contributions are welcome, and all submissions will be reviewed.
Code of Conduct
Please be respectful and constructive in all interactions. We welcome contributors of all experience levels.
Getting Started
Prerequisites
- Pike 8.1116 or later - The Pike programming language
- Node.js 18+ - JavaScript runtime
- bun - Package manager
- VS Code - For extension development and testing
Setting Up the Development Environment
# Clone the repository
git clone https://github.com/TheSmuks/pike-lsp.git
cd pike-lsp
# Install dependencies
bun install
# Build all packages
bun run build
# Run tests to verify setup
./scripts/run-tests.sh
Development Workflow
1. Create a Branch
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
2. Make Changes
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
3. Run Tests
Always run tests before committing:
# Full test suite
./scripts/run-tests.sh
# Smoke test
scripts/test-agent.sh --fast
4. Commit Changes
Use clear, descriptive commit messages with conventional prefixes:
feat:- New featurefix:- Bug fixdocs:- Documentation onlytest:- Adding testsrefactor:- Code refactoringperf:- Performance improvement
5. Submit Pull Request
- Push your branch:
git push origin feature/your-feature-name - Open a Pull Request on GitHub
- Wait for CI to pass
- Request review
Testing Guidelines
Test Structure
| File | Purpose |
|---|---|
lsp-tests.ts | Core LSP functionality |
integration-tests.ts | End-to-end workflows |
pike-source-tests.ts | Pike stdlib validation |
Adding Tests
All new features must have tests. Tests must pass before merging.
Code Style
TypeScript
- Use TypeScript strict mode
- No
anytypes unless absolutely necessary - Use type guards for runtime validation
- Document public APIs with TSDoc
Pike
- Use Pike 8 features
- Document functions with
//!comments - Handle errors gracefully
Reporting Issues
Include in bug reports:
- Pike version (
pike --version) - Node.js version (
node --version) - VS Code version
- Steps to reproduce
- Expected vs actual behavior
- Error messages or logs
Questions
- Open a GitHub issue
- Check existing issues and PRs
Thank you for contributing.