You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restart your editor (which will restart ElixirLS) sometimes fixes issues
Stop your editor, remove the entire .elixir_ls directory, then restart your editor
Issue
The top-level module of the file is not expanded in breadcrumbs. It doesn't expand no matter how wide the window is, or where the cursor is positioned.
When on a function within a module and running the command breadcrumbs.focusAndSelect, the top-level module is shown instead of the current function.
Data coming from the language server seems to be correct, e.g. the outline view and breadcrumbs (once expanded) look fine and selecting an item jumps to the expected position.
Behavior is the same in current VSCode Insiders build.
The text was updated successfully, but these errors were encountered:
@trkoch The breadcrumbs work but don't expand by default - you can expand them via keyboard. They also do not update when clicking inside source file.
My guess is that vscode expects proper ranges returned in documentSymbols request and we return empty ranges (i.e. start line 5, start char 2, end line 5, end char 2)
/**
* The range enclosing this symbol not including leading/trailing whitespace
* but everything else like comments. This information is typically used to
* determine if the clients cursor is inside the symbol to reveal in the
* symbol in the UI.
*/
range: [Range](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range);
/**
* The range that should be selected and revealed when this symbol is being
* picked, e.g. the name of a function. Must be contained by the `range`.
*/
selectionRange: [Range](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#range);
My guess is that vscode expects proper ranges returned in documentSymbols request and we return empty ranges (i.e. start line 5, start char 2, end line 5, end char 2)
Yes, that was it. I added an implementation returning ranges for most symbols (defmodule, def, attribute, test) where elixir parser returns sufficient metadata. Unfortunately as of elixir 1.13 selection ranges work reliably only for defs (and defs with params). There is no metadata in AST and more difficult hacks would be necessary.
Environment
Troubleshooting
.elixir_ls
directory, then restart your editorIssue
The top-level module of the file is not expanded in breadcrumbs. It doesn't expand no matter how wide the window is, or where the cursor is positioned.
When on a function within a module and running the command
breadcrumbs.focusAndSelect
, the top-level module is shown instead of the current function.Data coming from the language server seems to be correct, e.g. the outline view and breadcrumbs (once expanded) look fine and selecting an item jumps to the expected position.
Behavior is the same in current VSCode Insiders build.
The text was updated successfully, but these errors were encountered: