feat(lua): add utility functions to detect Lua, OS, Python environment, TypeScript environment, Git root, and safe function invocation.

This commit is contained in:
David Ibia
2025-07-21 16:53:44 +01:00
commit 107d3c5db2
7 changed files with 348 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
function GetProjectRoot()
local git_root = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
if git_root == nil then
return vim.fn.getcwd()
else
return git_root
end
end
return GetProjectRoot