Using `s` while cursor is over file in nvim-tree produces error: No application knows how to open URL
jessebot opened this issue · comments
Description
When I try to open a file in a split using s
, I get an error and the file does not open at all. It happens with all filetypes.
Example of the error:
[NvimTree] 'system_open failed with return code 1: \nNo application knows how to open URL file:///Users/friend/.local/share/nvim/site/pack/packer/start/nvim-tree.lua/CONTRIBUTING.md (Error
Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr: E.g. no application claims the file" UserInfo={_LSLine=1538, _LSFunction=runEvaluator}).\n'
I don't have a mailcap file or anything for mimetypes in my home directory, but not sure why it doesn't default to nvim anyway.
Thank you for your time and continuing to maintain this project!
Neovim version
NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura-arm64.local
Features: +acl +iconv +tui
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/opt/homebrew/Cellar/neovim/0.8.3/share/nvim"
Operating system and version
macOS Ventura 13.2
nvim-tree version
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end
Steps to reproduce
I did this from the ~/.local/share/nvim/site/pack/packer/start/nvim-tree.lua
directory:
nvim -nu /tmp/nvt-min.lua
:NvimTreeOpen
CTRL+ww
(to get to the nvim-tree split)11j
(to get to theCONTRIBUTING.md
file)s
(to try and open it in a split)
Expected behavior
No response
Actual behavior
No response
s
defaults to system open. See help g?
.
<C-x>
and <C-v>
are used to open a file in a split horizontally and vertically.
Closing, please comment if that doesn't address your issue.