neogen icon indicating copy to clipboard operation
neogen copied to clipboard

Wrong documentation

Open SebasF1349 opened this issue 1 year ago • 0 comments

I can be totally wrong of course, but in the documentation these keymaps are presented (https://github.com/danymat/neogen?tab=readme-ov-file#default-cycling-support)

local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("i", "<C-l>", ":lua require('neogen').jump_next<CR>", opts)
vim.api.nvim_set_keymap("i", "<C-h>", ":lua require('neogen').jump_prev<CR>", opts)

Aren't they wrong and should be instead

local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap("i", "<C-l>", "<cmd>lua require('neogen').jump_next()<CR>", opts)
vim.api.nvim_set_keymap("i", "<C-h>", "<cmd>lua require('neogen').jump_prev()<CR>", opts)

Note the change of : with <cmd> (to avoid just writing it in insert mode) and the missing brackets at the end of the functions.

SebasF1349 avatar Dec 15 '24 02:12 SebasF1349