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