nvim status column
This commit is contained in:
parent
39f90eb9b6
commit
2159feee1e
1 changed files with 9 additions and 14 deletions
|
@ -60,17 +60,14 @@ function M.setup()
|
||||||
.. '%( │ %{get(b:,"gitsigns_head","")}%)' -- branch
|
.. '%( │ %{get(b:,"gitsigns_head","")}%)' -- branch
|
||||||
.. ' │ %<%f%( [%M%R%W]%)' -- filename and modification flags
|
.. ' │ %<%f%( [%M%R%W]%)' -- filename and modification flags
|
||||||
.. '%=' -- rest is right
|
.. '%=' -- rest is right
|
||||||
.. '%( [%{get(b:,"attached_lsps","")}] | %)' -- branch
|
.. '%( [%{get(b:,"attached_lsps","")}] | %)' -- lsp
|
||||||
.. '%y ' -- filetype
|
.. '%y ' -- filetype
|
||||||
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
.. '%-7.(%3.l:%-3.(%c%V%)%) %P' -- ruler
|
||||||
|
|
||||||
if vim.fn.has('nvim-0.9') then
|
vim.o.statuscolumn = '%=%(%{(v:virtnum!=0||!&number)?\"\":(&relativenumber?v:relnum:v:lnum)} %C%s%)'
|
||||||
vim.o.statuscolumn = '%=%l %C%s'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
set_winopts()
|
set_winopts()
|
||||||
|
|
||||||
|
|
||||||
-- vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter', 'FileType' }, {
|
-- vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWinEnter', 'FileType' }, {
|
||||||
-- pattern = '*',
|
-- pattern = '*',
|
||||||
-- callback = function(args)
|
-- callback = function(args)
|
||||||
|
@ -113,9 +110,7 @@ function M.setup()
|
||||||
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
|
vim.opt_local.statusline = '%Y | %f%=%l:%v %P'
|
||||||
end
|
end
|
||||||
|
|
||||||
if vim.fn.has('nvim-0.9') then
|
|
||||||
vim.o.statuscolumn = ''
|
vim.o.statuscolumn = ''
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue