Skip to content

1221 handle deprecated vert split #1225

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

Merged
merged 2 commits into from
May 7, 2022

Conversation

alex-courtis
Copy link
Member

@alex-courtis alex-courtis commented May 2, 2022

closes #1221

  • detect WinSeparator, falls back to VertSplit
  • NvimTreeWinSeparator defaults to NvimTreeVertSplit

We could put a warning about this deprecation however I do not think it is worth it.

@@ -65,6 +65,7 @@ local function get_links()
EndOfBuffer = "EndOfBuffer",
CursorLine = "CursorLine",
VertSplit = "VertSplit",
WinSeparator = "NvimTreeVertSplit",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. WinSeparator defaults to VertSplit in 0.7.0.

@alex-courtis
Copy link
Member Author

@siduck please test.

NvimTreeCursorLine
NvimTreeVertSplit (deprecated, use NvimTreeWinSeparator)
NvimTreeWinSeparator
NvimTreeCursorColumn
Copy link
Member Author

@alex-courtis alex-courtis May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why there were no NvimTree prefixes. We can revert.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it was because i've specified the original groups, but it doesn't matter too much, i actually think it's clearer this way

@siduck
Copy link
Contributor

siduck commented May 2, 2022

@siduck please test.

works as expected

image

@alex-courtis
Copy link
Member Author

Thank you.

@par4m
Copy link

par4m commented May 3, 2022

This works just fine, this might be unrelated but i can't figure out whats causing the horizontal split to go out of bounds, any idea?
image

@siduck
Copy link
Contributor

siduck commented May 3, 2022

This works just fine, this might be unrelated but i can't figure out whats causing the horizontal split to go out of bounds, any idea? image

this seems like an upstream issue and I get it only when a horizontal splt's touching nvimtree.

@alex-courtis
Copy link
Member Author

this seems like an upstream issue and I get it only when a horizontal splt's touching nvimtree.

Could you try and replicate that without nvim-tree?

@siduck
Copy link
Contributor

siduck commented May 3, 2022

this seems like an upstream issue and I get it only when a horizontal splt's touching nvimtree.

Could you try and replicate that without nvim-tree?

with nvim-tree

image

without nvimtree

image

@adastx
Copy link

adastx commented May 3, 2022

2022-05-03-130421_1745x1107_scrot

All works fine for me except for the horizontal splt's touching nvimtree as mentioned by the others.

Sidenote: any idea how to get some more padding on the number row when using number and relative number? There's almost no space between the current line number and nvim-tree for example.
Edit: set signcolumn=yes

@siduck
Copy link
Contributor

siduck commented May 3, 2022

numberwidth option ig

@alex-courtis
Copy link
Member Author

All works fine for me except for the horizontal splt's touching nvimtree as mentioned by the others.

That is a possible nvim-tree problem. I cannot replicate with the minimal config and :hi NvimTreeVertSplit guibg=#ff0000 guifg=#00FF00. I can see that there is a lot of customisation and probably plugins in your setup.

@siduck @adastx : please produce a minimal configuration that demonstrates this issue so that we may replicate: raise a new bug report and put your minimal configuration in there.

@siduck
Copy link
Contributor

siduck commented May 7, 2022

@alex-courtis
image

@siduck
Copy link
Contributor

siduck commented May 7, 2022

Steps to reproduce @alex-courtis

git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim

init.lua

vim.opt.laststatus= 3
vim.opt.termguicolors = true

vim.cmd "hi Normal guibg=#000000"
vim.cmd "hi NvimTreeNormal guibg=#ffffff guifg=#000000"

vim.cmd "hi WinSeparator guibg='NONE'"
vim.cmd "hi NvimTreeWinSeparator guifg='#ffffff' guibg='#ffffff'"

require("packer").startup {
    {
      "wbthomason/packer.nvim",
      {
              "kyazdani42/nvim-tree.lua",
              branch = "1221-handle-deprecated-VertSplit",
      },
      "kyazdani42/nvim-web-devicons",
    },
 }
require("nvim-tree").setup {}

@alex-courtis
Copy link
Member Author

alex-courtis commented May 7, 2022

Steps to reproduce @alex-courtis

Replicated.

This happens on this branch, as well as the previous 86d573d

This might be a neovim bug. We should replicate this without nvim-tree.

@alex-courtis
Copy link
Member Author

Replicated without nvim-tree:

nvim --clean
<C-w>v
<C-w>w
<C-w>s
:set laststatus=3
:hi MyWinSeparator ctermfg=1 ctermbg=2
:setlocal winhl=WinSeparator:MyWinSeparator

asciicast

I don't know if this is intended behaviour; @siduck please raise a neovim issue.

@siduck
Copy link
Contributor

siduck commented May 7, 2022

@alex-courtis yes it is, So this is no longer nvimtree related issue Ig, it'd be great to push the changes for now tho!

Copy link
Member

@kyazdani42 kyazdani42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good enough for now, once we merge the switch to 0.7, we'll remove this :)

@kyazdani42 kyazdani42 merged commit d54fc28 into master May 7, 2022
@kyazdani42 kyazdani42 deleted the 1221-handle-deprecated-VertSplit branch May 8, 2022 11:27
ssiyad added a commit to ssiyad/tokyonight.nvim that referenced this pull request Sep 23, 2022
- change `NvimTreeVertSplit` to `NvimTreeWinSeparator` since the former
  is deprecated.
  nvim-tree/nvim-tree.lua#1225
- set `NvimTreeWinSeparator` to `border` if sidebar style is `transparent`

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
folke pushed a commit to folke/tokyonight.nvim that referenced this pull request Sep 23, 2022
- change `NvimTreeVertSplit` to `NvimTreeWinSeparator` since the former
  is deprecated.
  nvim-tree/nvim-tree.lua#1225
- set `NvimTreeWinSeparator` to `border` if sidebar style is `transparent`

Signed-off-by: Sabu Siyad <hello@ssiyad.com>

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
Almo7aya pushed a commit to Almo7aya/nvim-tree.lua that referenced this pull request Oct 11, 2022
riley-martine pushed a commit to riley-martine/tokyonight.nvim that referenced this pull request Dec 7, 2023
)

- change `NvimTreeVertSplit` to `NvimTreeWinSeparator` since the former
  is deprecated.
  nvim-tree/nvim-tree.lua#1225
- set `NvimTreeWinSeparator` to `border` if sidebar style is `transparent`

Signed-off-by: Sabu Siyad <hello@ssiyad.com>

Signed-off-by: Sabu Siyad <hello@ssiyad.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

call NvimTreeToggle, Invalid parameter
5 participants