From e64e70aa0ca9ab37505c88402cd75a5a38f0f20e Mon Sep 17 00:00:00 2001 From: n3oney Date: Mon, 10 Apr 2023 22:43:41 +0200 Subject: [PATCH] refactor: use builtin nvim function --- modules/core/default.nix | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/modules/core/default.nix b/modules/core/default.nix index ba257cf..0fdd1cb 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -266,7 +266,7 @@ in { toLuaBindings = mode: maps: builtins.map (value: '' - map(${toLuaObject mode}, ${toLuaObject value.key}, ${ + vim.keymap.set(${toLuaObject mode}, ${toLuaObject value.key}, ${ toLuaObject value.action }, ${toLuaObject value.config})'') (genMaps mode maps); @@ -317,17 +317,6 @@ in { # This is probably not the right way to set the config. I'm not sure how it should look like. mappings = let maps = [ - (splitString - "\n" - '' - local function map(mode, lhs, rhs, opts) - local options = { noremap=true, silent=true } - if opts then - options = vim.tbl_extend('force', options, opts) - end - vim.api.nvim_set_keymap(mode, lhs, rhs, options) - end - '') nmap imap vmap