From 6bef8f32b19778fdfe52f0eb39719425508dcc7b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 24 Apr 2025 11:36:39 +0300 Subject: Refactored nvim config to make it easier and less insanely nested --- .config/nvim/lua/custom/plugins/activity-watch.lua | 9 -- .config/nvim/lua/custom/plugins/alpha.lua | 69 ---------------- .config/nvim/lua/custom/plugins/auto-save.lua | 33 -------- .config/nvim/lua/custom/plugins/auto-session.lua | 29 ------- .config/nvim/lua/custom/plugins/buffer-manager.lua | 13 --- .config/nvim/lua/custom/plugins/buffer-vaccum.lua | 5 -- .config/nvim/lua/custom/plugins/bullets.lua | 4 - .config/nvim/lua/custom/plugins/ccc.lua | 13 --- .../nvim/lua/custom/plugins/clangd_extensions.lua | 38 --------- .../nvim/lua/custom/plugins/code-playground.lua | 7 -- .config/nvim/lua/custom/plugins/colorscheme.lua | 14 ---- .config/nvim/lua/custom/plugins/comment.lua | 25 ------ .config/nvim/lua/custom/plugins/conform.lua | 38 --------- .config/nvim/lua/custom/plugins/diffview.lua | 20 ----- .config/nvim/lua/custom/plugins/edgy.lua | 28 ------- .config/nvim/lua/custom/plugins/gitsigns.lua | 33 -------- .config/nvim/lua/custom/plugins/gopher.lua | 9 -- .config/nvim/lua/custom/plugins/harpoon.lua | 23 ------ .config/nvim/lua/custom/plugins/helpview.lua | 7 -- .../nvim/lua/custom/plugins/indent-blankline.lua | 11 --- .config/nvim/lua/custom/plugins/lazydev.lua | 12 --- .config/nvim/lua/custom/plugins/leap.lua | 15 ---- .config/nvim/lua/custom/plugins/lsp-signature.lua | 12 --- .config/nvim/lua/custom/plugins/lspsaga.lua | 44 ---------- .config/nvim/lua/custom/plugins/lualine.lua | 8 -- .../nvim/lua/custom/plugins/markdown-toggle.lua | 12 --- .config/nvim/lua/custom/plugins/mason.lua | 38 --------- .config/nvim/lua/custom/plugins/mini.lua | 16 ---- .config/nvim/lua/custom/plugins/neogen.lua | 5 -- .config/nvim/lua/custom/plugins/neogit.lua | 33 -------- .config/nvim/lua/custom/plugins/nvim-autopairs.lua | 11 --- .config/nvim/lua/custom/plugins/nvim-cmp.lua | 14 ---- .config/nvim/lua/custom/plugins/nvim-dap-ui.lua | 26 ------ .config/nvim/lua/custom/plugins/nvim-dap.lua | 58 ------------- .config/nvim/lua/custom/plugins/nvim-dbee.lua | 12 --- .config/nvim/lua/custom/plugins/nvim-java.lua | 5 -- .config/nvim/lua/custom/plugins/nvim-lint.lua | 41 ---------- .config/nvim/lua/custom/plugins/nvim-lspconfig.lua | 32 -------- .config/nvim/lua/custom/plugins/nvim-scrollbar.lua | 29 ------- .config/nvim/lua/custom/plugins/nvim-spectre.lua | 7 -- .config/nvim/lua/custom/plugins/nvim-surround.lua | 21 ----- .../nvim/lua/custom/plugins/nvim-treesitter.lua | 87 -------------------- .../nvim/lua/custom/plugins/nvim-ts-autotag.lua | 5 -- .config/nvim/lua/custom/plugins/octo.lua | 23 ------ .config/nvim/lua/custom/plugins/oil.lua | 40 --------- .config/nvim/lua/custom/plugins/overseer.lua | 49 ----------- .config/nvim/lua/custom/plugins/pretty-hover.lua | 5 -- .../nvim/lua/custom/plugins/render-markdown.lua | 16 ---- .config/nvim/lua/custom/plugins/rustaceanvim.lua | 8 -- .config/nvim/lua/custom/plugins/snacks.lua | 45 ---------- .config/nvim/lua/custom/plugins/sqls.lua | 3 - .config/nvim/lua/custom/plugins/suda.lua | 4 - .config/nvim/lua/custom/plugins/telescope.lua | 22 ----- .../lua/custom/plugins/tiny-inline-diagnostic.lua | 24 ------ .config/nvim/lua/custom/plugins/todo-comments.lua | 95 ---------------------- .config/nvim/lua/custom/plugins/trouble.lua | 40 --------- .config/nvim/lua/custom/plugins/undotree.lua | 14 ---- .config/nvim/lua/custom/plugins/vim-be-good.lua | 4 - .config/nvim/lua/custom/plugins/vim-illuminate.lua | 7 -- .../nvim/lua/custom/plugins/vim-tmux-navigator.lua | 9 -- .config/nvim/lua/custom/plugins/vim-wakatime.lua | 4 - 61 files changed, 1383 deletions(-) delete mode 100644 .config/nvim/lua/custom/plugins/activity-watch.lua delete mode 100644 .config/nvim/lua/custom/plugins/alpha.lua delete mode 100644 .config/nvim/lua/custom/plugins/auto-save.lua delete mode 100644 .config/nvim/lua/custom/plugins/auto-session.lua delete mode 100644 .config/nvim/lua/custom/plugins/buffer-manager.lua delete mode 100644 .config/nvim/lua/custom/plugins/buffer-vaccum.lua delete mode 100644 .config/nvim/lua/custom/plugins/bullets.lua delete mode 100644 .config/nvim/lua/custom/plugins/ccc.lua delete mode 100644 .config/nvim/lua/custom/plugins/clangd_extensions.lua delete mode 100644 .config/nvim/lua/custom/plugins/code-playground.lua delete mode 100644 .config/nvim/lua/custom/plugins/colorscheme.lua delete mode 100644 .config/nvim/lua/custom/plugins/comment.lua delete mode 100644 .config/nvim/lua/custom/plugins/conform.lua delete mode 100644 .config/nvim/lua/custom/plugins/diffview.lua delete mode 100644 .config/nvim/lua/custom/plugins/edgy.lua delete mode 100644 .config/nvim/lua/custom/plugins/gitsigns.lua delete mode 100644 .config/nvim/lua/custom/plugins/gopher.lua delete mode 100644 .config/nvim/lua/custom/plugins/harpoon.lua delete mode 100644 .config/nvim/lua/custom/plugins/helpview.lua delete mode 100644 .config/nvim/lua/custom/plugins/indent-blankline.lua delete mode 100644 .config/nvim/lua/custom/plugins/lazydev.lua delete mode 100644 .config/nvim/lua/custom/plugins/leap.lua delete mode 100644 .config/nvim/lua/custom/plugins/lsp-signature.lua delete mode 100644 .config/nvim/lua/custom/plugins/lspsaga.lua delete mode 100644 .config/nvim/lua/custom/plugins/lualine.lua delete mode 100644 .config/nvim/lua/custom/plugins/markdown-toggle.lua delete mode 100644 .config/nvim/lua/custom/plugins/mason.lua delete mode 100644 .config/nvim/lua/custom/plugins/mini.lua delete mode 100644 .config/nvim/lua/custom/plugins/neogen.lua delete mode 100644 .config/nvim/lua/custom/plugins/neogit.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-autopairs.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-cmp.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-dap-ui.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-dap.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-dbee.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-java.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-lint.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-lspconfig.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-scrollbar.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-spectre.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-surround.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-treesitter.lua delete mode 100644 .config/nvim/lua/custom/plugins/nvim-ts-autotag.lua delete mode 100644 .config/nvim/lua/custom/plugins/octo.lua delete mode 100644 .config/nvim/lua/custom/plugins/oil.lua delete mode 100644 .config/nvim/lua/custom/plugins/overseer.lua delete mode 100644 .config/nvim/lua/custom/plugins/pretty-hover.lua delete mode 100644 .config/nvim/lua/custom/plugins/render-markdown.lua delete mode 100644 .config/nvim/lua/custom/plugins/rustaceanvim.lua delete mode 100644 .config/nvim/lua/custom/plugins/snacks.lua delete mode 100644 .config/nvim/lua/custom/plugins/sqls.lua delete mode 100644 .config/nvim/lua/custom/plugins/suda.lua delete mode 100644 .config/nvim/lua/custom/plugins/telescope.lua delete mode 100644 .config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua delete mode 100644 .config/nvim/lua/custom/plugins/todo-comments.lua delete mode 100644 .config/nvim/lua/custom/plugins/trouble.lua delete mode 100644 .config/nvim/lua/custom/plugins/undotree.lua delete mode 100644 .config/nvim/lua/custom/plugins/vim-be-good.lua delete mode 100644 .config/nvim/lua/custom/plugins/vim-illuminate.lua delete mode 100644 .config/nvim/lua/custom/plugins/vim-tmux-navigator.lua delete mode 100644 .config/nvim/lua/custom/plugins/vim-wakatime.lua (limited to '.config/nvim/lua/custom/plugins') diff --git a/.config/nvim/lua/custom/plugins/activity-watch.lua b/.config/nvim/lua/custom/plugins/activity-watch.lua deleted file mode 100644 index 1fef86c..0000000 --- a/.config/nvim/lua/custom/plugins/activity-watch.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'lowitea/aw-watcher.nvim', - opts = { - aw_server = { - host = '127.0.0.1', - port = 5600, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/alpha.lua b/.config/nvim/lua/custom/plugins/alpha.lua deleted file mode 100644 index 00a7d56..0000000 --- a/.config/nvim/lua/custom/plugins/alpha.lua +++ /dev/null @@ -1,69 +0,0 @@ -return { - 'goolord/alpha-nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - cmd = "Alpha", - config = function() - local alpha = require('alpha') - local dashboard = require('alpha.themes.dashboard') - - local function get_natural_day(day) - local suffix = 'th' - local day_mod = day % 10 - - if day_mod == 1 and day ~= 11 then - suffix = 'st' - elseif day_mod == 2 and day ~= 12 then - suffix = 'nd' - elseif day_mod == 3 and day ~= 13 then - suffix = 'rd' - end - - return tostring(day) .. suffix - end - - local find_file_path = '$HOME' - local date = os.date('  %A, %B ') .. get_natural_day(tonumber(os.date('%d'))) - local plugins = '  ' .. require('lazy').stats().count .. ' plugins ' - local v = vim.version() - local version = '  v' .. v.major .. '.' .. v.minor .. '.' .. v.patch - local info_line = date .. plugins .. version - - -- WARN: Just hardcoded the length of the first line in the header - local header_length = #'  ' - local padding = (header_length - #info_line) / 2 - info_line = string.rep(' ', padding) .. info_line - - dashboard.section.header.val = { - [[  ]], - [[ ████ ██████ █████ ██ ██ ]], - [[ ███████████ █████ ███ ]], - [[ █████████ ███████████████████ ███ ███████████ ]], - [[ █████████ ███ █████████████ █████ ██████████████ ]], - [[ █████████ ██████████ █████████ █████ █████ ████ █████ ]], - [[ ███████████ ███ ███ █████████ █████ █████ ████ █████ ]], - [[ ██████ █████████████████████ ████ █████ █████ ████ ██████ ]], - [[ ]], - info_line, - } - - dashboard.section.buttons.opts.spacing = 0 - dashboard.section.buttons.val = { - dashboard.button('e', ' > New file', 'ene startinsert'), - dashboard.button('f', ' > Find file', 'cd ' .. find_file_path .. ' | Telescope find_files'), - dashboard.button('r', ' > Recent', 'Telescope oldfiles'), - dashboard.button('c', ' > Configuration', 'e $MYVIMRC | cd %:p:h'), - -- FIX: doesn't seem to work so great, probably just use a project manager - -- will most likely make my own project manager plugin - -- dashboard.button( - -- 's', - -- '󱎠 > Last Session', - -- 'lua require("auto-session.session-lens.actions").alternate_session()' - -- ), - dashboard.button('q', '󰈆 > Quit NVIM', 'qa'), - } - - dashboard.section.footer.val = require('alpha.fortune')() - - alpha.setup(dashboard.opts) - end, -} diff --git a/.config/nvim/lua/custom/plugins/auto-save.lua b/.config/nvim/lua/custom/plugins/auto-save.lua deleted file mode 100644 index 5da836b..0000000 --- a/.config/nvim/lua/custom/plugins/auto-save.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - 'okuuva/auto-save.nvim', - cmd = 'ASToggle', - event = { 'InsertLeave', 'TextChanged' }, - opts = function() - -- Disable autoformat between automatic saves - vim.api.nvim_create_autocmd('User', { - pattern = 'AutoSaveWritePre', - group = vim.api.nvim_create_augroup('autosave-pre', { clear = true }), - callback = function(opts) - local bufnr = opts.data.saved_buffer - vim.b[bufnr].disable_autoformat = true - end, - }) - - vim.api.nvim_create_autocmd('User', { - pattern = 'AutoSaveWritePost', - group = vim.api.nvim_create_augroup('autosave-post', { clear = true }), - callback = function(opts) - local bufnr = opts.data.saved_buffer - vim.b[bufnr].disable_autoformat = false - end, - }) - - return { - -- execution_message = { enabled = false }, removed - condition = function(buf) - -- Save only if the buffer is not a "special buffer" - return vim.fn.getbufvar(buf, '&buftype') == '' - end, - } - end, -} diff --git a/.config/nvim/lua/custom/plugins/auto-session.lua b/.config/nvim/lua/custom/plugins/auto-session.lua deleted file mode 100644 index cd8d7a4..0000000 --- a/.config/nvim/lua/custom/plugins/auto-session.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - '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() - if vim.fn.argc() == 0 then - vim.cmd('Alpha') - end - 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, -} diff --git a/.config/nvim/lua/custom/plugins/buffer-manager.lua b/.config/nvim/lua/custom/plugins/buffer-manager.lua deleted file mode 100644 index 6bce4b8..0000000 --- a/.config/nvim/lua/custom/plugins/buffer-manager.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - 'j-morano/buffer_manager.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - keys = { - { - 'bl', - function() - require('buffer_manager.ui').toggle_quick_menu() - end, - desc = '[B]uffer [L]ist', - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/buffer-vaccum.lua b/.config/nvim/lua/custom/plugins/buffer-vaccum.lua deleted file mode 100644 index b064b45..0000000 --- a/.config/nvim/lua/custom/plugins/buffer-vaccum.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'ChuufMaster/buffer-vacuum', - opts = { max_buffers = 6 }, - event = 'VeryLazy', -} diff --git a/.config/nvim/lua/custom/plugins/bullets.lua b/.config/nvim/lua/custom/plugins/bullets.lua deleted file mode 100644 index 5c81e75..0000000 --- a/.config/nvim/lua/custom/plugins/bullets.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - -- 'bullets-vim/bullets.vim', - -- event = { 'BufReadPre', 'BufNewFile' }, -} diff --git a/.config/nvim/lua/custom/plugins/ccc.lua b/.config/nvim/lua/custom/plugins/ccc.lua deleted file mode 100644 index 74c033e..0000000 --- a/.config/nvim/lua/custom/plugins/ccc.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - 'uga-rosa/ccc.nvim', - opts = { - highlighter = { auto_enable = true }, - -- highlight_mode = 'virtual', - -- virtual_pos = 'inline-right', - }, - event = 'VeryLazy', - keys = { - { 'cp', 'CccPick', desc = '[C]olor [P]icker' }, - { 'ct', 'CccHighlighterToggle', desc = '[C]olor [T]oggle' }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/clangd_extensions.lua b/.config/nvim/lua/custom/plugins/clangd_extensions.lua deleted file mode 100644 index 07f9dc0..0000000 --- a/.config/nvim/lua/custom/plugins/clangd_extensions.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - 'p00f/clangd_extensions.nvim', - dependencies = { 'microsoft/vscode-codicons' }, -- NOTE: for the ast icons - cmd = { - 'ClangdSwitchSourceHeader', - 'ClangdSetInlayHints', - 'ClangdDisableInlayHints', - 'ClangdToggleInlayHints', - 'ClangdAST', - 'ClangdSymbolInfo', - 'ClangdTypeHierarchy', - 'ClangdMemoryUsage', - }, - opts = { - inlay_hints = { - inline = false, - }, - ast = { - role_icons = { - type = '', - declaration = '', - expression = '', - specifier = '', - statement = '', - ['template argument'] = '', - }, - kind_icons = { - Compound = '', - Recovery = '', - TranslationUnit = '', - PackExpansion = '', - TemplateTypeParm = '', - TemplateTemplateParm = '', - TemplateParamObject = '', - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/code-playground.lua b/.config/nvim/lua/custom/plugins/code-playground.lua deleted file mode 100644 index 751de5b..0000000 --- a/.config/nvim/lua/custom/plugins/code-playground.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'GustavEikaas/code-playground.nvim', - lazy = false, - config = function() - require('code-playground').setup() - end, -} diff --git a/.config/nvim/lua/custom/plugins/colorscheme.lua b/.config/nvim/lua/custom/plugins/colorscheme.lua deleted file mode 100644 index 916eae2..0000000 --- a/.config/nvim/lua/custom/plugins/colorscheme.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - { - 'folke/tokyonight.nvim', - lazy = false, - priority = 1000, - config = function() - -- vim.cmd.colorscheme('tokyonight-night') - -- require('colorschemes.dapui').set() - -- vim.cmd.colorscheme('carbonight-tokyo') - vim.cmd.colorscheme('carbonight') - end, - }, - { dir = '~/projects/carbonight.nvim' }, -} diff --git a/.config/nvim/lua/custom/plugins/comment.lua b/.config/nvim/lua/custom/plugins/comment.lua deleted file mode 100644 index b61675a..0000000 --- a/.config/nvim/lua/custom/plugins/comment.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - -- '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, -} diff --git a/.config/nvim/lua/custom/plugins/conform.lua b/.config/nvim/lua/custom/plugins/conform.lua deleted file mode 100644 index fe3356f..0000000 --- a/.config/nvim/lua/custom/plugins/conform.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - 'stevearc/conform.nvim', - event = { 'BufWritePre' }, - cmd = { 'ConformInfo' }, - keys = { - { 'ft', 'FormatToggle', desc = '[F]ormat [T]oggle Globally' }, - { 'fT', 'FormatToggle!', desc = '[F]ormat [T]oggle Locally' }, - { 'ff', 'Format', desc = '[F]ormat [F]ile' }, - { 'f', 'Format', desc = '[F]ormat', mode = 'v' }, - }, - ---@module "conform" - ---@type conform.setupOpts - opts = { - formatters_by_ft = { - ['lua'] = { 'stylua' }, - ['c'] = { 'clang-format' }, - -- ['python'] = { 'isort', 'black' }, - -- ['rust'] = { 'rustfmt' }, - ['go'] = { 'gofumpt', 'goimports-reviser' }, - ['markdown'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['yaml'] = { 'prettierd' }, - ['json'] = { 'jq' }, - ['html'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['css'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['javascript'] = { 'prettierd', 'prettier', stop_after_first = true }, - ['typescript'] = { 'prettierd', 'prettier', stop_after_first = true }, - }, - format_on_save = function(bufnr) - -- Disable with a global or buffer local variable - if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then - return - end - return { timeout_ms = 500, lsp_fallback = true } - end, - notify_on_error = true, - lsp_fallback = true, - }, -} diff --git a/.config/nvim/lua/custom/plugins/diffview.lua b/.config/nvim/lua/custom/plugins/diffview.lua deleted file mode 100644 index 875e458..0000000 --- a/.config/nvim/lua/custom/plugins/diffview.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - 'sindrets/diffview.nvim', - cmd = { 'DiffviewOpen', 'DiffviewClose', 'DiffviewFileHistory' }, - keys = { - { 'gd', 'DiffviewOpen' }, - { 'gl', 'DiffviewFileHistory' }, - }, - opts = function() - local quit_keymap = { 'n', 'q', 'DiffviewClose', { desc = 'Quit the diffview' } } - return { - enhanced_diff_hl = true, - default = { winbar_info = true }, - keymaps = { - view = { quit_keymap }, - file_panel = { quit_keymap }, - file_history_panel = { quit_keymap }, - }, - } - end, -} diff --git a/.config/nvim/lua/custom/plugins/edgy.lua b/.config/nvim/lua/custom/plugins/edgy.lua deleted file mode 100644 index 872247f..0000000 --- a/.config/nvim/lua/custom/plugins/edgy.lua +++ /dev/null @@ -1,28 +0,0 @@ -return { - 'folke/edgy.nvim', - event = 'VeryLazy', - opts = { - bottom = { - 'Trouble', - { ft = 'qf', title = 'QuickFix' }, - { - ft = 'help', - size = { height = 20 }, - filter = function(buf) -- only show help buffers - return vim.bo[buf].buftype == 'help' - end, - }, - { ft = 'spectre_panel', size = { height = 0.4 } }, - }, - left = { - { - title = 'Neo-Tree', - ft = 'neo-tree', - filter = function(buf) - return vim.b[buf].neo_tree_source == 'filesystem' - end, - size = { height = 0.5 }, - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/gitsigns.lua b/.config/nvim/lua/custom/plugins/gitsigns.lua deleted file mode 100644 index 953cd80..0000000 --- a/.config/nvim/lua/custom/plugins/gitsigns.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - 'lewis6991/gitsigns.nvim', - cmd = 'Gitsigns', - -- INFO: Disabled lazy loading to see if the errors stop - -- Not sure if it's an issue with lazy loading or just a gitsigns bug - lazy = false, - config = function() - require('gitsigns').setup() - - local function stage_visual_chunk() - require('gitsigns').stage_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end - local function reset_visual_chunk() - require('gitsigns').reset_hunk({ vim.fn.line('.'), vim.fn.line('v') }) - end - - vim.keymap.set('n', 'gD', 'Gitsigns toggle_deleted', { desc = '[G]it [D]eleted' }) - vim.keymap.set('n', 'hp', 'Gitsigns preview_hunk', { desc = '[H]unk [P]review' }) - vim.keymap.set('n', 'hs', 'Gitsigns stage_hunk', { desc = '[H]unk [S]tage' }) - vim.keymap.set('n', 'hr', 'Gitsigns reset_hunk', { desc = '[H]unk [R]eset' }) - vim.keymap.set('v', 'hs', stage_visual_chunk, { desc = '[H]unk [S]tage' }) - vim.keymap.set('v', 'hr', reset_visual_chunk, { desc = '[H]unk [S]tage' }) - vim.keymap.set('n', 'hS', 'Gitsigns stage_buffer', { desc = '[S]tage Buffer' }) - vim.keymap.set('n', 'hR', 'Gitsigns reset_buffer', { desc = '[R]eset Buffer' }) - vim.keymap.set('n', 'hu', 'Gitsigns undo_stage_hunk', { desc = '[H]unk [U]ndo' }) - vim.keymap.set( - 'n', - 'gB', - 'Gitsigns toggle_current_line_blame', - { desc = '[G]it [B]lame Line' } - ) - end, -} diff --git a/.config/nvim/lua/custom/plugins/gopher.lua b/.config/nvim/lua/custom/plugins/gopher.lua deleted file mode 100644 index 4bbcc92..0000000 --- a/.config/nvim/lua/custom/plugins/gopher.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'olexsmir/gopher.nvim', - ft = 'go', - build = function() - vim.cmd.GoInstallDeps() - end, - ---@type gopher.Config - opts = {}, -} diff --git a/.config/nvim/lua/custom/plugins/harpoon.lua b/.config/nvim/lua/custom/plugins/harpoon.lua deleted file mode 100644 index 5627e2f..0000000 --- a/.config/nvim/lua/custom/plugins/harpoon.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - 'ThePrimeagen/harpoon', - branch = 'harpoon2', - dependencies = { 'nvim-lua/plenary.nvim' }, - keys = { '', 'a', '1', '2', '3', '4', '5' }, - config = function() - local harpoon = require('harpoon') - harpoon:setup() - - vim.keymap.set('n', 'a', function() - harpoon:list():add() - end) - vim.keymap.set('n', '', function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end) - - for i = 1, 9 do - vim.keymap.set('n', string.format('%d', i), function() - harpoon:list():select(i) - end) - end - end, -} diff --git a/.config/nvim/lua/custom/plugins/helpview.lua b/.config/nvim/lua/custom/plugins/helpview.lua deleted file mode 100644 index 098548b..0000000 --- a/.config/nvim/lua/custom/plugins/helpview.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'OXY2DEV/helpview.nvim', - ft = 'help', - dependencies = { - 'nvim-treesitter/nvim-treesitter', - }, -} diff --git a/.config/nvim/lua/custom/plugins/indent-blankline.lua b/.config/nvim/lua/custom/plugins/indent-blankline.lua deleted file mode 100644 index fb18add..0000000 --- a/.config/nvim/lua/custom/plugins/indent-blankline.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', - event = 'VeryLazy', - opts = { - scope = { - show_start = false, - show_end = false, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/lazydev.lua b/.config/nvim/lua/custom/plugins/lazydev.lua deleted file mode 100644 index 59d2366..0000000 --- a/.config/nvim/lua/custom/plugins/lazydev.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'folke/lazydev.nvim', - ft = 'lua', - cmd = 'LazyDev', - opts = { - library = { - { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, - { path = 'snacks.nvim', words = { 'Snacks' } }, - { path = 'lazy.nvim', words = { 'LazyVim' } }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/leap.lua b/.config/nvim/lua/custom/plugins/leap.lua deleted file mode 100644 index 6d1eeeb..0000000 --- a/.config/nvim/lua/custom/plugins/leap.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - 'ggandor/leap.nvim', - lazy = false, - dependencies = { 'tpope/vim-repeat' }, - config = function() - require('leap').opts.equivalence_classes = { ' \t\r\n', '([{', ')]}', '\'"`' } - vim.api.nvim_set_hl(0, 'LeapBackdrop', { fg = '#777777' }) - - vim.keymap.set({ 'n', 'x' }, 's', '(leap)') - vim.keymap.set('n', 'S', '(leap-from-window)') - vim.keymap.set('n', 's', require('leap.remote').action) - vim.keymap.set('o', 'z', '(leap-forward)') - vim.keymap.set('o', 'Z', '(leap-backward)') - end, -} diff --git a/.config/nvim/lua/custom/plugins/lsp-signature.lua b/.config/nvim/lua/custom/plugins/lsp-signature.lua deleted file mode 100644 index 718cd62..0000000 --- a/.config/nvim/lua/custom/plugins/lsp-signature.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - -- FIXME: fork the repo and fix the following issues - -- Make both insert and normal be toggelable rather than insert always showing and normal toggleable - 'ray-x/lsp_signature.nvim', - event = 'LspAttach', - opts = { - bind = true, -- This is mandatory, otherwise border config won't get registered. - handler_opts = { border = 'single' }, - doc_lines = 0, - hint_enable = false, - }, -} diff --git a/.config/nvim/lua/custom/plugins/lspsaga.lua b/.config/nvim/lua/custom/plugins/lspsaga.lua deleted file mode 100644 index a8fe588..0000000 --- a/.config/nvim/lua/custom/plugins/lspsaga.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - -- 'nvimdev/lspsaga.nvim', - 'Kyren223/lspsaga.nvim', - dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, - event = 'LspAttach', - opts = { - ui = { - border = 'rounded', - foldericon = false, - title = false, - kind = nil, - }, - hover = { open_cmd = '!firefox.exe' }, - diagnostic = { - show_layout = 'float', - keys = { - exec_action = 'o', - quit = 'q', - toggle_or_jump = '', - quit_in_show = { 'q', '' }, - }, - }, - code_action = { show_preview = false }, - lightbulb = { enable = false }, - rename = { - pre_hook = function() - pcall(function() - vim.cmd('IlluminateToggle') - end) - end, - post_hook = function() - pcall(function() - vim.cmd('IlluminateToggle') - end) - end, - keys = { - quit = '', - exec = '', - select = 'x', - }, - }, - symbol_in_winbar = { enable = false }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/lualine.lua b/.config/nvim/lua/custom/plugins/lualine.lua deleted file mode 100644 index f1e5ec5..0000000 --- a/.config/nvim/lua/custom/plugins/lualine.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons', 'linrongbin16/lsp-progress.nvim' }, - event = 'VeryLazy', - config = function() - require('custom.config.lualine') - end, -} diff --git a/.config/nvim/lua/custom/plugins/markdown-toggle.lua b/.config/nvim/lua/custom/plugins/markdown-toggle.lua deleted file mode 100644 index 39a932c..0000000 --- a/.config/nvim/lua/custom/plugins/markdown-toggle.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'roodolv/markdown-toggle.nvim', - event = 'VeryLazy', - config = function() - require('markdown-toggle').setup() - local opts = { silent = true, noremap = true } - local toggle = require('markdown-toggle') - vim.keymap.set({ 'n', 'x' }, 'tu', toggle.list, opts) - vim.keymap.set({ 'n', 'x' }, 'to', toggle.olist, opts) - vim.keymap.set({ 'n', 'x' }, 'tm', toggle.checkbox, opts) - end, -} diff --git a/.config/nvim/lua/custom/plugins/mason.lua b/.config/nvim/lua/custom/plugins/mason.lua deleted file mode 100644 index 9bbb01b..0000000 --- a/.config/nvim/lua/custom/plugins/mason.lua +++ /dev/null @@ -1,38 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - lazy = false, - opts = { - ui = { - icons = { - package_installed = '✓', - package_pending = '➜', - package_uninstalled = '✗', - }, - }, - }, - }, - { - 'WhoIsSethDaniel/mason-tool-installer.nvim', - lazy = false, - opts = { - ensure_installed = { - 'stylua', -- lua formatting - 'clang-format', -- C/C++ formatter - 'codelldb', -- C/C++ debugger - 'cpplint', -- C/C++ linter - -- 'black', -- python formatter - -- 'isort', -- python formatter for imports - -- 'flake8', -- python linter - 'gofumpt', -- go formatter - 'golangci-lint', -- go linter - 'prettierd', -- multi-lang formatter - 'prettier', -- prettierd but slower, used as a fallback - 'jq', -- json formatter - 'jsonlint', -- json linter - 'shellcheck', -- bash linter - 'beautysh', -- shell formatter - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/mini.lua b/.config/nvim/lua/custom/plugins/mini.lua deleted file mode 100644 index 61d04b6..0000000 --- a/.config/nvim/lua/custom/plugins/mini.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - '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', - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/neogen.lua b/.config/nvim/lua/custom/plugins/neogen.lua deleted file mode 100644 index fdefdbd..0000000 --- a/.config/nvim/lua/custom/plugins/neogen.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'danymat/neogen', - keys = { { 'ng', '<Neogen', desc = '[N]eo[G]en' } }, - opts = { snippet_engine = 'luasnip' }, -} diff --git a/.config/nvim/lua/custom/plugins/neogit.lua b/.config/nvim/lua/custom/plugins/neogit.lua deleted file mode 100644 index e1e164f..0000000 --- a/.config/nvim/lua/custom/plugins/neogit.lua +++ /dev/null @@ -1,33 +0,0 @@ -return { - 'NeogitOrg/neogit', - cmd = 'Neogit', - keys = { - { 'gb', 'Neogit branch' }, - { 'gs', 'Neogit' }, - { 'gL', 'Neogit log' }, - { 'gc', 'Neogit commit' }, - { 'gp', 'Neogit push' }, - { 'gP', 'Neogit pull' }, - { 'gr', 'Neogit rebase' }, - { 'gm', 'Neogit merge' }, - }, - opts = function() - return { - commit_editor = { spell_check = false }, - mappings = { - commit_editor = { - [''] = 'Submit', - [''] = 'Abort', - }, - commit_editor_I = { - [''] = 'Submit', - [''] = 'Abort', - }, - popup = { - ['p'] = 'PushPopup', - ['P'] = 'PullPopup', - }, - }, - } - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-autopairs.lua b/.config/nvim/lua/custom/plugins/nvim-autopairs.lua deleted file mode 100644 index 264004a..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-autopairs.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'windwp/nvim-autopairs', - event = 'InsertEnter', - opts = { - check_ts = true, - ts_config = { - lua = { 'string' }, -- don't add pairs inside lua strings - javascript = { 'template_string' }, -- FIX: remove me - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-cmp.lua b/.config/nvim/lua/custom/plugins/nvim-cmp.lua deleted file mode 100644 index 4860338..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-cmp.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - 'hrsh7th/nvim-cmp', - event = "InsertEnter", - dependencies = { - 'onsails/lspkind.nvim', -- icons for completion type - 'hrsh7th/cmp-path', -- complete filepaths - 'hrsh7th/cmp-nvim-lsp', -- lsp source for nvim-cmp - 'saadparwaiz1/cmp_luasnip', -- snippets source for nvim-cmp - { 'L3MON4D3/LuaSnip', build = 'make install_jsregexp' }, -- snippets plugin - }, - config = function() - require('custom.config.cmp') - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-dap-ui.lua b/.config/nvim/lua/custom/plugins/nvim-dap-ui.lua deleted file mode 100644 index cddad45..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-dap-ui.lua +++ /dev/null @@ -1,26 +0,0 @@ -return { - 'rcarriga/nvim-dap-ui', - dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' }, - event = 'VeryLazy', - config = function() - local dap = require('dap') - local dapui = require('dapui') - dapui.setup() - dap.listeners.before.attach.dapui_config = function() - dapui.open() - vim.cmd.Hardtime('disable') - end - dap.listeners.after.event_initialized['dapui_config'] = function() - dapui.open() - vim.cmd.Hardtime('disable') - end - dap.listeners.before.event_terminated['dapui_config'] = function() - dapui.close() - vim.cmd.Hardtime('enable') - end - dap.listeners.before.event_exited['dapui_config'] = function() - dapui.close() - vim.cmd.Hardtime('enable') - end - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-dap.lua b/.config/nvim/lua/custom/plugins/nvim-dap.lua deleted file mode 100644 index a6387dc..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-dap.lua +++ /dev/null @@ -1,58 +0,0 @@ -return { - 'mfussenegger/nvim-dap', - dependencies = { 'williamboman/mason.nvim' }, - -- NOTE:nvim-dap has no setup function - -- if there is just opts, lazy will attempt to call setup which causes an error - -- Having an empty config function makes lazy not call setup which fixes the issue - config = function() end, - opts = function() - -- Load dap keymaps - require('custom.config.dap-keymaps') - local dap = require('dap') - - -- Setup C/C++ dap - if not dap.adapters['codelldb'] then - dap.adapters['codelldb'] = { - type = 'server', - host = 'localhost', - port = '${port}', - executable = { - command = 'codelldb', - args = { - '--port', - '${port}', - }, - }, - } - end - for _, lang in ipairs({ 'c', 'cpp' }) do - dap.configurations[lang] = { - { - type = 'codelldb', - request = 'launch', - name = 'Launch file', - program = function() - if vim.g.dap_codelldb_exe then - return vim.fn.getcwd() .. '/' .. vim.g.dap_codelldb_exe - end - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - args = function() - if vim.g.dap_codelldb_args then - return vim.g.dap_codelldb_args - end - return {} - end, - cwd = '${workspaceFolder}', - }, - { - type = 'codelldb', - request = 'attach', - name = 'Attach to process', - pid = require('dap.utils').pick_process, - cwd = '${workspaceFolder}', - }, - } - end - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-dbee.lua b/.config/nvim/lua/custom/plugins/nvim-dbee.lua deleted file mode 100644 index 43baa80..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-dbee.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'kndndrj/nvim-dbee', - dependencies = { 'MunifTanjim/nui.nvim' }, - build = function() - -- Install tries to automatically detect the install method. - -- if it fails, try calling it with one of these parameters: - -- "curl", "wget", "bitsadmin", "go" - require('dbee').install() - end, - cmd = 'Dbee', - opts = {}, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-java.lua b/.config/nvim/lua/custom/plugins/nvim-java.lua deleted file mode 100644 index 4bd321d..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-java.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'nvim-java/nvim-java', - lazy = false, - opts = {} -} diff --git a/.config/nvim/lua/custom/plugins/nvim-lint.lua b/.config/nvim/lua/custom/plugins/nvim-lint.lua deleted file mode 100644 index 7bb3a16..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-lint.lua +++ /dev/null @@ -1,41 +0,0 @@ -return { - 'mfussenegger/nvim-lint', - lazy = false, - config = function() - local lint = require('lint') - lint.linters_by_ft = { - -- c = { 'clangtidy' }, - -- cpp = { 'clangtidy' }, - go = { 'golangcilint' }, - -- python = { 'flake8' }, - json = { 'jsonlint' }, - bash = { 'shellcheck' }, - } - - vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave', 'TextChanged', 'TextChangedI' }, { - group = vim.api.nvim_create_augroup('nvim-lint', { clear = true }), - callback = function() - require('lint').try_lint() - end, - }) - - -- NOTE: most if not all of clangt-idy warnings are - -- also reported by clangd, so this function filters clang-tidy warnings - -- to avoid duplication of warnings - -- local clangtidy_parser = lint.linters.clangtidy.parser - -- lint.linters.clangtidy.parser = function(output, bufnr, linter_cwd) - -- local diagnostics = clangtidy_parser(output, bufnr, linter_cwd) - -- diagnostics = vim.tbl_filter(function(diagnostic) - -- if diagnostic.severity == vim.diagnostic.severity.WARN then - -- return false - -- end - -- if diagnostic.severity == vim.diagnostic.severity.ERROR then - -- return false - -- end - -- - -- return true - -- end, diagnostics) - -- return diagnostics - -- end - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-lspconfig.lua b/.config/nvim/lua/custom/plugins/nvim-lspconfig.lua deleted file mode 100644 index 0b358fe..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-lspconfig.lua +++ /dev/null @@ -1,32 +0,0 @@ -return { - -- NOTE: Make sure the order is as follows: - -- Mason loads -> Mason lspconfig loads -> Lspconfig loads - 'neovim/nvim-lspconfig', - event = { 'BufReadPre', 'BufNewFile' }, - dependencies = { - 'hrsh7th/cmp-nvim-lsp', - { 'antosha417/nvim-lsp-file-operations', conifg = true }, - { - 'williamboman/mason-lspconfig.nvim', - build = ':MasonUpdate', - config = function() - local language_servers = require('custom.config.language-servers') - local ensure_installed = vim.tbl_filter(function(key) - local server = language_servers[key] - if type(server) == 'table' then - if server.mason ~= nil then - return server.mason - end - return true - else - return server - end - end, vim.tbl_keys(language_servers)) - require('mason-lspconfig').setup({ ensure_installed = ensure_installed, auto_install = true }) - end, - }, - }, - config = function() - require('custom.config.lsp') - end, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-scrollbar.lua b/.config/nvim/lua/custom/plugins/nvim-scrollbar.lua deleted file mode 100644 index f475ac7..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-scrollbar.lua +++ /dev/null @@ -1,29 +0,0 @@ -return { - 'petertriho/nvim-scrollbar', - event = 'VeryLazy', - opts = { - marks = { - Search = { - text = { '', '' }, - }, - Error = { - text = { '', '' }, - }, - Warn = { - text = { '', '' }, - }, - Info = { - text = { '', '' }, - }, - Hint = { - text = { '', '' }, - }, - Misc = { - text = { '', '' }, - }, - }, - handlers = { - cursor = false, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-spectre.lua b/.config/nvim/lua/custom/plugins/nvim-spectre.lua deleted file mode 100644 index df58de9..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-spectre.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - -- 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, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-surround.lua b/.config/nvim/lua/custom/plugins/nvim-surround.lua deleted file mode 100644 index 54d8754..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-surround.lua +++ /dev/null @@ -1,21 +0,0 @@ -return { - 'kylechui/nvim-surround', - version = '*', - keys = { - { 'ys' }, - { 'yss' }, - { 'S' }, - { 'cs' }, - { 'ds' }, - { '(', '(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' }, - { '`', '(nvim-surround-visual)`', mode = 'v' }, - { '"', '(nvim-surround-visual)"', mode = 'v' }, - { "'", "(nvim-surround-visual)'", mode = 'v' }, - }, - opts = {}, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-treesitter.lua b/.config/nvim/lua/custom/plugins/nvim-treesitter.lua deleted file mode 100644 index 96ac728..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-treesitter.lua +++ /dev/null @@ -1,87 +0,0 @@ -return { - { - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - config = function() - ---@type userdata - ---@diagnostic disable-next-line: missing-fields - require('nvim-treesitter.configs').setup({ - auto_install = true, - highlight = { enable = true }, - indent = { enable = true }, - rainbow = { - enable = true, - extended_mode = true, - max_file_lines = nil, - }, - }) - - -- HACK: Workaround to have syntax highlighting in zsh until a zsh parser is added - -- https://github.com/nvim-treesitter/nvim-treesitter/issues/655 - local ft_to_lang = require('nvim-treesitter.parsers').ft_to_lang - ---@diagnostic disable-next-line: duplicate-set-field - require('nvim-treesitter.parsers').ft_to_lang = function(ft) - if ft == 'zsh' then - return 'bash' - end - return ft_to_lang(ft) - end - end, - }, - { - 'nvim-treesitter/nvim-treesitter-textobjects', - event = 'VeryLazy', - dependencies = { 'nvim-treesitter/nvim-treesitter' }, - config = function() - ---@diagnostic disable-next-line: missing-fields - require('nvim-treesitter.configs').setup({ - textobjects = { - select = { - enable = true, - lookahead = true, -- automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['af'] = { query = '@function.outer', desc = 'Select entire function' }, - ['if'] = { query = '@function.inner', desc = 'Select function body' }, - ['ac'] = { query = '@class.outer', desc = 'Select entire class' }, - ['ic'] = { query = '@class.inner', desc = 'Select class body' }, - -- ['as'] = { query = '@scope', query_group = 'locals', desc = 'Select language scope' }, - ['ia'] = { query = '@assignment.rhs', desc = 'Select assignment rhs' }, - ['ip'] = { query = '@parameter.inner', desc = 'Select parameter' }, - }, - selection_modes = { - ['@parameter.outer'] = 'v', -- charwise - ['@function.outer'] = 'V', -- linewise - ['@class.outer'] = '', -- blockwise - ['@assignment.rhs'] = 'v', -- charwise - }, - }, - swap = { - enable = true, - swap_next = { - ['sa'] = { query = '@parameter.inner', desc = 'Swap Argument (next)' }, - }, - swap_previous = { - ['sA'] = { query = '@parameter.inner', desc = 'Swap Argument (prev)' }, - }, - }, - }, - }) - - local ts_repeat_move = require('nvim-treesitter.textobjects.repeatable_move') - -- Repeat movement with ; and , - vim.keymap.set({ 'n', 'x', 'o' }, ';', ts_repeat_move.repeat_last_move_next) - vim.keymap.set({ 'n', 'x', 'o' }, ',', ts_repeat_move.repeat_last_move_previous) - - -- NOTE: You need this, otherwise the normal ; and , won't work for fFtT - vim.keymap.set({ 'n', 'x', 'o' }, 'f', ts_repeat_move.builtin_f_expr, { expr = true }) - vim.keymap.set({ 'n', 'x', 'o' }, 'F', ts_repeat_move.builtin_F_expr, { expr = true }) - vim.keymap.set({ 'n', 'x', 'o' }, 't', ts_repeat_move.builtin_t_expr, { expr = true }) - vim.keymap.set({ 'n', 'x', 'o' }, 'T', ts_repeat_move.builtin_T_expr, { expr = true }) - end, - }, - -- NOTE: Might conflict with treeobj but it adds IQ and AQ for any quotes which is cool - -- The rest can probably be disabled, but I will try it out and only disable if it annoys me - -- Also it does (/{ etc ignore whitespace but )/} don't, which is interesting ig - -- { 'echasnovski/mini.ai', version = false, opts = {}, lazy = false }, -} diff --git a/.config/nvim/lua/custom/plugins/nvim-ts-autotag.lua b/.config/nvim/lua/custom/plugins/nvim-ts-autotag.lua deleted file mode 100644 index e806a45..0000000 --- a/.config/nvim/lua/custom/plugins/nvim-ts-autotag.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'windwp/nvim-ts-autotag', - event = { 'BufReadPre', 'BufNewFile' }, - opts = { opts = { enable_close_on_slash = true } }, -} diff --git a/.config/nvim/lua/custom/plugins/octo.lua b/.config/nvim/lua/custom/plugins/octo.lua deleted file mode 100644 index 26c1dbb..0000000 --- a/.config/nvim/lua/custom/plugins/octo.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - 'pwntester/octo.nvim', - cmd = 'Octo', - keys = { - { 'gi', 'Octo issue search', desc = '[G]ithub [I]ssues (local)' }, - { 'pr', 'Octo pr search', desc = 'Github [PR]s (local)' }, - { 'gI', 'Octo search is:issue is:open author:@me', desc = '[G]ithub [I]ssues (global)' }, - { 'pR', 'Octo search is:pr author:@me', desc = 'Github [PR]s (global)' }, - }, - config = function() - require('octo').setup({ suppress_missing_scope = { projects_v2 = true } }) - - vim.treesitter.language.register('markdown', 'octo') - vim.api.nvim_create_autocmd('FileType', { - pattern = 'octo', - callback = function() - -- Autocomplete for @ (user mention) and # (issue) - vim.keymap.set('i', '@', '@', { silent = true, buffer = true }) - vim.keymap.set('i', '#', '#', { silent = true, buffer = true }) - end, - }) - end, -} diff --git a/.config/nvim/lua/custom/plugins/oil.lua b/.config/nvim/lua/custom/plugins/oil.lua deleted file mode 100644 index 7b7521d..0000000 --- a/.config/nvim/lua/custom/plugins/oil.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - 'stevearc/oil.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, - keys = { { 'fo', 'Oil', desc = '[F]ilesystem [O]il' } }, - opts = { - delete_to_trash = true, - default_file_explorer = true, - skip_confirm_for_simple_edits = true, - keymaps = { - ['gs'] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = 'actions.select_split', - [''] = 'actions.select_vsplit', - [''] = 'actions.refresh', - ['Q'] = 'actions.close', - ['gS'] = 'actions.change_sort', - ['gy'] = 'actions.copy_to_system_clipboard', - ['gp'] = 'actions.paste_from_system_clipboard', - }, - view_options = { - show_hidden = true, - natural_order = true, - }, - - lsp_file_methods = { - -- Enable or disable LSP file operations - enabled = true, - -- Time to wait for LSP file operations to complete before skipping - timeout_ms = 1000, - -- Set to true to autosave buffers that are updated with LSP willRenameFiles - -- Set to "unmodified" to only save unmodified buffers - autosave_changes = false, - }, - }, - cmd = 'Oil', - event = 'VimEnter', -} diff --git a/.config/nvim/lua/custom/plugins/overseer.lua b/.config/nvim/lua/custom/plugins/overseer.lua deleted file mode 100644 index bd27efc..0000000 --- a/.config/nvim/lua/custom/plugins/overseer.lua +++ /dev/null @@ -1,49 +0,0 @@ -return { - 'stevearc/overseer.nvim', - -- NOTE: without telescope the UI is not custom, so making sure telescope is loaded first - dependencies = { 'nvim-telescope/telescope.nvim' }, - -- event = 'VeryLazy', - keys = function() - local overseer = require('overseer') - local RUN_TAG = overseer.TAG.RUN - local BUILD_TAG = overseer.TAG.BUILD - local TEST_TAG = overseer.TAG.TEST - local function run_template(tag, show_prompt) - return function() - local prompt = show_prompt and 'always' or 'avoid' - overseer.run_template({ tags = { tag }, first = true, prompt = prompt }) - -- overseer.open({ enter = false }) -- don't focus - end - end - return { - { 'or', run_template(RUN_TAG, false), desc = '[O]verseer [R]un' }, - { 'oR', run_template(RUN_TAG, true), desc = '[O]verseer [R]un (with params)' }, - - { 'ob', run_template(BUILD_TAG, false), desc = '[O]verseer [B]uild' }, - { 'oB', run_template(BUILD_TAG, true), desc = '[O]verseer [B]uild (with params)' }, - - { 'ot', run_template(TEST_TAG, false), desc = '[O]verseer [T]est' }, - { 'oT', run_template(TEST_TAG, true), desc = '[O]verseer [T]est (with params)' }, - - { 'ow', 'OverseerToggle!', desc = '[O]verseer [W]indow (toggle)' }, - { 'oW', 'OverseerQuickAction open float', desc = '[O]verseer [W]indow (terminal float)' }, - } - end, - opts = { - templates = { 'builtin', 'custom' }, - task_list = { - min_height = 0.5, - bindings = { - ['o'] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = false, - [''] = 'ScrollOutputUp', - [''] = 'ScrollOutputDown', - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/pretty-hover.lua b/.config/nvim/lua/custom/plugins/pretty-hover.lua deleted file mode 100644 index 5be5381..0000000 --- a/.config/nvim/lua/custom/plugins/pretty-hover.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - 'Fildo7525/pretty_hover', - event = 'LspAttach', - opts = {}, -} diff --git a/.config/nvim/lua/custom/plugins/render-markdown.lua b/.config/nvim/lua/custom/plugins/render-markdown.lua deleted file mode 100644 index a7ae2b7..0000000 --- a/.config/nvim/lua/custom/plugins/render-markdown.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - 'MeanderingProgrammer/render-markdown.nvim', - event = { 'BufReadPre', 'BufNewFile' }, - keys = { - { 'mt', '<RenderMarkdown toggle'} - }, - opts = { - render_modes = true, - sign = { enabled = false }, - bullet = { icons = { '', '◆' } }, - checkbox = { - unchecked = { icon = ' ' }, - checked = { icon = ' ' }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/rustaceanvim.lua b/.config/nvim/lua/custom/plugins/rustaceanvim.lua deleted file mode 100644 index 4f509a2..0000000 --- a/.config/nvim/lua/custom/plugins/rustaceanvim.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - 'mrcjkb/rustaceanvim', - version = '^5', - lazy = false, -- already lazy - init = function () - require("custom.config.rustaceanvim") - end -} diff --git a/.config/nvim/lua/custom/plugins/snacks.lua b/.config/nvim/lua/custom/plugins/snacks.lua deleted file mode 100644 index 50f4ff2..0000000 --- a/.config/nvim/lua/custom/plugins/snacks.lua +++ /dev/null @@ -1,45 +0,0 @@ -return { - 'folke/snacks.nvim', - priority = 1000, - lazy = false, - ---@type snacks.Config - opts = { - image = {}, - ---@class snacks.notifier.Config - notifier = { - ---@type snacks.notifier.style - style = 'compact', - filter = function(notif) - local filtered_messages = { 'No information available', 'No code actions available' } - for _, msg in ipairs(filtered_messages) do - if notif.msg == msg then - return false - end - end - return true - end, - }, - }, - keys = { - { - 'si', - function() - Snacks.image.hover() - end, - }, - { - 'nd', - function() - Snacks.notifier.hide() - end, - desc = '[N]otifications [D]ismiss All', - }, - { - 'nh', - function() - Snacks.notifier.show_history() - end, - desc = '[N]otifications [D]ismiss All', - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/sqls.lua b/.config/nvim/lua/custom/plugins/sqls.lua deleted file mode 100644 index a060415..0000000 --- a/.config/nvim/lua/custom/plugins/sqls.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - 'nanotee/sqls.nvim', -} diff --git a/.config/nvim/lua/custom/plugins/suda.lua b/.config/nvim/lua/custom/plugins/suda.lua deleted file mode 100644 index 39866cd..0000000 --- a/.config/nvim/lua/custom/plugins/suda.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'lambdalisue/vim-suda', - event = { 'BufReadPre', 'BufNewFile' }, -} diff --git a/.config/nvim/lua/custom/plugins/telescope.lua b/.config/nvim/lua/custom/plugins/telescope.lua deleted file mode 100644 index af0534b..0000000 --- a/.config/nvim/lua/custom/plugins/telescope.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - 'nvim-telescope/telescope.nvim', - tag = '0.1.5', - dependencies = { - 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, - 'nvim-telescope/telescope-ui-select.nvim', - }, - cmd = 'Telescope', - config = function() - require('custom.config.telescope') - end, - keys = { - 'fs', - 'fa', - 'fh', - 'fm', - 'lv', - 'f.', - 'th', - }, -} diff --git a/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua b/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua deleted file mode 100644 index 620f20f..0000000 --- a/.config/nvim/lua/custom/plugins/tiny-inline-diagnostic.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - 'rachartier/tiny-inline-diagnostic.nvim', - event = { 'BufReadPre', 'BufNewFile' }, - opts = { - options = { - -- Throttle the update of the diagnostic when moving cursor, in milliseconds. - -- You can increase it if you have performance issues. - -- Or set it to 0 to have better visuals. - throttle = 0, - - -- The minimum length of the message, otherwise it will be on a new line. - softwrap = 15, - - -- If multiple diagnostics are under the cursor, display all of them. - multiple_diag_under_cursor = true, - - --- Enable it if you want to always have message with `after` characters length. - break_line = { - enabled = false, - after = 30, - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/todo-comments.lua b/.config/nvim/lua/custom/plugins/todo-comments.lua deleted file mode 100644 index 799afd8..0000000 --- a/.config/nvim/lua/custom/plugins/todo-comments.lua +++ /dev/null @@ -1,95 +0,0 @@ --- NORMAL: lorem ipsum --- TODO: lorem ipsum --- FIX: lorem ipsum --- OPTIMIZE: lorem ipsum --- WARN: lorem ipsum --- PERF: lorem ipsum --- HACK: lorem ipsum --- NOTE: lorem ipsum --- TEST: lorem ipsum --- UNSAFE: lorem ipsum -return { - 'folke/todo-comments.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - event = 'VeryLazy', - keys = { - { 'st', 'TodoTelescope keywords=TODO,FIX', desc = '[S]earch [T]odos' }, - { 'lt', 'TodoTrouble', desc = '[L]ist [T]odos' }, - }, - config = function() - require('todo-comments').setup({ - signs = false, -- show icons in the signs column - sign_priority = 8, -- sign priority - keywords = { - -- NOTE: These are "todos" - TODO = { icon = ' ', color = 'info', alt = { 'todo' } }, - FIX = { icon = ' ', color = 'error', alt = { 'FIXME', 'BUG', 'ISSUE' } }, - OPTIMIZE = { icon = ' ', color = 'performance' }, - -- NOTE: These are "notes" - WARN = { icon = ' ', color = 'warning', alt = { 'WARNING' } }, - PERF = { icon = ' ', color = 'performance', alt = { 'PERFORMANCE' } }, - HACK = { icon = ' ', color = 'warning', alt = { 'SMELL', 'CODE SMELL', 'BAD', 'BAD PRACTICE' } }, - NOTE = { icon = ' ', color = 'hint', alt = { 'INFO' } }, - TEST = { icon = '󰙨 ', color = 'test', alt = { 'TESTING', 'PASSED', 'FAILED' } }, - UNSAFE = { icon = '󰍛 ', color = 'error', alt = { 'SAFETY' } }, - }, - gui_style = { - fg = 'NONE', - bg = 'BOLD', - }, - merge_keywords = true, -- when true, custom keywords will be merged with the defaults - -- highlighting of the line containing the todo comment - -- * before: highlights before the keyword (typically comment characters) - -- * keyword: highlights of the keyword - -- * after: highlights after the keyword (todo text) - highlight = { - multiline = true, - multiline_pattern = '^.', -- lua pattern to match the next multiline from the start of the matched keyword - multiline_context = 10, -- extra lines that will be re-evaluated when changing a line - before = '', -- "fg" or "bg" or empty - keyword = 'wide', -- "fg", "bg", "wide", "wide_bg", "wide_fg" or empty. (wide and wide_bg is the same as bg, but will also highlight surrounding characters, wide_fg acts accordingly but with fg) - after = 'fg', -- "fg" or "bg" or empty - -- TODO(): - pattern = { - -- [[.*<(KEYWORDS)\s*(.*)?\s*:]], -- default - [[.*<(KEYWORDS)\s*:]], -- default - [[.*<(KEYWORDS)\s*!?\(\):]], -- keyword!() syntax - -- [[.*<(KEYWORDS)\s*\(.*\):]], -- keyword(anything) syntax - [[.*<(KEYWORDS)\s* ?\(.*\):]], -- keyword(anything) syntax - [[.*<(KEYWORDSky)\s*:]], -- keyword(anything) syntax - }, -- pattern or table of patterns, used for highlighting (vim regex) - comments_only = false, - max_line_len = 400, - exclude = {}, -- list of excluded filetypes - }, - -- list of named colors where we try to extract the gui fg from the - -- list of highlight groups or use the hex color if hl not found as a fallback - colors = { - default = { 'Identifier', '#7C3AED' }, - error = { 'DiagnosticError', 'ErrorMsg', '#DC2626' }, - warning = { 'DiagnosticWarn', 'WarningMsg', '#FBBF24' }, - info = { 'DiagnosticInfo', '#2563EB' }, - hint = { '#10B981' }, - test = { 'Identifier', '#FF00FF' }, - performance = { '#7C3AED' }, - }, - search = { - command = 'rg', - args = { - '--color=never', - '--no-heading', - '--with-filename', - '--line-number', - '--column', - -- "--hidden", -- show todos in hidden directories and files - '--follow', -- follow symlinks - }, - -- regex that will be used to match keywords. - -- don't replace the (KEYWORDS) placeholder - pattern = [[\b(KEYWORDS)(?:\(([^)]*)\))?:]], -- supports optional `(anything)` before colon - -- pattern = [[\b(KEYWORDS):]], -- default - -- pattern = [[\b(KEYWORDS)\b]], -- no colon - }, - }) - end, -} diff --git a/.config/nvim/lua/custom/plugins/trouble.lua b/.config/nvim/lua/custom/plugins/trouble.lua deleted file mode 100644 index 3239aa7..0000000 --- a/.config/nvim/lua/custom/plugins/trouble.lua +++ /dev/null @@ -1,40 +0,0 @@ -return { - 'folke/trouble.nvim', - opts = {}, - cmd = 'Trouble', - -- TODO: Consider maybe using this for outlines (code structure) - -- and also configuring some of the keys to better fit me - -- and probably removing most of them in the process - keys = { - { - 'xx', - 'Trouble diagnostics toggle', - desc = 'Diagnostics (Trouble)', - }, - { - 'xX', - 'Trouble diagnostics toggle filter.buf=0', - desc = 'Buffer Diagnostics (Trouble)', - }, - { - 'cs', - 'Trouble symbols toggle focus=false', - desc = 'Symbols (Trouble)', - }, - { - 'cl', - 'Trouble lsp toggle focus=false win.position=right', - desc = 'LSP Definitions / references / ... (Trouble)', - }, - { - 'xL', - 'Trouble loclist toggle', - desc = 'Location List (Trouble)', - }, - { - 'xQ', - 'Trouble qflist toggle', - desc = 'Quickfix List (Trouble)', - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/undotree.lua b/.config/nvim/lua/custom/plugins/undotree.lua deleted file mode 100644 index cbbeffb..0000000 --- a/.config/nvim/lua/custom/plugins/undotree.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - '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, -} diff --git a/.config/nvim/lua/custom/plugins/vim-be-good.lua b/.config/nvim/lua/custom/plugins/vim-be-good.lua deleted file mode 100644 index 03fd98f..0000000 --- a/.config/nvim/lua/custom/plugins/vim-be-good.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'ThePrimeagen/vim-be-good', - cmd = 'VimBeGood', -} diff --git a/.config/nvim/lua/custom/plugins/vim-illuminate.lua b/.config/nvim/lua/custom/plugins/vim-illuminate.lua deleted file mode 100644 index 69091db..0000000 --- a/.config/nvim/lua/custom/plugins/vim-illuminate.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'RRethy/vim-illuminate', - event = 'LspAttach', - keys = { - { 'it', 'IlluminateToggle', desc = '[I]lluminate [Tloggle]' }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/vim-tmux-navigator.lua b/.config/nvim/lua/custom/plugins/vim-tmux-navigator.lua deleted file mode 100644 index de08d82..0000000 --- a/.config/nvim/lua/custom/plugins/vim-tmux-navigator.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'christoomey/vim-tmux-navigator', - keys = { - { '', 'TmuxNavigateLeft', mode = { 'n', 'i' } }, - { '', 'TmuxNavigateDown', mode = { 'n', 'i' } }, - { '', 'TmuxNavigateUp', mode = { 'n', 'i' } }, - { '', 'TmuxNavigateRight', mode = { 'n', 'i' } }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/vim-wakatime.lua b/.config/nvim/lua/custom/plugins/vim-wakatime.lua deleted file mode 100644 index 515c6d0..0000000 --- a/.config/nvim/lua/custom/plugins/vim-wakatime.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - 'wakatime/vim-wakatime', - event = 'VeryLazy', -} -- cgit v1.3.1