anuvyklack / windows.nvim

Automatically expand width of the current window. Maximizes and restore it. And all this with nice animations!
MIT License
537 stars 15 forks source link

middleclass.lua symlink error on Windows OS #11

Closed Issafalcon closed 2 years ago

Issafalcon commented 2 years ago

Hi,

Nice plugin firstly! Works very well when I'm using WSL on Windows. However, I also need to use Neovim on Windows at work, which led me to find an issue with the middleclass symlink in the middleclass dependency.

I get the following error when using the plugin on Windows:

E5113: Error while calling lua chunk: vim/_init_packages.lua:24: ...a\site\pack\packer\start\middleclass/lua/middleclass.lua:1: unexpected symbol near '..'
stack traceback:
        [C]: in function 'error'
        vim/_init_packages.lua:24: in function <vim/_init_packages.lua:18>
        [C]: in function 'require'
        ...\pack\packer\start\animation.nvim/lua/animation/init.lua:1: in main chunk
        [C]: in function 'require'
        ...windows.nvim/lua/windows/lib/resize-windows-animated.lua:5: in main chunk
        [C]: in function 'require'
        ...site\pack\packer\start\windows.nvim/lua/windows/init.lua:8: in function 'setup'
        C:\Users\adam.figgins\AppData\Local\nvim/lua/ui/windows.lua:14: in main chunk
        [C]: in function 'require'
        C:\Users\adam.figgins\AppData\Local\nvim/lua/ui/init.lua:1: in main chunk
        [C]: in function 'require'
        C:\Users\adam.figgins\AppData\Local\nvim\init.lua:8: in main chunk

Whilst being able to include the middleclass lib in plugins is a nice idea, I'm not sure how to get around the cross-platform issue with symlinking.

It would be great if there was an alternative method that would work for all Neovim users. Otherwise, any plugins that use the original middleware lib in the future (I noticed your PR from the fork) will break the plugins for Windows users.

anuvyklack commented 2 years ago

Seems, it is known issue. Check https://stackoverflow.com/a/59761201

If that doesn't work, I'll think about what else I can do.

anuvyklack commented 2 years ago

Fixed. See https://github.com/kikito/middleclass/pull/65

Issafalcon commented 2 years ago

Nice! I think that way is better. Thanks for the update. Now I know about an extra git config setting 😄