Skip to content

Latest commit

 

History

History
42 lines (30 loc) · 875 Bytes

README.md

File metadata and controls

42 lines (30 loc) · 875 Bytes

nvim-templ-static-reload

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

Installation

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
}

Setup

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
}