1
0
Fork 0

nvim: use global status line

This commit is contained in:
tastytea 2022-08-26 04:20:49 +02:00
parent 6d678df2f0
commit 6b85f5bddf
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 13 additions and 26 deletions

View File

@ -20,6 +20,7 @@ local options = {
pumheight = 10, -- maximum entries in popup menu
smartindent = true, -- indent after { and so on
statusline = '%<%f %h%m%r%=%y %l,%c%V (%P)',
laststatus = 3, -- global statusline
formatoptions = vim.o.formatoptions .. 'n',
splitright = true, -- split vertical window right
}

View File

@ -63,40 +63,26 @@ 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 = {
icons_enabled = nerdfont_installed,
component_separators = {},
section_separators = {},
extensions = {}
extensions = {},
globalstatus = true
},
sections = {
lualine_a = { 'mode' },
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 }
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 }
}
},
})