local symbols_outline = require("symbols-outline")

local opts = {
	auto_close = false,
	auto_preview = false,
	autofold_depth = 0,
	highlight_hovered_item = false,
	lsp_blacklist = {},
	position = 'right',
	preview_bg_highlight = 'Pmenu',
	relative_width = true,
	show_guides = true,
	show_numbers = false,
	show_relative_numbers = false,
	show_symbol_details = true,
	symbol_blacklist = {},
	width = 25,
	keymaps = {
		close = { "<Esc>", "q" },
		code_actions = "a",
		focus_location = "o",
		fold = "h",
		fold_all = "W",
		fold_reset = "R",
		goto_location = "<Cr>",
		hover_symbol = "<C-space>",
		rename_symbol = "r",
		toggle_preview = "K",
		unfold = "l",
		unfold_all = "E",
	},
	symbols = {
		Array = { icon = "", hl = "TSConstant" },
		Boolean = { icon = "⊨", hl = "TSBoolean" },
		Class = { icon = "𝓒", hl = "TSType" },
		Constant = { icon = "", hl = "TSConstant" },
		Constructor = { icon = "", hl = "TSConstructor" },
		Enum = { icon = "ℰ", hl = "TSType" },
		EnumMember = { icon = "", hl = "TSField" },
		Event = { icon = "🗲", hl = "TSType" },
		Field = { icon = "", hl = "TSField" },
		File = { icon = "", hl = "TSURI" },
		Function = { icon = "", hl = "TSFunction" },
		Interface = { icon = "ﰮ", hl = "TSType" },
		Key = { icon = "🔐", hl = "TSType" },
		Method = { icon = "ƒ", hl = "TSMethod" },
		Module = { icon = "", hl = "TSNamespace" },
		Namespace = { icon = "", hl = "TSNamespace" },
		Null = { icon = "NULL", hl = "TSType" },
		Number = { icon = "#", hl = "TSNumber" },
		Object = { icon = "⦿", hl = "TSType" },
		Operator = { icon = "+", hl = "TSOperator" },
		Package = { icon = "", hl = "TSNamespace" },
		Property = { icon = "", hl = "TSMethod" },
		String = { icon = "𝓐", hl = "TSString" },
		Struct = { icon = "𝓢", hl = "TSType" },
		TypeParameter = { icon = "𝙏", hl = "TSParameter" },
		Variable = { icon = "", hl = "TSConstant" },
	},
}

symbols_outline.setup(opts)

vim.api.nvim_set_keymap('n', '<Leader>a', ':SymbolsOutline<CR>', { noremap = true, silent = true })
