diff --git a/.config/nvim/lua/my/tools.lua b/.config/nvim/lua/my/tools.lua index 74487c9..e3fe5e8 100644 --- a/.config/nvim/lua/my/tools.lua +++ b/.config/nvim/lua/my/tools.lua @@ -63,6 +63,14 @@ require("nvim-tree").setup({ map('n', '', require("nvim-tree.api").tree.toggle, 'Open nvim-tree') map('i', '', require("nvim-tree.api").tree.toggle, 'Open nvim-tree') +local function over40() + return vim.fn.winwidth(0) > 40 +end + +local function over70() + return vim.fn.winwidth(0) > 70 +end + vim.o.showmode = false require('lualine').setup({ options = { @@ -73,12 +81,22 @@ require('lualine').setup({ }, sections = { lualine_a = { 'mode' }, - lualine_b = { { 'branch', icons_enabled = true }, - { 'require("my.functions").lsp_status()', padding = 0 }, - 'diagnostics' }, - lualine_c = { { 'filename', path = 1 } }, - lualine_x = { 'filetype' }, - lualine_y = { 'progress' }, - lualine_z = { 'location', { '"🍄"', padding = 0 } } + lualine_b = { { + 'branch', + icons_enabled = true, + cond = over70 + }, { + 'require("my.functions").lsp_status()', + padding = 0, + cond = over70 + }, { + 'diagnostics', + cond = over70 + } }, + lualine_c = { { 'filename', path = 1, cond = over40 } }, + lualine_x = { { 'filetype', cond = over70 } }, + lualine_y = { { 'progress', cond = over40 } }, + lualine_z = { 'location', { '"🍄"', padding = 0, cond = over40 } + } }, })