Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sourcegraph/sourcegraph-jetbrains
Sourcegraph for JetBrains IDEs (IntelliJ)
https://github.com/sourcegraph/sourcegraph-jetbrains
gogland gogland-plugin intellij intellij-platform intellij-plugin jetbrains repo-type-editor sourcegraph
Last synced: about 10 hours ago
JSON representation
Sourcegraph for JetBrains IDEs (IntelliJ)
- Host: GitHub
- URL: https://github.com/sourcegraph/sourcegraph-jetbrains
- Owner: sourcegraph
- License: apache-2.0
- Archived: true
- Created: 2017-05-04T05:23:20.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-11-14T15:51:07.000Z (almost 1 year ago)
- Last Synced: 2024-08-03T22:15:58.628Z (3 months ago)
- Topics: gogland, gogland-plugin, intellij, intellij-platform, intellij-plugin, jetbrains, repo-type-editor, sourcegraph
- Language: Java
- Homepage: https://sourcegraph.com
- Size: 271 KB
- Stars: 37
- Watchers: 64
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
**⚠️ Development of the JetBrains plugin has [moved to `sourcegraph/jetbrains`](https://github.com/sourcegraph/jetbrains).**
# Sourcegraph for JetBrains IDEs [![JetBrains Plugin](https://img.shields.io/badge/JetBrains-Sourcegraph-green.svg)](https://plugins.jetbrains.com/plugin/9682-sourcegraph)
- Search snippets of code on Sourcegraph.
- Copy and share a link to code on Sourcegraph.
- Quickly go from files in your editor to Sourcegraph.The plugin works with all JetBrains IDEs including:
- IntelliJ IDEA
- IntelliJ IDEA Community Edition
- PhpStorm
- WebStorm
- PyCharm
- PyCharm Community Edition
- RubyMine
- AppCode
- CLion
- GoLand
- DataGrip
- Rider
- Android Studio## Installation
- Select `IntelliJ IDEA` then `Preferences` (or use ⌘,)
- Click `Plugins` in the left-hand pane.
- Choose `Browse repositories...`
- Search for `Sourcegraph` -> `Install`
- Restart your IDE if needed, then select some code and choose `Sourcegraph` in the right-click context menu to see actions and keyboard shortcuts.## Configuring for use with a private Sourcegraph instance
The plugin is configurable _globally_ by creating a `.sourcegraph-jetbrains.properties` (or `sourcegraph-jetbrains.properties` pre-v1.2.2) in your home directory. For example, modify the following URL to match your on-premises Sourcegraph instance URL:
```
url = https://sourcegraph.example.com
defaultBranch = example-branch
remoteUrlReplacements = git.example.com, git-web.example.com
```You may also choose to configure it _per repository_ using a `.idea/sourcegraph.xml` (or `idea/sourcegraph.xml` pre-v1.2.2) file in your repository like so:
```xml
```
By default, the plugin will use the `origin` git remote to determine which repository on Sourcegraph corresponds to your local repository. If your `origin` remote doesn't match Sourcegraph, you may instead configure a `sourcegraph` Git remote which will take priority.
## Questions & Feedback
Please file an issue: https://github.com/sourcegraph/sourcegraph-jetbrains/issues/new
## Uninstallation
- Select `IntelliJ IDEA` then `Preferences` (or use ⌘,)
- Click `Plugins` in the left-hand pane.
- Search for `Sourcegraph` -> Right click -> `Uninstall` (or uncheck to disable)## Development
- Start IntelliJ and choose `Check out from Version Control` -> `Git` -> `https://github.com/sourcegraph/sourcegraph-jetbrains`
- Develop as you would normally (hit Debug icon in top right of IntelliJ) or using gradlew commands:
1. `./gradlew runIde` to run an IDE instance with sourcegraph plugin installed. This will start the platform with the versions defined in [`gradle.properties`](https://github.com/sourcegraph/sourcegraph-jetbrains/blob/main/gradle.properties#L14-L16). _Note: 2021.3 is required for M1 Macs._
2. `./gradlew buildPlugin` to build plugin artifact (`build/distributions/Sourcegraph.zip`)## Publishing a new version
The publishing process is based on the actions outlined in the [`intellij-platform-plugin-template`](https://github.com/JetBrains/intellij-platform-plugin-template).
1. Update `gradle.properties` and set the version number for this release (e.g. `1.2.3`).
2. Create a [new release](https://github.com/sourcegraph/sourcegraph-jetbrains/releases/new) on GitHub.
3. Pick the new version number as the git tag (e.g. `v1.2.3`).
4. Copy/paste the `[Unreleased]` section of the [`CHANGELOG.md`](https://github.com/sourcegraph/sourcegraph-jetbrains/blob/main/CHANGELOG.md) into the GitHub release text.
5. Once published, a GitHub action is triggered that will publish the release automatically and create a PR to update the changelog and version text. You may need to manually fix the content.## Version History
See [`CHANGELOG.md`](https://github.com/sourcegraph/sourcegraph-jetbrains/blob/main/CHANGELOG.md).