From c171d757979bfa59b04eebb45355fcdbfb90851e Mon Sep 17 00:00:00 2001 From: hoob3rt Date: Mon, 22 Mar 2021 15:17:27 +0100 Subject: [PATCH] feat: added hostname component --- README.md | 1 + lua/lualine/components/hostname.lua | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 lua/lualine/components/hostname.lua diff --git a/README.md b/README.md index 8c55485..78cb648 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ inactive_sections = { * fileformat (file format) * filename * filetype +* hostname * location (location in file in line:column format) * mode (vim mode) * progress (%progress in file) diff --git a/lua/lualine/components/hostname.lua b/lua/lualine/components/hostname.lua new file mode 100644 index 0000000..baf48bd --- /dev/null +++ b/lua/lualine/components/hostname.lua @@ -0,0 +1,8 @@ +-- Copyright (c) 2020-2021 hoob3rt +-- MIT license, see LICENSE for more details. +local function hostname() + local data = vim.loop.os_gethostname() + return data +end + +return hostname