You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nvim-libmodal/lua/libmodal/src/utils/init.lua

48 lines
777 B
Lua

--[[
/*
* MODULE
*/
--]]
local utils = {}
utils.api = require('libmodal/src/utils/api')
utils.Help = require('libmodal/src/utils/Help')
utils.WindowState = require('libmodal/src/utils/WindowState')
--[[
/*
* FUNCTIONS
*/
--]]
----------------------------------
--[[ SUMMARY:
* Show an error from `pcall()`.
]]
--[[ PARAMS:
4 years ago
`pcall_err` => the error generated by `pcall()`.
]]
----------------------------------
4 years ago
function utils.show_error(pcall_err)
local api = utils.api
api.nvim_bell()
api.nvim_show_err(
4 years ago
require('libmodal/src/globals').DEFAULT_ERROR_TITLE,
api.nvim_get_vvar('throwpoint')
.. '\n' ..
api.nvim_get_vvar('exception')
.. '\n' ..
4 years ago
tostring(pcall_err)
)
end
--[[
/*
* PUBLICIZE MODULE
*/
--]]
return utils