use executable instead of search $PATH

pull/294/head
ray-x 1 year ago
parent 4f3d09f0a3
commit fbb0b87de9

@ -534,7 +534,6 @@ M.run = function(...)
dap_cfg.name = dap_cfg.name .. ' run current'
dap_cfg.request = 'launch'
dap_cfg.mode = 'debug'
dap_cfg.request = 'launch'
if testfunc then
dap_cfg.args = { '-test.run', '^' .. testfunc.name .. '$' }
dap_cfg.mode = 'test'
@ -611,7 +610,12 @@ local unmap = function()
end
log(v)
vim.keymap.set(mode, v.lhs, v.rhs or v.callback, { noremap = nr, silent = sl, expr = exp, desc = desc })
vim.keymap.set(
mode,
v.lhs,
v.rhs or v.callback,
{ noremap = nr, silent = sl, expr = exp, desc = desc }
)
-- vim.api.nvim_set_keymap('n', v.lhs, v.rhs, {noremap=nr, silent=sl, expr=exp})
end
end

@ -36,6 +36,9 @@ end
local function is_installed(bin)
local env_path = os.getenv('PATH')
if vim.fn.executable(bin) == 1 then
return true
end
local sep = utils.sep2()
local ext = utils.ext()
local base_paths = vim.split(env_path, sep, true)

Loading…
Cancel
Save