From feaeb35c2c6cd09b2732d71c063865f1e37008f7 Mon Sep 17 00:00:00 2001 From: danymat Date: Thu, 18 Nov 2021 14:27:26 +0100 Subject: [PATCH] breaking_change : Deprecate jump_map in favor of user keybind (Closes #27) --- README.md | 2 +- lua/neogen.lua | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index 0dee74f..6818b6b 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ cmp.setup { require('neogen').setup { enabled = true, --if you want to disable Neogen input_after_comment = true, -- (default: true) automatic jump (with insert mode) on inserted annotation - jump_map = "" -- The keymap in order to jump in the annotation fields (in insert mode) + -- jump_map = "" -- (DROPPED SUPPORT, see [here](#cycle-between-annotations) !) The keymap in order to jump in the annotation fields (in insert mode) } } ``` diff --git a/lua/neogen.lua b/lua/neogen.lua index ce33b5c..949a92f 100644 --- a/lua/neogen.lua +++ b/lua/neogen.lua @@ -125,7 +125,6 @@ neogen.setup = function(opts) neogen.configuration = vim.tbl_deep_extend("keep", opts or {}, { input_after_comment = true, -- bool, If you want to jump with the cursor after annotation jump_text = "$1", -- symbol to find for jumping cursor in template - jump_map = "", -- DEFAULT CONFIGURATION languages = { lua = require("neogen.configurations.lua"), @@ -141,15 +140,6 @@ neogen.setup = function(opts) if neogen.configuration.enabled == true then neogen.generate_command() - vim.api.nvim_set_keymap("i", neogen.configuration.jump_map, "lua require('neogen').jump_next()", {}) - 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", "", ":lua require('neogen').jump_next()", { silent = true, noremap = true }) - ]], - vim.log.levels.WARN - ) end end