Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chipsenkbeil committed Jul 23, 2023
1 parent 8cb1bcb commit 138ddb8
Showing 1 changed file with 47 additions and 58 deletions.
105 changes: 47 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,86 +8,75 @@ enables users to edit remote files from the comfort of their local environment.
- **Requires neovim 0.8+**
- **Requires distant 0.20.x**

🚧 **(Alpha stage software) This plugin is in rapid development and may
break or change frequently!** 🚧
Visit https://distant.dev/editors/neovim/ for full documentation!

## Features
## Installation

Supports the following features against remote machines:
### lazy.nvim

- [X] Retrieving a list of available files & directories
- [X] Editing remote files
- [X] Creating and deleting files & directories
- [X] Copying files & directories
- [X] Renaming files & directories
- [X] Running [LSPs](https://neovim.io/doc/lsp/) remotely and getting live results locally
- [X] [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) integration via `:Telescope distant search`

## Installation & Setup

> It is **highly** recommended to not use the master branch of this plugin.
> Instead, prefer either a branch (`v0.3`) or a specific tag (`v0.3.0`) to lock
> in the plugin. When using a branch, you will get rolling updates to that
> branch. When using a tag, you are locked into the features and stability of
> the plugin at that point!
```lua
{
'chipsenkbeil/distant.nvim',
branch = 'v0.3',
config = function()
require('distant'):setup()
end
}
```

Using [packer.nvim](https://github.com/wbthomason/packer.nvim), the quickest
way to get up and running is the following:
### packer.nvim

```lua
use {
'chipsenkbeil/distant.nvim',
branch = 'v0.3',
config = function()
local distant = require('distant')
distant:setup()
end
'chipsenkbeil/distant.nvim',
branch = 'v0.3',
config = function()
require('distant'):setup()
end
}
```

#### Within a file
### vim-plug

| Key | Action |
|-----|--------------------------------|
| `-` | `lua distant.nav.actions.up()` |
```vim
Plug 'chipsenkbeil/distant.nvim', {
\ 'branch': 'v0.3',
\ 'do': ':lua require("distant"):setup()'
\ }
```

#### Within a directory
## Post-installation

| Key | Action |
|------------|-------------------------------------|
| `<Return>` | `lua distant.nav.actions.edit()` |
| `-` | `lua distant.nav.actions.up()` |
| `K` | `lua distant.nav.actions.mkdir()` |
| `N` | `lua distant.nav.actions.newfile()` |
| `R` | `lua distant.nav.actions.rename()` |
| `D` | `lua distant.nav.actions.remove()` |
> If you already have `distant` installed with a version that is compatible
> with the plugin, this step can be skipped. You can verify if `distant` is
> installed correctly by running `:checkhealth distant`.
#### Post-setup
Execute `:DistantInstall`.

Run `:DistantInstall` to complete the setup.
A prompt will be provided where you can download a pre-built binary for your
local machine that will be placed in `~/.local/share/nvim/distant/` on Unix
systems or `~\AppData\Local\nvim-data\distant\` on Windows.

* For more information on installation, check out `:help distant-installation`
* For more information on settings, check out `:help distant-settings`
You can verify that it is available by running `:DistantClientVersion`.

## Getting Started
See the [neovim installation
guide](http://distant.dev/editors/neovim/installation) for more information.

In order to operate against a remote machine, we first need to establish
a connection to it. To do this, we run `:DistantLaunch {host}` where the host
points to the remote machine and can be an IP address like `127.0.0.1` or
a domain like `example.com`.
## Installing on your server

The launch command will attempt to SSH into the remote machine using port 22
by default and start an instance of [`distant`](https://github.com/chipsenkbeil/distant).
> If you want to just use distant to connect to an ssh server, you can skip
> this and the remaining steps and use `:DistantConnect ssh://example.com`.
Once started, all remote operations will be sent to that machine! You can try
out something simple like displaying a list of files, directories, and symlinks
by running `:DistantOpen /some/dir`, which will open a dialog that displays
all of the contents of the specified directory.
Log into your remote machine and run this command to download a script to run
to install distant. In this example, we'll use ssh to install distant on a
Unix-compatible server (example.com):

## Documentation
```
ssh example.com 'curl -L https://sh.distant.dev | sh -s -- --on-conflict overwrite'
```

For more details on available functions, settings, commands, and more,
please check out the [online help documentation](https://distant.dev/editors/neovim/).
See the [distant CLI installation
guide](http://distant.dev/getting-started/installation) for more information.

## License

Expand Down

0 comments on commit 138ddb8

Please sign in to comment.