mrjones2014 / smart-splits.nvim

🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
904 stars 38 forks source link

[Bug]: Ignored filetypes doesn't work(at least on neo-tree) #81

Closed Ciel-MC closed 1 year ago

Ciel-MC commented 1 year ago

Similar Issues

Neovim Version

NVIM v0.10.0-dev-24+g3c724fe1f
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-10 -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always -fstack-protector-strong -DUNIT_TESTING -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/home/runner/work/neovim/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include -I/home/runner/work/neovim/neovim/build/cmake.config -I/home/runner/work/neovim/neovim/src -I/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include -I/home/runner/work/neovim/neovim/.deps/usr/include

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

Multiplexer Integration

Kitty

Multiplexer Version

kitty 0.27.1 created by Kovid Goyal

Steps to Reproduce

  1. Add neo-tree as an ignored filetype(or nofile as a buftype cause that's what it uses)

  2. Open a folder(neotree on the left, empty buffer on the right image

  3. Try to resize either splits

Expected Behavior

No resizing happens as it neotree is the only other buffer, which should be ignored

Actual Behavior

Neotree's split gets resized

Minimal Configuration to Reproduce

Uhhhhhhhhhhhhhhh

Additional Details and/or Screenshots

By running the check for ignored filetype/buftype from the code seems to return true, so it is likely the ignore mechanism's fault and not the check's

mrjones2014 commented 1 year ago
  1. "Uhhhhhhhhhhhhhhh" is not a minimally reproducible init.lua
  2. Ignore lists aren't taken into account when there's only two total windows (why try to resize if there is nothing that should be resized?)