Skip to content

Instantly share code, notes, and snippets.

@fayimora
Created February 21, 2026 09:48
Show Gist options
  • Select an option

  • Save fayimora/01606b4ba551cad7b25abcb24fc6062f to your computer and use it in GitHub Desktop.

Select an option

Save fayimora/01606b4ba551cad7b25abcb24fc6062f to your computer and use it in GitHub Desktop.
local overrides = require "configs.overrides"
---@type NvPluginSpec[]
local plugins = {
-- Override plugin definition options
-- {
-- dir = "~/Code/opencode-nvim",
-- -- or absolute path: dir = "/home/fayi/Code/opencode-nvim",
-- config = function()
-- require("opencode").setup()
-- end,
-- },
{
"nickjvandyke/opencode.nvim",
dependencies = {
-- Recommended for `ask()` and `select()`.
-- Required for `snacks` provider.
---@module 'snacks' <- Loads `snacks.nvim` types for configuration intellisense.
{ "folke/snacks.nvim", opts = { input = {}, picker = {}, terminal = {} } },
},
config = function()
---@type opencode.Opts
vim.g.opencode_opts = {
-- Your configuration, if any — see `lua/opencode/config.lua`, or "goto definition" on the type or field.
provider = {
enabled = "tmux",
},
}
-- Required for `opts.events.reload`.
vim.o.autoread = true
end,
},
{ import = "nvchad.blink.lazyspec" },
{
"neovim/nvim-lspconfig",
opts = {
inlay_hints = { enabled = true },
},
config = function()
require "configs.lspconfig"
end, -- Override to setup mason-lspconfig
},
{ "williamboman/mason.nvim", opts = overrides.mason },
-- {
-- "williamboman/mason.nvim",
-- opts = overrides.mason,
-- config = function(_, opts)
-- local conf = vim.tbl_deep_extend("keep", opts, overrides.mason)
-- require("mason").setup(conf)
-- end,
-- },
{
"WhoIsSethDaniel/mason-tool-installer.nvim",
lazy = false,
config = function()
require("mason-tool-installer").setup {
ensure_installed = overrides.mason.ensure_installed,
}
end,
},
{
"nvim-treesitter/nvim-treesitter",
branch = "master",
opts = overrides.treesitter,
dependencies = {
"nvim-treesitter/nvim-treesitter-textobjects",
},
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
branch = "master",
lazy = true,
config = function()
require("nvim-treesitter.configs").setup {
textobjects = {
select = {
enable = true,
-- Automatically jump forward to textobj, similar to targets.vim
lookahead = true,
keymaps = {
-- You can use the capture groups defined in textobjects.scm
["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" },
["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" },
["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" },
["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" },
["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" },
["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" },
["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" },
["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" },
["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" },
["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" },
["af"] = { query = "@call.outer", desc = "Select outer part of a function call" },
["if"] = { query = "@call.inner", desc = "Select inner part of a function call" },
["am"] = { query = "@function.outer", desc = "Select outer part of a method/function definition" },
["im"] = { query = "@function.inner", desc = "Select inner part of a method/function definition" },
["ac"] = { query = "@class.outer", desc = "Select outer part of a class" },
["ic"] = { query = "@class.inner", desc = "Select inner part of a class" },
["at"] = { query = "@element.outer", desc = "Select outer part of a tag" },
["it"] = { query = "@element.inner", desc = "Select inner part of a tag" },
},
},
-- swap = {
-- enable = true,
-- swap_next = {
-- ["<leader>na"] = "@parameter.inner", -- swap parameters/argument with next
-- ["<leader>nm"] = "@function.outer", -- swap function with next
-- },
-- swap_previous = {
-- ["<leader>pa"] = "@parameter.inner", -- swap parameters/argument with prev
-- ["<leader>pm"] = "@function.outer", -- swap function with previous
-- },
-- },
move = {
enable = true,
set_jumps = true, -- whether to set jumps in the jumplist
goto_next_start = {
["]f"] = { query = "@call.outer", desc = "Next function call start" },
["]m"] = { query = "@function.outer", desc = "Next method/function def start" },
["]c"] = { query = "@class.outer", desc = "Next class start" },
["]i"] = { query = "@conditional.outer", desc = "Next conditional start" },
["]l"] = { query = "@loop.outer", desc = "Next loop start" },
-- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path.
-- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm.
["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" },
["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" },
},
goto_next_end = {
["]F"] = { query = "@call.outer", desc = "Next function call end" },
["]M"] = { query = "@function.outer", desc = "Next method/function def end" },
["]C"] = { query = "@class.outer", desc = "Next class end" },
["]I"] = { query = "@conditional.outer", desc = "Next conditional end" },
["]L"] = { query = "@loop.outer", desc = "Next loop end" },
},
goto_previous_start = {
["[f"] = { query = "@call.outer", desc = "Prev function call start" },
["[m"] = { query = "@function.outer", desc = "Prev method/function def start" },
["[c"] = { query = "@class.outer", desc = "Prev class start" },
["[i"] = { query = "@conditional.outer", desc = "Prev conditional start" },
["[l"] = { query = "@loop.outer", desc = "Prev loop start" },
},
goto_previous_end = {
["[F"] = { query = "@call.outer", desc = "Prev function call end" },
["[M"] = { query = "@function.outer", desc = "Prev method/function def end" },
["[C"] = { query = "@class.outer", desc = "Prev class end" },
["[I"] = { query = "@conditional.outer", desc = "Prev conditional end" },
["[L"] = { query = "@loop.outer", desc = "Prev loop end" },
},
},
},
}
end,
},
{
"windwp/nvim-ts-autotag",
event = "VeryLazy",
config = function()
require("nvim-ts-autotag").setup {
opts = {
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = true, -- Auto close on trailing </
},
}
end,
},
{
"rcarriga/nvim-notify",
opts = {
timeout = 500,
render = "compact",
stages = "fade",
top_down = true,
},
},
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
},
{
"max397574/better-escape.nvim",
event = "InsertEnter",
config = function()
require("better_escape").setup()
end,
},
{
"scalameta/nvim-metals",
dependencies = {
"nvim-lua/popup.nvim",
"nvim-lua/plenary.nvim",
},
ft = { "scala", "sbt", "java" },
opts = function()
local metals_config = require("metals").bare_config()
metals_config.init_options.statusBarProvider = "off"
metals_config.settings = {
defaultBspToBuildTool = true,
excludedPackages = {},
serverProperties = { "-Xmx3g" },
serverVersion = "latest.snapshot",
showImplicitArguments = true,
showInferredType = true,
inlayHints = true,
}
metals_config.capabilities = require("cmp_nvim_lsp").default_capabilities()
metals_config.on_attach = function(client, bufnr)
-- your on_attach function
vim.keymap.set("n", "<leader>ch", function()
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
else
vim.notify("Server is not an inlay_hint provider", vim.log.levels.ERROR)
end
end, { desc = "Toggle inlay hints" })
end
return metals_config
end,
config = function(self, metals_config)
local nvim_metals_group = vim.api.nvim_create_augroup("nvim-metals", { clear = true })
vim.api.nvim_create_autocmd("FileType", {
pattern = self.ft,
callback = function()
require("metals").initialize_or_attach(metals_config)
end,
group = nvim_metals_group,
})
end,
},
{
"supermaven-inc/supermaven-nvim",
event = "InsertEnter",
config = function()
require("supermaven-nvim").setup {
keymaps = nil,
-- keymaps = {
-- accept_suggestion = "<Tab>",
-- clear_suggestion = "<C-]>",
-- accept_word = "<C-j>",
-- },
ignore_filetypes = { "cpp" },
color = {
suggestion_color = "#ffffff",
cterm = 244,
},
disable_inline_completion = false, -- disables inline completion for use with cmp
disable_keymaps = false, -- disables built in keymaps for more manual control
}
end,
},
-- { "hrsh7th/nvim-cmp", enabled = false },
-- {
-- "hrsh7th/nvim-cmp",
-- -- dependencies = {
-- -- {
-- -- "zbirenbaum/copilot-cmp",
-- -- config = function()
-- -- require("copilot_cmp").setup({})
-- -- end,
-- -- },
-- -- },
-- opts = {
-- sources = {
-- { name = "nvim_lsp", group_index = 2 },
-- -- { name = "copilot", group_index = 2 },
-- { name = "supermaven", group_index = 2 },
-- { name = "luasnip", group_index = 2 },
-- { name = "buffer", group_index = 2 },
-- { name = "nvim_lua", group_index = 2 },
-- { name = "path", group_index = 2 },
-- },
-- },
-- },
{
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurentFile",
},
},
{
"kylechui/nvim-surround",
event = "VeryLazy",
config = function()
require("nvim-surround").setup {
-- Configuration here, or leave empty to use defaults
}
end,
},
{
"dstein64/vim-startuptime",
cmd = "StartupTime",
},
{
"Wansmer/treesj",
keys = { "<space>mm", "<space>j", "<space>s" },
config = function()
require("treesj").setup {}
end,
},
{
"kevinhwang91/nvim-bqf",
event = "VeryLazy",
opts = {},
},
-- {
-- "f-person/git-blame.nvim",
-- event = "VeryLazy",
-- },
{
"folke/trouble.nvim",
opts = {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
modes = {
test = {
mode = "diagnostics",
preview = {
type = "split",
relative = "win",
position = "right",
size = 0.3,
},
},
},
},
},
{
"nvim-telescope/telescope.nvim",
opts = function(_, conf)
local lga_actions = require "telescope-live-grep-args.actions"
local actions = require "telescope.actions"
local additional_rg_args =
{ "--hidden", "--glob", "!**/.git/*", "--glob", "!**/node_modules/*", "--glob", "!**/.idea/*" }
local myopts = {
extensions_list = { "themes", "terms", "fzf", "live_grep_args" },
pickers = {
resume = {},
find_files = {
-- `hidden = true` will still show the inside of `.git/` as it's not `.gitignore`d.
find_command = { "rg", "--files", "--hidden", "--glob", "!**/.git/*" },
path_display = { "truncate" },
},
live_grep = { additional_args = additional_rg_args },
grep_string = { additional_args = additional_rg_args },
},
extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
},
live_grep_args = {
auto_quoting = true,
mappings = {
i = {
["<C-k>"] = lga_actions.quote_prompt(),
["<C-i>"] = lga_actions.quote_prompt { postfix = " --iglob " },
-- freeze the current list and start a fuzzy search in the frozen list
["<C-space>"] = require("telescope.actions").to_fuzzy_refine,
},
},
},
},
defaults = {
mappings = {
n = {
["l"] = actions.cycle_history_next,
["h"] = actions.cycle_history_prev,
["<C-d>"] = actions.delete_buffer,
},
i = {
["<C-S-d>"] = actions.delete_buffer,
},
},
},
}
return vim.tbl_deep_extend("force", conf, myopts)
end,
dependencies = {
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
},
{
"nvim-telescope/telescope-live-grep-args.nvim",
version = "^1.1.0",
},
},
},
{
"folke/todo-comments.nvim",
event = "BufRead",
config = function()
require("configs.todo").setup()
end,
},
{
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
"TmuxNavigatorProcessList",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
{
"junegunn/fzf",
event = "VeryLazy",
run = function()
vim.fn["fzf#install"]()
end,
},
{
"folke/flash.nvim",
event = "VeryLazy",
opts = {
modes = {
search = {
enabled = true,
},
char = {
enabled = true,
jump_labels = true,
},
},
},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump {
search = {
mode = function(str)
return "\\<" .. str
end,
},
}
end,
desc = "Flash",
},
{
"S",
mode = { "n", "o", "x" },
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 = "Flash Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
{
"nvimdev/lspsaga.nvim",
event = "LspAttach",
config = function()
require("lspsaga").setup {
outline = {
win_width = 30,
win_position = "left",
},
}
end,
},
{
"Rawnly/gist.nvim",
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
config = function()
require("configs.gist").setup()
end,
},
-- `GistsList` opens the selected gif in a terminal buffer,
-- nvim-unception uses neovim remote rpc functionality to open the gist in an actual buffer
-- and prevents neovim buffer inception
{
"samjwill/nvim-unception",
init = function()
vim.g.unception_block_while_host_edits = true
end,
},
-- {
-- "mg979/vim-visual-multi",
-- lazy = false,
-- },
{
"numToStr/Comment.nvim",
lazy = false,
config = function()
require("Comment").setup {
ignore = "^$", -- ignores empty lines
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
}
end,
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
},
-- {
-- "sindrets/diffview.nvim",
-- cmd = {
-- "DiffviewOpen",
-- "DiffviewClose",
-- "DiffviewToggleFiles",
-- "DiffviewFocusFiles",
-- "DiffviewRefresh",
-- "DiffviewFileHistory",
-- "DiffviewOpenInVsplit",
-- "DiffviewOpenInTab",
-- "DiffviewToggleFilesInTab",
-- "DiffviewFocusFilesInTab",
-- },
-- },
{
"esmuellert/codediff.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
cmd = "CodeDiff",
config = function()
require("configs.codediff").setup()
end,
},
-- {
-- "NeogitOrg/neogit",
-- cmd = "Neogit",
-- dependencies = {
-- "sindrets/diffview.nvim",
-- },
-- config = function()
-- require("neogit").setup()
-- dofile(vim.g.base46_cache .. "neogit")
-- end,
-- },
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
"rcarriga/nvim-notify",
},
config = function()
require("configs.noice").setup()
end,
},
{
"folke/trouble.nvim",
opts = {}, -- for default options, refer to the configuration section for custom setup.
cmd = "Trouble",
},
-- {
-- "mistweaverco/kulala.nvim",
-- config = function()
-- require("kulala").setup()
-- end,
-- },
{
"chrisgrieser/nvim-rip-substitute",
cmd = "RipSubstitute",
keys = {
{
"<leader>fs",
function()
require("rip-substitute").sub()
end,
mode = { "n", "x" },
desc = " rip substitute",
},
},
},
-- {
-- "onsails/lspkind-nvim",
-- event = "LspAttach",
-- config = function()
-- require("configs.lspkind").setup()
-- end,
-- },
{
"junegunn/vim-easy-align",
event = "VeryLazy",
},
{ "nvchad/volt", lazy = true },
{ "nvchad/menu", lazy = true },
{
"nvim-mini/mini.nvim",
version = false,
lazy = false,
config = function()
-- local animate = require "mini.animate"
-- local duration = 500
-- require("mini.animate").setup {
-- scroll = {
-- enable = true,
-- timing = animate.gen_timing.linear { duration = duration, unit = "total" },
-- },
-- cursor = {
-- enable = true,
-- timing = animate.gen_timing.linear { duration = duration, unit = "total" },
-- },
-- }
require("mini.animate").setup()
-- require("mini.ai").setup()
end,
},
{
"nvzone/typr",
dependencies = "nvzone/volt",
opts = {},
cmd = { "Typr", "TyprStats" },
},
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
config = function()
-- local mason_registry = require "mason-registry"
-- local codelldb = mason_registry.get_package "codelldb"
-- local extension_path = codelldb:get_install_path() .. "/extension/"
-- local codelldb_path = extension_path .. "adapter/codelldb"
-- local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"
-- If you are on Linux, replace the line above with the line below:
-- local liblldb_path = extension_path .. "lldb/lib/liblldb.so"
-- local cfg = require "rustaceanvim.config"
-- vim.g.rustaceanvim = {
-- dap = {
-- adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
-- },
-- }
end,
},
-- {
-- "mfussenegger/nvim-dap",
-- config = function()
-- local dap, dapui = require "dap", require "dapui"
-- dap.listeners.before.attach.dapui_config = function()
-- dapui.open()
-- end
-- dap.listeners.before.launch.dapui_config = function()
-- dapui.open()
-- end
-- dap.listeners.before.event_terminated.dapui_config = function()
-- dapui.close()
-- end
-- dap.listeners.before.event_exited.dapui_config = function()
-- dapui.close()
-- end
-- end,
-- },
-- {
-- "rcarriga/nvim-dap-ui",
-- dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
-- config = function()
-- require("dapui").setup()
-- end,
-- },
{
"saecki/crates.nvim",
ft = { "toml" },
config = function()
require("crates").setup {
-- completion = {
-- cmp = {
-- enabled = true,
-- },
-- },
}
-- require("cmp").setup.buffer {
-- sources = { { name = "crates" } },
-- }
end,
},
{
"OXY2DEV/markview.nvim",
lazy = false,
},
{
"ziglang/zig.vim",
ft = "zig",
},
-- {
-- "wakatime/vim-wakatime",
-- event = "VeryLazy",
-- enabled = vim.fn.filereadable(vim.fn.getenv "HOME" .. "/.wakatime.cfg"),
-- },
-- To make a plugin not be loaded
-- {
-- "NvChad/nvim-colorizer.lua",
-- enabled = false
-- },
-- All NvChad plugins are lazy-loaded by default
-- For a plugin to be loaded, you will need to set either `ft`, `cmd`, `keys`, `event`, or set `lazy = false`
-- If you want a plugin to load on startup, add `lazy = false` to a plugin spec, for example
-- {
-- "mg979/vim-visual-multi",
-- lazy = false,
-- }
}
return plugins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment