Implemented folding and some improvements. Moved functions to the utils module

This commit is contained in:
2025-08-29 17:38:23 +02:00
parent d29b2e1012
commit ec9b84ac35
10 changed files with 70 additions and 36 deletions

View File

@@ -5,6 +5,18 @@ function M.sleep(n)
os.execute("sleep " .. tonumber(n))
end
--- @return string
function M.get_cwd()
local cwd = vim.fn.getcwd()
local home = os.getenv("HOME")
if cwd:sub(1, #home) == home then
return "~" .. cwd:sub(#home + 1)
else
return cwd
end
end
--- @return {}
function M.get_lsp_servers()
local servers = { "lua_ls" }