nvim-nu
nvim-nu copied to clipboard
Error: Executable not found
Although I have this ugly work around, I may still need some info how to remove this error
For context: I am using lunarvim so it is using lazy.nvim
config = function ()
require('nu').setup({})
vim.schedule(function ()
vim.cmd[[set filetype=nu]]
end)
end
It works though
but I am still having this error whenever I open ~nu
script~ lunarvim. I just realized it shows the error whenever I open the lunarvim, so I guess I will comment the plugin first before I find the fix.
Hi jeeeem,
thanks for opening this issue.
The error comes from this piece of code:
-- nvim-nu/lua/nu/lsp.lua
local proc = Job:new({
command = "sh",
args = { "-c", cmd },
cwd = '.',
enable_recording = true,
})
proc:start()
proc:wait()
You are using the default configuration so cmd
is [[nu -c 'help commands | get name | str join "\n"']]
.
I guess you don't have sh
in your PATH? Are you on windows?
You can try passing a different value for all_cmd_names
in the configuration (see README.md). E.G.:
require'nu'.setup{
use_lsp_features = true, -- requires https://github.com/jose-elias-alvarez/null-ls.nvim
all_cmd_names = function() /* TODO windows logic here to retrieve cmd names */ end
}
The error should be gone then.
Please let me know, whether this fixes your error.
Cheers
sh
is no longer expected to be on the PATH. Instead nu
is now required to be executable.