hardtime.nvim icon indicating copy to clipboard operation
hardtime.nvim copied to clipboard

Possibility to run without plugins

Open mliszcz opened this issue 5 months ago • 1 comments

I try to keep my setup minimal, including the numbers of plugins. Currently hardtime depends on nui and plenary. Would it be possible to remove them or make them optional?

For plenary, it is used only for ensuring that the log directory exists. https://github.com/m4xshen/hardtime.nvim/blob/main/lua/hardtime/log.lua#L172

This can be easily replaced with the builtin functions, like:

local outfile_parent_path = vim.fs.dirname(outfile)
vim.fn.mkdir(outfile_parent_path, "p")

Or maybe this is not needed at all if neovim ensures that it exists (haven't checked but e.g. shada is stored there).

For nui, I'd make it optional and fall back to a full-screen buffer if it cannot be loaded. This is not as critical as plenary, in the worst case I can roll my own command to parse the log.

mliszcz avatar Sep 12 '24 08:09 mliszcz