-
-
Notifications
You must be signed in to change notification settings - Fork 877
lsp symbol search show context #2695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What picker do you refer to? |
all builtin lsp symbol pickers, |
It would be useful if you would give a screenshot of the thing you are talking about from ionide-vim. |
The ---Provider options for a {@link DocumentHighlightRequest}.
---@class lsp.DocumentHighlightOptions
---A base for all symbol information.
---@class lsp.BaseSymbolInformation
---The name of this symbol.
---@field name string
---The kind of this symbol.
---@field kind lsp.SymbolKind
---Tags for this symbol.
---
---@since 3.16.0
---@field tags? lsp.SymbolTag[]
---The name of the symbol containing this symbol. This information is for
---user interface purposes (e.g. to render a qualifier in the user interface
---if necessary). It can't be used to re-infer a hierarchy for the document
---symbols.
---@field containerName? string
---Provider options for a {@link DocumentSymbolRequest}.
---@class lsp.DocumentSymbolOptions
---A human-readable string that is shown when multiple outlines trees
---are shown for the same document.
---
---@since 3.16.0
---@field label? string So the container name could be used for what you need but you need to tell me how it is shown in ionide-vim to know how to format them. |
The requests in Ionide-vim seem to be fsharp specific. For example rather making a textDocument/documentSymbol request it does a fsharp/documentationSymbol request. Though I know almost nothing about LSP |
Those those pickers use a single function to make the display. That function is make_entry.gen_from_lsp_symbols. So this should be very doable. |
Is the previewer not adequate for seeing context? |
@jamestrew not unless you have found a way to display the "fully qualified path" inside the previewer? I mean, thinking about that it would be awesome to able to use nvim-navic in the previewer or an extended column... |
I think a Telescope results list like the following would be extremely cool: |
Is your feature request related to a problem? Please describe.
When structuring code around modules instead of uniquely named functions it's common to have multiple functions with the same name. Not being able to tell what the enclosing scope of the symbol is makes it harder than necessary to navigate.
Describe the solution you'd like
The same as vscode or ionide: display the enclosing scope next to the suggested symbol. E.g. given a function
add
in aPost
namespace the suggestion could look likeadd (Post)
or something alike.Describe alternatives you've considered
Checking how lsp servers send suggestions, but since vscode uses the same lsp server as my nvim instance that should not be where the problem is.
Additional context
I think ionide-vim already does this, but IIRC they don't offer a telescope integration 🤔
The text was updated successfully, but these errors were encountered: