nvim: lualine: don't display some things in small windows
This commit is contained in:
parent
60a65be22c
commit
7783bb9c0d
|
@ -63,6 +63,14 @@ require("nvim-tree").setup({
|
|||
map('n', '<F9>', require("nvim-tree.api").tree.toggle, 'Open nvim-tree')
|
||||
map('i', '<F9>', 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 }
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user