From 3c4f03c439369bca263dcf410ff75049707ad55a Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Wed, 24 Jul 2024 14:45:21 +0300 Subject: refactor(neovim): moved plugin/ files to lua/custom/config --- .config/nvim/plugin/keymaps.lua | 53 ----------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .config/nvim/plugin/keymaps.lua (limited to '.config/nvim/plugin/keymaps.lua') diff --git a/.config/nvim/plugin/keymaps.lua b/.config/nvim/plugin/keymaps.lua deleted file mode 100644 index bc5c73e..0000000 --- a/.config/nvim/plugin/keymaps.lua +++ /dev/null @@ -1,53 +0,0 @@ -local set = vim.keymap.set -local silent = { silent = true } ----@param mode string|table ----@param keymap string -local function unbind(mode, keymap) - set(mode, keymap, function() end) -end - -local function toggle_zen() - vim.cmd('Neotree close') - vim.cmd('Trouble todo close') - vim.cmd('UndotreeHide') -end - -local function paste() - vim.fn.getreg('+') -end - --- Misc -set({ 'n', 'i' }, '', 'ggVG', { desc = 'Visually Highlight [A]ll' }) -set('n', '', 'nohlsearch', silent) -set({ 'i', 'c' }, '', paste) -- FIXME: seems to not work -set('n', 'z', toggle_zen, { desc = '[Z]en Mode', silent = true }) -unbind({ 'i', 'n', 'v' }, '') - -set('n', 'U', 'redo') -set('i', '', 'undo') -set('i', '', 'undo') -set({ 'i', 'n', 'v' }, '', 'wqa') - --- Window Navigation - NO NEED BECAUSE IT CONFLICTS WITH TMUX --- set('n', '', '', { desc = 'Move focus to the left window' }) --- set('n', '', '', { desc = 'Move focus to the down window' }) --- set('n', '', '', { desc = 'Move focus to the up window' }) --- set('n', '', '', { desc = 'Move focus to the right window' }) - --- Window resizing -local resize = 2 -set({ 'n', 't' }, '', string.format('vertical resize -%d', resize), { desc = 'Resize Left' }) -set({ 'n', 't' }, '', string.format('resize -%d', resize), { desc = 'Resize Up' }) -set({ 'n', 't' }, '', string.format('resize +%d', resize), { desc = 'Resize Down' }) -set({ 'n', 't' }, '', string.format('vertical resize +%d', resize), { desc = 'Resize Right' }) - --- Keep selection after < and > in visual mode -set('v', '<', '', '>gv') - --- Execute lua file or line -set('n', 'x', '.lua', { desc = 'Execute the current line' }) -set('n', 'x', 'source %', { desc = 'Execute the current file' }) - --- Reformats file using lsp -set('n', '=', vim.lsp.buf.format, { desc = 'Format File' }) -- cgit v1.3.1