1
0
Fork 0
dotfiles/.config/nvim/lua/lib.lua

23 lines
499 B
Lua
Raw Normal View History

2024-05-27 10:43:55 +02:00
local M = {}
function M.generate_shortcut_maps()
2024-06-03 10:55:43 +02:00
local shortcuts = require("config.shortcuts")
2024-05-27 10:43:55 +02:00
local fs = require("neo-tree.sources.filesystem")
local maps = {}
for map, path in pairs(shortcuts) do
maps[map] = function(state)
fs._navigate_internal(state, path, nil, nil, false)
end
end
return maps
end
function M.get_secret(key)
local ok, keys = pcall(require, "config.secrets")
if ok then
return keys[key]
end
end
return M