From 8dbc0f7a96d4c0135a826d37c5657359bb032321 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniele=20Vigan=C3=B2?= Date: Fri, 25 Oct 2024 16:44:23 +0200 Subject: [PATCH] Update and clean up mappings --- lua/mappings.lua | 44 ++++++++++++-------------------------------- lua/myinit.lua | 3 --- 2 files changed, 12 insertions(+), 35 deletions(-) diff --git a/lua/mappings.lua b/lua/mappings.lua index c830170..3d79bb2 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -1,35 +1,15 @@ require "nvchad.mappings" -local M = {} +local map = vim.keymap.set -M.dap = { - plugin = true, - n = { - ["db"] = {" DapToggleBreakpoint "} - } -} +-- +-- restore shift-y line copy +map('n', 'Y', 'Y') -M.dap_python = { - plugin = true, - n = { - ["dpr"] = { - function() - require('dap-python').test_method() - end - } - } -} - - -M.copilot = { - n = { - [""] = { - function() - vim.fn.feedkeys(vim.fn['copilot#Accept'](), '') - end, - "Copilot Accept", - {replace_keycodes = true, nowait=true, silent=true, expr=true, noremap=true} - } - } -} - -return M +-- +-- Copilot mappings +map('i', '', 'copilot#Accept("\\")', { + expr = true, + replace_keycodes = false +}) +map('i', '', '(copilot-accept-word)') +map('i', '', '(copilot-accept-word)') diff --git a/lua/myinit.lua b/lua/myinit.lua index 1b14e19..4150828 100644 --- a/lua/myinit.lua +++ b/lua/myinit.lua @@ -2,9 +2,6 @@ local autocmd = vim.api.nvim_create_autocmd vim.opt.fillchars = { } -- --- restore shift-y line copy -vim.keymap.set('n', 'Y', 'Y') --- -- enable nvim intro -- vim.opt.shortmess = "filnxtToO" vim.opt.whichwrap:remove "<>[]hl"