2021-10-04 12:50:45 +00:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- - 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"]()
|
2021-10-04 12:50:45 +00:00
|
|
|
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
|
2021-10-04 12:50:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|