zgpio / tree.nvim

Neovim file-explorer powered by C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lua breaks nvim-4.x

litao91 opened this issue · comments

Hi,
I just noticed that the recent commits actually moving from viml to lua, and those changes break in nvim-4.x .

To be specific, the vim.fn is not available until the 5.x version, which has not been stablized yet.

I'm actually wondering does it help to use lua instead of viml in this project, even ignoring the compatibility issue. Although luaJIT is way faster than viml, the heavy work load in this project is delegated to the C++ part. In that sense, I don't think moving to lua will help much.

Regards

commented

I agree with your opinion. I may maintain a radical development attitude for two reasons:

  1. This is my first nvim plugin. Maintaining compatibility is a burden for me because I generally use nvim-nightly build.
  2. I converted VimL to Lua just for learning. The current Lua API of tree.nvim is still very rough. If you are a coc.nvim user and want stable file explorer, in fact, coc-explorer is a good plugin, and I admit that compared to coc-explorer, tree.nvim has small significant performance improvement.

Anyway, thanks for your feedback.

@zgpio
I tried coc-explorer. It's great but in my setup it is significantly slower than defx. When opening a large directory, even a simple cursor moving is slow.

For your reference, in my setup, opening a tree with about 24000 files

  • defx took about 7 secs
  • I haven't profile coc-explorer, but it definitely took more than 5secs, and as I said before, cursor moving is not smooth.
  • Your tree.nvim took about 1.1 secs

Regards

commented

I just tested it roughly. The performance of defx and coc-explorer for opening dir(16k files) is similar(about 4s). Yes, tree.nvim took only about 1s.
coc-explorer remaps the j/k keys so that cursor moving is not smooth.
I tested it before, it seems the new version of coc-explorer slow down.