uga-rosa / denippet.vim

A snippet plugin for Vim/Neovim, powered by TypeScript
MIT License
30 stars 1 forks source link

`denippet#choosable(-1)` cause error `too many arguments` #21

Closed ryoppippi closed 5 months ago

ryoppippi commented 5 months ago

Hello! according to the help file, we can pass an argument for direction. However, when I excecute the command like this

vim.fn['denippet#choosable'](-1)

It causes error like this

E5108: Error executing lua: Vim:E118: Too many arguments for function: denippet#choosable
stack traceback:
    [C]: in function 'choosable'
    /Users/ryoppippi/.config/nvim/lua/plugin/nvim-cmp.lua:120: in function 'on_keymap'
    ...oppippi/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:145: in function 'callback'
    ....local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:133: in function <....local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/keymap.lua:127>

Looking at the actual implementation, it appears that this function does not accept any arguments

uga-rosa commented 5 months ago

I don't see the documentation updated. The implementation is correct. Fixed.

ryoppippi commented 5 months ago

Okay thanks!!