return { 'stevearc/aerial.nvim', opts = function () require("aerial").setup({ -- optionally use on_attach to set keymaps when aerial has attached to a buffer on_attach = function(bufnr) -- Jump forwards/backwards with '{' and '}' vim.keymap.set("n", "{", "AerialPrev", { buffer = bufnr }) vim.keymap.set("n", "}", "AerialNext", { buffer = bufnr }) end, max_width = { 40, 0.2 }, backends = { "treesitter", "lsp" }, default_direction = "float", float = { border = "rounded", -- Determines location of floating window -- cursor - Opens float on top of the cursor -- editor - Opens float centered in the editor -- win - Opens float centered in the window relative = "cursor", -- These control the height of the floating window. -- They can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) -- min_height and max_height can be a list of mixed types. -- min_height = {8, 0.1} means "the greater of 8 rows or 10% of total" max_height = 0.9, height = nil, min_height = { 8, 0.1 }, override = function(conf, source_winid) -- This is the config that will be passed to nvim_open_win. -- Change values here to customize the layout return conf end, }, }) -- You probably also want to set a keymap to toggle aerial -- require("telescope").setup({ -- extensions = { -- aerial = { -- -- How to format the symbols -- format_symbol = function(symbol_path, filetype) -- if filetype == "json" or filetype == "yaml" then -- return table.concat(symbol_path, ".") -- else -- return symbol_path[#symbol_path] -- end -- end, -- -- Available modes: symbols, lines, both -- show_columns = "both", -- }, -- }, -- }) end, -- Optional dependencies dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, }