Auto generate vim docs

This commit is contained in:
hedyhli
2023-11-01 06:31:19 +00:00
committed by github-actions[bot]
parent ed90314f9f
commit 2258c6bbd0

View File

@@ -1,58 +1,189 @@
*symbols-outline.txt* For NVIM v0.8.0 Last change: 2023 January 25 *symbols-outline.txt* For NVIM v0.8.0 Last change: 2023 November 01
============================================================================== ==============================================================================
Table of Contents *symbols-outline-table-of-contents* Table of Contents *symbols-outline-table-of-contents*
1. symbols-outline.nvim |symbols-outline-symbols-outline.nvim| 1. ⚠️ NOTE: THIS IS A FORK |symbols-outline-⚠️-note:-this-is-a-fork|
- Prerequisites |symbols-outline-prerequisites| - Maintenance status|symbols-outline-⚠️-note:-this-is-a-fork-maintenance-status|
- Installation |symbols-outline-installation| - Features |symbols-outline-⚠️-note:-this-is-a-fork-features|
- Setup |symbols-outline-setup| 2. symbols-outline.nvim |symbols-outline-symbols-outline.nvim|
- Configuration |symbols-outline-configuration| - Prerequisites |symbols-outline-symbols-outline.nvim-prerequisites|
- Commands |symbols-outline-commands| - Installation |symbols-outline-symbols-outline.nvim-installation|
- Default keymaps |symbols-outline-default-keymaps| - Setup |symbols-outline-symbols-outline.nvim-setup|
- Highlights |symbols-outline-highlights| - Configuration |symbols-outline-symbols-outline.nvim-configuration|
- Commands |symbols-outline-symbols-outline.nvim-commands|
- Default keymaps |symbols-outline-symbols-outline.nvim-default-keymaps|
- Highlights |symbols-outline-symbols-outline.nvim-highlights|
============================================================================== ==============================================================================
1. symbols-outline.nvim *symbols-outline-symbols-outline.nvim* 1. ⚠️ NOTE: THIS IS A FORK *symbols-outline-⚠️-note:-this-is-a-fork*
This is a fork of the original symbols-outline.nvim which merges some selected
PRs from the original repo, plus some other improvements due to personal
preferences.
It does not attempt to be an up-to-date successor of the original repo, nor
does it attempt to ensure everyones use-cases are satisfied by providing an
overall better experience. It is merely a fork which I maintain for my personal
use-cases which incorporates some selected PRs.
MAINTENANCE STATUS*symbols-outline-⚠️-note:-this-is-a-fork-maintenance-status*
This fork is NOT guaranteed to be completely bug-free, nor as stable as the
original. However, since I use this plugin myself, it is guaranteed that
selected issues that I encounter myself would be fixed (to the best of my
ability).
I do not merge PRs from the original repo that I dont personally need.
- **DO use this fork if**:
- You want to use features available in this fork, which are not included
upstream (listed below)
- You MIGHT want some up-to-date fixes to problems (that I also face) but is
OK with some things not being looked after well (things I dont personally use)
- **Do NOT use this fork if**:
- You want a stable plugin
- You dont need the extra features in this fork
FEATURES *symbols-outline-⚠️-note:-this-is-a-fork-features*
Below is a list of features Ive included in this fork which, at the time of
writing, has not been included upstream (in the original repo). I try my best
to keep this list up to date.
- Feat: Toggling folds (and added default keymaps for it)
(simrat39/symbols-outline.nvim#194)
- Feat: when `auto_close=true` only auto close if `goto_location` is used (where
focus changed), and not for `focus_location`
(simrat39/symbols-outline.nvim#119)
- Fix `SymbolsOutlineClose` crashing when already closed:
simrat39/symbols-outline.nvim#163
- Support Nerd fonts v3.0: simrat39/symbols-outline.nvim#225
- Fix newlines in symbols crash: simrat39/symbols-outline.nvim#204
(simrat39/symbols-outline.nvim#184)
- Fix `code_actions`: simrat39/symbols-outline.nvim#168
(simrat39/symbols-outline.nvim#123)
- Fix fold all operation too slow: simrat39/symbols-outline.nvim#223
(simrat39/symbols-outline.nvim#224)
PRS ~
- Open handler checks if view is not already open (#235 by eyalz800)
- auto_jump config param (#229 by stickperson)
- ✅ Update nerd fonts to 3.0 (#225 by anstadnik)
- ✅ fix(folding): optimize fold/unfold all (#223 by wjdwndud0114)
- ✅ Support markdown setext-style headers (#222 by msr1k)
- ✅ fix(icons): replace obsolete icons (#219 by loichyan) **Superseded by
#225**
- ✅ Support ccls symbols (#218 by rqdmap)
- ✅ fix: replace newlines with spaces in writer (#204 by tbung)
- ✅ Make close_outline idempotent (#200 by showermat) **Superseded by #163**
- Distinguish between public and private function display in Elixir (#187 by
scottming)
- ✅ Fix some options (#180 by cljoly)
- fix: Invalid buffer id error (#177 by snowair)
- ✅ fix(code_actions): use the builtin code_action (#168 by zjp-CN)
- ✅ fix: plugin crashes when SymbolOutlineClose used (#163 by beauwilliams)
- feat: Add window_bg_highlight to config (#137 by Zane-)
- Added preview width and relative size (#130 by Freyskeyd)
- Improve preview, hover windows configurability and looks (#128 by toppair)
- ✅ Do not close outline when focus_location occurs (#119 by M1Sports20)
- feat: instant_preview (#116 by axieax)
- check if code_win is nill (#110 by i3Cheese)
- Floating window (Draft) (#101 by druskus20)
TODO ~
KEY:
>
- [ ] : Planned
- [/] : WIP
- : Idea
<
Items will be moved to above list when complete.
- Folds
- ☐ Org-like shift+tab behavior: Open folds level-by-level
- ☐ Optionally not opening all child nodes when opening parent node
- Fold siblings and siblings of parent on startup
- Navigation
- Go to parent
- Cycle siblings
RELATED PLUGINS ~
- nvim-navic
- nvim-navbuddy
- dropdown.nvim
- treesitter (inspect/edit)
------------------------------------------------------------------------------
==============================================================================
2. symbols-outline.nvim *symbols-outline-symbols-outline.nvim*
**A tree like view for symbols in Neovim using the Language Server Protocol. **A tree like view for symbols in Neovim using the Language Server Protocol.
Supports all your favourite languages.** 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*
PREREQUISITES *symbols-outline-symbols-outline.nvim-prerequisites*
- `neovim 0.7+` - `neovim 0.7+`
- Properly configured Neovim LSP client - Properly configured Neovim LSP client
INSTALLATION *symbols-outline-installation* INSTALLATION *symbols-outline-symbols-outline.nvim-installation*
Using `packer.nvim` Use `hedyhli/symbols-outline.nvim` if you wish to use this fork.
> Packer:
>lua
use 'simrat39/symbols-outline.nvim' use 'simrat39/symbols-outline.nvim'
< <
Lazy:
SETUP *symbols-outline-setup* >lua
{
"simrat39/symbols-outline.nvim",
config = function()
-- Example mapping to toggle symbols-outline
vim.keymap.set("n", "<leader>tt", "<cmd>SymbolsOutline<CR>",
{ desc = "SymbolsOutline" })
require("symbols-outline").setup {
-- Your setup opts here (optional)
}
end,
},
<
SETUP *symbols-outline-symbols-outline.nvim-setup*
Put the setup call in your init.lua or any lua file that is sourced. Put the setup call in your init.lua or any lua file that is sourced.
> **NOTE**: A call to `.setup()` is _required_ for this plugin to work!
(simrat39/symbols-outline.nvim#213)
>lua
require("symbols-outline").setup() require("symbols-outline").setup()
< <
CONFIGURATION *symbols-outline-configuration* CONFIGURATION *symbols-outline-symbols-outline.nvim-configuration*
Pass a table to the setup call above with your configuration options. Pass a table to the setup call above with your configuration options.
> >lua
local opts = { local opts = {
highlight_hovered_item = true, highlight_hovered_item = true,
show_guides = true, show_guides = true,
@@ -60,6 +191,9 @@ Pass a table to the setup call above with your configuration options.
position = 'right', position = 'right',
relative_width = true, relative_width = true,
width = 25, width = 25,
-- Behaviour changed in this fork:
-- Auto close the outline window if goto_location is triggered and not for
-- focus_location
auto_close = false, auto_close = false,
show_numbers = false, show_numbers = false,
show_relative_numbers = false, show_relative_numbers = false,
@@ -78,6 +212,8 @@ Pass a table to the setup call above with your configuration options.
rename_symbol = "r", rename_symbol = "r",
code_actions = "a", code_actions = "a",
fold = "h", fold = "h",
fold_toggle = '<tab>', -- Only in this fork
fold_toggle_all = '<S-tab>', -- Only in this fork
unfold = "l", unfold = "l",
fold_all = "W", fold_all = "W",
unfold_all = "E", unfold_all = "E",
@@ -86,6 +222,7 @@ Pass a table to the setup call above with your configuration options.
lsp_blacklist = {}, lsp_blacklist = {},
symbol_blacklist = {}, symbol_blacklist = {},
symbols = { symbols = {
-- Changed in this fork
File = { icon = "󰈔", hl = "@text.uri" }, File = { icon = "󰈔", hl = "@text.uri" },
Module = { icon = "󰆧", hl = "@namespace" }, Module = { icon = "󰆧", hl = "@namespace" },
Namespace = { icon = "󰅪", hl = "@namespace" }, Namespace = { icon = "󰅪", hl = "@namespace" },
@@ -114,68 +251,121 @@ Pass a table to the setup call above with your configuration options.
TypeParameter = { icon = "𝙏", hl = "@parameter" }, TypeParameter = { icon = "𝙏", hl = "@parameter" },
Component = { icon = "󰅴", hl = "@function" }, Component = { icon = "󰅴", hl = "@function" },
Fragment = { icon = "󰅴", hl = "@constant" }, Fragment = { icon = "󰅴", hl = "@constant" },
-- ccls
TypeAlias = { icon = ' ', hl = '@type' },
Parameter = { icon = ' ', hl = '@parameter' },
StaticMethod = { icon = ' ', hl = '@function' },
Macro = { icon = ' ', hl = '@macro' },
}, },
} }
< <
--------------------------------------------------------------------------------------------
Property Description Type Default
------------------------ --------------------------------------- -------------- ------------
highlight_hovered_item Whether to highlight the currently boolean true
hovered symbol (high cpu usage)
│ Property │ Description │ Type Default show_guides Whether to show outline guides boolean true
│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 right
│position │Where to open the split window │'right' or 'left' │'right' │ left
│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 │ relative_width Whether width of window is set relative boolean true
│auto_close │Whether to automatically close the window after selection │boolean │false to existing windows
│auto_preview │Show a preview of the code on hover │boolean │false │
│show_numbers │Shows numbers with the outline │boolean │false width Width of window (as a % or columns int 25
│show_relative_numbers │Shows relative numbers with the outline │boolean │false based on relative_width)
│show_symbol_details │Shows extra details with the symbols (lsp dependent) │boolean │true │
│preview_bg_highlight │Background color of the preview window │string │Pmenu │ auto_close Whether to automatically close the boolean false
│winblend │Pseudo-transparency of the preview window │int │0 window after goto_location
│keymaps │Which keys do what │table (dictionary)│|symbols-outline-here|│
│symbols │Icon and highlight config for symbol icons │table (dictionary)│scroll up │ auto_preview Show a preview of the code on hover boolean false
│lsp_blacklist │Which lsp clients to ignore │table (array) │{} │
│symbol_blacklist │Which symbols to ignore (possible values <./lua/symbols-outline/symbols.lua>)│table (array) │{} show_numbers Shows numbers with the outline boolean false
│autofold_depth │Depth past which nodes will be folded by default │int │nil │
│auto_unfold_hover │Automatically unfold hovered symbol │boolean │true │ show_relative_numbers Shows relative numbers with the outline boolean false
│fold_markers │Markers to denote foldable symbols status │table (array) │{ '', '' } │
│wrap │Whether to wrap long lines, or let them flow off the window │boolean │false │ show_symbol_details Shows extra details with the symbols boolean true
(lsp dependent)
preview_bg_highlight Background color of the preview window string Pmenu
winblend Pseudo-transparency of the preview int 0
window
keymaps Which keys do what table here
(dictionary)
symbols Icon and highlight config for symbol table scroll up
icons (dictionary)
lsp_blacklist Which lsp clients to ignore table (array) {}
symbol_blacklist Which symbols to ignore (possible table (array) {}
values)
autofold_depth Depth past which nodes will be folded int nil
by default
auto_unfold_hover Automatically unfold hovered symbol boolean true
fold_markers Markers to denote foldable symbols table (array) { ‘’, ‘’ }
status
wrap Whether to wrap long lines, or let them boolean false
flow off the window
--------------------------------------------------------------------------------------------
COMMANDS *symbols-outline-symbols-outline.nvim-commands*
Command Description
---------------------- ------------------------
:SymbolsOutline Toggle symbols outline
:SymbolsOutlineOpen Open symbols outline
:SymbolsOutlineClose Close symbols outline
LUA ~
>
require'symbols-outline'.toggle_outline()
require'symbols-outline'.open_outline()
require'symbols-outline'.close_outline()
<
COMMANDS *symbols-outline-commands* DEFAULT KEYMAPS *symbols-outline-symbols-outline.nvim-default-keymaps*
│ Command Description │ Key Action
│:SymbolsOutline │Toggle symbols outline│ ------------ ----------------------------------------------------
│:SymbolsOutlineOpen │Open symbols outline Escape Close outline
│:SymbolsOutlineClose │Close symbols 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
tab toggle fold under cursor
shift+tab toggle all folds
l Unfold symbol
W Fold all symbols
E Unfold all symbols
R Reset all folding
? Show help message
HIGHLIGHTS *symbols-outline-symbols-outline.nvim-highlights*
DEFAULT KEYMAPS *symbols-outline-default-keymaps* Highlight Purpose
------------------------- ----------------------------------------
Key │ Action │ FocusedSymbol Highlight of the focused symbol
│Escape │Close outline │ Pmenu Highlight of the preview popup windows
│Enter │Go to symbol location in code │ SymbolsOutlineConnector Highlight of the table connectors
│o │Go to symbol location in code without losing focus│ Comment Highlight of the info virtual text
│Ctrl+Space│Hover current symbol │ ==============================================================================
│K │Toggles the current symbol preview │ 3. Links *symbols-outline-links*
│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 │
1. *demo*: https://github.com/simrat39/rust-tools-demos/raw/master/symbols-demo.gif
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc> Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>