-
Notifications
You must be signed in to change notification settings - Fork 58
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
TextMate syntax coloring doesn't appear on first toggle split editor #827
Comments
I can reproduce this with the latest eclipse and tm4e release. @mickaelistria any idea how to address this? |
I cannot reproduce this anymore with Eclipse 2024-12 (4.34.0) and TM4E 0.14.1. Feel free to reopen if issue persists. |
Thanks for the update, unfortunately I'm still seeing this running Eclipse 4.34 and TM4E 0.14.1, was running 0.14.0 and even updated to double check. |
@sebthom I am on macOS if that makes a difference, but have had colleagues test on Windows as well and still seeing the same issue. Unfortunately I'm not able to reopen with the repository's current permissions setup. |
Can you try with this Eclipse bundle? https://www.eclipse.org/downloads/packages/release/2024-12/r/eclipse-ide-java-developers Maybe some plugin from the RCP/RAP bundle is interfering. Also try to use a fresh/empty workspace (in case you haven't done so). If you are using a VM. Is the project on a shared folder or on the local drive inside the VM? |
This is interesting, I had no luck with that eclipse as well as a brand new workspace on mac. Tried the same on the Windows VM, no change. However, I changed my yaml file contents to match what you have in your yaml, and it works... Could you try matching the following yaml contents to see what happens? # yaml-language-server: $schema=
name: no-name
test: this-one |
That is surprising. Minimal reproducible for me is: key: value Like this it works as expected: key:
value |
I tested this using our language server and textmate, and it doesn't seem to be directly related to whitespace usage. Perhaps something with different rules getting hit in the textmate? We're also working on implementing semantic tokens support, and with semantic tokens the highlighting does work the first time the split editor is toggled. So that is somewhat of a workaround. |
For new models the colorizer will be invoked after tokenization. For reused models (e.g. when splitting an editor) this must be done explicitly.
Our organization maintains several language servers that use TM4E in an eclipse-based product. We've had customer reports and verified that when first using the
Toggle Split Editor
view, the newly opened window does not highlight until it is toggled on a second time.Using the publicly available YAML editor as an example:
Open YAML source in the YAML Editor with Window/Editor/Toggle
Split Editor (Vertical).
The new second window will have no syntax highlighting.
Without closing, use same YAML source with Window/Editor/Toggle Split Editor
(Horizontal).
The new horizontally split window does have syntax highlighting.
Use same YAML source with Window/Editor/Toggle Split Editor
(Vertical).
The new vertically split screen will have syntax highlighting.
It appears that for each file, only the first invocation of split screen editing doesn't have highlighting, but every following invocation does.
Environment:
The text was updated successfully, but these errors were encountered: