A Neovim plugin that triggers reloads when static files in Templ project is updated
This works as a replacement for forcing reloads detailed in the templ.guide
Using packer.nvim
:
use {
'Bparsons0904/nvim-templ-static-reload',
config = function()
require('nvim-templ-static-reload').setup()
end
}
Using lazy.nvim
:
return {
'Bparsons0904/nvim-templ-static-reload',
config = function()
require('nvim-templ-static-reload').setup()
end
}
Add a templ-reload.lua
to the root of the project.
return {
trigger_files = { "css", "js" }, -- List of file extensions to trigger actions
update_file = "/cmd/main.go", -- Can be any Go file within the project
}