diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-05-13 19:32:22 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-05-13 19:32:22 -0400 |
| commit | 2f3f91682f7b4a33f1791781bfa8eca4f7c9527a (patch) | |
| tree | eaf91e90301d87363bcb22dcd5c2253e0b0bad6d /archive/.config/nvim/lua | |
| parent | be8c956b0e819f2db0c6ae3598b6590b62982a83 (diff) | |
new system on gentoo
Diffstat (limited to 'archive/.config/nvim/lua')
22 files changed, 559 insertions, 0 deletions
diff --git a/archive/.config/nvim/lua/autocmds.lua b/archive/.config/nvim/lua/autocmds.lua new file mode 100644 index 0000000..bff808a --- /dev/null +++ b/archive/.config/nvim/lua/autocmds.lua @@ -0,0 +1,22 @@ +-- Wrap and check for spell in text filetypes. +vim.api.nvim_create_autocmd('FileType', { + group = vim.api.nvim_create_augroup('wrap_spell', { clear = true }), + pattern = { 'gitcommit', 'markdown' }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.spell = true + end, +}) + +-- Go to last loc when opening a buffer. +vim.api.nvim_create_autocmd('BufReadPost', { + group = vim.api.nvim_create_augroup('last_loc', { clear = true }), + callback = function() + local mark = vim.api.nvim_buf_get_mark(0, '"') + local lcount = vim.api.nvim_buf_line_count(0) + if mark[1] > 0 and mark[1] <= lcount then + -- Protected call to catch errors. + pcall(vim.api.nvim_win_set_cursor, 0, mark) + end + end, +}) diff --git a/archive/.config/nvim/lua/keymaps.lua b/archive/.config/nvim/lua/keymaps.lua new file mode 100644 index 0000000..7b5a27a --- /dev/null +++ b/archive/.config/nvim/lua/keymaps.lua @@ -0,0 +1,49 @@ +-- Remap for dealing with word wrap +vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + +-- Move to window using the <C-hjkl> keys +vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Switch to left window' }) +vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Switch to lower window' }) +vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'Switch to upper window' }) +vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = 'Switch to right window' }) + +-- Quickfix list +vim.keymap.set('n', '[q', vim.cmd.cprev, { desc = 'Previous quickfix item' }) +vim.keymap.set('n', ']q', vim.cmd.cnext, { desc = 'Next quickfix item' }) + +-- Diagnostics +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to prev diagnostic message' }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) +vim.keymap.set('n', 'gl', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) +vim.keymap.set('n', '<leader>q', vim.diagnostic.setqflist, { desc = 'Open diagnostic quickfix list' }) + +-- Nagivation in insert +vim.keymap.set({'i', 'c'}, '<C-h>', '<Left>', { desc = "Forward char" }) +vim.keymap.set({'i', 'c'}, '<C-j>', '<C-o>gj', { desc = "Up char" }) +vim.keymap.set({'i', 'c'}, '<C-k>', '<C-o>gk', { desc = "Down char" }) +vim.keymap.set({'i', 'c'}, '<C-l>', '<Right>', { desc = "Backward char" }) + +-- <C-g> to exit +vim.keymap.set({'i', 'n', 'v', 'c'}, '<C-g>', '<Esc>', { desc = "Exit mode" }) +vim.cmd('cmap <C-g> <C-c>') + +-- C-d to delete +vim.keymap.set('i', '<C-d>', '<Del>', { desc = "Delete forward char"}) + +-- Jump forward and back +vim.keymap.set('n', '<C-l>', '$', { desc = "Delete forward char"}) +vim.keymap.set('n', '<C-h>', '_', { desc = "Delete forward char"}) + +-- File managerment +vim.keymap.set('n', '<leader>e', ':e <C-R>=expand("%:p:h") . "/"<CR>', { desc = 'Open file in current directory' }) + +-- Insert at correct tab +vim.keymap.set("n", "i", function() + local line = vim.api.nvim_get_current_line() + if #line == 0 then + return [["_cc]] + else + return "i" + end +end, { expr = true, noremap = true }) diff --git a/archive/.config/nvim/lua/options.lua b/archive/.config/nvim/lua/options.lua new file mode 100644 index 0000000..d0adefb --- /dev/null +++ b/archive/.config/nvim/lua/options.lua @@ -0,0 +1,40 @@ +-- tabs +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 0 +vim.opt.expandtab = false +vim.opt.autoindent = true +vim.opt.smartindent = true +-- display cursor at front of tabs +vim.opt.list = true +vim.opt.listchars = { tab = " " } + +vim.opt.shortmess:append { s = true, I = true } + +vim.g.mapleader = ' ' +vim.g.maplocalleader = '\\' + +-- line numbers +vim.opt.signcolumn="number" +vim.opt.number=true +vim.opt.fillchars:append({ eob = " " }) +vim.opt.scrolloff = 7 + +vim.opt.splitright = true + +vim.opt.cinoptions:append("g0") +vim.opt.cinoptions:append("L0") + +vim.opt.cursorline = true + +vim.diagnostic.config({ + virtual_text = true, +}) + +-- undo +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir" +vim.opt.undofile = true + +-- misc +vim.opt.updatetime = 700 diff --git a/archive/.config/nvim/lua/plugins/cmp.lua b/archive/.config/nvim/lua/plugins/cmp.lua new file mode 100644 index 0000000..f515e17 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/cmp.lua @@ -0,0 +1,53 @@ +return { + 'hrsh7th/nvim-cmp', + event = { 'InsertEnter', 'CmdlineEnter' }, + dependencies = { + 'saadparwaiz1/cmp_luasnip', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/cmp-path', + }, + opts = function() + local cmp = require('cmp') + local select_opts = {behavior = cmp.SelectBehavior.Select} + + return { + snippet = { + expand = function(args) + require('luasnip').lsp_expand(args.body) + end, + }, + mapping = { + ['<C-p>'] = cmp.mapping.select_prev_item(select_opts), + ['<C-n>'] = cmp.mapping.select_next_item(select_opts), + ['<C-u>'] = cmp.mapping.scroll_docs(-4), + ['<C-d>'] = cmp.mapping.scroll_docs(4), + ['<C-e>'] = cmp.mapping.abort(), + ['<Tab>'] = cmp.mapping.confirm({select = true}), + }, + sources = cmp.config.sources({ + { name = 'nvim_lsp', max_item_count = 5, keyword_length = 1 }, + { name = "luasnip", max_item_count = 5, keyword_length = 2 }, + }, { + { name = 'buffer', max_item_count = 2, keyword_length = 3 }, + }, { + { name = 'path', max_item_count = 2 }, + }), + sorting = { + comparators = { + cmp.config.compare.offset, + cmp.config.compare.exact, + --cmp.config.compare.scopes, + cmp.config.compare.score, + + cmp.config.compare.locality, + cmp.config.compare.kind, + --cmp.config.compare.sort_text, + cmp.config.compare.length, + cmp.config.compare.order, + }, + }, + } + end, +} + diff --git a/archive/.config/nvim/lua/plugins/colorscheme.lua b/archive/.config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..acdc3ee --- /dev/null +++ b/archive/.config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,6 @@ +return { + "folke/tokyonight.nvim", + config = function () + vim.cmd[[colorscheme tokyonight-moon]] + end +} diff --git a/archive/.config/nvim/lua/plugins/comment.lua b/archive/.config/nvim/lua/plugins/comment.lua new file mode 100644 index 0000000..4fbab38 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/comment.lua @@ -0,0 +1,4 @@ +return { + 'numToStr/Comment.nvim', + config = true, +} diff --git a/archive/.config/nvim/lua/plugins/fidget.lua b/archive/.config/nvim/lua/plugins/fidget.lua new file mode 100644 index 0000000..facf28b --- /dev/null +++ b/archive/.config/nvim/lua/plugins/fidget.lua @@ -0,0 +1,17 @@ +return { + 'j-hui/fidget.nvim', + tag = 'v1.4.1', + lazy = true, + opts = { + progress = { + display = { + progress_icon = { pattern = 'line', period = 0.7 }, + }, + }, + notification = { + window = { + winblend = 0, + }, + }, + }, +} diff --git a/archive/.config/nvim/lua/plugins/glance.lua b/archive/.config/nvim/lua/plugins/glance.lua new file mode 100644 index 0000000..9c43939 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/glance.lua @@ -0,0 +1,10 @@ +return { + 'dnlhc/glance.nvim', + cmd = 'Glance', + config = function() + require("glance").setup({}) + end, + keys = { + { 'gr', '<CMD>Glance references<CR>' } + } +} diff --git a/archive/.config/nvim/lua/plugins/init.lua b/archive/.config/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/init.lua @@ -0,0 +1 @@ +return {} diff --git a/archive/.config/nvim/lua/plugins/lspconfig.lua b/archive/.config/nvim/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..ee8c464 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/lspconfig.lua @@ -0,0 +1,96 @@ +local on_attach = function(client, bufnr) + local keymap = function(mode, keys, func, opts) + opts.buffer = bufnr + vim.keymap.set(mode, keys, func, opts) + end + + keymap('n', 'gd', vim.lsp.buf.definition, { desc = 'Go to definition' }) + keymap('n', 'gD', vim.lsp.buf.declaration, { desc = 'Go to declaration' }) + keymap('n', 'gI', vim.lsp.buf.implementation, { desc = 'Go to implementation' }) + keymap('n', 'gy', vim.lsp.buf.type_definition, { desc = 'Go to type definition' }) + -- keymap('n', 'gr', vim.lsp.buf.references, { desc = 'List references' }) + + keymap('n', '<leader>ds', vim.lsp.buf.document_symbol, { desc = 'List document symbols' }) + keymap('n', '<leader>ws', vim.lsp.buf.workspace_symbol, { desc = 'List workspace symbols' }) + + keymap('n', 'K', vim.lsp.buf.hover, { desc = 'Show documentation' }) + keymap('n', 'gK', vim.lsp.buf.signature_help, { desc = 'Show signature' }) + keymap('i', '<C-s>', vim.lsp.buf.signature_help, { desc = 'Show signature' }) + + keymap('n', '<leader>rn', vim.lsp.buf.rename, { desc = 'Rename symbol' }) + keymap('n', '<leader>ca', vim.lsp.buf.code_action, { desc = 'Code action' }) + + keymap('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, { desc = 'Add workspace folder' }) + keymap('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, { desc = 'Remove workspace folder' }) + keymap('n', '<leader>cf', vim.cmd.ClangdSwitchSourceHeader, { desc = 'Switch source with header' }) + keymap( + 'n', + '<leader>wl', + function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, + { desc = 'List workspace folders' } + ) +end + +return { + 'neovim/nvim-lspconfig', + dependencies = { + "hrsh7th/cmp-nvim-lsp", + 'j-hui/fidget.nvim', + }, + ft = { 'c', 'cpp', 'lua', 'zig' }, + opts = { + servers = { + lua_ls = { + settings = { + Lua = { + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, + }, + }, + clangd = { + settings = {}, + cmd = { "clangd", "--header-insertion=never" }, + }, + zls = { + settings = {}, + }, + }, + }, + config = function(_, opts) + local lspconfig = require('lspconfig'); + local capabilities = require('cmp_nvim_lsp').default_capabilities() + + for name, conf in pairs(opts.servers) do + lspconfig[name].setup { + capabilities = capabilities, + settings = conf.settings, + on_attach = function(client, bufnr) + local _, err = pcall(on_attach, client, bufnr) + if err then + vim.notify('[on_attach] error: ' .. err, vim.log.levels.ERROR) + else + vim.notify('[on_attach] ' .. client.name .. ' attached to buffer ' .. bufnr, vim.log.levels.INFO) + end + end, + } + end + + -- Autohighlight symbol under cursor + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + callback = function() + local bufnr = vim.api.nvim_get_current_buf() + if next(vim.lsp.get_clients({ buffer = bufnr })) then + vim.lsp.buf.document_highlight() + end + end, + }) + -- Clear highlights when cursor moves + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { + callback = function() + vim.lsp.buf.clear_references() + end, + }) + + end +} diff --git a/archive/.config/nvim/lua/plugins/luadev.lua b/archive/.config/nvim/lua/plugins/luadev.lua new file mode 100644 index 0000000..7011f66 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/luadev.lua @@ -0,0 +1,5 @@ +return { + "folke/lazydev.nvim", + ft = "lua", + config = true, +} diff --git a/archive/.config/nvim/lua/plugins/luasnip.lua b/archive/.config/nvim/lua/plugins/luasnip.lua new file mode 100644 index 0000000..8ed8c24 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/luasnip.lua @@ -0,0 +1,12 @@ +return { + 'L3MON4D3/LuaSnip', + lazy = true, + dependencies = { 'rafamadriz/friendly-snippets' }, + keys = { + { '<M-h>', function() require('luasnip').jump(-1) end, mode = { 'i', 's' } }, + { '<M-l>', function() require('luasnip').jump(1) end, mode = { 'i', 's' } }, + }, + config = function() + require('luasnip.loaders.from_vscode').lazy_load() + end, +} diff --git a/archive/.config/nvim/lua/plugins/multicursor.lua b/archive/.config/nvim/lua/plugins/multicursor.lua new file mode 100644 index 0000000..75f8b6e --- /dev/null +++ b/archive/.config/nvim/lua/plugins/multicursor.lua @@ -0,0 +1,61 @@ +return { + "jake-stewart/multicursor.nvim", + branch = "1.0", + config = function() + local mc = require("multicursor-nvim") + mc.setup() + + local set = vim.keymap.set + + -- Add or skip cursor above/below the main cursor. + set({"n", "x"}, "<up>", function() mc.lineAddCursor(-1) end) + set({"n", "x"}, "<down>", function() mc.lineAddCursor(1) end) + set({"n", "x"}, "<leader><up>", function() mc.lineSkipCursor(-1) end) + set({"n", "x"}, "<leader><down>", function() mc.lineSkipCursor(1) end) + + -- Add or skip adding a new cursor by matching word/selection + set({"n", "x"}, "<leader>n", function() mc.matchAddCursor(1) end) + set({"n", "x"}, "<leader>s", function() mc.matchSkipCursor(1) end) + set({"n", "x"}, "<leader>N", function() mc.matchAddCursor(-1) end) + set({"n", "x"}, "<leader>S", function() mc.matchSkipCursor(-1) end) + + -- Add and remove cursors with control + left click. + set("n", "<c-leftmouse>", mc.handleMouse) + set("n", "<c-leftdrag>", mc.handleMouseDrag) + set("n", "<c-leftrelease>", mc.handleMouseRelease) + + -- Disable and enable cursors. + set({"n", "x"}, "<c-q>", mc.toggleCursor) + + -- Mappings defined in a keymap layer only apply when there are + -- multiple cursors. This lets you have overlapping mappings. + mc.addKeymapLayer(function(layerSet) + + -- Select a different cursor as the main one. + layerSet({"n", "x"}, "<left>", mc.prevCursor) + layerSet({"n", "x"}, "<right>", mc.nextCursor) + + -- Delete the main cursor. + layerSet({"n", "x"}, "<leader>x", mc.deleteCursor) + + -- Enable and clear cursors using escape. + layerSet("n", "<esc>", function() + if not mc.cursorsEnabled() then + mc.enableCursors() + else + mc.clearCursors() + end + end) + end) + + -- Customize how cursors look. + local hl = vim.api.nvim_set_hl + hl(0, "MultiCursorCursor", { reverse = true }) + hl(0, "MultiCursorVisual", { link = "Visual" }) + hl(0, "MultiCursorSign", { link = "SignColumn"}) + hl(0, "MultiCursorMatchPreview", { link = "Search" }) + hl(0, "MultiCursorDisabledCursor", { reverse = true }) + hl(0, "MultiCursorDisabledVisual", { link = "Visual" }) + hl(0, "MultiCursorDisabledSign", { link = "SignColumn"}) + end +} diff --git a/archive/.config/nvim/lua/plugins/neogit.lua b/archive/.config/nvim/lua/plugins/neogit.lua new file mode 100644 index 0000000..0f5f90e --- /dev/null +++ b/archive/.config/nvim/lua/plugins/neogit.lua @@ -0,0 +1,8 @@ +return { + "NeogitOrg/neogit", + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + "nvim-telescope/telescope.nvim", -- optional + }, +} diff --git a/archive/.config/nvim/lua/plugins/pair.lua b/archive/.config/nvim/lua/plugins/pair.lua new file mode 100644 index 0000000..5698563 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/pair.lua @@ -0,0 +1,5 @@ +return { + 'windwp/nvim-autopairs', + event = "InsertEnter", + config = true +} diff --git a/archive/.config/nvim/lua/plugins/scroll.lua b/archive/.config/nvim/lua/plugins/scroll.lua new file mode 100644 index 0000000..4de5939 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/scroll.lua @@ -0,0 +1,23 @@ +return { + "karb94/neoscroll.nvim", + opts = { + mappings = { -- Keys to be mapped to their corresponding default scrolling animation + '<C-u>', '<C-d>', + '<C-b>', '<C-f>', + '<C-y>', '<C-e>', + 'zt', 'zz', 'zb', + }, + hide_cursor = true, -- Hide cursor while scrolling + stop_eof = true, -- Stop at <EOF> when scrolling downwards + respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file + cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further + duration_multiplier = 1.0, -- Global duration multiplier + easing = 'linear', -- Default easing function + pre_hook = nil, -- Function to run before the scrolling animation starts + post_hook = nil, -- Function to run after the scrolling animation ends + performance_mode = false, -- Disable "Performance Mode" on all buffers. + ignored_events = { -- Events ignored while scrolling + 'WinScrolled', 'CursorMoved' + }, + }, +} diff --git a/archive/.config/nvim/lua/plugins/signature.lua b/archive/.config/nvim/lua/plugins/signature.lua new file mode 100644 index 0000000..0d0a174 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/signature.lua @@ -0,0 +1,10 @@ +return { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = { + bind = true, + handler_opts = { + border = "rounded" + } + }, +} diff --git a/archive/.config/nvim/lua/plugins/surround.lua b/archive/.config/nvim/lua/plugins/surround.lua new file mode 100644 index 0000000..7504211 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/surround.lua @@ -0,0 +1,21 @@ +return { + "echasnovski/mini.surround", + event = "VeryLazy", + config = function() + require("mini.surround").setup({ + mappings = { + add = '', + delete = 'ds', + find = '', + find_left = '', + highlight = '', + replace = '', + update_n_lines = '', + + -- Add this only if you don't want to use extended mappings + suffix_last = '', + suffix_next = '', + } + }) + end +} diff --git a/archive/.config/nvim/lua/plugins/telescope.lua b/archive/.config/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..264a77b --- /dev/null +++ b/archive/.config/nvim/lua/plugins/telescope.lua @@ -0,0 +1,45 @@ +return { + 'nvim-telescope/telescope.nvim', + cmd = 'Telescope', + dependencies = { + 'nvim-lua/plenary.nvim', + }, + keys = function() + local lazy_telescope = function(builtin) + return function(...) + if builtin == 'find_files_custom' then + require('telescope.builtin').find_files({ find_command = {'rg', '--files', '--hidden', '-g', '!.git', '-g', '!external/', '-g', '!build/' }}) + else + require('telescope.builtin')[builtin](...) + end + end + end + return { + { '<leader>fb', lazy_telescope('buffers'), desc = 'Find buffers' }, + { '<leader>fd', lazy_telescope('diagnostics'), desc = 'Find diagnostics' }, + { '<leader>fF', lazy_telescope('git_files'), desc = 'Find Git files' }, + { '<leader>fG', lazy_telescope('git_status'), desc = 'Find Git status' }, + { '<leader>ff', lazy_telescope('find_files_custom'), desc = 'Find files' }, + { '<leader>fg', lazy_telescope('live_grep'), desc = 'Find files by content' }, + { '<leader>fh', lazy_telescope('help_tags'), desc = 'Find help tags' }, + { '<leader>fo', lazy_telescope('oldfiles'), desc = 'Find recently opened files' }, + { '<leader>fw', lazy_telescope('grep_string'), desc = 'Find word in buffer' }, + { '<leader>f/', lazy_telescope('current_buffer_fuzzy_find'), desc = 'Find fuzzy match in current buffer' }, + } + end, + config = function() + local telescope = require('telescope') + telescope.setup({ + defaults = { + mappings = { + i = { + ["<C-g>"] = require('telescope.actions').close, + }, + n = { + ["<C-g>"] = require('telescope.actions').close, + }, + }, + }, + }) + end, +} diff --git a/archive/.config/nvim/lua/plugins/treesitter.lua b/archive/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..268e13d --- /dev/null +++ b/archive/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,24 @@ +return { + 'nvim-treesitter/nvim-treesitter', + ft = { 'c', 'cpp', 'zig', 'lua', 'rust' }, + build = ':TSUpdate', + config = function() + require('nvim-treesitter.configs').setup { + -- Add languages to be installed here that you want installed for treesitter + ensure_installed = { 'c', 'cpp', 'lua', 'rust', 'vimdoc', 'vim', 'zig' }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = false, + + highlight = { + enable = true, + disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end, + additional_vim_regex_highlighting = false, + }, + } + end, +} diff --git a/archive/.config/nvim/lua/plugins/trouble.lua b/archive/.config/nvim/lua/plugins/trouble.lua new file mode 100644 index 0000000..3741f30 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "<leader>xx", + "<cmd>Trouble diagnostics toggle<cr>", + desc = "Diagnostics (Trouble)", + }, + { + "<leader>xX", + "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "<leader>cs", + "<cmd>Trouble symbols toggle focus=false<cr>", + desc = "Symbols (Trouble)", + }, + { + "<leader>cl", + "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "<leader>xL", + "<cmd>Trouble loclist toggle<cr>", + desc = "Location List (Trouble)", + }, + { + "<leader>xQ", + "<cmd>Trouble qflist toggle<cr>", + desc = "Quickfix List (Trouble)", + }, + }, +} diff --git a/archive/.config/nvim/lua/plugins/yank.lua b/archive/.config/nvim/lua/plugins/yank.lua new file mode 100644 index 0000000..cdf0f15 --- /dev/null +++ b/archive/.config/nvim/lua/plugins/yank.lua @@ -0,0 +1,10 @@ +return { + "svban/YankAssassin.nvim", + event = "VeryLazy", + config = function() + require("YankAssassin").setup { + auto_normal = true, -- if true, autocmds are used. Whenever y is used in normal mode, the cursor doesn't move to start + auto_visual = true, -- if true, autocmds are used. Whenever y is used in visual mode, the cursor doesn't move to start + } + end, +} |
