fix(#1831): remove windows executable functionality due to occasional vim freeze and performance concerns (#1868)

* #1831 exploratory testing: disable file executable checks

* fix(#1831): remove windows executable functionality
This commit is contained in:
Alexander Courtis
2022-12-31 12:34:55 +11:00
committed by GitHub
parent 9e4c39572f
commit 3c4958ab3d
7 changed files with 44 additions and 97 deletions

View File

@@ -1,12 +1,7 @@
local notify = require "nvim-tree.notify"
local utils = require "nvim-tree.utils"
local M = {
config = {
is_windows = vim.fn.has "win32" == 1 or vim.fn.has "win32unix" == 1,
is_macos = vim.fn.has "mac" == 1 or vim.fn.has "macunix" == 1,
is_unix = vim.fn.has "unix" == 1,
},
}
local M = {}
function M.fn(node)
if #M.config.system_open.cmd == 0 then
@@ -50,17 +45,18 @@ function M.fn(node)
end
function M.setup(opts)
M.config = {}
M.config.system_open = opts.system_open or {}
if #M.config.system_open.cmd == 0 then
if M.config.is_windows then
if utils.is_windows then
M.config.system_open = {
cmd = "cmd",
args = { "/c", "start", '""' },
}
elseif M.config.is_macos then
elseif utils.is_macos then
M.config.system_open.cmd = "open"
elseif M.config.is_unix then
elseif utils.is_unix then
M.config.system_open.cmd = "xdg-open"
end
end