Skip to content


When leveraging the distant plugin, the very first step you must take is setting up the plugin by calling the setup function.

local plugin = require('distant')

Out of the box, this function will do the following:

  • Check the CLI and start a manager for remote connections
  • Initialize autocommands for reading and writing files prefixed with distant://
  • Initialize vim commands for distant such as :DistantLaunch
  • Initialize user interface for use with :Distant
  • Provide sane defaults for settings and merge in user-defined settings

User-defined settings

The first argument to the setup function is a table of settings to apply that will override the defaults. You can provide these settings as either a series of nested tables and values or a key represented as a dot-separated path with an associated value.

For example, these two calls are equivalent:

    network = {
        timeout = {
            max = 1000
    ['network.timeout.max'] = 1000

Check out the following documentation for different settings: