Skip to content

Commit

Permalink
feat: Disable cursorline in alpha buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Allaman committed Jul 10, 2024
1 parent 17ea61e commit e99210e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lua/core/plugins/alpha.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ return {
},
config = function()
require("utils.functions").dashboard_autocmd(":Alpha | bd#")
-- Disable cursorline in alpha buffer
vim.api.nvim_create_autocmd("FileType", {
pattern = { "alpha" }, -- Add other buffer types as needed
callback = function()
vim.opt_local.cursorline = false
end,
})
-- Re-enable cursorline when entering other buffers
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*",
callback = function()
local ft = vim.bo.filetype
if not vim.tbl_contains({ "alpha" }, ft) then
vim.opt_local.cursorline = true
end
end,
})
require("core.plugins.alpha.alpha")
end,
}

0 comments on commit e99210e

Please sign in to comment.