Closed lsshawn closed 2 years ago
require("silicon").setup({
output = string.format(
"/home/astro/Pictures/SILICON_%s-%s-%s_%s-%s.png",
os.date("%Y"),
os.date("%m"),
os.date("%d"),
os.date("%H"),
os.date("%M")
),
})
It should be absolute path
I've configured the output dir as follows, but it appears to still save with the default name to cwd:
{ "narutoxy/silicon.lua", requires = "nvim-lua/plenary.nvim",
config = function()
require("silicon").setup({
output = string.format(
"/Users/as/Pictures/code/SS_%s-%s-%s_%s-%s.png",
os.date("%Y"),
os.date("%m"),
os.date("%d"),
os.date("%H"),
os.date("%M")
),
font = "JetBrainsMono Nerd Font Regular"
})
end
}
Font specification statement below works correctly tho.
Strange, it should have worked.
Does the notification states correct location or it also states default one?
The notification only mentions the default filename.
I found out why it didn't work, there's some caching of the settings call going on. Not sure if it's on my end, maybe due to Astrovim or what, but some combination of restarting vim and running :PackerSync
clears the cache and applies the config.
Pro Tip: Always do :PackerSync when changing anything.
It was on your end as packer compiled old config function and hence the output setting wasn't being applied.
@NarutoXY Yeah, I noticed my astrovim config is not really compatible with this add-on. It also seems to cache the timestamp to whenever I last ran packer sync, so making new screenshots doesn't work as expected.
At the moment, all screenshot is generated to the working directory.
How can I configure the default saving location?