557 lines
14 KiB
Lua
557 lines
14 KiB
Lua
local function load_config(package)
|
|
return function()
|
|
require('plugins.' .. package)
|
|
end
|
|
end
|
|
|
|
local plugins = {
|
|
-- UI
|
|
{
|
|
'Mofiqul/dracula.nvim',
|
|
config = load_config('ui.dracula'),
|
|
lazy = false,
|
|
priority = 1000,
|
|
},
|
|
{
|
|
'nvim-lualine/lualine.nvim',
|
|
config = load_config('ui.lualine'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'lukas-reineke/indent-blankline.nvim',
|
|
config = load_config('ui.indentline'),
|
|
main = 'ibl',
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'HiPhish/rainbow-delimiters.nvim',
|
|
config = load_config('ui.rainbow'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'rcarriga/nvim-notify',
|
|
config = load_config('ui.notify'),
|
|
event = 'VeryLazy',
|
|
cmd = 'Notifications',
|
|
},
|
|
{
|
|
'stevearc/dressing.nvim',
|
|
config = load_config('ui.dressing'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'nvimdev/dashboard-nvim',
|
|
config = load_config('ui.dashboard'),
|
|
-- Only load when no arguments
|
|
event = function()
|
|
if vim.fn.argc() == 0 then
|
|
return 'VimEnter'
|
|
end
|
|
end,
|
|
cmd = 'Dashboard',
|
|
},
|
|
--{
|
|
-- 'gelguy/wilder.nvim',
|
|
--
|
|
-- build = function()
|
|
-- vim.cmd([[silent UpdateRemotePlugins]])
|
|
-- end,
|
|
-- config = load_config('ui.wilder'),
|
|
-- keys = { ':', '/', '?' },
|
|
--},
|
|
{
|
|
'folke/noice.nvim',
|
|
event = 'VimEnter',
|
|
dependencies = {
|
|
'MunifTanjim/nui.nvim',
|
|
'rcarriga/nvim-notify',
|
|
},
|
|
config = load_config('ui.noice'),
|
|
},
|
|
{
|
|
'folke/zen-mode.nvim',
|
|
dependencies = {
|
|
'folke/twilight.nvim',
|
|
config = load_config('ui.twilight'),
|
|
},
|
|
config = load_config('ui.zen-mode'),
|
|
cmd = { 'ZenMode', 'Twilight' },
|
|
},
|
|
|
|
-- Language
|
|
{
|
|
'mfussenegger/nvim-dap',
|
|
dependencies = {
|
|
'rcarriga/nvim-dap-ui',
|
|
},
|
|
config = load_config('lang.dap'),
|
|
cmd = { 'DapUIToggle', 'DapToggleRepl', 'DapToggleBreakpoint' },
|
|
},
|
|
{
|
|
'nvim-neotest/neotest',
|
|
dependencies = {
|
|
'nvim-neotest/nvim-nio',
|
|
'olimorris/neotest-rspec',
|
|
'haydenmeade/neotest-jest',
|
|
},
|
|
config = load_config('lang.neotest'),
|
|
cmd = 'Neotest',
|
|
},
|
|
{
|
|
'michaelb/sniprun',
|
|
build = 'bash ./install.sh',
|
|
config = load_config('lang.sniprun'),
|
|
cmd = 'SnipRun',
|
|
},
|
|
{
|
|
'ThePrimeagen/refactoring.nvim',
|
|
config = load_config('lang.refactoring'),
|
|
},
|
|
{
|
|
'windwp/nvim-autopairs',
|
|
config = load_config('lang.autopairs'),
|
|
event = 'InsertEnter',
|
|
},
|
|
{
|
|
'echasnovski/mini.comment',
|
|
version = '*',
|
|
dependencies = 'JoosepAlviste/nvim-ts-context-commentstring',
|
|
config = load_config('lang.comment'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'echasnovski/mini.surround',
|
|
version = '*',
|
|
config = load_config('lang.surround'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'echasnovski/mini.ai',
|
|
version = '*',
|
|
config = load_config('lang.ai'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
|
|
-- Tresitter
|
|
{
|
|
'nvim-treesitter/nvim-treesitter',
|
|
build = ':TSUpdate',
|
|
dependencies = {
|
|
'nvim-treesitter/nvim-treesitter-refactor',
|
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
|
'RRethy/nvim-treesitter-endwise',
|
|
'RRethy/nvim-treesitter-textsubjects',
|
|
'windwp/nvim-ts-autotag',
|
|
},
|
|
config = load_config('lang.treesitter'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'ckolkey/ts-node-action',
|
|
dependencies = { 'nvim-treesitter' },
|
|
},
|
|
-- LSP
|
|
{
|
|
'neovim/nvim-lspconfig',
|
|
dependencies = {
|
|
'williamboman/mason-lspconfig.nvim',
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
},
|
|
config = load_config('lang.lspconfig'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'folke/neodev.nvim',
|
|
ft = { 'lua', 'vim' },
|
|
config = load_config('lang.neodev'),
|
|
},
|
|
{
|
|
'nvimdev/lspsaga.nvim',
|
|
config = load_config('lang.lspsaga'),
|
|
event = 'LspAttach',
|
|
},
|
|
{
|
|
'Maan2003/lsp_lines.nvim',
|
|
config = load_config('lang.lsp-lines'),
|
|
event = 'LspAttach',
|
|
},
|
|
{
|
|
'williamboman/mason.nvim',
|
|
config = load_config('lang.mason'),
|
|
cmd = 'Mason',
|
|
},
|
|
{
|
|
'nvimtools/none-ls.nvim',
|
|
dependencies = { 'neovim/nvim-lspconfig', 'jay-babu/mason-null-ls.nvim' },
|
|
config = load_config('lang.null-ls'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
|
|
-- Completion
|
|
{
|
|
'hrsh7th/nvim-cmp',
|
|
dependencies = {
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-cmdline',
|
|
'hrsh7th/cmp-nvim-lua',
|
|
'L3MON4D3/LuaSnip',
|
|
'rafamadriz/friendly-snippets',
|
|
'saadparwaiz1/cmp_luasnip',
|
|
},
|
|
config = load_config('lang.cmp'),
|
|
event = 'InsertEnter',
|
|
},
|
|
{
|
|
'Exafunction/codeium.vim',
|
|
event = 'BufEnter',
|
|
cmd = 'Codeium',
|
|
build = 'Codeium Auth:',
|
|
dependencies = {
|
|
'nvim-lua/plenary.nvim',
|
|
'hrsh7th/nvim-cmp',
|
|
},
|
|
},
|
|
-- Tools
|
|
{
|
|
'nvim-tree/nvim-tree.lua',
|
|
dependencies = {
|
|
'nvim-tree/nvim-web-devicons',
|
|
},
|
|
config = load_config('tools.nvim-tree'),
|
|
cmd = 'NvimTreeToggle',
|
|
},
|
|
{
|
|
'windwp/nvim-spectre',
|
|
config = load_config('tools.spectre'),
|
|
cmd = 'Spectre',
|
|
},
|
|
{
|
|
'abecodes/tabout.nvim',
|
|
config = load_config('tools.tabout'),
|
|
event = 'InsertEnter',
|
|
},
|
|
{
|
|
'folke/flash.nvim',
|
|
config = load_config('tools.flash'),
|
|
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',
|
|
},
|
|
{
|
|
'<c-s>',
|
|
mode = { 'c' },
|
|
function()
|
|
require('flash').toggle()
|
|
end,
|
|
desc = 'Toggle Flash Search',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'numToStr/Navigator.nvim',
|
|
config = load_config('tools.navigator'),
|
|
event = function()
|
|
if vim.fn.exists('$TMUX') == 1 then
|
|
return 'VeryLazy'
|
|
end
|
|
end,
|
|
},
|
|
{
|
|
'm4xshen/hardtime.nvim',
|
|
dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
|
|
config = function()
|
|
require('hardtime').setup({ enabled = true })
|
|
end,
|
|
cmd = 'Hardtime',
|
|
},
|
|
{
|
|
'chrisgrieser/nvim-spider',
|
|
config = load_config('tools.spider'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'folke/which-key.nvim',
|
|
config = load_config('tools.which-key'),
|
|
event = 'VeryLazy',
|
|
},
|
|
{
|
|
'iamcco/markdown-preview.nvim',
|
|
build = function()
|
|
vim.fn['mkdp#util#install']()
|
|
end,
|
|
ft = 'markdown',
|
|
cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview' },
|
|
},
|
|
{
|
|
'uga-rosa/ccc.nvim',
|
|
config = load_config('tools.ccc'),
|
|
cmd = { 'CccHighlighterToggle', 'CccConvert', 'CccPick' },
|
|
},
|
|
{
|
|
'2kabhishek/termim.nvim',
|
|
cmd = { 'Fterm', 'FTerm', 'Sterm', 'STerm', 'Vterm', 'VTerm' },
|
|
},
|
|
{
|
|
'2kabhishek/tdo.nvim',
|
|
dependencies = 'nvim-telescope/telescope.nvim',
|
|
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoTodos', 'TdoToggle', 'TdoFind', 'TdoFiles' },
|
|
keys = { '[t', ']t' },
|
|
},
|
|
{
|
|
'kndndrj/nvim-dbee',
|
|
dependencies = {
|
|
'MunifTanjim/nui.nvim',
|
|
},
|
|
build = function()
|
|
-- "curl", "wget", "bitsadmin", "go"
|
|
require('dbee').install('curl')
|
|
end,
|
|
config = load_config('tools.dbee'),
|
|
cmd = 'DBToggle',
|
|
enabled = false,
|
|
},
|
|
{
|
|
'stevearc/oil.nvim',
|
|
opts = {},
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
config = load_config('tools.oil'),
|
|
},
|
|
{
|
|
'aurum77/live-server.nvim',
|
|
build = function()
|
|
require("live_server.util").install()
|
|
end,
|
|
cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" },
|
|
keys = {
|
|
{ "<A-F1>", ft = "html", "<cmd>LiveServer<CR>", desc = "Live Server" },
|
|
{ "<A-F2>", ft = "html", "<cmd>LiveServerStop<CR>", desc = "Live Server Stop" },
|
|
},
|
|
},
|
|
{
|
|
'Zeioth/compiler.nvim',
|
|
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
|
|
dependencies = { "stevearc/overseer.nvim" },
|
|
opts = {},
|
|
keys = {
|
|
{ "<F3>", "<cmd>CompilerOpen<cr>", desc = "Open Compiler" },
|
|
{ "<S-F3>", function() vim.cmd("CompilerStop") vim.cmd("CompilerRedo") end, desc = "Redo Compiler" },
|
|
{ "<F4>", "<cmd>CompilerToggleResults<cr>", desc = "Toggle Compiler Results" },
|
|
},
|
|
},
|
|
{
|
|
'stevearc/overseer.nvim',
|
|
cmd = {
|
|
"OverseerOpen",
|
|
"OverseerClose",
|
|
"OverseerToggle",
|
|
"OverseerSaveBundle",
|
|
"OverseerLoadBundle",
|
|
"OverseerDeleteBundle",
|
|
"OverseerRunCmd",
|
|
"OverseerRun",
|
|
"OverseerInfo",
|
|
"OverseerBuild",
|
|
"OverseerQuickAction",
|
|
"OverseerTaskAction ",
|
|
"OverseerClearCache",
|
|
},
|
|
opts = {
|
|
task_list = {
|
|
direction = "bottom",
|
|
min_height = 15,
|
|
max_height = 15,
|
|
default_detail = 1,
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'okuuva/auto-save.nvim',
|
|
event = 'VeryLazy',
|
|
config = load_config('tools.auto-save'),
|
|
},
|
|
{
|
|
'CRAG666/code_runner.nvim',
|
|
config = load_config('tools.code-runner'),
|
|
},
|
|
-- Telescope
|
|
{
|
|
'nvim-telescope/telescope.nvim',
|
|
branch = 'master',
|
|
dependencies = {
|
|
'nvim-lua/plenary.nvim',
|
|
{
|
|
'nvim-telescope/telescope-fzf-native.nvim',
|
|
build = 'make',
|
|
},
|
|
'nvim-telescope/telescope-file-browser.nvim',
|
|
'nvim-telescope/telescope-symbols.nvim',
|
|
'molecule-man/telescope-menufacture',
|
|
'debugloop/telescope-undo.nvim',
|
|
},
|
|
config = load_config('tools.telescope'),
|
|
cmd = 'Telescope',
|
|
},
|
|
{
|
|
'ThePrimeagen/harpoon',
|
|
branch = 'harpoon2',
|
|
config = load_config('tools.harpoon'),
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'2kabhishek/nerdy.nvim',
|
|
dependencies = { 'stevearc/dressing.nvim' },
|
|
cmd = 'Nerdy',
|
|
},
|
|
|
|
-- Git
|
|
{
|
|
'2kabhishek/co-author.nvim',
|
|
dependencies = { 'stevearc/dressing.nvim' },
|
|
cmd = 'CoAuthor',
|
|
},
|
|
{
|
|
'ruifm/gitlinker.nvim',
|
|
config = load_config('tools.gitlinker'),
|
|
keys = '<leader>yg',
|
|
},
|
|
{
|
|
'lewis6991/gitsigns.nvim',
|
|
config = load_config('tools.gitsigns'),
|
|
cmd = 'Gitsigns',
|
|
event = { 'BufReadPre', 'BufNewFile' },
|
|
},
|
|
{
|
|
'tpope/vim-fugitive',
|
|
cmd = 'Git',
|
|
},
|
|
}
|
|
|
|
local ts_parsers = {
|
|
'bash',
|
|
'css',
|
|
'dart',
|
|
'elixir',
|
|
'gitcommit',
|
|
'go',
|
|
'html',
|
|
'java',
|
|
'javascript',
|
|
'json',
|
|
'lua',
|
|
'markdown',
|
|
'markdown_inline', -- markdown code blocks
|
|
'python',
|
|
'ruby',
|
|
'rust',
|
|
'typescript',
|
|
'vim',
|
|
'vimdoc',
|
|
'yaml',
|
|
}
|
|
|
|
local null_ls_sources = {
|
|
'shellcheck', -- bash lint
|
|
}
|
|
|
|
local lsp_servers = {
|
|
'bashls',
|
|
'jsonls',
|
|
'lua_ls',
|
|
'typos_lsp', -- check typos
|
|
'vimls',
|
|
}
|
|
|
|
local util = require('lib.util')
|
|
|
|
if util.is_present('npm') then
|
|
table.insert(lsp_servers, 'eslint')
|
|
table.insert(lsp_servers, 'tsserver')
|
|
end
|
|
|
|
if util.is_present('gem') then
|
|
local ror_nvim = {
|
|
'weizheheng/ror.nvim',
|
|
branch = 'main',
|
|
ft = 'ruby',
|
|
config = load_config('lang.ror'),
|
|
keys = {
|
|
{
|
|
'<leader>rc',
|
|
mode = { 'n', 'x', 'o' },
|
|
function()
|
|
vim.cmd('RorCommands')
|
|
end,
|
|
desc = 'Rails Commands',
|
|
},
|
|
},
|
|
}
|
|
local vim_rails = {
|
|
'tpope/vim-rails',
|
|
ft = 'ruby',
|
|
}
|
|
|
|
table.insert(lsp_servers, 'solargraph')
|
|
table.insert(lsp_servers, 'ruby_lsp')
|
|
table.insert(lsp_servers, 'rubocop')
|
|
table.insert(plugins, ror_nvim)
|
|
table.insert(plugins, vim_rails)
|
|
end
|
|
|
|
if util.is_present('dart') then
|
|
table.insert(lsp_servers, 'dartls')
|
|
end
|
|
|
|
if util.is_present('java') then
|
|
table.insert(lsp_servers, 'jdtls')
|
|
end
|
|
|
|
if util.is_present('pip') then
|
|
table.insert(lsp_servers, 'ruff_lsp')
|
|
table.insert(lsp_servers, 'pylsp')
|
|
end
|
|
|
|
if util.is_present('mix') then
|
|
table.insert(lsp_servers, 'elixirls')
|
|
end
|
|
|
|
if util.is_present('cargo') then
|
|
table.insert(lsp_servers, 'rust_analyzer')
|
|
end
|
|
|
|
return {
|
|
plugins = plugins,
|
|
lsp_servers = lsp_servers,
|
|
null_ls_sources = null_ls_sources,
|
|
ts_parsers = ts_parsers,
|
|
}
|