From 0b30ed27d571adff7a7c875ae19ad4303c38bda9 Mon Sep 17 00:00:00 2001 From: siduck76 Date: Wed, 22 Sep 2021 21:26:30 +0530 Subject: [PATCH] replace better-escape.vim with better-escape.nvim --- lua/plugins/configs/others.lua | 7 ++++--- lua/plugins/init.lua | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/plugins/configs/others.lua b/lua/plugins/configs/others.lua index 7d06c76..d967f26 100644 --- a/lua/plugins/configs/others.lua +++ b/lua/plugins/configs/others.lua @@ -41,9 +41,10 @@ end M.better_escape = function() local m = require("core.utils").load_config().mappings.plugin.better_escape.esc_insertmode - - vim.g.better_escape_interval = config.options.plugin.esc_insertmode_timeout or 300 - vim.g.better_escape_shortcut = m + require("better_escape").setup { + mapping = m, + timeout = config.options.plugin.esc_insertmode_timeout or 300, + } end M.blankline = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 4a67097..01456ce 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -163,10 +163,10 @@ return packer.startup(function() } use { - "jdhao/better-escape.vim", + "max397574/better-escape.nvim", disable = not plugin_status.esc_insertmode, event = "InsertEnter", - setup = function() + config = function() require("plugins.configs.others").better_escape() end, }