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

[BUG] dashboard plugin not working maybe due to vimEnter event. #1513

Open
1 task done
Eveeifyeve opened this issue May 12, 2024 · 2 comments
Open
1 task done

[BUG] dashboard plugin not working maybe due to vimEnter event. #1513

Eveeifyeve opened this issue May 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Eveeifyeve
Copy link

Eveeifyeve commented May 12, 2024

Field Description
Plugin dashborad
Nixpkgs nixpkgs-unstable
Nix-Darwin *
  • I have read the FAQ and my bug is not listed there.

Description

The issue is when dashboard is enabled it doesn't run on vim enter which therefore shows the default Neovim.
Dashborad includes a guide on how to do this here

Minimal, Reproducible Example (MRE)

{ pkgs, ... }:
{
  programs.nixvim = {
    enable = true;
    colorschemes.catppuccin.enable = true;
    plugins = {
      nvim-autopairs.enable = true;
      luasnip.enable = true;
      treesitter.enable = true;

      trouble.enable = true;
      bufferline.enable = true;
      dashboard = {
        enable = true;
        center = [
          {
            desc = "Find project";
            icon = "📁";
            action = "Telescope find_files";
          }
          {
            desc = "Configuration";
            icon = "⚙️";
            action = "Telescope find_files ";
          }
        ];
        hideStatusline = true;
        hideTabline = true;
      };

      auto-save = {
        enable = true;
        enableAutoSave = true;
      };
      lightline.enable = true;
      telescope.enable = true;

      lazy.enable = true;
      direnv.enable = true;
      neocord.enable = true;

      lsp = {
        enable = true;
        servers = {
          rust-analyzer = {
            enable = true;
            autostart = true;
            installCargo = false;
            installRustc = false;
          };
          kotlin-language-server = {
            enable = true;
            autostart = true;
          };
          nil_ls = {
            enable = true;
            autostart = true;
          };
          java-language-server = {
            enable = true;
            autostart = true;
          };
          biome = {
            enable = true;
            autostart = true;
          };
          astro = {
            enable = true;
            autostart = true;
          };
          tsserver = {
            enable = true;
            autostart = true;
          };
          html = {
            enable = true;
            autostart = true;
          };
        };
      };
      cmp = {
        enable = true;
        autoEnableSources = true;
      };

      ccc.enable = true;
      codeium-nvim.enable = true;
      comment.enable = true;

      project-nvim.enable = true;
      todo-comments.enable = true;
      barbar = {
        enable = true;
        autoHide = true;
      };
    };
extraConfigLua = ''
  vim.api.nvim_exec([[
    augroup DashboardOnVimEnter
      autocmd!
      autocmd VimEnter * Dashboard
    augroup END
  ]], false)
'';
  };
}
@Eveeifyeve Eveeifyeve added the bug Something isn't working label May 12, 2024
@Eveeifyeve Eveeifyeve changed the title [BUG] dashborad plugin not working maybe due to vimEnter event. [BUG] dashboard plugin not working maybe due to vimEnter event. May 12, 2024
@khaneliman
Copy link
Contributor

khaneliman commented Sep 9, 2024

I see that we recently refactored this module in #1590 so double checking if you are still seeing this behavior? I was able to get it to work with just this config:

{
  plugins.dashboard = {
    enable = true;
    center = [
      {
        desc = "Find project";
        icon = "📁";
        action = "Telescope find_files";
      }
      {
        desc = "Configuration";
        icon = "⚙️";
        action = "Telescope find_files ";
      }
    ];
    hideStatusline = true;
    hideTabline = true;
  };
}

@Eveeifyeve
Copy link
Author

I will try it tmr as it's 3am here.

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

No branches or pull requests

2 participants