From c5bc73cb27e4a02108114126b62dbb17d6ac064c Mon Sep 17 00:00:00 2001 From: Daniel Mathiot Date: Fri, 27 Aug 2021 22:36:44 +0200 Subject: [PATCH] Add jump mapping to configuration --- lua/neogen.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/neogen.lua b/lua/neogen.lua index 1698d0d..fa937f6 100644 --- a/lua/neogen.lua +++ b/lua/neogen.lua @@ -109,6 +109,7 @@ 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"), @@ -120,6 +121,7 @@ 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()", { }) end end