From 157da034393691766882ce7dc257514a4cd5f7d6 Mon Sep 17 00:00:00 2001 From: Rob Watson Date: Thu, 21 Sep 2023 05:36:09 +0200 Subject: [PATCH] chore(nvim): update lualine config --- vim/lua/lightline_config.lua | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/vim/lua/lightline_config.lua b/vim/lua/lightline_config.lua index a5bd708..11d5489 100644 --- a/vim/lua/lightline_config.lua +++ b/vim/lua/lightline_config.lua @@ -23,10 +23,14 @@ require("lualine").setup({ return mode_map[mode] or mode end, }, + "paste", }, lualine_b = { "filename" }, lualine_c = { - "branch", + { + "branch", + padding = { left = 0 }, + }, "diff", { "diagnostics", @@ -48,8 +52,28 @@ require("lualine").setup({ }, }, }, - lualine_x = { "filetype" }, - lualine_y = { "progress" }, - lualine_z = { "location" }, + lualine_x = { + { + function() + local go_status_line = vim.api.nvim_call_function("go#statusline#Show", {}) + if go_status_line ~= "" then + return go_status_line + end + + return vim.bo.filetype + end, + padding = { left = 1, right = 0 }, + }, + }, + lualine_y = { { "progress", padding = { left = 1, right = 0 } } }, + lualine_z = { { "location", padding = { left = 1, right = 0 } } }, + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { "filename" }, + lualine_x = { { "location", padding = { right = 0 } } }, + lualine_y = {}, + lualine_z = {}, }, })