Skip to content

Commit

Permalink
feat(debug): add auto compile on save
Browse files Browse the repository at this point in the history
  • Loading branch information
nullchilly committed May 29, 2023
1 parent 1d3eda1 commit c9cc5a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,13 @@ vim.api.nvim_create_user_command("CatppuccinCompile", function()
vim.api.nvim_command "colorscheme catppuccin"
end, {})

if vim.g.catppuccin_debug then
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*/catppuccin/*",
callback = function()
vim.schedule(function() vim.cmd "CatppuccinCompile" end)
end,
})
end

return M

0 comments on commit c9cc5a9

Please sign in to comment.