A simple fact fetcher that fetches facts from the Ninjas Facts API

{
'notelgnis/fetchfact.nvim',
opts = {
cache_file_path = '~/.cache/facts_cache.json',
config_file_path = '~/.config/.facts_api_key',
min_facts = 2,
max_facts = 10,
},
}
- cache_file_path: Path to the cache file where the facts are stored
- config_file_path: Path to the file where the API key is stored
- min_facts: Minimum number of facts to keep in the cache before fetching new ones
- max_facts: Maximum number of facts to keep in the cache
NOTE: Do not forget to get the API key from Ninjas Facts API and add it in the config file
{
'nvimdev/dashboard-nvim',
event = 'VimEnter',
config = function()
require('dashboard').setup {
config = {
footer = function()
local fact = require('fetchfact').get_split_fact(85)
return { '', unpack(fact) }
end,
},
}
end,
},