return { -- lazy itself { 'folke/lazy.nvim', version = '*' }, { 'catppuccin/nvim', name = "catppuccin", lazy = false, priority = 1000, config = function() require'catppuccin'.setup({ color_overrides = { macchiato = { text = "#feffe9", --"#b7d69b", subtext1 = "#a8c68f", subtext0 = "#98b381", overlay2 = "#879f72", overlay1 = "#758a63", overlay0 = "#647554", surface2 = "#526146", surface1 = "#414d37", surface0 = "#303828", base = "#262e1e", mantle = "#1d2417", crust = "#151a10", } } }) vim.cmd([[colorscheme catppuccin-macchiato]]) end }, { 'morhetz/gruvbox', -- Neovim editor theme (gruvbox MVP) lazy = false, priority = 1000, config = function() -- vim.cmd([[colorscheme gruvbox]]) end }, -- treesitter { 'nvim-treesitter/nvim-treesitter', version = false, event = { "BufReadPost", "BufWritePost", "BufNewFile", "VeryLazy" }, build = ":TSUpdate", init = function(plugin) -- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early -- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which -- no longer trigger the **nvim-treeitter** module to be loaded in time. -- Luckily, the only thins that those plugins need are the custom queries, which we make available -- during startup. require("lazy.core.loader").add_to_rtp(plugin) require("nvim-treesitter.query_predicates") end, dependencies = { { "nvim-treesitter/nvim-treesitter-textobjects", config = function() -- When in diff mode, we want to use the default -- vim text objects c & C instead of the treesitter ones. local move = require("nvim-treesitter.textobjects.move") ---@type table local configs = require("nvim-treesitter.configs") for name, fn in pairs(move) do if name:find("goto") == 1 then move[name] = function(q, ...) if vim.wo.diff then local config = configs.get_module("textobjects.move")[name] ---@type table for key, query in pairs(config or {}) do if q == query and key:find("[%]%[][cC]") then vim.cmd("normal! " .. key) return end end end return fn(q, ...) end end end end, }, }, cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" }, }, -- Telescope { { 'nvim-telescope/telescope.nvim', event = "VeryLazy", dependencies = { "nvim-telescope/telescope-file-browser.nvim", { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, 'nvim-lua/plenary.nvim', "nvim-tree/nvim-web-devicons", }, }, }, -- cmdline tools and lsp servers -- { 'neovim/nvim-lspconfig', -- Configurations for Nvim LSP dependencies = { { "folke/neoconf.nvim", cmd = "Neoconf", config = false, dependencies = { "nvim-lspconfig" } }, { "folke/neodev.nvim", opts = {} }, "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", }, config = function() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) require('mason').setup() local mason_lspconfig = require 'mason-lspconfig' mason_lspconfig.setup { ensure_installed = { "pyright" } } require("lspconfig").pyright.setup { capabilities = capabilities, } end }, -- mason.nvim { "williamboman/mason.nvim", cmd = "Mason", keys = { { "cm", "Mason", desc = "Mason" } }, build = ":MasonUpdate", opts = { ensure_installed = { "stylua", "shfmt", -- "flake8", }, }, ---@param opts MasonSettings | {ensure_installed: string[]} config = function(_, opts) require("mason").setup(opts) local mr = require("mason-registry") mr:on("package:install:success", function() vim.defer_fn(function() -- trigger FileType event to possibly load this newly installed LSP server require("lazy.core.handler.event").trigger({ event = "FileType", buf = vim.api.nvim_get_current_buf(), }) end, 100) end) local function ensure_installed() for _, tool in ipairs(opts.ensure_installed) do local p = mr.get_package(tool) if not p:is_installed() then p:install() end end end if mr.refresh then mr.refresh(ensure_installed) else ensure_installed() end end, }, { 'jay-babu/mason-null-ls.nvim', lazy = true, dependencies = { 'jose-elias-alvarez/null-ls.nvim', 'williamboman/mason.nvim' } }, { 'jay-babu/mason-nvim-dap.nvim', lazy = true, dependencies = { 'williamboman/mason.nvim', 'mfussenegger/nvim-dap' } }, { 'rcarriga/nvim-dap-ui', lazy = true, dependencies = { "mfussenegger/nvim-dap" } }, -- -- auto pairs { "echasnovski/mini.pairs", event = "VeryLazy", opts = {}, keys = {{ "up", function() local Util = require("lazy.core.util") vim.g.minipairs_disable = not vim.g.minipairs_disable if vim.g.minipairs_disable then Util.warn("Disabled auto pairs", { title = "Option" }) else Util.info("Enabled auto pairs", { title = "Option" }) end end, desc = "Toggle auto pairs", }}, }, -- auto completion { 'hrsh7th/nvim-cmp', version = false, -- last release is way too old event = "InsertEnter", dependencies = { 'hrsh7th/cmp-buffer', -- completion source 'hrsh7th/cmp-path', -- completion source 'hrsh7th/cmp-nvim-lua', -- completion source 'hrsh7th/cmp-nvim-lsp', -- completion source 'L3MON4D3/LuaSnip', 'saadparwaiz1/cmp_luasnip', 'onsails/lspkind.nvim', }, }, -- misc { 'vim-airline/vim-airline', }, { 'j-hui/fidget.nvim', tag = "legacy" }, { "folke/trouble.nvim", lazy = true, dependencies = "nvim-tree/nvim-web-devicons", }, { "L3MON4D3/LuaSnip", dependencies = { "rafamadriz/friendly-snippets" }, event = "VeryLazy", }, -- Need to short this out properly! -- learn this 'tpope/vim-surround', -- differentiate brackets 'luochen1990/rainbow', -- File tree 'preservim/nerdtree', -- Distraction free writing 'junegunn/goyo.vim', -- The Best Thing EVER 'vimwiki/vimwiki', -- better comments 'scrooloose/nerdcommenter', -- Show colours 'ap/vim-css-color', -- Add snippets 'honza/vim-snippets', -- highlight matching html tags -- 'valloric/matchtagalways', -- Syntax highlighting extension 'sheerun/vim-polyglot', --[[ --[[ { 'gleinir/lspsaga.nvim',-- Interact with LSP a little easier branch='main' } --] ] -- Autocomplete brackets and punctutation 'jiangmiao/auto-pairs', -- Debug Adaptor Protocol (added for mason.nvim), and null-ls for linter and formatting 'mfussenegger/nvim-dap', 'jose-elias-alvarez/null-ls.nvim', -- Live Preview of MD { "iamcco/markdown-preview.nvim", config = function() vim.fn["mkdp#util#install"]() end, }, 'rbgrouleff/bclose.vim', 'folke/neodev.nvim', 'nvim-tree/nvim-web-devicons', --]] }