blob: e972e7cedb239ab869ab61d9292cf3a36ad640f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
-- Lua implementations of "vimfn" builtin functions (via `func_lua`).
--
-- Functions defined here are pure Lua, they don't have any explicit C impl, so they are named with
-- the "f_xx" convention, for discoverability.
local M = {}
--- Returns the hostname of the machine.
--- @return string
function M.f_hostname()
return vim.uv.os_gethostname()
end
--- Returns all environment variables as a dictionary.
--- @return table<string, string>
function M.f_environ()
return vim.uv.os_environ()
end
return M
|