ref: Add future deprecation notices for jump_map
This commit is contained in:
11
README.md
11
README.md
@@ -80,13 +80,16 @@ vim.api.nvim_set_keymap("n", "<Leader>nc", ":lua require('neogen').generate({ ty
|
|||||||
|
|
||||||
### Cycle between annotations
|
### Cycle between annotations
|
||||||
|
|
||||||
I added support passing cursor positionings in templates.
|
I added support passing cursor positionings in templates. That means you can now cycle your cursor between different parts of the annotation.
|
||||||
|
|
||||||
That means you can now cycle your cursor between different parts of the annotation.
|
To configure it to the keybind of your choice, you can do something like this:
|
||||||
|
|
||||||
The default keybind is `<C-e>` in insert mode.
|
```lua
|
||||||
|
local opts = { noremap = true, silent = true }
|
||||||
|
vim.api.nvim_set_keymap("n", "<C-e>", ":lua require('neogen').jump_next()<CR>", opts)
|
||||||
|
```
|
||||||
|
|
||||||
If you want to add `<Tab>` completion instead, be sure you don't have a completion plugin. If so, you have to configure them:
|
If you want to use a key that's already used for completion purposes, take a look at the code snippet here:
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>nvim-cmp</summary>
|
<summary>nvim-cmp</summary>
|
||||||
|
|||||||
@@ -142,6 +142,14 @@ neogen.setup = function(opts)
|
|||||||
if neogen.configuration.enabled == true then
|
if neogen.configuration.enabled == true then
|
||||||
neogen.generate_command()
|
neogen.generate_command()
|
||||||
vim.api.nvim_set_keymap("i", neogen.configuration.jump_map, "<cmd>lua require('neogen').jump_next()<CR>", {})
|
vim.api.nvim_set_keymap("i", neogen.configuration.jump_map, "<cmd>lua require('neogen').jump_next()<CR>", {})
|
||||||
|
vim.notify(
|
||||||
|
[[
|
||||||
|
[neogen] Future deprecation: `jump_map` option will be deprecated in favor of user keybinds.
|
||||||
|
You can do something like this:
|
||||||
|
vim.api.nvim_set_keymap("n", "<C-e>", ":lua require('neogen').jump_next()<CR>", { silent = true, noremap = true })
|
||||||
|
]],
|
||||||
|
vim.log.levels.WARN
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user