From e6f584e792b40a34d714dae2e7609a50fafd6524 Mon Sep 17 00:00:00 2001 From: desktop Date: Wed, 13 Dec 2023 23:17:40 +0300 Subject: [PATCH] nvim : remove winshift. --- .config/nvim/init.lua | 1 - .config/nvim/lua/key/align.lua | 4 -- .config/nvim/lua/key/navigation.lua | 3 -- .config/nvim/lua/plugin/init.lua | 5 +-- .config/nvim/lua/plugin/winshift.lua | 58 ---------------------------- 5 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 .config/nvim/lua/key/align.lua delete mode 100644 .config/nvim/lua/plugin/winshift.lua diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 8eca7e6..9d71ebb 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -20,7 +20,6 @@ require("key/window") require("key/telescope") require("key/common") require("key/todo") --- require("key/align") require("key/fold") require("key/update") require("key/macro") diff --git a/.config/nvim/lua/key/align.lua b/.config/nvim/lua/key/align.lua deleted file mode 100644 index 4639708..0000000 --- a/.config/nvim/lua/key/align.lua +++ /dev/null @@ -1,4 +0,0 @@ -require('key/rekey') - -rekey_visual('A', 'lua require("align").align_to_string({ preview = false, regex = true, reverse = false })') -- align from left. -rekey_visual('a', 'lua require("align").align_to_string({ preview = false, regex = true, reverse = true })') -- align from right. diff --git a/.config/nvim/lua/key/navigation.lua b/.config/nvim/lua/key/navigation.lua index a15154e..bacce49 100644 --- a/.config/nvim/lua/key/navigation.lua +++ b/.config/nvim/lua/key/navigation.lua @@ -17,9 +17,6 @@ rekey_normal('Q', 'BufferLineMovePrev') -- rekey_normal('x', 'bd!') rekey_normal('x', 'bpspbnbd') --- move window. TODO: remove? -rekey_normal('m', 'WinShift') - -- splits. rekey_normal('|', 'vsplit') rekey_normal('-', 'split') diff --git a/.config/nvim/lua/plugin/init.lua b/.config/nvim/lua/plugin/init.lua index e2e7b15..4de5427 100644 --- a/.config/nvim/lua/plugin/init.lua +++ b/.config/nvim/lua/plugin/init.lua @@ -35,7 +35,6 @@ return require("packer").startup(function(use) use "https://git.voronind.com/mirror/SingleComment.nvim.git" use "https://git.voronind.com/mirror/lualine.nvim.git" use "https://git.voronind.com/mirror/autoclose.nvim.git" - use "https://git.voronind.com/mirror/winshift.nvim.git" use "https://git.voronind.com/mirror/mason.nvim.git" use "https://git.voronind.com/mirror/mason-lspconfig.nvim.git" use "https://git.voronind.com/mirror/gitsigns.nvim.git" @@ -46,10 +45,9 @@ return require("packer").startup(function(use) use "https://git.voronind.com/mirror/telescope.nvim.git" use "https://git.voronind.com/mirror/nvim-treesitter.git" use "https://git.voronind.com/mirror/todo-comments.nvim.git" - -- use "https://git.voronind.com/mirror/align.nvim.git" use "https://git.voronind.com/mirror/gruvbox-material.git" use "https://git.voronind.com/mirror/indent-o-matic.git" - use "https://github.com/echasnovski/mini.align" -- Temporary while align is broken. See https://git.voronind.com/voronind/linux/issues/2 + use "https://git.voronind.com/mirror/mini.align.git" -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins @@ -67,7 +65,6 @@ return require("packer").startup(function(use) require("plugin/bufferline") require("plugin/lualine") require("plugin/autoclose") - require("plugin/winshift") require("plugin/gitsigns") require("plugin/trouble") require("plugin/tokyonight") diff --git a/.config/nvim/lua/plugin/winshift.lua b/.config/nvim/lua/plugin/winshift.lua deleted file mode 100644 index d11280b..0000000 --- a/.config/nvim/lua/plugin/winshift.lua +++ /dev/null @@ -1,58 +0,0 @@ -require("winshift").setup({ - highlight_moving_win = true, -- Highlight the window being moved - focused_hl_group = "Visual", -- The highlight group used for the moving window - moving_win_options = { - -- These are local options applied to the moving window while it's - -- being moved. They are unset when you leave Win-Move mode. - wrap = false, - cursorline = false, - cursorcolumn = false, - colorcolumn = "", - }, - keymaps = { - disable_defaults = false, -- Disable the default keymaps - win_move_mode = { - ["h"] = "left", - ["j"] = "down", - ["k"] = "up", - ["l"] = "right", - ["H"] = "far_left", - ["J"] = "far_down", - ["K"] = "far_up", - ["L"] = "far_right", - [""] = "left", - [""] = "down", - [""] = "up", - [""] = "right", - [""] = "far_left", - [""] = "far_down", - [""] = "far_up", - [""] = "far_right", - }, - }, - ---A function that should prompt the user to select a window. - --- - ---The window picker is used to select a window while swapping windows with - ---`:WinShift swap`. - ---@return integer? winid # Either the selected window ID, or `nil` to - --- indicate that the user cancelled / gave an invalid selection. - window_picker = function() - return require("winshift.lib").pick_window({ - -- A string of chars used as identifiers by the window picker. - picker_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", - filter_rules = { - -- This table allows you to indicate to the window picker that a window - -- should be ignored if its buffer matches any of the following criteria. - cur_win = true, -- Filter out the current window - floats = true, -- Filter out floating windows - filetype = {}, -- List of ignored file types - buftype = {}, -- List of ignored buftypes - bufname = {}, -- List of vim regex patterns matching ignored buffer names - }, - ---A function used to filter the list of selectable windows. - ---@param winids integer[] # The list of selectable window IDs. - ---@return integer[] filtered # The filtered list of window IDs. - filter_func = nil, - }) - end, -})