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

Add Ruby, RDoc and ERB language support #145

Merged
merged 4 commits into from
Oct 24, 2020
Merged

Add Ruby, RDoc and ERB language support #145

merged 4 commits into from
Oct 24, 2020

Conversation

caleb
Copy link
Contributor

@caleb caleb commented Mar 20, 2020

Mostly this patch just sets Ruby styles to inherit from the generic styles, but some styles needed to be manually set to make it consistent with the rest of the theme.

Before:

Screen Shot 2020-03-19 at 11 54 07 PM

After:

Screen Shot 2020-03-19 at 11 53 38 PM

@caleb
Copy link
Contributor Author

caleb commented Mar 20, 2020

I will spend some more time tweaking this to match the other languages/editors in the nord ecosystem, but this is a huge step up at the moment.

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Apr 7, 2020

Hi @caleb 👋, thanks for your contribution 👍

This already looks great. I'll review and test the changes, but my first change request would be to explicitly define the syntax element attributes instead of inheriting from others.
Unfortunately this is currently an inevitable step we need to go because of the problem documented in #120. It was fixed in #121 some time ago, but for new languages we need to implement keys the same way. Otherwise as far as I can see on the screenshots the highlighting looks fantastic 😄

I'll review it in detail later on. Please note that it might take some time due to hundreds of other issues/PRs/support requests in other projects and my limited free time (combined with the current health situation of this world).

@caleb
Copy link
Contributor Author

caleb commented Apr 7, 2020

Okay, I can update the theme to specify the colors rather than inherit.

Once this looks good, I have a minor update for the clojure language to change keyword highlighting (e.g. :keyword).

Thanks!

@mariojackson
Copy link

Hi there,

It seems like the problem is still there. Have been patiently waiting since a few months, since I know that Sven is often very busy. Now I just want to ask if this is still in progress?

Thanks in advance!

@mariojackson
Copy link

Hi @arcticicestudio,

Can you already tell, if this one will get reviewed and eventually merged into the next release?

@arcticicestudio
Copy link
Contributor

Hi @mariojackson, as far as I understand @caleb was about to update the PR to use the explicitly defined syntax element attributes instead of the inherited colors.
But since it is currently the only remaining ticket for the next release version I can take care of it to ship it as soon as possible.

@mariojackson
Copy link

Hi @arcticicestudio,

That would be awesome if you could do that. If you can't, I could also wait of course or do it myself. I initially thought that this just had to be reviewed :)

Thanks you Sven!

@arcticicestudio
Copy link
Contributor

I've adapted the changes and tested it locally. Looks good so far so I guess I'll push and merge this tomorrow to package and deploy the new release version 🚢

Added explicit support for Ruby's "RDoc" [1] for JetBrains RubyMine [2]
and the official "Ruby" plugin for IntelliJ [3].

GH-145

[1]: https://github.com/ruby/rdoc
[2]: https://www.jetbrains.com/ruby
[3]: https://plugins.jetbrains.com/plugin/1293-ruby
Added explicit support for Ruby [1], RDoc [2] and ERB [3] for JetBrains
RubyMine [4] and the official "Ruby" plugin for IntelliJ [5].

GH-145

[1]: https://www.ruby-lang.org
[2]: https://github.com/ruby/rdoc
[3]: https://en.wikipedia.org/wiki/ERuby
[4]: https://www.jetbrains.com/ruby
[5]: https://plugins.jetbrains.com/plugin/1293-ruby
@arcticicestudio arcticicestudio changed the title Add ruby/erb language support Add Ruby, RDoc and ERB language support Oct 24, 2020
Copy link
Contributor

@arcticicestudio arcticicestudio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@caleb Thanks again for your contribution 👍
Unfortunately you've created this PR based on the develop branch instead of a dedicated story branch so I also had to push the changes to the default branch of your fork.

The colors are now explicitly defined instead of relying on the (broken) inheritance system
I've also added dedicated support for RDoc.

RDoc

Next to this I also adjusted some styles of some Ruby elements to better fit to the style of other languages.

ERB

Since I've never used Ruby I had to read something about the syntax to understand curious elements like Symbols.

The final results looks like this:

Ruby syntax before

Ruby syntax after

@arcticicestudio arcticicestudio merged commit fc72e67 into nordtheme:develop Oct 24, 2020
arcticicestudio added a commit that referenced this pull request Oct 24, 2020
Add explicit Ruby, RDoc and ERB language support

Added explicit support for Ruby [1], RDoc [2] and ERB [3] for JetBrains
RubyMine [4] and the official "Ruby" plugin for IntelliJ [5].

[1]: https://www.ruby-lang.org
[2]: https://github.com/ruby/rdoc
[3]: https://en.wikipedia.org/wiki/ERuby
[4]: https://www.jetbrains.com/ruby
[5]: https://plugins.jetbrains.com/plugin/1293-ruby

Co-authored-by: Arctic Ice Studio <[email protected]>
Co-authored-by: Sven Greb <[email protected]>
@arcticicestudio
Copy link
Contributor

@mariojackson Plugin version 0.13.0 is deployed to the JetBrains plugin registry and should be available soon 🚀

@mariojackson
Copy link

Hi @arcticicestudio

Thanks once again for your research, explanations and awesome work ✌🏽

I'm glad to be able to support you a little.

Have a nice start into the week!

@arcticicestudio
Copy link
Contributor

Thanks, I wish you the same 😊

Unfortunately the Ruby plugin groups identifiers and structs/classes into the same syntax highlighting group so both are now using nord4. I hope this will me improved in some plugin and RubyMine updates so that we can achieve a more consistent style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants