From b749ccb690e2a5a0e41095873bc5c60d0f4f1ad4 Mon Sep 17 00:00:00 2001 From: hedyhli Date: Thu, 16 Nov 2023 13:51:40 +0000 Subject: [PATCH] Auto generate vim docs --- doc/outline.txt | 52 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/doc/outline.txt b/doc/outline.txt index 862564e..4a3ce4a 100644 --- a/doc/outline.txt +++ b/doc/outline.txt @@ -270,6 +270,7 @@ Show defaults ~ }, providers = { + priority = { 'lsp', 'coc', 'markdown' }, lsp = { -- Lsp client names to ignore blacklist_clients = {}, @@ -277,9 +278,20 @@ Show defaults ~ }, symbols = { - -- Symbols to ignore. - -- Possible values are the Keys in the icons table below. - blacklist = {}, + -- Filter by kinds (string) for symbols in the outline. + -- Possible kinds are the Keys in the icons table below. + -- A filter list is a string[] with an optional exclude (boolean) field. + -- The symbols.filter option takes either a filter list or ft:filterList + -- key-value pairs. + -- Put exclude=true in the string list to filter by excluding the list of + -- kinds instead. + -- Include all except String and Constant: + -- filter = { 'String', 'Constant', exclude = true } + -- Only include Package, Module, and Function: + -- filter = { 'Package', 'Module', 'Function' } + -- See more examples below. + filter = nil, + -- You can use a custom function that returns the icon for each symbol kind. -- This function takes a kind (string) as parameter and should return an -- icon as string. @@ -331,6 +343,40 @@ Show defaults ~ To find out exactly what some of the options do, please see the |outline-recipes| section at the bottom for screen-recordings/shots. + +SYMBOLS TABLE ~ + +**filter** + +Include all symbols except kinds String and Variable: + +>lua + symbols.filter = { 'String', 'Variable', exclude=true } +< + +Include only Function symbols: + +>lua + symbols.filter = { 'Function' } +< + +Per-filetype filtering example: - For python, only include function and class - +For other file types, include all but string + +>lua + symbols.filter = { + ['*'] = { 'String', exclude=true }, + python = { 'Function', 'Class' }, + } +< + +Note how the python filter list and the default filter list is NOT merged. + +Setting any filter list to `nil` or `false` means include all symbols, where a +filter list is an array of strings with an optional `exclude` field. + +**icons** + The order in which the sources for icons are checked is: 1. Icon fetcher function