-- You can add your own plugins here or in other files in this directory! -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information return { -- snacks type shit { 'folke/snacks.nvim', lazy = false, priority = 1000, ---@type snacks.Config opts = { bigfile = { enabled = true }, dashboard = { enabled = true }, indent = { enabled = true }, input = { enabled = true }, notifier = { enabled = true, timeout = 3000, }, picker = { enabled = true }, quickfile = { enabled = true }, scope = { enabled = true }, statuscolumn = { enabled = true }, words = { enabled = true }, styles = { notification = { -- wo = { wrap = true } -- Wrap notifications }, }, }, keys = { -- git { 'gb', function() Snacks.picker.git_branches() end, desc = 'Git Branches', }, { 'gl', function() Snacks.picker.git_log() end, desc = 'Git Log', }, { 'gL', function() Snacks.picker.git_log_line() end, desc = 'Git Log Line', }, { 'gs', function() Snacks.picker.git_status() end, desc = 'Git Status', }, { 'gS', function() Snacks.picker.git_stash() end, desc = 'Git Stash', }, { 'gd', function() Snacks.picker.git_diff() end, desc = 'Git Diff (Hunks)', }, { 'gf', function() Snacks.picker.git_log_file() end, desc = 'Git Log File', }, -- Grep { 'sb', function() Snacks.picker.lines() end, desc = 'Buffer Lines', }, { 'sB', function() Snacks.picker.grep_buffers() end, desc = 'Grep Open Buffers', }, { 'sg', function() Snacks.picker.grep() end, desc = 'Grep', }, { 'sw', function() Snacks.picker.grep_word() end, desc = 'Visual selection or word', mode = { 'n', 'x' }, }, -- Other { 'z', function() Snacks.zen() end, desc = 'Toggle Zen Mode', }, { 'gB', function() Snacks.gitbrowse() end, desc = 'Git Browse', mode = { 'n', 'v' }, }, { 'gg', function() Snacks.lazygit() end, desc = 'Lazygit', }, { ']]', function() Snacks.words.jump(vim.v.count1) end, desc = 'Next Reference', mode = { 'n', 't' }, }, { '[[', function() Snacks.words.jump(-vim.v.count1) end, desc = 'Prev Reference', mode = { 'n', 't' }, }, { 'N', desc = 'Neovim News', function() Snacks.win { file = vim.api.nvim_get_runtime_file('doc/news.txt', false)[1], width = 0.6, height = 0.6, wo = { spell = false, wrap = false, signcolumn = 'yes', statuscolumn = ' ', conceallevel = 3, }, } end, }, }, init = function() vim.api.nvim_create_autocmd('User', { pattern = 'VeryLazy', callback = function() -- Setup some globals for debugging (lazy-loaded) _G.dd = function(...) Snacks.debug.inspect(...) end _G.bt = function() Snacks.debug.backtrace() end vim.print = _G.dd -- Override print to use snacks for `:=` command -- Create some toggle mappings Snacks.toggle.option('spell', { name = 'Spelling' }):map 'us' Snacks.toggle.option('wrap', { name = 'Wrap' }):map 'uw' Snacks.toggle.option('relativenumber', { name = 'Relative Number' }):map 'uL' Snacks.toggle.diagnostics():map 'ud' Snacks.toggle.line_number():map 'ul' Snacks.toggle.option('conceallevel', { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 }):map 'uc' Snacks.toggle.treesitter():map 'uT' Snacks.toggle.option('background', { off = 'light', on = 'dark', name = 'Dark Background' }):map 'ub' Snacks.toggle.inlay_hints():map 'uh' Snacks.toggle.indent():map 'ug' Snacks.toggle.dim():map 'uD' end, }) end, }, -- bracket autocomplete { 'windwp/nvim-autopairs', event = 'InsertEnter', config = true, }, -- typst preview { 'chomosuke/typst-preview.nvim', lazy = false, version = '1.*', opts = {}, }, -- mini { 'echasnovski/mini.nvim', version = '*' }, -- file explorer { 'nvim-tree/nvim-tree.lua', version = '*', lazy = false, dependencies = { 'nvim-tree/nvim-web-devicons', }, config = function() require('nvim-tree').setup {} end, }, -- markdown stuff { 'tadmccorkle/markdown.nvim', ft = 'markdown', -- or 'event = "VeryLazy"' opts = { -- configuration here or empty for defaults }, }, { 'MeanderingProgrammer/render-markdown.nvim', dependencies = { 'nvim-treesitter/nvim-treesitter', 'echasnovski/mini.nvim' }, -- if you use the mini.nvim suite ---@module 'render-markdown' ---@type render.md.UserConfig opts = {}, }, -- catppuccin if i want { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }, -- display whitespace in visual mode { 'mcauley-penney/visual-whitespace.nvim', config = true, }, -- tabs { 'romgrk/barbar.nvim', dependencies = { 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons }, init = function() vim.g.barbar_auto_setup = false end, opts = { -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: -- animation = true, -- insert_at_start = true, -- …etc. }, version = '^1.0.0', -- optional: only update when a new 1.x version is released }, -- Coq support lets hope this works { 'whonore/Coqtail', init = function() vim.g.loaded_coqtail = 1 vim.g['coqtail#supported'] = 0 end, }, { 'tomtomjhj/vscoq.nvim', filetypes = 'coq', dependencies = { 'neovim/nvim-lspconfig', 'whonore/Coqtail', }, opts = { vscoq = { path = '/home/aadi/.opam/CP.2024.10.1~8.19~2024.10/bin/vscoqtop', }, lsp = { on_attach = function(client, bufnr) -- In manual mode, use ctrl-alt-{j,k,l} to step. vim.keymap.set({ 'n', 'i' }, '', 'VsCoq stepForward', { buffer = bufnr, desc = 'VsCoq step forward' }) vim.keymap.set({ 'n', 'i' }, '', 'VsCoq stepBackward', { buffer = bufnr, desc = 'VsCoq step backward' }) vim.keymap.set({ 'n', 'i' }, '', 'VsCoq interpretToPoint', { buffer = bufnr, desc = 'VsCoq interpret to point' }) end, }, }, }, -- flash.nvim { 'folke/flash.nvim', event = 'VeryLazy', ---@type Flash.Config opts = {}, -- stylua: ignore keys = { { "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, { "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, -- { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, -- { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, }, }, -- symbols { 'oskarrrrrrr/symbols.nvim', config = function() local r = require 'symbols.recipes' require('symbols').setup(r.DefaultFilters, r.AsciiSymbols, { -- custom settings here -- e.g. hide_cursor = false }) vim.keymap.set('n', ',s', ' Symbols') end, }, }