VSCode Sticky Scroll not working in outlineModel mode.
First off, thank you for creating this project, it's so nice to be able to ctrl-click through my .proto files now!
Issue: It seems that VSCode's "Sticky Scroll" (i.e. seeing the first line of the containing block as you scroll through a file), isn't working with the VSCode extension. Now, VSCode can be configured to use one of the three hints for getting the sticky scroll line number that it should pin to the top of the editor, they are:
- outlineModel (default)
- foldingProviderModel
- indentationModel
Since this extension does provide outline hints (i.e. if I open a .proto file, you can see top-level messages all defined in the Outline panel on the left sidebar), sticky scroll should "just work". However it doesn't, and I'm not sure why.
I can flip to using foldingProviderModel or indentationModel as my default sticky scroll model, however the fellow who maintains our .proto files is a C/C++'er and prefers to place his braces on a separate line under the message preamble, like so:
message Cmpl
{
VehicleKey vehicleKey = 1;
uint32 level = 2;
uint32 classLevel = 3;
This results in sticky scroll looking like this, which kind of defeats its purpose:
Instead it'd be desirable if it were to look like this, which should be achievable via the outlineModel, but it's not working:
Reproduce
- Open a
.protofile - Ensure you can see an "Outline" section fully filled out in the left hand sidebar of VSCode
- Ensure "Sticky Scroll" is enabled under
Settings -> Text Editor - Ensure "Sticky Scroll: Default Model" is set to outlineModel.
- Start scrolling through the document and notice that the sticky scroll section at the top of the file doesn't appear.
- Go back into settings and change the Default Model to be either foldingProviderModel or indentationModel.
- Start scrolling through the document and notice that the sticky scroll section at the top of the editor now DOES appear, but it will only show the line containing an opening brace, if your opening brace is not on the same line as your
messageorenumdeclaration, you won't know what the brace represents.
try rust version https://github.com/lasorda/protobuf-lsp