From 9f36c9e319c3f62d2cc5fcc13888bb1c52549dd5 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 23 Jul 2024 17:04:16 +0300 Subject: refactor(neovim): minor changes and splited most plugins to their own file --- .config/nvim/lua/custom/plugins/utility.lua | 198 ---------------------------- 1 file changed, 198 deletions(-) delete mode 100644 .config/nvim/lua/custom/plugins/utility.lua (limited to '.config/nvim/lua/custom/plugins/utility.lua') diff --git a/.config/nvim/lua/custom/plugins/utility.lua b/.config/nvim/lua/custom/plugins/utility.lua deleted file mode 100644 index 9c122ba..0000000 --- a/.config/nvim/lua/custom/plugins/utility.lua +++ /dev/null @@ -1,198 +0,0 @@ -return { - { - 'uga-rosa/ccc.nvim', - opts = { highlighter = { auto_enable = true } }, - event = 'VeryLazy', - keys = { - { 'cp', 'CccPick', desc = '[C]olor [P]icker' }, - { 'ct', 'CccHighlighterToggle', desc = '[C]olor [T]oggle' }, - }, - }, - { - 'okuuva/auto-save.nvim', - cmd = 'ASToggle', - event = { 'InsertLeave', 'TextChanged' }, - opts = { - execution_message = { enabled = false }, - condition = function(buf) - return vim.fn.getbufvar(buf, '&buftype') == '' - end, - }, - }, - { - 'rmagatti/auto-session', - lazy = false, - config = function() - vim.opt.sessionoptions = 'blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions' - require('auto-session').setup({ - log_level = 'error', - auto_session_suppress_dirs = { '~/', '/' }, - session_lens = { load_on_setup = false }, - no_restore_cmds = { - function() - vim.cmd('Alpha') - end, - }, - }) - - local session_lens_setup_done = false - local function search_session() - if not session_lens_setup_done then - require('auto-session').setup_session_lens() - session_lens_setup_done = true - end - require('auto-session.session-lens').search_session() - end - vim.keymap.set('n', '', search_session, { desc = '[S]ession Manager' }) - end, - }, - { 'wakatime/vim-wakatime', lazy = false }, - { - 'mbbill/undotree', - keys = { { 'ut', vim.cmd.UndotreeToggle } }, - config = function() - vim.g.undotree_DiffAutoOpen = false - vim.g.undotree_DiffpanelHeight = 0 - vim.g.undotree_SetFocusWhenToggle = false - vim.g.undotree_HelpLine = false - vim.g.undotree_TreeNodeShape = '' - vim.g.undotree_TreeVertShape = '│' - vim.g.undotree_TreeSplitShape = '─┘' - vim.g.undotree_TreeReturnShape = '─┐' - end, - }, - -- NOTE: No keybindings, use `:Spectre` or `:Spectre ` - -- Spectre has no undo, so it should be rarely used, which is why no keybindings are defined - { 'nvim-pack/nvim-spectre', cmd = 'Spectre', config = true }, - { - 'echasnovski/mini.nvim', - version = false, - keys = { - { - 'Q', - function() - if vim.bo.modified then - vim.cmd.write() - end - require('mini.bufremove').delete(0) - end, - desc = '[Q]uit Buffer', - }, - }, - }, - { - 'kylechui/nvim-surround', - version = '*', - keys = { - { 'yS', '(nvim-surround-normal)' }, - { 'ySS', '(nvim-surround-normal-cur)' }, - { 'S', '(nvim-surround-visual)', mode = 'v' }, - { 'cS', '(nvim-surround-change)' }, - { 'dS', '(nvim-surround-delete)' }, - { '(', '(nvim-surround-visual)(', mode = 'v' }, - { '{', '(nvim-surround-visual){', mode = 'v' }, - { '[', '(nvim-surround-visual)[', mode = 'v' }, - { '`', '(nvim-surround-visual)`', mode = 'v' }, - { '"', '(nvim-surround-visual)"', mode = 'v' }, - { "'", "(nvim-surround-visual)'", mode = 'v' }, - }, - opts = { - keymaps = { - insert = false, - insert_line = false, - normal_line = false, - normal_cur_line = false, - visual_line = false, - normal = false, - normal_cur = false, - visual = false, - delete = false, - change = false, - change_line = false, - }, - }, - }, - { - -- TODO: Make sure it uses a diff color - -- the color rn is too similar to visual mode - 'RRethy/vim-illuminate', - event = 'LspAttach', - keys = { { 'it', 'IlluminateToggle', desc = '[I]lluminate [Tloggle]' } }, - }, - { - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', - event = 'BufEnter', - opts = { - scope = { - show_start = false, - show_end = false, - }, - }, - }, - { - 'christoomey/vim-tmux-navigator', - keys = { - { '', 'TmuxNavigateLeft' }, - { '', 'TmuxNavigateDown' }, - { '', 'TmuxNavigateUp' }, - { '', 'TmuxNavigateRight' }, - }, - }, - { - 'ggandor/leap.nvim', - dependencies = { 'tpope/vim-repeat' }, - keys = { - { 's', '(leap)', mode = { 'n', 'x', 'o' } }, - { 'S', '(leap-from-window)' }, - { - 'gs', - function() - require('leap.remote').action() - end, - }, - }, - config = function() - require('leap').opts.equivalence_classes = { ' \t\r\n', '([{', ')]}', '\'"`' } - vim.api.nvim_set_hl(0, 'LeapBackdrop', { fg = '#777777' }) - end, - }, - { 'windwp/nvim-autopairs', event = 'InsertEnter', config = true }, - { - -- 'numToStr/Comment.nvim', - 'os-mey/Comment.nvim', - branch = 'fix-inline-visual-linewise-comment', - keys = { - { 'gc', mode = { 'n', 'v' } }, - { 'gb', mode = { 'n', 'v' } }, - { '', mode = { 'n', 'v' } }, - { 'gcc', mode = 'n' }, - { 'gcb', mode = 'n' }, - }, - config = function() - require('Comment').setup() - local api = require('Comment.api') - local esc = vim.api.nvim_replace_termcodes('', true, false, true) - local toggle_linewise_selection = function() - vim.api.nvim_feedkeys(esc, 'nx', false) - api.toggle.linewise(vim.fn.visualmode()) - end - - -- means Ctrl slash, `_` is a `/` - vim.keymap.set('n', '', api.toggle.linewise.current, { noremap = true, silent = true }) - vim.keymap.set('v', '', toggle_linewise_selection, { noremap = true, silent = true }) - end, - }, - { - 'j-morano/buffer_manager.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - keys = { - { - 'e', - function() - require('buffer_manager.ui').toggle_quick_menu() - end, - }, - }, - }, -} -- cgit v1.3.1