dotfiles/symlinks/config/nvim/lua/common/projects.lua

20 lines
538 B
Lua
Raw Normal View History

-------------------------------------------------------------------------------
-- - Common projects library -
-------------------------------------------------------------------------------
local M = {}
-- Gets project root directory based on projectionist
function M.get_project_root()
2022-04-28 13:53:54 +00:00
return vim.fn["projectionist#path"]()
end
-- Get unique project ID based on git repository
function M.get_project_id()
2022-04-28 13:53:54 +00:00
local remote_url = vim.fn["fugitive#RemoteUrl"]()
remote_url = remote_url:gsub("/", ":")
return remote_url
end
return M