simurai / tone-syntax

An Atom theme with customizable colors
MIT License
82 stars 12 forks source link

Maintainer wanted #2

Open Announcement opened 6 years ago

Announcement commented 6 years ago

Hey, just wanted to say I was interested in possibly becoming a maintainer! What all would that involved I'd like to get started right away!

simurai commented 6 years ago

🎉 In the "Contribute" section https://github.com/simurai/tone-syntax#contribute are steps how to get started. Is that enough clear?

Announcement commented 6 years ago

Yeah it's clear enough thanks

objectkit commented 6 years ago

Apologies for butting in, but as I'm unfamiliar with syntax support styles in Atom, would if be possible for you to add a link here to give me a heads up Simurai? I'd be keen to give it a go... thanks

simurai commented 6 years ago

@objectkit Here some more infos, but it might not go into details.

What language are you familiar with? Here an example for "Go".

  1. Doublicate styles/languages/javascript.less so you have a starting point and rename the file to go.less.
  2. Add the file to styles/languages/_index.less with @import 'go';.
  3. In go.less replace the styles with

// Go

.@{s}go {

&.@{s}string { .uno-1(); }

&.@{s}keyword { .duo-1(); }

}

4. Open a `.go` file that has some sample code. You should already see that `strings` and `keywords` have a different color.
5. Now place the cursor somewhere in the Go sample code that you want to highlight and press `cmd-alt-p`. This should open a popup like
  ![image](https://user-images.githubusercontent.com/378023/34471841-515a85dc-ef96-11e7-9dca-81eef5eb6468.png)
6. In this example `variable.other.assignment.go` it's a `variable`. We could be more specific with `.other.assignment`, but maybe ok to highlight all variables the same. So in `go.less` add the following.

```less

// Go

.@{s}go {

  &.@{s}string {
    .uno-1();
  }

  &.@{s}keyword {
    .duo-1();
  }

  &.@{s}variable {
    .tri-1();
  }

}
  1. This should make variables have a tri-1 color. Here the whole color palette to choose from.
  2. Once you're happy, commit and send a PR. 🙇

Thinking about it, I might can add a few more languages. So it's easier to get started if there is already some syntax highlighting.

simurai commented 6 years ago

Ok, here a bunch more languages: https://github.com/simurai/tone-syntax/pull/6