vim.g.mapleader = " "

vim.pack.add {
	{ src = "https://github.com/nvim-mini/mini.pick" },
	{ src = "https://github.com/rafamadriz/friendly-snippets" },
	{
		src = "https://github.com/saghen/blink.cmp",
		version = "1.*",
	},
	{ src = "https://github.com/nvim-lualine/lualine.nvim" },
	{ src = "https://github.com/sphamba/smear-cursor.nvim" },

	{ src = "https://github.com/m00qek/baleia.nvim" },
	{ src = "https://github.com/esmuellert/codediff.nvim" },
	{ src = "https://github.com/NeogitOrg/neogit" },
}

require("mini.pick").setup {}
require("lualine").setup {}
require("smear_cursor").setup {}

require('blink.cmp').setup {
	fuzzy = { implementation = 'prefer_rust_with_warning' },
	signature = { enabled = true },
	keymap = {
		preset = "default",
		["<C-y>"] = { "select_and_accept" },
		["<C-p>"] = { "select_prev", "fallback" },
		["<C-n>"] = { "select_next", "fallback" },
		["<C-b>"] = { "scroll_documentation_down", "fallback" },
		["<C-f>"] = { "scroll_documentation_up", "fallback" },
		-- ["<C-e>"] = { "hide" },
	},

	appearance = {
		use_nvim_cmp_as_default = true,
		nerd_font_variant = "normal",
	},

	completion = {
		documentation = {
			auto_show = true,
			auto_show_delay_ms = 200,
		}
	},

	cmdline = {
		keymap = {
			preset = 'inherit',
			['<CR>'] = { 'accept_and_enter', 'fallback' },
		},
	},

	sources = {
		default = { "lsp", "snippets" },
		providers = {
			snippets = { opts = { friendly_snippets = true, } }
		}
	}
}

require("neogit").setup {}
