From 219d254ea5bfb6323cded2f041935acf14ec93a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Magalh=C3=A3es?= Date: Wed, 16 Aug 2023 16:02:45 -0300 Subject: [PATCH] Small remaps --- lua/core/keymaps/async/project-tree.lua | 2 +- lua/core/keymaps/diagnostics.lua | 0 lua/core/keymaps/general.lua | 12 ++++++------ lua/core/keymaps/init.lua | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 lua/core/keymaps/diagnostics.lua diff --git a/lua/core/keymaps/async/project-tree.lua b/lua/core/keymaps/async/project-tree.lua index 45f859ab..047d353d 100644 --- a/lua/core/keymaps/async/project-tree.lua +++ b/lua/core/keymaps/async/project-tree.lua @@ -1,4 +1,4 @@ --- Neotree mappings +-- Project tree mappings return function(buffer) local api = require "nvim-tree.api" diff --git a/lua/core/keymaps/diagnostics.lua b/lua/core/keymaps/diagnostics.lua deleted file mode 100644 index e69de29b..00000000 diff --git a/lua/core/keymaps/general.lua b/lua/core/keymaps/general.lua index 1c7469aa..755647b2 100644 --- a/lua/core/keymaps/general.lua +++ b/lua/core/keymaps/general.lua @@ -22,15 +22,15 @@ vim.api.nvim_create_autocmd('TextYankPost', { pattern = '*', }) --- Esc functionality -vim.keymap.set("n", "", function() - -- Clear terminal notification below - vim.notify("") +local function nohClear() -- Removes highlight search vim.cmd.noh() + -- Clear terminal notification below + vim.notify("") +end - vim.cmd(':silent! Neotree cancel') -end, { silent = true }) +vim.keymap.set("n", "", nohClear, { silent = true }) +vim.keymap.set("n", "", nohClear, { silent = true }) --[[ NOTE To use Meta key as Option in mac inside iterm diff --git a/lua/core/keymaps/init.lua b/lua/core/keymaps/init.lua index 7f334577..862e2dde 100644 --- a/lua/core/keymaps/init.lua +++ b/lua/core/keymaps/init.lua @@ -2,4 +2,3 @@ local import = require('core.utils').createImporter("core.keymaps") import('general') import('file-search') -import('diagnostics')