require("lazy").setup({
	spec = {
		-- install plugins
		{ 'nvim-treesitter/nvim-treesitter' },
		{ 'ellisonleao/gruvbox.nvim' },
		{ 'danilamihailov/beacon.nvim' },
		{ 'nvim-lua/plenary.nvim' },
		{
			'folke/todo-comments.nvim',
			dependencies = { "nvim-lua/plenary.nvim" },
			opts = {
				keywords = {
					SAFETY = {
						icon = "☢",
						color = "warning",
						alt = { "SOUNDNESS", "UNSAFE", "UNSOUND" },
					},
					INVARIANT = {
						icon = "🦑",
						color = "hint",
					},
				},
			},
		},
		{
			"folke/which-key.nvim",
			event = "VeryLazy",
			init = function()
				vim.o.timeout = true
				vim.o.timeoutlen = 300
			end,
			opts = {
				-- your configuration comes here
				-- or leave it empty to use the default settings
				-- refer to the configuration section below
			},
		},
		{ 'rktjmp/fwatch.nvim' },
		{
			"folke/snacks.nvim",
			priority = 1000,
			lazy = false,
			opts = {
				bigfile = { enabled = true },
				notifier = { enabled = true },
				quickfile = { enabled = true },
				statuscolumn = { enabled = true },
				words = { enabled = true },
			},
		},
		{
			"folke/flash.nvim",
			event = "VeryLazy",
			---@type Flash.Config
			opts = {},
			-- stylua: ignore
			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" },
			},
		},

		-- -- language server stuff
		{ 'williamboman/mason.nvim' },
		{ 'williamboman/mason-lspconfig.nvim' },
		{ 'neovim/nvim-lspconfig' },
		{
			'mrcjkb/rustaceanvim',
			version = '^6',
			lazy = false, -- This plugin is already lazy
		},
		{ 'mfussenegger/nvim-dap' },
		{ 'rcarriga/nvim-dap-ui',               dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } },
		{ 'theHamsta/nvim-dap-virtual-text' },
		{ 'jay-babu/mason-nvim-dap.nvim' },

		-- -- nushell support
		-- --use { 'LhKipp/nvim-nu', run = function() vim.fn[':TSInstall nu'] end} }
		{ 'LhKipp/nvim-nu' },

		-- -- Completion framework:
		{ 'hrsh7th/nvim-cmp' },

		-- -- LSP completion source:
		{ 'hrsh7th/cmp-nvim-lsp' },

		-- -- Useful completion sources:
		{ 'hrsh7th/cmp-nvim-lua' },
		{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
		{ 'hrsh7th/cmp-vsnip' },
		{ 'hrsh7th/cmp-path' },
		{ 'hrsh7th/cmp-buffer' },
		{ 'hrsh7th/vim-vsnip' },
		{ 'ryo33/nvim-cmp-rust' },

		{
			'nvim-telescope/telescope.nvim',
			branch = '0.1.x',
			dependencies = { 'nvim-lua/plenary.nvim' }
		},
		{
			"ThePrimeagen/harpoon",
			branch = "harpoon2",
			dependencies = { "nvim-lua/plenary.nvim" }
		},

		-- -- status line
		{ 'linrongbin16/lsp-progress.nvim' },
		{ 'nvim-lualine/lualine.nvim' },
	},
	-- Configure any other settings here. See the documentation for more details.
	-- colorscheme that will be used when installing plugins.
	install = { colorscheme = { "habamax" } },
	-- automatically check for plugin updates
	checker = {
		enabled = true,
		notify = false,
	},
})
