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

23 lines
493 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)
2024-07-11 13:22:31 +02:00
fs.navigate(state, path, ".", function() end)
2024-05-27 10:43:55 +02:00
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