nvim: use global status line
This commit is contained in:
parent
6d678df2f0
commit
6b85f5bddf
|
@ -20,6 +20,7 @@ local options = {
|
||||||
pumheight = 10, -- maximum entries in popup menu
|
pumheight = 10, -- maximum entries in popup menu
|
||||||
smartindent = true, -- indent after { and so on
|
smartindent = true, -- indent after { and so on
|
||||||
statusline = '%<%f %h%m%r%=%y %l,%c%V (%P)',
|
statusline = '%<%f %h%m%r%=%y %l,%c%V (%P)',
|
||||||
|
laststatus = 3, -- global statusline
|
||||||
formatoptions = vim.o.formatoptions .. 'n',
|
formatoptions = vim.o.formatoptions .. 'n',
|
||||||
splitright = true, -- split vertical window right
|
splitright = true, -- split vertical window right
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,40 +63,26 @@ require("nvim-tree").setup({
|
||||||
map('n', '<F9>', require("nvim-tree.api").tree.toggle, 'Open nvim-tree')
|
map('n', '<F9>', require("nvim-tree.api").tree.toggle, 'Open nvim-tree')
|
||||||
map('i', '<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
|
vim.o.showmode = false
|
||||||
require('lualine').setup({
|
require('lualine').setup({
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = nerdfont_installed,
|
icons_enabled = nerdfont_installed,
|
||||||
component_separators = {},
|
component_separators = {},
|
||||||
section_separators = {},
|
section_separators = {},
|
||||||
extensions = {}
|
extensions = {},
|
||||||
|
globalstatus = true
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { 'mode' },
|
lualine_a = { { 'mode' } },
|
||||||
lualine_b = { {
|
lualine_b = {
|
||||||
'branch',
|
{ 'branch', icons_enabled = true },
|
||||||
icons_enabled = true,
|
{ 'require("my.functions").lsp_status()', padding = 0 },
|
||||||
cond = over70
|
{ 'diagnostics' }
|
||||||
}, {
|
},
|
||||||
'require("my.functions").lsp_status()',
|
lualine_c = { { 'filename', path = 1 } },
|
||||||
padding = 0,
|
lualine_x = { { 'filetype' } },
|
||||||
cond = over70
|
lualine_y = { { 'progress' } },
|
||||||
}, {
|
lualine_z = { { 'location' }, { '"🍄"', padding = 0 }
|
||||||
'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