nix-community / nixvim

Configure Neovim with Nix! [maintainer=@GaetanLepage, @traxys, @mattsturgeon, @khaneliman]
https://nix-community.github.io/nixvim
MIT License
1.57k stars 244 forks source link

[Bug] Bufferline plugin is not initialized #1027

Closed borisoid closed 3 weeks ago

borisoid commented 7 months ago

This line require('bufferline').setup${helpers.toLuaObject setupOptions} has no parens for a setup call. As a result I get require('bufferline').setup{} line in init.lua and the plugin is not initialized.

It does start showing nvim tabs though, idk why. image

Calling setup with parens fixes this. image

Every other plugin under plugins/bufferlines uses require(...).setup(${helpers.toLuaObject setupOptions}) (with parens) e.g.

traxys commented 5 months ago

This is strange, because I set plugins.bufferline.enable = true; and I have the plugin working (with the current nixvim):

image

khaneliman commented 3 weeks ago

Resolved with https://github.com/nix-community/nixvim/pull/2013

MattSturgeon commented 3 weeks ago

As a result I get require('bufferline').setup{} line in init.lua and the plugin is not initialized.

I think this was a red herring; lua allows calling single-argument functions without parentheses. This is often used for DSL-style lua, similar to kotlin or groovy.

Yash-Garg commented 3 weeks ago

I have enabled bufferline in my config, but it doesn't show me all the open buffers (only the current file on top).

If I do :ls they show up that they are open and I can also switch between them using my keymap. Can it be related to this issue? This is my bufferline config.

khaneliman commented 3 weeks ago

I have enabled bufferline in my config, but it doesn't show me all the open buffers (only the current file on top).

If I do :ls they show up that they are open and I can also switch between them using my keymap. Can it be related to this issue? This is my bufferline config.

Not sure... if I use that config I see the buffers.

  plugins.bufferline = {
    enable = true;

    settings.options = {
      hover.enabled = true;
      indicator.style = null;
      mode = "buffers";
      separatorStyle = "slant";
      themable = true;
    };
  };

Not sure if it's related to your enabled \\ merge. Try with enable = true;.

Yash-Garg commented 3 weeks ago

I have enabled bufferline in my config, but it doesn't show me all the open buffers (only the current file on top). If I do :ls they show up that they are open and I can also switch between them using my keymap. Can it be related to this issue? This is my bufferline config.

Not sure... if I use that config I see the buffers.

  plugins.bufferline = {
    enable = true;

    settings.options = {
      hover.enabled = true;
      indicator.style = null;
      mode = "buffers";
      separatorStyle = "slant";
      themable = true;
    };
  };

Not sure if it's related to your enabled \\ merge. Try with enable = true;.

It's still the same without the merge thing, weird issue.