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 T-SQL highlighting, part 1 #122

Closed

Conversation

thisisnian
Copy link

Hi, this is my first pull request so I'm not sure how it all works but:
I've added T-SQL support. It requires a few more styles but the css file doesn't seem to be in your repo so I'm not sure where it should go.

/**sql language **/

pre .command
{
    color: #0000ff;   
}

pre .field
{
    color: #cccccc;   
}

pre .function
{
    color: #ff00cc;
}

Feel free to reject this and I'll re-do it.

Thanks!

@thisisnian
Copy link
Author

So the CSS is done in the themes - are you OK with adding classes to every theme or should I find another way?

@ccampbell
Copy link
Owner

Can you try using the more generic naming conventions from the other themes which correspond to the proper colors? For example .command should probably be .keyword.

Take a look at http://manual.macromates.com/en/language_grammars the naming conventions section. Rainbow doesn't follow it perfectly, but this should definitely be doable using the existing scopes.

@thisisnian
Copy link
Author

Sure, the one I've submitted was customised to our needs (basically same colours as sql server), but I'll resubmit a more generic version when I'm free.

@ccampbell
Copy link
Owner

Cool. The main idea is that all the colors should be handled by the css. You can use the same scope names, but then add your own css rules to customize colors specifically for your language.

For example

/* normal keyword color */
pre .keyword {
    color: orange;
}

/* tsql keyword color */
*[data-language="tsql"] .keyword {
    color: #0000ff;
}

@ccampbell ccampbell closed this in d65500d Jul 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants