return { { -- treesitter 'nvim-treesitter/nvim-treesitter', opts = function() return require('plugins.configs.treesitter') end, config = function(_, opts) -- to ensure the configuration can happen we need to do this here -- otherwise the configuration of treesitter can't find it require('nvim-treesitter.configs').setup(opts) end, init = function() require('core.utils.lazy')('nvim-treesitter') end, build = ':TSUpdate', dependencies = { { 'nvim-treesitter/nvim-treesitter-textobjects' }, }, }, { -- rainbow-delimiters 'hiphish/rainbow-delimiters.nvim', config = false, event = 'VeryLazy', dependencies = { 'nvim-treesitter', }, init = function() vim.g.rainbow_delimiters = require('plugins.configs.treesitter.rainbow-delims') end, }, { -- nerd commenter 'preservim/nerdcommenter', event = 'VeryLazy', init = function() vim.g.NERDSpaceDelims = 1 vim.g.NERDCompaceSexyComs = 1 end, keys = { { 'cc', nil, desc = 'Comment line' }, { 'cn', nil, desc = 'Comment line force nesting' }, { 'c', nil, desc = 'Toggle comment selection' }, { 'cm', nil, desc = 'Comment Minimal' }, { 'ci', nil, desc = 'Toggle comment line' }, { 'cs', nil, desc = 'Comment Sexy' }, { 'cy', nil, desc = 'Comment and yank' }, { 'c$', nil, desc = 'Comment to EOL' }, { 'cA', nil, desc = 'Append comment' }, { 'ca', nil, desc = 'Switch comment delimiters' }, { 'cl', nil, desc = 'Comment align left' }, { 'cb', nil, desc = 'Comment alight both' }, { 'cu', nil, desc = 'Uncomment lines' }, }, }, { 'mcauley-penney/tidy.nvim', config = true, event = 'BufWritePre', }, { 'gentoo/gentoo-syntax', lazy = false, }, }