-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Add option to base Sticky Scroll on indent, not Document Symbols #157165
Comments
I think the automatic issue assigning failed (?) Not sure what I did wrong, but just in case here's a ping @aiday-mar |
I would also love to see this in AutoHotkey! |
So since this got put on the backlog, it won't happen anytime soon, I guess...? Could you give me a quick estimation on this? Because if it's still a long way, then I'll actually go ahead and create an extension with the questionable workaround mentioned above. |
Hi @phil294 thank you for your contribution. I intend to investigate the issue in the coming days by seeing how we can use the folding ranges model to obtain a custom outline model. Not sure yet how long this will take to implement. |
Is there an option now to always use the folding model for sticky scroll? |
@gulshan it only seems to be working as a fallback mechanism, nothing configurable though. It's not yet part of the insiders build apparently, at least it did not work there for me so far. |
they were not in a usable state, and with next update [1], no symbols (outline) is better than broken outline, so sticky scroll still works fine [1] microsoft/vscode#157165
|
Testing #156175
Basing Sticky Scroll on class/function/namespace etc. makes a lot of sense, but only as long as there is an active language server or language extension that provides good Document Symbols (Outline). For all languages that either have no LSP (so, so many), whose LSP provides no Outline, whose LSP provide invalid Outline or which simply have no concept of functions/classes etc., Sticky Scroll can not be leveraged :-(
I'd argue that in many cases the respective context could be inferred from the indentation instead. I realize this may not be desirable by default, so perhaps it should be either hidden behind a flag or configurable per language. For example, in a large JSON file, you might then get this context:
this is IMO immensely useful, especially for dealing with messy codebases.
Personally, I'd like to have SS in CoffeeScript, Crystal, AutoHotkey, Markdown, JSON, and pretty much everywhere else except maybe plain text files. I think it also helps a lot outside the currently selected document symbols: Why not add SS for
if
/else
blocks, for example? Worst case scenario, it occupies one single extra line; best case scenario, it helps you navigate nicely in multi-page if-else constructs.There is one very ugly workaround that comes to my mind: Add a generic, language-independent extension which provides indentation based document symbols, by simply marking every line as a function definition. But I hope that won't be necessary. Also not sure if that would even work, because which doc symbols does SS use when there's multiple providers?
That said, thank you so much for adding this feature, I'm so happy it's finally here ❤️
The text was updated successfully, but these errors were encountered: