nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

[Bug] Bufferline plugin is not initialized

Open borisoid opened this issue 2 years ago • 1 comments

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.

borisoid avatar Feb 06 '24 10:02 borisoid

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

image

traxys avatar Mar 12 '24 22:03 traxys

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

khaneliman avatar Aug 14 '24 13:08 khaneliman

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.

MattSturgeon avatar Aug 14 '24 13:08 MattSturgeon

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.

Yash-Garg avatar Aug 14 '24 16:08 Yash-Garg

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;.

khaneliman avatar Aug 14 '24 16:08 khaneliman

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.

Yash-Garg avatar Aug 14 '24 18:08 Yash-Garg