00sapo / visual.nvim

First select, then edit. A helix/kakoune-like editing in neovim
GNU General Public License v3.0
181 stars 5 forks source link

folder named `modules` conflicts with other plugins #4

Closed fecet closed 1 year ago

fecet commented 1 year ago

https://github.com/00sapo/visual.nvim/commit/fca7b421138b7469b8e5cd7169265886f5780373

fecet commented 1 year ago

2023-07-27T18:33:31 lazy.nvim  ERROR Failed to source /home/rok/.local/share/nvim/site/lazy/visual.nvim/plugin/visual.lua
vim/_editor.lua:0: User Autocommands for "VeryLazy"..script nvim_exec2() called at User Autocommands for "VeryLazy":0../home/rok/.local/share/nvim/site/lazy/visual.nvim/plugin/visual.lua: Vim(source):E5113: Er
ror while calling lua chunk: ...are/nvim/site/lazy/visual.nvim/lua/modules/extending.lua:34: attempt to call field 'concat_arrays' (a nil value)
stack traceback:
...are/nvim/site/lazy/visual.nvim/lua/modules/extending.lua:34: in main chunk
[C]: in function 'require'
...hare/nvim/site/lazy/visual.nvim/lua/modules/mappings.lua:4: in main chunk
[C]: in function 'require'
...k/.local/share/nvim/site/lazy/visual.nvim/lua/visual.lua:3: in main chunk
[C]: in function 'require'
...local/share/nvim/site/lazy/visual.nvim/plugin/visual.lua:12: in main chunk
[C]: in function 'nvim_exec2'
vim/_editor.lua: in function 'cmd'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:467: in function <.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:466>
[C]: in function 'xpcall'
...al/share/nvim/site/lazy/lazy.nvim/lua/lazy/core/util.lua:110: in function 'try'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:466: in function 'source'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:425: in function 'source_runtime'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:393: in function 'packadd'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:328: in function '_load'
.../share/nvim/site/lazy/lazy.nvim/lua/lazy/core/loader.lua:184: in function 'load'
...nvim/site/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:33: in function <...nvim/site/lazy/lazy.nvim/lua/lazy/core/handler/event.lua:26>
[C]: in function 'nvim_exec_autocmds'
...al/share/nvim/site/lazy/lazy.nvim/lua/lazy/core/util.lua:149: in function <...al/share/nvim/site/lazy/lazy.nvim/lua/lazy/core/util.lua:144>

00sapo commented 1 year ago

Hi, have you tried the latest version in the main branch? Anyway, this plugin is still not stable, and it's going to change a lot in the near future...

fecet commented 1 year ago

Yes I do a bisect start from main

00sapo commented 1 year ago

I cannot reproduce it. Can you try with the updated main branch and this configuration file?

In linux/mac:

  1. curl https://raw.githubusercontent.com/00sapo/visual.nvim/main/test/init.lua -o /tmp/visual.nvim-test.lua
  2. nvim -u /tmp/visual.nvim-test.lua <file>
fecet commented 1 year ago

nvim I can reproduce this for neovim 9.1 and nightly

00sapo commented 1 year ago

Honestly, it's hard to debug without being able to reproduce it. I'm also using neovim 0.9.1 and LuaJIT 2.1.0-beta3. Since I'm going to do a large (and definitely braking) update in the next few days, I wouldn't worry too much for now. Let's see if it will still be there afterwards

fecet commented 1 year ago

I'm also want to ask if it's possible to use it just to add some keymap in visual mode instead of adding many select automatically enter visual mode (like 3w now be v3w) as I'm confortable with using CR to enter visual mode (it's my incremental_selection init and next). Cannot test it as not able to install it yet

00sapo commented 1 year ago

Yes, it's possible, but that's not the aim of the plugin. For what you say it's better doing it by yourself using vim.keymap.set and vim.keymap.del.

00sapo commented 1 year ago

Hello, could you retry installing the plugin?

fecet commented 1 year ago

Still cannot install for me

fecet commented 1 year ago

It seems that was caused by https://github.com/00sapo/visual.nvim/blob/fca7b421138b7469b8e5cd7169265886f5780373/lua/modules/extending.lua#L2 this also exist in my neovim config and that path take higher priority

00sapo commented 1 year ago

Just wondering, are you using some pre-made configs or have you created it from scratch? Anyway, I will fix this asap

fecet commented 1 year ago

I'm using https://github.com/ayamir/nvimdots but do some(maybe many) modification. I'm open to any changes as visual.nvim looks like a life changer for me

00sapo commented 1 year ago

Fixed in 3136d2bf78cc88dafb1e4e4ff6d9f21ee559f123