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_better_performance = 1 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, ft = { 'lua' } }, { 'hrsh7th/nvim-cmp', config = function() require 'cmp-setup' end, event = 'VeryLazy', dependencies = { 'saadparwaiz1/cmp_luasnip', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', } }, 'lukas-reineke/cmp-under-comparator', { 'neovim/nvim-lspconfig', config = function() require 'lsp-setup' end, event = { "BufReadPre", "BufNewFile" }, dependencies = { { 'williamboman/mason.nvim', config = true }, { "williamboman/mason-lspconfig.nvim", config = true }, } }, { "pmizio/typescript-tools.nvim", dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, opts = {}, event = { "BufReadPre", "BufNewFile" } }, { '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, cmd = { 'Neogit' } }, { 'ahmedkhalf/project.nvim', opts = {}, config = function(_, opts) require 'gitsigns'.setup(opts) end, event = 'VeryLazy' }, { 'lambdalisue/suda.vim', cmd = { 'SudaRead', 'SudaWrite' } }, { '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 }, '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', }, }, lazy = false, config = function(_, opts) local wk = require("which-key") wk.setup(opts) wk.add({ { "x", group = "Trouble" }, }) wk.add({ { "f", group = "Format" }, }) wk.add({ "T", group = "Telescope" }) wk.add({ "Tg", group = "git" }) wk.add({ "Tf", group = "files" }) wk.add({ { "w", group = "LSP workspace" }, }) 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 = { "eslint_d", stop_after_first = true, lsp_format = "never" }, typescript = { "eslint_d", stop_after_first = true, lsp_format = "never" }, }, format_on_save = {}, }) end, keys = { { "ff", function() require("conform").format({ async = true }) end, desc = "Format buffer", }, }, enabled = hasversion(0, 10), event = "VeryLazy", }, { 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 }, event = 'VeryLazy' }, { '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 = {}, cmd = { 'Twilight', 'TwilightEnable', 'TwilightDisable' } }, { "CWood-sdf/spaceport.nvim", opts = { replaceDirs = { { "C:\\Development", "#" } }, projectEntry = "Neotree current", }, lazy = false, -- load spaceport immediately }, }