* WIP for adding minimap section headers for #74843
* Get section headers rendering
* Fix default value of section header font size
* Fix tests
* Improve section header position
* Fix separator display, update after config change
* Split too-long headers with an ellipsis
* Render section headers on the decorations canvas
* Support MARK with just a separator line
* Calculate minimap section headers asynchronously
* Simplify change
* Avoid font variable duplication
* Fix issue introduced earlier
* Recompute section headers when the language configuration changes
* Fix problem in constructing region header range
* Parse mark headers in the entire file and then filter out the ones not appearing in comments on the UI side, where tokens info is available
---------
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
This needs a different approach, likely on the level of custom editors itself. Given custom editors are to implement backups, moving between windows should actually not result in data loss in most cases.
For custom editors that ignore backups, a better approach would be to throw an error or force to save right before a `webview` is about to get disposed because it moved to another window.
Tab size and indent size were separated in #155450, but for deciding
where to put "//" or "#" when toggling a line comment tab size was still
used.
Fixes#170393.
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>
* Do not trim whitespace when part of strings or regexes
Fixes https://github.com/microsoft/vscode/issues/195010. If the token to be removed is part of a string or a regex, then we do not want to remove the character, as it is very likely semantically important.
* Address initial feedback:
1. Add a new setting to control whether to trim whitespace in multiline strings/regexes. This setting is then piped through to everywhere that is calling trim whitespace, which is file save editing, the trim whitespace command, and notebooks.
2. Force line tokenization to complete when the setting is enabled so that trim is accurate.
* Don't force tokenization; instead, check to see if there are tokens for a given line and do not format if there are none.
* Look for syntactical tokens
* Fix compilation errors
* Add a test
---------
Co-authored-by: Alex Dima <alexdima@microsoft.com>
* Invalidate and update extensionPaths on load
* Also update the `ExtensionPaths` search tree after startup because it applies an extension delta
* Cache realpath calls
---------
Co-authored-by: Alexandru Dima <alexdima@microsoft.com>