Skip to content

Commit

Permalink
fixup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdevries committed Dec 14, 2023
1 parent 8b4783d commit 35bcd8e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ sg.nvim is a plugin focused on bringing many of the features of sourcegraph.com

## Setup

To Log In, either:
To login, either:

- Run `:SourcegraphLogin` after following installation instructions for `sourcegraph.com` usage.
- Run `:SourcegraphLogin!` and provide an endpoint and access token to be stored.
- Use the `SRC_ENDPOINT` and `SRC_ACCESS_TOKEN` environment variables to manage tokens for enterprise usage.
- See :[src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance) for more info
- See [src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance) for more info

See `:help sg.auth` for more information.

Expand Down
25 changes: 13 additions & 12 deletions doc/sg.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ INTRODUCTION *sg.nvim*

sg.nvim is a plugin for interfacing with Sourcegraph and Cody

To configure logging in:

- Log in on your Sourcegraph instance.
- Click your user menu in the top right, then select Settings > Access tokens.
- Create your access token, and then run `:SourcegraphLogin` in your neovim
editor after installation.
- Type in the link to your Sourcegraph instance (for example:
`https://sourcegraph.com`)
- And then paste in your access token.

An alternative to this is to use the environment variables specified for
[src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance).
To login, either:

- Run `:SourcegraphLogin` after following installation instructions for
`sourcegraph.com` usage.
- Run `:SourcegraphLogin!` and provide an endpoint and access token to be
stored.
- Use the `SRC_ENDPOINT` and `SRC_ACCESS_TOKEN` environment variables to manage
tokens for enterprise usage.
- See
[src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance)
for more info

See `:help sg.auth` for more information.

You can check that you're logged in by then running `:checkhealth sg`

Expand Down
13 changes: 6 additions & 7 deletions lua/sg/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
---@brief [[
--- sg.nvim is a plugin for interfacing with Sourcegraph and Cody
---
--- To configure logging in:
--- To login, either:
---
--- - Log in on your Sourcegraph instance.
--- - Click your user menu in the top right, then select Settings > Access tokens.
--- - Create your access token, and then run `:SourcegraphLogin` in your neovim editor after installation.
--- - Type in the link to your Sourcegraph instance (for example: `https://sourcegraph.com`)
--- - And then paste in your access token.
--- - Run `:SourcegraphLogin` after following installation instructions for `sourcegraph.com` usage.
--- - Run `:SourcegraphLogin!` and provide an endpoint and access token to be stored.
--- - Use the `SRC_ENDPOINT` and `SRC_ACCESS_TOKEN` environment variables to manage tokens for enterprise usage.
--- - See [src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance) for more info
---
--- An alternative to this is to use the environment variables specified for [src-cli](https://github.com/sourcegraph/src-cli#log-into-your-sourcegraph-instance).
--- See `:help sg.auth` for more information.
---
--- You can check that you're logged in by then running `:checkhealth sg`
---@brief ]]
Expand Down

0 comments on commit 35bcd8e

Please sign in to comment.