Harper is a JetBrains IDE plugin that integrates the Harper Language Server for grammar and spell checking directly into your development environment.
- π Language Server Protocol (LSP) Integration: Seamless integration with Harper Language Server
- π¦ Automatic Server Management: Downloads and manages the Harper language server binary automatically
- π Auto-Updates: Checks for and downloads newer versions of the language server
- βοΈ Project Settings: Configurable settings per project
- π Real-time Checking: Grammar and spell checking as you type
- π― Multi-Platform Support: Works on macOS, Linux, and Windows
- Open your JetBrains IDE (IntelliJ IDEA, PyCharm, WebStorm, etc.)
- Go to
Settings/PreferencesβPluginsβMarketplace - Search for "Harper"
- Click
Install
-
Clone this repository:
git clone https://github.com/yourusername/harper.git cd harper -
Build the plugin:
./gradlew buildPlugin
-
Install the plugin from disk:
- Open your JetBrains IDE
- Go to
Settings/PreferencesβPluginsβ βοΈ βInstall Plugin from Disk... - Select the built plugin ZIP from
build/distributions/harper-1.0-SNAPSHOT.zip
When you first open a project after installing Harper, the plugin will:
- Automatically download the Harper language server binary
- Extract and configure it in your system's application data directory
- Start the language server in the background
The language server binary is stored in:
- macOS:
~/Library/Application Support/Harper/language-server/<version>/ - Linux:
~/.local/share/Harper/language-server/<version>/ - Windows:
%LOCALAPPDATA%\Harper\language-server\<version>\
Access Harper settings via:
Settings/PreferencesβToolsβHarper(or search for "Harper" in settings)
If needed, you can restart the Harper language server from the LSP console or by restarting the IDE.
- JDK 21 or higher
- Gradle 8.x (wrapper included)
- IntelliJ IDEA 2025.2.4 or newer (for development)
# Clone the repository
git clone https://github.com/yourusername/harper.git
cd harper
# Build the project
./gradlew build
# Run the plugin in a sandbox IDE
./gradlew runIde
# Run tests
./gradlew testharper/
βββ src/
β βββ main/
β βββ kotlin/
β β βββ im/cheng/harper/
β β βββ lsp/ # LSP integration
β β βββ services/ # Services and utilities
β β βββ ui/ # UI components
β βββ resources/
β βββ icons/ # Plugin icons
β βββ messages/ # Localization bundles
β βββ META-INF/
β βββ plugin.xml # Plugin configuration
βββ build.gradle.kts # Build configuration
βββ README.md
- HarperLspServerSupportProvider: Main LSP server provider implementation
- HarperServiceSettings: Project-level settings management
- LanguageServerDownloader: Handles automatic download and updates of the Harper LSP server
- HarperSettingsConfigurable: UI for plugin configuration
- Kotlin: Primary programming language
- IntelliJ Platform SDK: Plugin framework
- LSP4J: Language Server Protocol support
- Gradle: Build system
- Apache Commons Compress: Archive extraction
- AppDirs: Cross-platform application directory management
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Kotlin coding conventions
- Use meaningful variable and function names
- Add KDoc comments for public APIs
- Keep functions focused and concise
If the Harper language server fails to start:
- Check the IDE logs:
HelpβShow Log in Finder/Explorer - Look for Harper-related errors
- Verify the language server binary has execute permissions:
# macOS/Linux chmod +x ~/Library/Application\ Support/Harper/language-server/*/harper-ls
- Try manually restarting the server from the LSP console
If the automatic download fails:
- Check your internet connection
- Verify firewall settings allow downloads from GitHub releases
- Check available disk space
- Review error messages in the IDE's Event Log
If you encounter permission errors (error=13):
# macOS/Linux - make the binary executable
chmod +x ~/Library/Application\ Support/Harper/language-server/*/harper-lsThis project is licensed under the MIT License - see the LICENSE file for details.
- Harper Language Server - The underlying grammar and spell checker
- JetBrains - For the excellent IntelliJ Platform SDK
- Contributors and users of this plugin
If you encounter any issues or have questions:
- π« Open an issue on GitHub Issues
- π¬ Check existing issues for solutions
- π§ Contact: [your-email@example.com]
Note: This plugin is under active development. Features and APIs may change between versions.