From 2f74592bff775ed21c4d6f9903da10db0de76ff1 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Wed, 26 Jun 2024 11:34:00 +0300 Subject: [PATCH] NeoVim: lualine: show selectioncount in visual mode --- home/.config/nvim/lua/plugins/lualine.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/home/.config/nvim/lua/plugins/lualine.lua b/home/.config/nvim/lua/plugins/lualine.lua index 895b9e8..377201d 100644 --- a/home/.config/nvim/lua/plugins/lualine.lua +++ b/home/.config/nvim/lua/plugins/lualine.lua @@ -3,5 +3,25 @@ return { "nvim-lualine/lualine.nvim", dependencies = { "kyazdani42/nvim-web-devicons" }, + opts = { + sections = { + lualine_z = { + { + "selectioncount", + cond = function() + local mode = vim.fn.mode() + return mode == "v" or mode == "V" or mode == "\22" + end, + }, + { + "location", + cond = function() + local mode = vim.fn.mode() + return mode ~= "v" and mode ~= "V" and mode ~= "\22" + end, + }, + }, + }, + }, config = true, }