neovim-config/lua/plugins/chadsheet.lua
Akianonymus 7753e03b9e feat: Do not depend on user config | Fix merging of configs
because it is a user config, so our config shoudn't break even we if dont have it

use our own table merge function

move loading config to a function

use a global variable to store the config, so no need to call the table function everytime
2021-08-19 14:19:12 +05:30

25 lines
567 B
Lua

local present, chadsheet = pcall(require, "cheatsheet")
if not present then
return
end
local mappings = require("utils").load_config().mappings
-- add user mappings to the cheetsheet
for section, data in pairs(mappings) do
for description, keymap in pairs(data) do
chadsheet.add_cheat(description, keymap, section)
end
end
require("cheatsheet").setup {
bundled_cheatsheets = {
enabled = { "default" },
disabled = { "unicode", "nerd-fonts" },
},
bundled_plugin_cheatsheets = false,
include_only_installed_plugins = true,
}