fedepujol / move.nvim

Gain the power to move lines and blocks and auto-indent them!
GNU General Public License v3.0
348 stars 6 forks source link

Attempt to compare nil with number #19

Closed Mte90 closed 1 year ago

Mte90 commented 1 year ago

immagine

I have those mappings:

vim.api.nvim_set_keymap('v', '<A-j>', ":MoveBlock(1)<CR>", { noremap = true, silent = true})
vim.api.nvim_set_keymap('v', '<A-k>', ":MoveBlock(-1)<CR>", { noremap = true, silent = true})
fedepujol commented 1 year ago

Hi! I couldn't replicate the error on my end. So I've got a few questions to narrow it down:

Thanks!

Mte90 commented 1 year ago

My dotfiles are on github.com/mte90/dotfiles with vim-plug and latest nvim nightly

fedepujol commented 1 year ago

I couldn't reproduce this error with a minimal setup (neovim nightly + vim-plug):

set number
set relativenumber

call plug#start()
Plug 'fedepujol/move.nvim'
call plug#end()

After that, I clone your config to see what was going on and I found that you're using a fork of this plugin. In the file plugins.lua on line 76:

    "'hinell/move.nvim'",

You can opt to use this plugin instead, test the functionality and tell me if the error persist.

fedepujol commented 1 year ago

Closing this for now.

Mte90 commented 1 year ago

I am very sorry, I don't remember why I configured the fork and that I didn't notice when i opened the ticket.