autoload/lsp/symbol.vim | 16 ++++++++++++++++ doc/lsp.txt | 23 ++++++++++++++++++++--- diff --git a/autoload/lsp/symbol.vim b/autoload/lsp/symbol.vim index c64e6e64bc5dd1e9cef86c039325ede2fb99453b..f104e203ae6d18a5a1ca3e0f2d1f2405647f1f18 100644 --- a/autoload/lsp/symbol.vim +++ b/autoload/lsp/symbol.vim @@ -457,6 +457,22 @@ # Key filter callback function used for the symbol popup window. # Vim doesn't close the popup window when the escape key is pressed. # This is function supports that. def SymbolFilterCB(lspserver: dict, id: number, key: string): bool + # Handle the keys for scrolling the symbol popup window + if key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + || key == "\" + # scroll the hover popup window + win_execute(id, $'normal! {key}') + return true + endif + if key == "\" lspserver.peekSymbolPopup->popup_close() return true diff --git a/doc/lsp.txt b/doc/lsp.txt index c2743c48a2b8cc88fc891c8d5379f3109e4efaca..46318ac707d9040a79d86bdb122fab0490182f13 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -1010,8 +1010,7 @@ *:LspPeekDefinition* :[count]LspPeekDefinition Displays the line where the symbol under the cursor is defined in a popup window. The symbol is highlighted - in the popup window. Moving the cursor or pressing - will close the popup window. + in the popup window. When more than one symbol is found all of them will be shown. The corresponding file for the symbol is displayed in another popup window. As the selection @@ -1019,6 +1018,24 @@ in the symbol popup menu changes, the file in the popup is updated. When [count] is provided only the [count] symbol will be shown. + + *lsp-symbol-window* + Moving the cursor or pressing will close the + popup window. In the popup window, the following keys + can be used: + + CTRL-F - Scroll one page forward + - idem + CTRL-B - Scroll one page backward + - idem + CTRL-Home - Jump to the first entry + CTRL-End - Jump to the last entry + - Close the popup window + CTRL-C - idem + CTRL-E - Scroll one line forward + CTRL-D - Scroll half page forward + CTRL-Y - Scroll one line backward + CTRL-U - Scroll half page backward *:LspPeekImpl* :[count]LspPeekImpl Displays the implementation of the symbol under the @@ -1988,7 +2005,7 @@ ============================================================================== *lsp-license* License: MIT License -Copyright (c) 2020-2023 Yegappan Lakshmanan +Copyright (c) 2020-2024 Yegappan Lakshmanan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to