1
argonaut.nvim/plugin/argonaut.lua

20 lines
537 B
Lua
Raw Normal View History

2023-01-29 03:20:14 +00:00
if not vim.g.argonaut then
local function argonaut_reload()
2024-04-20 19:03:24 +00:00
for name, _ in pairs(package.loaded) do
if vim.startswith(name, 'argonaut') then
package.loaded[name] = nil
end
end
2023-01-29 03:20:14 +00:00
end
2022-12-30 19:09:28 +00:00
2023-01-29 03:20:14 +00:00
local function argonaut_reflow()
argonaut_reload()
2024-04-20 19:03:24 +00:00
require('argonaut').reflow()
2023-01-29 03:20:14 +00:00
end
2022-12-30 23:10:22 +00:00
2022-12-30 19:09:28 +00:00
vim.api.nvim_create_user_command('ArgonautReload', argonaut_reload, {})
2023-01-29 03:20:14 +00:00
vim.api.nvim_create_user_command('ArgonautReflow', argonaut_reflow, {})
2022-12-30 18:40:23 +00:00
vim.g.argonaut = true
end