138 lines
4 KiB
Lua
138 lines
4 KiB
Lua
|
require("outline").setup({
|
|||
|
guides = {
|
|||
|
enabled = true,
|
|||
|
markers = {
|
|||
|
bottom = '└',
|
|||
|
middle = '├',
|
|||
|
vertical = '│',
|
|||
|
horizontal = '─',
|
|||
|
},
|
|||
|
},
|
|||
|
outline_items = {
|
|||
|
show_symbol_details = true,
|
|||
|
show_symbol_lineno = false,
|
|||
|
-- The two below are both for auto_update_events.follow
|
|||
|
highlight_hovered_item = true,
|
|||
|
-- On open, always followed. This is for auto_update_events.follow, whether
|
|||
|
-- to auto update cursor position to reflect code location. If false, can
|
|||
|
-- manually trigger with follow_cursor (API, command, keymap action).
|
|||
|
auto_set_cursor = true,
|
|||
|
auto_update_events = {
|
|||
|
follow = { 'CursorMoved' },
|
|||
|
items = { 'InsertLeave', 'WinEnter', 'BufEnter', 'BufWinEnter', 'BufWritePost' },
|
|||
|
},
|
|||
|
},
|
|||
|
outline_window = {
|
|||
|
position = 'right',
|
|||
|
split_command = nil,
|
|||
|
width = 25,
|
|||
|
relative_width = true,
|
|||
|
wrap = false,
|
|||
|
focus_on_open = true,
|
|||
|
auto_close = false,
|
|||
|
auto_jump = false,
|
|||
|
show_numbers = false,
|
|||
|
show_relative_numbers = false,
|
|||
|
---@type boolean|string?
|
|||
|
show_cursorline = true,
|
|||
|
hide_cursor = false,
|
|||
|
winhl = '',
|
|||
|
jump_highlight_duration = 400,
|
|||
|
center_on_jump = true,
|
|||
|
},
|
|||
|
preview_window = {
|
|||
|
live = false,
|
|||
|
auto_preview = false,
|
|||
|
width = 50,
|
|||
|
min_width = 50,
|
|||
|
relative_width = true,
|
|||
|
height = 50,
|
|||
|
min_height = 10,
|
|||
|
relative_height = true,
|
|||
|
border = 'single',
|
|||
|
open_hover_on_preview = false,
|
|||
|
winhl = 'NormalFloat:',
|
|||
|
winblend = 0,
|
|||
|
},
|
|||
|
symbol_folding = {
|
|||
|
autofold_depth = 1,
|
|||
|
auto_unfold = {
|
|||
|
hovered = true,
|
|||
|
---@type boolean|integer
|
|||
|
only = true,
|
|||
|
},
|
|||
|
markers = { '', '' },
|
|||
|
},
|
|||
|
keymaps = {
|
|||
|
show_help = '?',
|
|||
|
close = { '<Esc>', 'q' },
|
|||
|
goto_location = '<Cr>',
|
|||
|
peek_location = 'o',
|
|||
|
goto_and_close = '<S-Cr>',
|
|||
|
restore_location = '<C-g>',
|
|||
|
hover_symbol = '<C-space>',
|
|||
|
toggle_preview = 'K',
|
|||
|
rename_symbol = 'r',
|
|||
|
code_actions = 'a',
|
|||
|
fold = 'h',
|
|||
|
fold_toggle = '<tab>',
|
|||
|
fold_toggle_all = '<S-tab>',
|
|||
|
unfold = 'l',
|
|||
|
fold_all = 'W',
|
|||
|
unfold_all = 'E',
|
|||
|
fold_reset = 'R',
|
|||
|
down_and_jump = '<C-j>',
|
|||
|
up_and_jump = '<C-k>',
|
|||
|
},
|
|||
|
providers = {
|
|||
|
priority = { 'lsp', 'coc', 'markdown', 'norg' },
|
|||
|
lsp = {
|
|||
|
blacklist_clients = {},
|
|||
|
},
|
|||
|
markdown = {
|
|||
|
filetypes = { 'markdown' },
|
|||
|
},
|
|||
|
},
|
|||
|
symbols = {
|
|||
|
---@type outline.FilterConfig?
|
|||
|
filter = nil,
|
|||
|
icon_source = nil,
|
|||
|
icon_fetcher = nil,
|
|||
|
icons = {
|
|||
|
File = { icon = '', hl = 'Identifier' },
|
|||
|
Module = { icon = '', hl = 'Include' },
|
|||
|
Namespace = { icon = '{}', hl = 'Include' },
|
|||
|
Package = { icon = '', hl = 'Include' },
|
|||
|
Class = { icon = '𝓒', hl = 'Type' },
|
|||
|
Method = { icon = '.ƒ', hl = 'Function' },
|
|||
|
Property = { icon = '', hl = 'Identifier' },
|
|||
|
Field = { icon = '-', hl = 'Identifier' },
|
|||
|
Constructor = { icon = '()', hl = 'Special' },
|
|||
|
Enum = { icon = 'ℰ', hl = 'Type' },
|
|||
|
Interface = { icon = 'i', hl = 'Type' },
|
|||
|
Function = { icon = 'ƒ', hl = 'Function' },
|
|||
|
Variable = { icon = '(x)', hl = 'Constant' },
|
|||
|
Constant = { icon = 'c', hl = 'Constant' },
|
|||
|
String = { icon = '𝓐', hl = 'String' },
|
|||
|
Number = { icon = '#', hl = 'Number' },
|
|||
|
Boolean = { icon = '⊨', hl = 'Boolean' },
|
|||
|
Array = { icon = '[]', hl = 'Constant' },
|
|||
|
Object = { icon = '⦿', hl = 'Type' },
|
|||
|
Key = { icon = '🔐', hl = 'Type' },
|
|||
|
Null = { icon = 'NULL', hl = 'Type' },
|
|||
|
EnumMember = { icon = '', hl = 'Identifier' },
|
|||
|
Struct = { icon = '𝓢', hl = 'Structure' },
|
|||
|
Event = { icon = '🗲', hl = 'Type' },
|
|||
|
Operator = { icon = '+', hl = 'Identifier' },
|
|||
|
TypeParameter = { icon = '𝙏', hl = 'Identifier' },
|
|||
|
Component = { icon = '', hl = 'Function' },
|
|||
|
Fragment = { icon = '-', hl = 'Constant' },
|
|||
|
-- ccls
|
|||
|
TypeAlias = { icon = 't ', hl = 'Type' },
|
|||
|
Parameter = { icon = 'p ', hl = 'Identifier' },
|
|||
|
StaticMethod = { icon = '. ', hl = 'Function' },
|
|||
|
Macro = { icon = ' ', hl = 'Function' },
|
|||
|
},
|
|||
|
},
|
|||
|
})
|