local version = vim.version() local function hasversion(major, minor, patch) if version.major < major then return false end if minor == nil then return true end if version.minor < minor then return false end if patch == nil then return true end return version.patch <= patch end return { { 'rose-pine/neovim', name = 'rose-pine', }, { 'sainnhe/everforest', init = function() vim.g.everforest_dim_inactive_windows = 1 end, config = function() vim.cmd [[colorscheme everforest]] end }, { 'L3MON4D3/LuaSnip', version = 'v2.*', build = 'make install_jsregexp', dependencies = { 'rafamadriz/friendly-snippets' }, config = function() require('luasnip.loaders.from_vscode').lazy_load() end }, 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', { 'hrsh7th/nvim-cmp', config = function() require 'cmp-setup' end }, 'lukas-reineke/cmp-under-comparator', { 'neovim/nvim-lspconfig', config = function() require 'lsp-setup' end }, { 'folke/neodev.nvim', opts = { override = function(_, library) library.enabled = true library.plugins = true end, }, enabled = not hasversion(0, 10), lazy = false }, { "folke/lazydev.nvim", ft = "lua", -- only load on lua files opts = { library = { { path = "luvit-meta/library", words = { "vim%.uv" } }, }, }, enabled = hasversion(0, 10), }, { "Bilal2453/luvit-meta", lazy = true }, 'simrat39/rust-tools.nvim', 'mfussenegger/nvim-dap', { 'numToStr/Comment.nvim', opts = {} }, { 'NeogitOrg/neogit', version = 'v0.0.1', dependencies = { 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope.nvim', 'sindrets/diffview.nvim', }, config = true, }, { 'ahmedkhalf/project.nvim', opts = {}, config = function(_, opts) require 'gitsigns'.setup(opts) end }, 'lambdalisue/suda.vim', { 'kylechui/nvim-surround', version = '*', opts = {} }, { 'nvim-treesitter/nvim-treesitter', config = function() require 'nvim-treesitter.configs'.setup({ ensure_installed = { 'c', 'lua', 'vim', 'vimdoc', 'query', 'rust', 'cpp' } }) end, build = function() local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) ts_update() end, }, { "nvim-neo-tree/neo-tree.nvim", branch = "v3.x", dependencies = { "nvim-lua/plenary.nvim", "nvim-tree/nvim-web-devicons", "MunifTanjim/nui.nvim", }, opts = { filesystem = { hijack_netrw_behavior = "open_default" } }, keys = { { '', 'Neotree', desc = 'View files', mode = { 'n', 'i', 'x' } } }, lazy = false }, { 'klen/nvim-test', config = function() require('nvim-test').setup() end }, 'direnv/direnv.vim', { 'folke/which-key.nvim', event = 'VeryLazy', opts = { delay = function(ctx) return ctx.plugin and 100 or 200 end, }, keys = { { '?', function() require('which-key').show({ global = false }) end, desc = 'Buffer Local Keymaps', }, { '', function() require('which-key').show({ global = true }) end, desc = 'All Keymaps', }, }, config = function(_, opts) local wk = require('which-key') wk.setup(opts) wk.add({ { 'x', group = 'Trouble' } }) end }, { 'nvim-lualine/lualine.nvim', dependencies = { 'nvim-tree/nvim-web-devicons' }, opts = {} }, { 'akinsho/bufferline.nvim', version = "*", dependencies = 'nvim-tree/nvim-web-devicons', opts = { options = { mode = 'tabs', separator_style = "slant" } } }, { 'stevearc/conform.nvim', config = function() require('conform').setup({ formatters_by_ft = { lua = { 'stylua' }, rust = { 'rustfmt', lsp_format = 'fallback' }, -- javascript = { '', stop_after_first = true }, }, }) end, enabled = hasversion(0, 10), }, { 'folke/trouble.nvim', opts = {}, cmd = 'Trouble', keys = { { 'xx', 'Trouble diagnostics toggle', desc = 'Diagnostics (Trouble)', }, { 'xX', 'Trouble diagnostics toggle filter.buf=0', desc = 'Buffer Diagnostics (Trouble)', }, { 'xcs', 'Trouble symbols toggle focus=false', desc = 'Symbols (Trouble)', }, { 'xcl', 'Trouble lsp toggle focus=false win.position=right', desc = 'LSP Definitions / references / ... (Trouble)', }, { 'xL', 'Trouble loclist toggle', desc = 'Location List (Trouble)', }, { 'xQ', 'Trouble qflist toggle', desc = 'Quickfix List (Trouble)', }, }, }, { 'lewis6991/gitsigns.nvim', opts = { current_line_blame = true } }, { 'folke/zen-mode.nvim', keys = { { 'zt', function() require 'zen-mode'.toggle() end, desc = 'Toggle zen mode' } }, opts = { window = { options = { relativenumber = false, number = false } } } }, { 'folke/twilight.nvim', opts = {} }, { 'CWood-sdf/spaceport.nvim', opts = { replace_dirs = { { 'C:\\Development', '#' } } }, lazy = false, -- load spaceport immediately } }