The Sourcegraph extension for VS Code enables you to quickly open and search code on Sourcegraph.com easily and efficiently.
- Open the extensions tab on the left side of VS Code (Cmd+Shift+X or Ctrl+Shift+X).
- Search for
Sourcegraph
->Install
andReload
.
In the command palette (Cmd+Shift+P
or Ctrl+Shift+P
), search for Sourcegraph:
to see available actions.
Keyboard Shortcuts:
Description | Mac | Linux / Windows |
---|---|---|
Open file in Sourcegraph | Option+A | Alt+A |
Search selection in Sourcegraph | Option+S | Alt+S |
This extension contributes the following settings:
sourcegraph.URL
: The Sourcegraph instance to use. Specify your on-premises Sourcegraph instance here, if applicable.
Please file an issue: https://github.com/sourcegraph/sourcegraph-vscode/issues/new
- Open the extensions tab on the left side of VS Code (Cmd+Shift+X or Ctrl+Shift+X).
- Search for
Sourcegraph
-> Gear icon ->Uninstall
andReload
.
To develop the extension:
git clone
the repository somewhere- Run
npm install
in the directory - Open the repo with
code .
- Press F5 to open a new VS Code window with the extension loaded.
- After making changes to
src/extension.ts
, reload the window by clicking the reload icon in the debug toolbar or with F5. - To release a new version:
- Update
README.md
(describe ALL changes) - Update
CHANGELOG.md
(copy from README.md change above) - Update
src/extension.ts
(VERSION
constant) - Publish on the VS Code store by following https://code.visualstudio.com/docs/extensions/publish-extension (contact @slimsag or @lindaxie for access)
vsce login sourcegraph
(see also https://marketplace.visualstudio.com/manage/publishers/sourcegraph)cd sourcegraph-vscode
andvsce publish <major|minor|patch>
git add . && git commit -m "all: release v<THE VERSION>" && git push
git tag v<THE VERSION> && git push --tags
- Update
- v1.0.8 - Added back and fixed search functionality.
- v1.0.5 - Temporarily removed broken search functionality.
- v1.0.0 - Initial Release; basic Open File functionality.