From 5c77243b8c2879f11f3b1884a017539061a5db7e Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 26 Jun 2023 14:48:39 -0700 Subject: [PATCH] Add csv column to statusline --- neovim/lua/plugins/lualine.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/neovim/lua/plugins/lualine.lua b/neovim/lua/plugins/lualine.lua index eb4f37b..38e96d9 100644 --- a/neovim/lua/plugins/lualine.lua +++ b/neovim/lua/plugins/lualine.lua @@ -35,6 +35,16 @@ function M.trailing_whitespace() return "" end +-- Plugin to print name of current CSV column +M.csv_col = { + function() + return vim.fn.CSVCol(1) + end, + cond = function() + return vim.bo.filetype == "csv" and vim.fn.exists("*CSVCol") == 1 + end, +} + -- Configure lualine witha provided theme function M.config_lualine(theme_name) -- Theme name transformations @@ -102,7 +112,7 @@ function M.config_lualine(theme_name) }, }, lualine_b = { "FugitiveHead", "diff" }, - lualine_c = { { "filename", path = 1 }, code_loc }, + lualine_c = { { "filename", path = 1 }, code_loc, M.csv_col }, lualine_x = { M.custom_ffenc, "filetype" }, lualine_y = { "progress", "location" }, lualine_z = {