1

Add reload logic

This commit is contained in:
Alex Yatskov 2022-12-30 11:09:28 -08:00
parent 089bb747a4
commit 8c9634e735

View File

@ -1,5 +1,16 @@
if not vim.g.argonaut then
local argonaut = require('argonaut')
vim.api.nvim_create_user_command('ArgonautWrapToggle', argonaut.wrap_toggle, {})
local function argonaut_wrap_toggle()
argonaut.wrap_toggle()
end
local function argonaut_reload()
package.loaded.argonaut = nil
argonaut = require('argonaut')
end
if not vim.g.argonaut then
vim.api.nvim_create_user_command('ArgonautWrapToggle', argonaut_wrap_toggle, {})
vim.api.nvim_create_user_command('ArgonautReload', argonaut_reload, {})
vim.g.argonaut = true
end