Conversation
071396c to
7675c6b
Compare
Support importing grammars and binding them to content types. Refresh highlighting and editing rules when a file's selected language changes.
|
@jensli did you give it a try? is it what you expected functionality wise? |
Yes, it works! Great! Here are some thought and observations:
|
That's a good idea, thanks!
They serve different purposes, but are related. Those associations also help put likely matches first in the chooser, alongside the grammar's own file patterns. And they let editing features such as bracket matching and folding follow the selected language.
The import repair was a separate fix in #1053
This should actually only happen if you select the checkbox "Set this grammar as the workspace default for matching files" which is off by default. |
|
@jensli please give the new snapshot version in https://github.com/eclipse-tm4e/tm4e/actions/runs/35843669695/artifacts/10742691263 a try. it contains the command handler change. |
Language configurations can supply multi-character surrounding pairs, including through the autoClosingPairs fallback. Flattening these into characters can trigger JFace's even-length assertion or create false pairs. Require exactly one UTF-16 character per delimiter in the matcher. Keep the shared configuration intact so multi-character auto-closing continues to work, and remove the now-redundant quote-length check.
Support importing grammars and binding them to content types. Refresh highlighting and editing rules when a file's selected language changes.