checkhealth error
bojohnson5 opened this issue · comments
I'm working on MacOS with a new install of Neovim v0.9.1 from Homebrew and using LazyVim. I've added a file under .config/nvim/lua/plugins
that is
{
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1", -- It is recommended that you keep this pinned to a tag
-- so that you do not pick up breaking changes
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
-- This would be an optional dependency eventually
"nvim-telescope/telescope.nvim",
}
}
After this plugin installs and I run :checkhealth
I get an error
I'm not sure where I put a config
table when working with LazyVim. How do I go about getting this set up?
Could you try this?
{
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1", -- It is recommended that you keep this pinned to a tag
-- so that you do not pick up breaking changes
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
-- This would be an optional dependency eventually
"nvim-telescope/telescope.nvim",
},
config = true,
}
I also use lazy.nvim
as the package manager which powers LazyVim too. And had no issue with it on v0.9.1
. Only scenario I can imagine is that the setup()
did not get called, in which case, config would indeed be nil
.
I solved it by watching the YouTube video and adding to the setup
function:
local remote_nvim = function()
local util = require("remote-nvim.utils")
require("remote-nvim").setup({
-- Configuration for SSH connections made using this plugin
ssh_config = {
-- Binary with this name would be searched on your runtime path and would be
-- used to run SSH commands. Rename this if your SSH binary is something else
ssh_binary = "ssh",
-- Similar to `ssh_binary`, but for copying over files onto remote server
scp_binary = "scp",
-- All your SSH config file paths.
ssh_config_file_paths = { "$HOME/.ssh/config" },
-- This helps the plugin to understand when the underlying binary expects
-- input from user. This is useful for password-based authentication and
-- key-based authentication.
-- Explanation for each prompt:
-- match - string - This would be matched with the SSH output to decide if
-- SSH is waiting for input. This is a plain match (not a regex one)
-- type - string - Takes two values "secret" or "plain". "secret" indicates
-- that the value you would enter is a secret and should not be logged into
-- your input history
-- input_prompt - string - What is the input prompt that should be shown to
-- user when this match happens
-- value_type - string - Takes two values "static" and "dynamic". "static"
-- means that the value can be cached for the same prompt for future commands
-- (e.g. your password) so that you do not have to keep typing it again and
-- again. This is retained in-memory and is not logged anywhere. When you
-- close the editor, it is cleared from memory. "dynamic" is for something
-- like MFA codes which change every time.
ssh_prompts = {
{
match = "password:",
type = "secret",
input_prompt = "Enter password: ",
value_type = "static",
value = "",
},
{
match = "continue connecting (yes/no/[fingerprint])?",
type = "plain",
input_prompt = "Do you want to continue connection (yes/no)? ",
value_type = "static",
value = "",
},
},
},
-- Installation script location on local machine (If you have your own custom
-- installation script and you do not want to use the packaged install script.
-- It should accept the same inputs as the packaged install script though)
neovim_install_script_path = util.path_join(
util.is_windows,
util.get_package_root(),
"scripts",
"neovim_install.sh"
),
-- Where should everything that Remote Neovim does on remote be stored. By
-- default, it stores everything inside ~/.remote-nvim so as long as you
-- delete that folder, you essentially wipe out everything that remote-nvim
-- has over there.
remote_neovim_install_home = util.path_join(util.is_windows, "~", ".remote-nvim"),
-- Where is your personal Neovim config stored?
neovim_user_config_path = util.path_join(util.is_windows, "~", ".config", "nvim"),
local_client_config = {
-- modify this function to override how your client launches
-- function should accept two arguments function(local_port, workspace_config)
-- local_port is the port on which the remote server is available locally
-- workspace_config contains the workspace config. For all attributes present
-- in it, see WorkspaceConfig in ./lua/remote-nvim/config.lua.
-- See examples of callback in https://github.com/amitds1997/remote-nvim.nvim/wiki/Configuration-recipes
callback = nil,
-- [Subject to change]: These values may be subject to change, so there
-- might be a breaking change. Right now, it uses the [plenary.nvim#win_float.percentage_range_window](https://github.com/nvim-lua/plenary.nvim/blob/267282a9ce242bbb0c5dc31445b6d353bed978bb/lua/plenary/window/float.lua#L138C25-L138C25)
default_client_config = {
col_percent = 0.9,
row_percent = 0.9,
win_opts = {
winblend = 0,
},
border_opts = {
topleft = "â•",
topright = "â•®",
top = "─",
left = "│",
right = "│",
botleft = "â•°",
botright = "╯",
bot = "─",
},
},
},
})
end
return {
"amitds1997/remote-nvim.nvim",
tag = "v0.0.1",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
"nvim-telescope/telescope.nvim",
},
config = remote_nvim,
}
You can also just do
require('remote-nvim').setup({})
and it should work. These are the default options.
You can also just do
require('remote-nvim').setup({})and it should work. These are the default options.
where should I write that line? in what file?
You can also just do
require('remote-nvim').setup({})and it should work. These are the default options.
where should I write that line? in what file?
This is for an older version. The README instructions should set things up correctly. If you are facing any particular issues, could you open a new issue?