diff --git a/AGENTS.md b/AGENTS.md index b9eca51b39..018f21a998 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -58,6 +58,7 @@ Agents should remind humans of this when possible. - `packages/web/src/routes/docs/integrations/emacs/+page.md`: Emacs setup using `harper-ls`, plus optional and common config tweaks. - `packages/web/src/routes/docs/integrations/zed/+page.md`: Zed extension entry point and link to canonical extension README. - `packages/web/src/routes/docs/integrations/sublime-text/+page.md`: Sublime Text setup with `harper-ls` and LSP package configuration. +- `packages/web/src/routes/docs/integrations/jetbrains/+page.md`: JetBrains IDE setup via the LSP4IJ plugin's built-in `harper-ls` support. - `packages/web/src/routes/docs/harperjs/introduction/+page.md`: `harper.js` mission, package overview, and installation starting point. - `packages/web/src/routes/docs/harperjs/linting/+page.md`: Core `harper.js` lint workflow and linter usage patterns. - `packages/web/src/routes/docs/harperjs/spans/+page.md`: Explains span objects and how to use them to locate/handle lint ranges. diff --git a/packages/web/src/routes/docs/integrations/jetbrains/+page.md b/packages/web/src/routes/docs/integrations/jetbrains/+page.md new file mode 100644 index 0000000000..ccca32256f --- /dev/null +++ b/packages/web/src/routes/docs/integrations/jetbrains/+page.md @@ -0,0 +1,21 @@ +--- +title: JetBrains IDEs +--- + +You can use [`harper-ls`](./language-server) in any IDE built on the IntelliJ Platform — IntelliJ IDEA, WebStorm, PyCharm, Rider, GoLand, RustRover, CLion, PhpStorm, RubyMine, and more — through the community [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) plugin, which ships with `harper-ls` support built in. No Harper-specific plugin is required. + +## Required Setup + +Make sure you have `harper-ls` installed and available on your `PATH`. You can do this using the [supported installation methods](./language-server#Installation). + +Install [LSP4IJ](https://plugins.jetbrains.com/plugin/23257-lsp4ij) from `Settings/Preferences > Plugins > Marketplace`, then search for "LSP4IJ" and click "Install". + +## Enabling `harper-ls` + +LSP4IJ includes a predefined entry for `harper-ls` under `Settings/Preferences > Languages & Frameworks > Language Servers`. Enable it there, or add `harper-ls` as a user-defined language server pointing at your installed binary if your version of LSP4IJ doesn't list it yet. + +For the exact, up-to-date steps and screenshots, see [LSP4IJ's `harper-ls` documentation](https://github.com/redhat-developer/lsp4ij/blob/main/docs/user-defined-ls/harper-ls.md), since that page is maintained by the LSP4IJ project and may change independently of Harper. + +## Configuration + +`harper-ls` is configured the same way regardless of editor. See the [configuration section](./language-server#Configuration) of our `harper-ls` documentation for the full list of options, including dialect, dictionaries, and which linters to enable. diff --git a/packages/web/vite.config.ts b/packages/web/vite.config.ts index 7750b4d78d..27c8ce41b3 100644 --- a/packages/web/vite.config.ts +++ b/packages/web/vite.config.ts @@ -121,6 +121,10 @@ export default defineConfig(async () => { title: 'Sublime Text', to: '/docs/integrations/sublime-text', }, + { + title: 'JetBrains IDEs', + to: '/docs/integrations/jetbrains', + }, ], }, {