Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lua/user/autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ vim.api.nvim_create_autocmd({ "VimResized" }, {
end,
})

vim.api.nvim_create_autocmd({ "CmdWinEnter" }, {
callback = function()
vim.cmd "quit"
end,
})

vim.api.nvim_create_autocmd({ "CursorMoved", "BufWinEnter", "BufFilePost", "InsertEnter", "BufWritePost" }, {
callback = function()
require("user.winbar").get_winbar()
Expand Down
6 changes: 5 additions & 1 deletion lua/user/winbar.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
local M = {}

M.winbar_buftype_exclude = {
"nofile"
}

M.winbar_filetype_exclude = {
"help",
"startify",
Expand Down Expand Up @@ -62,7 +66,7 @@ local get_gps = function()
end

local excludes = function()
if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) then
if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) or vim.tbl_contains(M.winbar_buftype_exclude, vim.bo.buftype) then
vim.opt_local.winbar = nil
return true
end
Expand Down