Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catppuccin breaks alpha-nvim autocmds #399

Closed
sharpenedblade opened this issue Feb 8, 2023 · 3 comments
Closed

Catppuccin breaks alpha-nvim autocmds #399

sharpenedblade opened this issue Feb 8, 2023 · 3 comments
Labels
bug Something isn't working needs:response

Comments

@sharpenedblade
Copy link

Description

When using Catppuccin and alpha-nvim at the same time, alpha-nvim autocmds do not get triggered. alpha-nvim will usually start the AlphaReady autocmd, but when using colorscheme catppuccin, the autocmd is not run. Interestingly, it does not matter if Catppuccin is installed or require-ed, it only matters if Catppuccin is set as the active colorscheme. This does not happen with any other colorschemes.

Neovim version

NVIM v0.8.3
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by brew@Ventura

Features: +acl +iconv +tui

Operating system and version

macOS 13.0.1

Catppuccin version / branch / rev

main

Steps to reproduce

  1. nvim -nu minimal.lua

Expected behavior

The autocmd is run, so you see AlphaReady called in the command window.

Actual behavior

The autocmd is not run, so you do not see anything in the command window. Commenting out the colorscheme catppuccin call makes the autocmd work again.

Minimal config

-- `minimal.lua` used for reproducible configuration
-- Open with `nvim --clean -u minimal.lua`

local is_windows = vim.fn.has("win32") == 1
local function join(...)
  local sep = is_windows and "\\" or "/"
  return table.concat({ ... }, sep)
end

local root_tmp = is_windows and os.getenv("TEMP") or "/tmp"
local lazypath = join(root_tmp, "nvim", "lazy")

if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable",
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    { "catppuccin/nvim", name = "catppuccin" },
    -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    { "goolord/alpha-nvim" } 
})

require("catppuccin").setup({
    flavour = "mocha"
})

-- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE

local alpha_config = {
    layout = {},
    opts = {}
}
require("alpha").setup(alpha_config)

vim.api.nvim_create_autocmd("User", {
    pattern = "AlphaReady",
    callback = function()
        print("AlphaReady called")
    end,
})

-- COMMENT this to make the autocmd work
vim.cmd.colorscheme('catppuccin')
@nullchilly
Copy link
Contributor

nullchilly commented Feb 8, 2023

Unable to reproduce with your minimal config.

Running :messages shows AlphaReady called as expected

@sharpenedblade
Copy link
Author

Unable to reproduce with your minimal config.

Running :messages shows AlphaReady called as expected

It might be my system install, I will try in a fresh VM.

@sharpenedblade
Copy link
Author

It was caused by a borked luajit install, reinstalling luajit fixed the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs:response
Projects
None yet
Development

No branches or pull requests

2 participants