Skip to content

Commit 884b3d3

Browse files
Copilotobserverw
andcommitted
docs: enhance contribution documentation with call to action
Co-authored-by: observerw <[email protected]>
1 parent c8404b5 commit 884b3d3

File tree

4 files changed

+242
-7
lines changed

4 files changed

+242
-7
lines changed

CONTRIBUTING.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Contributing to LSP Client
2+
3+
Thank you for your interest in contributing to lsp-client! 🎉
4+
5+
## Why Your Contribution Matters
6+
7+
This project is unique in its ambitious scope: **we aim to provide production-ready Python clients for every major language server**, each with its own intricate protocol details, configuration quirks, and containerization requirements.
8+
9+
**We need your help!** The LSP Client project interfaces with numerous upstream projects:
10+
11+
- **Language Servers**: Pyright, Rust-Analyzer, TypeScript, Deno, Pyrefly, and many more to come
12+
- **LSP Protocol**: The ever-evolving LSP 3.17+ specification with 50+ capabilities
13+
- **Container Ecosystems**: Docker/Podman images, version management, and build systems
14+
- **Upstream Dependencies**: npm packages, PyPI distributions, GitHub releases
15+
16+
Each integration requires:
17+
- Deep understanding of the specific language server's capabilities and behavior
18+
- Careful testing across different environments (local, container, multi-workspace)
19+
- Maintaining compatibility as upstream projects evolve
20+
- Documenting edge cases and configuration options
21+
22+
**No single maintainer can keep up with all these moving parts.** Your expertise with specific language servers, protocols, or use cases is invaluable. Whether you use Rust, Python, TypeScript, or any other language, you have unique insights that can improve this project for everyone.
23+
24+
## How You Can Help
25+
26+
We welcome all kinds of contributions:
27+
28+
### 🚀 Add Support for New Language Servers
29+
30+
Know a language server that would benefit the community? We'd love to integrate it! See our detailed guide:
31+
32+
**[How to Add Support for a New LSP Server](docs/contribution/how-to-add-new-servers.md)**
33+
34+
Common servers we'd love to see:
35+
- **Go**: gopls
36+
- **Java**: Eclipse JDT, jdtls
37+
- **C/C++**: clangd
38+
- **Ruby**: Solargraph, Sorbet
39+
- **PHP**: Intelephense
40+
- **And many more!**
41+
42+
### 🧩 Implement LSP Capabilities
43+
44+
The LSP specification includes 50+ capabilities. We've implemented the most common ones, but there's much more to do:
45+
46+
**[How to Add a New LSP Capability](docs/contribution/how-to-add-new-capabilities.md)**
47+
48+
Capabilities we need:
49+
- **textDocument/inlayHint** - inline type hints
50+
- **textDocument/inlineValue** - debugger inline values
51+
- **textDocument/colorPresentation** - color picker support
52+
- **textDocument/linkedEditingRange** - rename refactoring
53+
- **workspace/symbol** - project-wide symbol search
54+
- And more from the [LSP 3.17 spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)
55+
56+
### 🐳 Improve Container Support
57+
58+
Help us maintain and improve our container images:
59+
- Update versions in `registry/wiki.toml`
60+
- Optimize Dockerfiles for smaller image sizes
61+
- Add new base images for different environments
62+
- Improve cross-platform compatibility
63+
64+
### 📚 Documentation & Examples
65+
66+
- Write tutorials for specific use cases
67+
- Add examples for your favorite language server
68+
- Improve API documentation
69+
- Translate documentation to other languages
70+
71+
### 🐛 Bug Reports & Testing
72+
73+
- Report issues with specific language servers
74+
- Test edge cases in your environment
75+
- Improve test coverage
76+
- Share your integration experiences
77+
78+
### 💡 Feature Requests & Discussion
79+
80+
Have ideas for improving the API? Want to discuss architecture decisions? Open an issue or start a discussion!
81+
82+
## Getting Started
83+
84+
### Development Setup
85+
86+
1. **Clone the repository**:
87+
```bash
88+
git clone https://github.com/observerw/lsp-client.git
89+
cd lsp-client
90+
```
91+
92+
2. **Install dependencies** (we recommend [uv](https://github.com/astral-sh/uv)):
93+
```bash
94+
uv sync --all-extras
95+
```
96+
97+
3. **Set up pre-commit hooks**:
98+
```bash
99+
uv run pre-commit install
100+
```
101+
102+
### Development Workflow
103+
104+
See [AGENTS.md](AGENTS.md) for detailed development commands:
105+
106+
```bash
107+
# Lint & format
108+
ruff check --fix && ruff format
109+
110+
# Type checking
111+
mypy src/
112+
113+
# Run tests
114+
pytest # All tests
115+
pytest -m unit # Unit tests only
116+
pytest -m integration # Integration tests
117+
pytest path/to/test.py::test_function # Single test
118+
```
119+
120+
### Code Style
121+
122+
- **Python 3.12+** required
123+
- Use `from __future__ import annotations` in all files
124+
- Follow [PEP 8](https://peps.python.org/pep-0008/) (enforced by ruff)
125+
- Full type annotations required (checked by mypy)
126+
- Write clear docstrings for public APIs
127+
128+
### Commit Guidelines
129+
130+
- Write clear, descriptive commit messages
131+
- Use conventional commits format:
132+
- `feat:` new features
133+
- `fix:` bug fixes
134+
- `docs:` documentation changes
135+
- `test:` test additions/changes
136+
- `refactor:` code refactoring
137+
- `chore:` maintenance tasks
138+
139+
Examples:
140+
```
141+
feat(lsp): add support for gopls language server
142+
fix(container): resolve path translation issue in Windows
143+
docs: add tutorial for rust-analyzer integration
144+
test: add integration tests for multi-root workspaces
145+
```
146+
147+
## Pull Request Process
148+
149+
1. **Fork the repository** and create a branch from `main`
150+
2. **Make your changes** following the code style guidelines
151+
3. **Add tests** for new functionality
152+
4. **Update documentation** as needed
153+
5. **Ensure all tests pass**: `pytest`
154+
6. **Run linting**: `ruff check --fix && ruff format`
155+
7. **Submit a pull request** with a clear description of your changes
156+
157+
### PR Checklist
158+
159+
- [ ] Tests added/updated and passing
160+
- [ ] Documentation updated
161+
- [ ] Code follows style guidelines (ruff, mypy)
162+
- [ ] Commit messages are clear and descriptive
163+
- [ ] PR description explains the motivation and changes
164+
165+
## Need Help?
166+
167+
- **Questions?** Open a [Discussion](https://github.com/observerw/lsp-client/discussions)
168+
- **Bug reports?** Open an [Issue](https://github.com/observerw/lsp-client/issues)
169+
- **Want to chat?** Reach out in the Issues or Discussions
170+
171+
## Recognition
172+
173+
All contributors will be recognized in our release notes and documentation. We deeply appreciate every contribution, no matter how small!
174+
175+
---
176+
177+
**Remember**: Every language server you help integrate, every capability you implement, and every bug you fix makes this library better for the entire Python community. Your contribution has real impact! 🚀

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,17 @@ Container images are automatically updated weekly to ensure access to the latest
107107

108108
## Contributing
109109

110-
We welcome contributions! Please see our [Contributing Guide](docs/contribution/) for details on:
110+
**We need your help!** 🙌 This project aims to support every major language server, each requiring detailed integration work with upstream projects. Whether you're an expert in Rust, Go, Java, or any other language, your contribution makes a real difference.
111111

112-
- Adding new language server support
113-
- Extending protocol capabilities
114-
- Container image updates
115-
- Development workflow
112+
### How You Can Contribute
113+
114+
- **🚀 Add new language servers** - Know a language server that should be supported? [Add it!](docs/contribution/how-to-add-new-servers.md)
115+
- **🧩 Implement LSP capabilities** - Help us support more of the LSP 3.17 spec. [Guide here](docs/contribution/how-to-add-new-capabilities.md)
116+
- **🐳 Improve containers** - Optimize images, update versions, enhance cross-platform support
117+
- **📚 Write docs & examples** - Tutorials, use cases, translations
118+
- **🐛 Report bugs & test** - Share your experiences and edge cases
119+
120+
Every contribution—from fixing typos to implementing complex capabilities—helps the entire Python community. Read our [**Contributing Guide**](CONTRIBUTING.md) to get started!
116121

117122
## License
118123

docs/contribution/how-to-add-new-capabilities.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# How to Add a New LSP Capability
22

3-
This guide details the process for adding new Language Server Protocol (LSP) capabilities to this library. Familiarity with the [LSP 3.17 specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) and the library's Protocol/Mixin design pattern is recommended.
3+
**Why this matters**: The Language Server Protocol specification includes 50+ capabilities, from basic autocomplete to advanced refactoring. Each capability you implement opens up new possibilities for developers building intelligent tools. This project needs contributors familiar with different parts of the LSP spec to help achieve complete coverage.
4+
5+
This guide provides a comprehensive walkthrough for adding new LSP capabilities to the library. Whether you're implementing a common capability like `textDocument/inlayHint` or something more specialized, this guide will help you follow the project's architecture patterns.
6+
7+
## Prerequisites
8+
9+
Before starting, familiarize yourself with:
10+
- The [LSP 3.17 specification](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/)
11+
- The library's Protocol/Mixin design pattern (see examples in `src/lsp_client/capability/`)
12+
- Python's `Protocol` and `runtime_checkable` decorators
413

514
## Design Philosophy
615

@@ -481,3 +490,19 @@ Add a `match` branch for the new capability in the server request dispatch funct
481490
## Default Capabilities
482491

483492
Optionally mix in `WithDefaultCapabilities` to enable baseline capabilities (logging and text document synchronization).
493+
494+
---
495+
496+
## Your Contribution Makes a Difference
497+
498+
Implementing LSP capabilities is at the heart of this project. Each capability you add:
499+
500+
- **Enables new use cases** for developers building intelligent tools
501+
- **Improves compatibility** across different language servers
502+
- **Advances the Python ecosystem** by making LSP more accessible
503+
504+
The LSP specification is vast, and we can't cover it all alone. Your expertise—whether it's understanding debugger protocols, refactoring operations, or any other LSP feature—is invaluable.
505+
506+
**Questions or stuck on something?** Don't hesitate to open an issue or discussion. We're here to help guide you through the process!
507+
508+
Thank you for contributing to lsp-client! 🎉

docs/contribution/how-to-add-new-servers.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
# How to Add Support for a New LSP Server
22

3-
To add a new LSP server to this project, follow these steps to ensure both client support and containerized deployment are correctly configured.
3+
**Why this matters**: Language servers are the core of this project. Each new server you add enables Python developers to leverage that language's intelligence—from autocomplete to refactoring—in their tools and workflows. The community needs contributors who understand specific language servers and can help integrate them properly.
4+
5+
This guide shows you how to add complete support for a new LSP server, including both the Python client and containerized deployment.
6+
7+
## Overview
8+
9+
Adding a new language server involves three main steps:
10+
11+
1. **Implement the Python client** - Create a client class with appropriate capability mixins
12+
2. **Register for automatic versioning** - Enable automated updates from upstream
13+
3. **Create a container image** - Package the server for isolated, reproducible environments
14+
15+
Let's walk through each step:
416

517
## 1. Implement the Client
618

@@ -60,3 +72,19 @@ ENTRYPOINT ["your-server-binary", "--stdio"]
6072
```
6173
2. Check if `.github/workflows/lsp-servers.yml` and your `ContainerFile` are updated with the latest version.
6274
3. Commit and push your changes. The GitHub Action will build and push the new image to GHCR.
75+
76+
---
77+
78+
## Your Contribution Expands the Ecosystem
79+
80+
Adding support for a new language server is one of the most impactful contributions you can make:
81+
82+
- **Brings language intelligence to Python developers** working in that language
83+
- **Reduces integration friction** for tools that need multi-language support
84+
- **Demonstrates real-world usage patterns** that inform future improvements
85+
86+
The lsp-client project aims to be the go-to solution for LSP integration in Python, and that's only possible with community contributions covering diverse language ecosystems.
87+
88+
**Questions about a specific language server?** Feel free to open an issue or discussion—we're happy to help you navigate the integration process!
89+
90+
Thank you for helping make lsp-client better! 🚀

0 commit comments

Comments
 (0)