Skip to content
Discussion options

You must be logged in to vote

You can simply try:

vim.o.laststatus = 3

If you only want laststatus = 3 while you're in diff view, I'd probably do something like this (though there may be a better approach):

local laststatus_au = vim.api.nvim_create_augroup("set_laststatus", { clear = true })
local laststatus = vim.o.laststatus
vim.api.nvim_create_autocmd("OptionSet", {
  pattern = "laststatus",
  group = laststatus_au,
  callback = function()
    laststatus = vim.o.laststatus
  end,
})
local set_status = function()
  local ei = vim.o.eventignore
  vim.o.eventignore = "OptionSet"
  vim.o.laststatus = vim.wo.diff and 3 or laststatus
  vim.o.eventignore = ei
end
vim.api.nvim_create_autocmd("OptionSet", { pattern = "diff", 

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@echasnovski
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.statusline
3 participants