From 439053637212338e7c2249b35b1c929d3724b963 Mon Sep 17 00:00:00 2001 From: afonso Date: Sat, 5 Oct 2024 13:07:39 +0100 Subject: [PATCH] [nvim] replace nvim-tmux-navigator with smart-splits --- .config/nvim/lua/plugins/lsp.lua | 4 ++-- .config/nvim/lua/plugins/navigation.lua | 25 ++++++++++++++----------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index d9e7423..521eddf 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -219,8 +219,8 @@ return { }, { 'mrcjkb/rustaceanvim', - version = '^5', -- Recommended - lazy = false, -- This plugin is already lazy + version = '^5', + lazy = false }, { "stevearc/conform.nvim", diff --git a/.config/nvim/lua/plugins/navigation.lua b/.config/nvim/lua/plugins/navigation.lua index 8c67595..3952476 100644 --- a/.config/nvim/lua/plugins/navigation.lua +++ b/.config/nvim/lua/plugins/navigation.lua @@ -21,16 +21,19 @@ return { opts = {}, }, { - "alexghergh/nvim-tmux-navigation", - event = "VeryLazy", - opts = { - disable_when_zoomed = true, -- defaults to false - keybindings = { - left = "", - down = "", - up = "", - right = "", - }, - }, + 'mrjones2014/smart-splits.nvim', + config = function() + require('smart-splits').setup({}) + --Resize + vim.keymap.set('n', '', require('smart-splits').resize_left) + vim.keymap.set('n', '', require('smart-splits').resize_down) + vim.keymap.set('n', '', require('smart-splits').resize_up) + vim.keymap.set('n', '', require('smart-splits').resize_right) + --Move + vim.keymap.set('n', '', require('smart-splits').move_cursor_left) + vim.keymap.set('n', '', require('smart-splits').move_cursor_down) + vim.keymap.set('n', '', require('smart-splits').move_cursor_up) + vim.keymap.set('n', '', require('smart-splits').move_cursor_right) + end }, }