SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
762 stars 30 forks source link

Setting custom (section) borders leads to broken layout #69

Closed weilbith closed 1 year ago

weilbith commented 1 year ago

Hey 👋🏾

I struggle with customizing the border(s). So basically anyway I set a border to none of the plugin presets (i.e. single, double, etc.), the layout of the window breaks. I read the Nui documentation on this as I saw in the code that you basically just pass this forward to it. But still no luck.

So an example configuration would be:

{
  window = {
    border = 'none',
    sections = {
      mid = {
        border = {
          style = { '┃', ' ', '┃', '┃', '┃', ' ', '┃', '┃' },
        },
      },
    },
  }
})

Here are some screenshots using a plain cargo init Rust project. There are two randomly broken scenarios I can observe:

image image


What am I doing wrong? 😞

weilbith commented 1 year ago

Funny enough, if I now also try to set a Nui border.text.top, I have no border anymore, but the positioning and layout is correct again. 🤔

EDIT: And I just figured out that for the "right" window, you can not pass a full Nui border configuration as the code maps the configuration here to the style property explicitly.

weilbith commented 1 year ago

Somehow it is working now. I played a lot with borders etc. And for some reason it works fine now. 🤷🏾