Rewrite of the custom functions to better load with the newer modular configs.
This commit is contained in:
parent
95a58ffb1f
commit
b11ee41a48
@ -1,12 +1,13 @@
|
||||
-- 'softrequire' provides a wrapper around the builtin require. If the require has failed in a `local mod = softrequire('m') call, a quick check of
|
||||
-- 'if mod then' can wrap code dependent upon the require, and fails gracefully
|
||||
local function softrequire(m)
|
||||
local ok, err = pcall(require, m)
|
||||
if not ok then return nil, err end
|
||||
return err
|
||||
end
|
||||
-- local function softrequire(m)
|
||||
-- local ok, err = pcall(require, m)
|
||||
-- if not ok then return nil, err end
|
||||
-- return err
|
||||
-- end
|
||||
|
||||
local function execute(type)
|
||||
return {
|
||||
execute = function(type)
|
||||
local command_table = {
|
||||
run = {
|
||||
java = 'java %',
|
||||
@ -28,4 +29,4 @@ local function execute(type)
|
||||
vim.cmd('FloatermNew --autoclose=0 ' .. command)
|
||||
end
|
||||
end
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user