Skip to content

Conversation

@misumisumi
Copy link

First, thank you for this excellent plugin.

I suggest about improving neovim binary installation and update config.
Currently, this plugin installs the Neovim binary and uploads the config when connecting to a new remote.
However, when the target host is under our control, it likely already has an nvim command and a config under $XDG_CONFIG_HOME/nvim.
Therefore, I’ve improved the plugin to reuse those existing installations and configurations instead of reinstalling or reuploading them.
To handle remotes without nvim, I added three policies:

  • always: always install the binary and upload the config when connecting
  • relax: reuse the binary or config if they already exist on the host
  • prompt: decide interactively per remote

The binary installation and config upload policies can now be configured independently.
In SSH sessions, only system-wide Neovim is available.
To handle hosts without nvim, I added search_binary_paths to scan for local binaries and use the absolute path of whichever nvim is found.

Additionally, when connecting over SSH the shell may not source files like .bash_profile, so environment variables are not set properly and we can’t use command outside the system.
This can be worked around by piping .bash_profile before running nvim.
I added launch_cmd_prefix so users can prepend custom commands to run before launching nvim.

misumisumi added 5 commits November 19, 2025 15:06
… config upload

- Add install_nvim_policy config option: "prompt", "relax", "always", "global"
  - "prompt": ask user for installation location during setup
  - "relax": install only if nvim not executable (install to remote_nvim_home)
  - "always": always install to remote_nvim_home
  - "global": install to ~/.local/bin if not executable
- Add upload_config_policy config option for config upload behavior
  - "never": never upload config
  - "prompt": always ask user using config_copy variable
  - "relax": skip if exists and don't use NVIM_APPNAME, upload with NVIM_APPNAME if not exists
  - "always": always upload with NVIM_APPNAME
  - "global": upload to nvim dir if not exists without NVIM_APPNAME
- Improve remote Neovim detection and installation logic
- Update installation script to support new policy flags
- Add tests for new policy-based configuration upload preferences
…urable search paths

- Add `search_binary_pathes` config option for specifying additional paths to search for nvim binary when install_policy is "relax"
- Refactor provider logic to detect and use existing nvim binary on remote
- Store detected binary path in `remote_binary` and use it for subsequent operations
- Add 'source .profile;' etc. before starting nvim to be able to set PATH etc.
…urable search paths

- Add `search_binary_pathes` config option for specifying additional paths to search for nvim binary when install_policy is "relax"
- Refactor provider logic to detect and use existing nvim binary on remote
- Store detected binary path in `remote_binary` and use it for subsequent operations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant