return { { "LazyVim/LazyVim", opts = { colorscheme = "tokyonight-night", -- colorscheme = "catppuccin-mocha", }, }, { "nvim-telescope/telescope.nvim", cmd = "Telescope", keys = function() return {} end, config = function(opts) require("telescope").setup(opts) end, }, { "ThePrimeagen/harpoon", lazy = true, config = function() require("telescope").load_extension("harpoon") end, }, { "iamcco/markdown-preview.nvim", lazy = true, event = "FileType markdown", build = "cd app && yarn install", }, { "nvim-telescope/telescope-project.nvim", lazy = true, }, { "nvim-telescope/telescope-file-browser.nvim", lazy = true, config = function() require("telescope").load_extension("file_browser") end, }, { "jvgrootveld/telescope-zoxide", lazy = true, config = function() local z_utils = require("telescope._extensions.zoxide.utils") local t = require("telescope") -- Configure the extension t.setup({ extensions = { zoxide = { prompt_title = "[ Queries ]", mappings = { default = { after_action = function(selection) print("Update to (" .. selection.z_score .. ") " .. selection.path) end, }, [""] = { before_action = function(selection) print("before C-s") end, action = function(selection) vim.cmd("edit " .. selection.path) end, }, [""] = { action = z_utils.create_basic_command("split") }, }, }, }, }) -- Load the extension t.load_extension("zoxide") end, }, { "lervag/vimtex", config = function() vim.cmd("let g:vimtex_quickfix_mode=0") vim.cmd("let g:vimtex_view_general_viewer = 'evince'") vim.cmd("let g:vimtex_compiler_method = 'latexmk'") vim.cmd( "let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}" ) end, }, { "echasnovski/mini.ai", diabled = true, }, { "rcarriga/nvim-notify", opts = { top_down = false, }, }, { "jbyuki/instant.nvim", config = function() vim.cmd("let g:instant_username = 'dashie'") end, }, { "nvim-treesitter/nvim-treesitter", opts = { textobjects = { select = { enable = true, lookahead = true, keymaps = { -- You can use the capture groups defined in textobjects.scm ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@class.outer", ["ic"] = "@class.inner", }, }, }, }, }, { "karb94/neoscroll.nvim", config = function() require("neoscroll").setup() local t = {} t[""] = { "scroll", { "-vim.wo.scroll", "true", "250" } } t[""] = { "scroll", { "vim.wo.scroll", "true", "250" } } t[""] = { "scroll", { "-vim.api.nvim_win_get_height(0)", "true", "450" } } t[""] = { "scroll", { "vim.api.nvim_win_get_height(0)", "true", "450" } } t[""] = { "scroll", { "-0.10", "false", "100" } } t[""] = { "scroll", { "0.10", "false", "100" } } t["zt"] = { "zt", { "250" } } t["zz"] = { "zz", { "250" } } t["zb"] = { "zb", { "250" } } require("neoscroll.config").set_mappings(t) end, }, { "kaarmu/typst.vim", lazy = true, event = "FileType typst", }, { "folke/which-key.nvim", event = "VeryLazy", opts = { plugins = { spelling = true }, defaults = { mode = { "n", "v" }, ["g"] = { name = "+goto" }, ["gz"] = { name = "+surround" }, ["]"] = { name = "+next" }, ["["] = { name = "+prev" }, [""] = { name = "+tabs" }, ["b"] = { name = "+buffer" }, ["c"] = { name = "+code" }, ["f"] = { name = "+file/find" }, ["g"] = { name = "+git" }, ["gh"] = { name = "+hunks" }, ["q"] = { name = "+quit/session" }, ["s"] = { name = "+search" }, ["u"] = { name = "+ui" }, ["w"] = { name = "+windows" }, ["x"] = { name = "+diagnostics/quickfix" }, ["h"] = { name = "+harpoon" }, ["d"] = { name = "+DAP" }, }, }, config = function(_, opts) local wk = require("which-key") wk.setup(opts) wk.register(opts.defaults) end, }, { "f-person/git-blame.nvim", lazy = true, }, { "mg979/vim-visual-multi", }, { "rouge8/neotest-rust", }, { "Issafalcon/neotest-dotnet", }, { "andy-bell101/neotest-java", }, { "nvim-neotest/neotest-go", }, { "nvim-neotest/neotest-python", }, { "nvim-neotest/neotest", dependencies = { "rouge8/neotest-rust", "Issafalcon/neotest-dotnet", "andy-bell101/neotest-java", "nvim-neotest/neotest-go", "nvim-neotest/neotest-python", }, opts = { adapters = { ["neotest-rust"] = {}, ["neotest-dotnet"] = {}, ["neotest-java"] = {}, ["neotest-go"] = {}, ["neotest-python"] = {}, }, status = { virtual_text = true }, output = { open_on_run = true }, quickfix = { open = function() if require("lazyvim.util").has("trouble.nvim") then vim.cmd("Trouble quickfix") else vim.cmd("copen") end end, }, }, config = function(_, opts) local neotest_ns = vim.api.nvim_create_namespace("neotest") vim.diagnostic.config({ virtual_text = { format = function(diagnostic) -- Replace newline and tab characters with space for more compact diagnostics local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "") return message end, }, }, neotest_ns) if opts.adapters then local adapters = {} for name, config in pairs(opts.adapters or {}) do if type(name) == "number" then if type(config) == "string" then config = require(config) end adapters[#adapters + 1] = config elseif config ~= false then local adapter = require(name) if type(config) == "table" and not vim.tbl_isempty(config) then local meta = getmetatable(adapter) if adapter.setup then adapter.setup(config) elseif meta and meta.__call then adapter(config) else error("Adapter " .. name .. " does not support setup") end end adapters[#adapters + 1] = adapter end end opts.adapters = adapters end require("neotest").setup(opts) end, -- stylua: ignore keys = { { "tT", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" }, { "tt", function() require("neotest").run.run(vim.loop.cwd()) end, desc = "Run All Test Files" }, { "tr", function() require("neotest").run.run() end, desc = "Run Nearest" }, { "ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" }, { "to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" }, { "tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" }, { "tS", function() require("neotest").run.stop() end, desc = "Stop" }, }, }, { "echasnovski/mini.hipatterns", event = "BufReadPre", opts = function() local hi = require("mini.hipatterns") return { -- custom LazyVim option to enable the tailwind integration tailwind = { enabled = true, ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, -- full: the whole css class will be highlighted -- compact: only the color will be highlighted style = "full", }, highlighters = { hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }), }, } end, config = function(_, opts) -- backward compatibility if opts.tailwind == true then opts.tailwind = { enabled = true, ft = { "typescriptreact", "javascriptreact", "css", "javascript", "typescript", "html" }, style = "full", } end if type(opts.tailwind) == "table" and opts.tailwind.enabled then -- reset hl groups when colorscheme changes vim.api.nvim_create_autocmd("ColorScheme", { callback = function() M.hl = {} end, }) opts.highlighters.tailwind = { pattern = function() if not vim.tbl_contains(opts.tailwind.ft, vim.bo.filetype) then return end if opts.tailwind.style == "full" then return "%f[%w:-]()[%w:-]+%-[a-z%-]+%-%d+()%f[^%w:-]" elseif opts.tailwind.style == "compact" then return "%f[%w:-][%w:-]+%-()[a-z%-]+%-%d+()%f[^%w:-]" end end, group = function(_, _, m) ---@type string local match = m.full_match ---@type string, number local color, shade = match:match("[%w-]+%-([a-z%-]+)%-(%d+)") shade = tonumber(shade) local bg = vim.tbl_get(M.colors, color, shade) if bg then local hl = "MiniHipatternsTailwind" .. color .. shade if not M.hl[hl] then M.hl[hl] = true local bg_shade = shade == 500 and 950 or shade < 500 and 900 or 100 local fg = vim.tbl_get(M.colors, color, bg_shade) vim.api.nvim_set_hl(0, hl, { bg = "#" .. bg, fg = "#" .. fg }) end return hl end end, priority = 2000, } end require("mini.hipatterns").setup(opts) end, }, }