Skip to content
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

tmTheme highlighting issues in vscode (Material Theme) #16206

Closed
fredrikaverpil opened this issue Nov 29, 2016 · 7 comments · Fixed by #17933
Closed

tmTheme highlighting issues in vscode (Material Theme) #16206

fredrikaverpil opened this issue Nov 29, 2016 · 7 comments · Fixed by #17933
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug themes Color theme issues verified Verification succeeded
Milestone

Comments

@fredrikaverpil
Copy link

fredrikaverpil commented Nov 29, 2016

The Material Theme from the tmTheme editor doesn't render as intended per the tmTheme specs in vscode. I'm not sure if these themes are supposed to render in vscode exactly like they appear in the mtTheme editor?

  • VSCode Version: 1.7.2
  • OS Version: Windows 10, macOS Sierra/El Capitan

Steps to Reproduce:

  1. Download and install extension "Material Theme" by Fredrik Averpil (that's me)
  2. Enable extension and switch theme to "Material Theme"
  3. Copy paste the following and set syntax to Python:
def hello(some_option=None):
    """docstring here"""

    call_some_function(with_arg='some_string')
    self.call_other_function(with_arg='some_string')
    some_object.call_yet_another_function(with_arg='some_string')

Expected highlighting

As per Sublime Text:

sublime

...and tmTheme-Editor:

tmtheme-editor

Note

The docstring is rendered differently in Sublime Text, which I guess is because of a customization for Sublime, so please disregard this.

Actual highlighting in vscode:

vscode

Issues with vscode highlighting

  • Function arguments are not highlighted in orange (instead they are red)
  • Strings inside function calls are not highlighted in green (instead they are blue)
  • Objects are not highlighted in blue (instead they are white)

Additional information

The extension is using the exact same .tmTheme theme which can be downloaded from the tmTheme-editor. The theme is also maintained by Mattia Astorino and can be found in his git repo here. The theme file from tmTheme-editor and from Mattia's github repo are very similar and they both produce the same highlighting issue in vscode.

@fredrikaverpil fredrikaverpil changed the title mtTheme highlighting issues in vscode (Material Theme) tmTheme highlighting issues in vscode (Material Theme) Nov 29, 2016
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug themes Color theme issues labels Nov 29, 2016
@alexdima
Copy link
Member

Great timing! I'm actually working on a fix for the way we match TM themes in https://github.com/Microsoft/vscode-textmate/tree/next (in the next branch). It will take some time to get it in vscode though, hopefully this month.

@alexdima alexdima added this to the November 2016 milestone Nov 30, 2016
@fredrikaverpil
Copy link
Author

That's great news! I'll be on the lookout for an issue update or vscode update in a while then!

@alexdima
Copy link
Member

alexdima commented Dec 6, 2016

The work in vscode-texmate is done, but adopting the new logic will happen in the next milestone.

@alexdima alexdima modified the milestones: January 2017, November 2016 Dec 6, 2016
@fredrikaverpil
Copy link
Author

fredrikaverpil commented Dec 6, 2016

@alexandrudima Wonderful! I know this is off-topic but can I get a hold of this using some kind of developer build of vscode or something?

@alexdima
Copy link
Member

alexdima commented Dec 6, 2016

The code is on the next branch in vscode-textmate: https://github.com/Microsoft/vscode-textmate/tree/next

The new logic will be exercised once we begin to call IGrammar.tokenizeLine2 which will give binary encoded tokens with theme information resolved. Today, we call IGrammar.tokenizeLine which gives back scopes and then we let CSS do the token matching.

The only place where the new code is exercised is in the extensive theme test suite.

The integration in vscode is still to be done (it involves adopting this new binary encoded representation in the buffer, in the view, etc.)

@fredrikaverpil
Copy link
Author

@alexandrudima I better wait then ;) Cheers again for this nice update!

@wprater
Copy link
Contributor

wprater commented Dec 19, 2016

@alexandrudima Ive found another sublime material theme, but Im afraid it's in the new sublime-theme format. Is there a converter for this theme format as well?

@roblourens roblourens added the verified Verification succeeded label Jan 25, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug themes Color theme issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants