forked from simrat39/symbols-outline.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
symbols-outline.txt
182 lines (148 loc) · 9.33 KB
/
symbols-outline.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
*symbols-outline.txt* For NVIM v0.8.0 Last change: 2023 January 25
==============================================================================
Table of Contents *symbols-outline-table-of-contents*
1. symbols-outline.nvim |symbols-outline-symbols-outline.nvim|
- Prerequisites |symbols-outline-prerequisites|
- Installation |symbols-outline-installation|
- Setup |symbols-outline-setup|
- Configuration |symbols-outline-configuration|
- Commands |symbols-outline-commands|
- Default keymaps |symbols-outline-default-keymaps|
- Highlights |symbols-outline-highlights|
==============================================================================
1. symbols-outline.nvim *symbols-outline-symbols-outline.nvim*
**A tree like view for symbols in Neovim using the Language Server Protocol.
Supports all your favourite languages.**
<div class="figure">
<img src="https://github.com/simrat39/rust-tools-demos/raw/master/symbols-demo.gif" title="fig:"/>
<p class="caption">demo</p>
</div>
PREREQUISITES *symbols-outline-prerequisites*
- `neovim 0.7+`
- Properly configured Neovim LSP client
INSTALLATION *symbols-outline-installation*
Using `packer.nvim`
>
use 'simrat39/symbols-outline.nvim'
<
SETUP *symbols-outline-setup*
Put the setup call in your init.lua or any lua file that is sourced.
>
require("symbols-outline").setup()
<
CONFIGURATION *symbols-outline-configuration*
Pass a table to the setup call above with your configuration options.
>
local opts = {
highlight_hovered_item = true,
show_guides = true,
auto_preview = false,
position = 'right',
relative_width = true,
width = 25,
auto_close = false,
show_numbers = false,
show_relative_numbers = false,
show_symbol_details = true,
preview_bg_highlight = 'Pmenu',
autofold_depth = nil,
auto_unfold_hover = true,
fold_markers = { '', '' },
wrap = false,
keymaps = { -- These keymaps can be a string or a table for multiple keys
close = {"<Esc>", "q"},
goto_location = "<Cr>",
focus_location = "o",
hover_symbol = "<C-space>",
toggle_preview = "K",
rename_symbol = "r",
code_actions = "a",
fold = "h",
unfold = "l",
fold_all = "W",
unfold_all = "E",
fold_reset = "R",
},
lsp_blacklist = {},
symbol_blacklist = {},
symbols = {
File = { icon = "", hl = "@text.uri" },
Module = { icon = "", hl = "@namespace" },
Namespace = { icon = "", hl = "@namespace" },
Package = { icon = "", hl = "@namespace" },
Class = { icon = "𝓒", hl = "@type" },
Method = { icon = "ƒ", hl = "@method" },
Property = { icon = "", hl = "@method" },
Field = { icon = "", hl = "@field" },
Constructor = { icon = "", hl = "@constructor" },
Enum = { icon = "ℰ", hl = "@type" },
Interface = { icon = "ﰮ", hl = "@type" },
Function = { icon = "", hl = "@function" },
Variable = { icon = "", hl = "@constant" },
Constant = { icon = "", 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 = "@field" },
Struct = { icon = "𝓢", hl = "@type" },
Event = { icon = "🗲", hl = "@type" },
Operator = { icon = "+", hl = "@operator" },
TypeParameter = { icon = "𝙏", hl = "@parameter" },
Component = { icon = "", hl = "@function" },
Fragment = { icon = "", hl = "@constant" },
},
}
<
│ Property │ Description │ Type │ Default │
│highlight_hovered_item│Whether to highlight the currently hovered symbol (high cpu usage) │boolean │true │
│show_guides │Whether to show outline guides │boolean │true │
│position │Where to open the split window │'right' or 'left' │'right' │
│relative_width │Whether width of window is set relative to existing windows │boolean │true │
│width │Width of window (as a % or columns based on relative_width) │int │25 │
│auto_close │Whether to automatically close the window after selection │boolean │false │
│auto_preview │Show a preview of the code on hover │boolean │false │
│show_numbers │Shows numbers with the outline │boolean │false │
│show_relative_numbers │Shows relative numbers with the outline │boolean │false │
│show_symbol_details │Shows extra details with the symbols (lsp dependent) │boolean │true │
│preview_bg_highlight │Background color of the preview window │string │Pmenu │
│winblend │Pseudo-transparency of the preview window │int │0 │
│keymaps │Which keys do what │table (dictionary)│|symbols-outline-here|│
│symbols │Icon and highlight config for symbol icons │table (dictionary)│scroll up │
│lsp_blacklist │Which lsp clients to ignore │table (array) │{} │
│symbol_blacklist │Which symbols to ignore (possible values <./lua/symbols-outline/symbols.lua>)│table (array) │{} │
│autofold_depth │Depth past which nodes will be folded by default │int │nil │
│auto_unfold_hover │Automatically unfold hovered symbol │boolean │true │
│fold_markers │Markers to denote foldable symbol’s status │table (array) │{ '', '' } │
│wrap │Whether to wrap long lines, or let them flow off the window │boolean │false │
COMMANDS *symbols-outline-commands*
│ Command │ Description │
│:SymbolsOutline │Toggle symbols outline│
│:SymbolsOutlineOpen │Open symbols outline │
│:SymbolsOutlineClose │Close symbols outline │
DEFAULT KEYMAPS *symbols-outline-default-keymaps*
│ Key │ Action │
│Escape │Close outline │
│Enter │Go to symbol location in code │
│o │Go to symbol location in code without losing focus│
│Ctrl+Space│Hover current symbol │
│K │Toggles the current symbol preview │
│r │Rename symbol │
│a │Code actions │
│h │fold symbol │
│l │Unfold symbol │
│W │Fold all symbols │
│E │Unfold all symbols │
│R │Reset all folding │
│? │Show help message │
HIGHLIGHTS *symbols-outline-highlights*
│ Highlight │ Purpose │
│FocusedSymbol │Highlight of the focused symbol │
│Pmenu │Highlight of the preview popup windows│
│SymbolsOutlineConnector│Highlight of the table connectors │
│Comment │Highlight of the info virtual text │
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: