1
0
Fork 0

nvim status column

This commit is contained in:
Vladimír Dudr 2023-09-20 21:25:38 +02:00
parent 39f90eb9b6
commit 2159feee1e

View file

@ -56,21 +56,18 @@ function M.setup()
vim.o.relativenumber = false
vim.o.list = false
vim.o.statusline = ''
.. ' %{fnamemodify(getcwd(),":t")}' -- basename of cwd
.. '%( │  %{get(b:,"gitsigns_head","")}%)' -- branch
.. ' │  %<%f%( [%M%R%W]%)' -- filename and modification flags
.. '%=' -- rest is right
.. '%( [%{get(b:,"attached_lsps","")}] | %)' -- branch
.. '%y ' -- filetype
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
.. ' %{fnamemodify(getcwd(),":t")}' -- basename of cwd
.. '%( │  %{get(b:,"gitsigns_head","")}%)' -- branch
.. ' │  %<%f%( [%M%R%W]%)' -- filename and modification flags
.. '%=' -- rest is right
.. '%( [%{get(b:,"attached_lsps","")}] | %)' -- lsp
.. '%y ' -- filetype
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
if vim.fn.has('nvim-0.9') then
vim.o.statuscolumn = '%=%l %C%s'
end
vim.o.statuscolumn = '%=%(%{(v:virtnum!=0||!&number)?\"\":(&relativenumber?v:relnum:v:lnum)} %C%s%)'
end
set_winopts()
-- vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter', 'FileType' }, {
-- pattern = '*',
-- callback = function(args)
@ -113,9 +110,7 @@ function M.setup()
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
end
if vim.fn.has('nvim-0.9') then
vim.o.statuscolumn = ''
end
vim.o.statuscolumn = ''
end,
})