add(nvim): helper to reload curry colorscheme

This commit is contained in:
Léana 江 2024-03-26 18:11:12 +01:00 committed by Léana 江
parent 0539bbfefa
commit 3e199282b2
2 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,17 @@
-- helper to reload module
local usercmd = vim.api.nvim_create_user_command
local map = vim.keymap.set
local remove = require("plenary.reload").reload_module
usercmd("Reload", function(opts)
remove(opts.fargs[1])
require(opts.fargs[1])
end, { nargs = 1 })
usercmd("ReloadCurry", function(_)
remove("curry")
require("curry").setup()
end, {})
map("n", "<leader>rc", ":ReloadCurry<CR>")