-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 TSQL to linguist #4481
Add TSQL to linguist #4481
Conversation
@lildude Updated the draft PR with some changes, all tests now pass. I think the major issue now is the grammar problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something you are looking for?
@nanoquanta Yes, but I am not sure how to look. Do you know of something that may be able to help? |
@nanoquanta Thanks for working on this our company just started using Flyway and moved all of our TSQL to github. I came across this looking for a solution to fix temp tables where github is rendering #tempTable as a commented line vs actual TSQL Code. Would that be able to be fixed as a feature to TSQL? |
@acdevick If we are able to get the right grammar file included as part of adding the TSQL language to Linguist, then yes, that should be rendered correctly assuming the file is correctly detected as TSQL. |
@lildude If I were to make a separate repo to be the TSQL grammar repo, have the scope be source.tsql, and have it setup in such a way that linguist can read/understand the path, would that be ok? |
@beau-witter yeah, I think so. You'd become the maintainer of that grammar going forward and can't delete it as long as Linguist continues to use it. @Alhadis has more experience with maintaining grammars so should know if simply changing the scope is sufficient for our needs. |
@lildude I added the TSQL grammar repo I created as the grammar for the TSQL language I added to linguist. All the tests appear to pass. Let me know if there is anything else that needs to be done to move forward. @Alhadis When I added https://github.com/beau-witter/language-tsql as a grammar using script/add-grammar it auto added the scope as |
I am turning this into a real PR as I believe it is ready to be fully reviewed. |
TIL... Travis doesn't support draft PRs yet so CI wasn't triggered when you flipped this PR to be a real PR. I'm going to see if I can trigger a build by closing and reopening the PR. If I hit problems, I may need you to do it @beau-witter. |
🎉 it worked!!! |
@lildude Alright! Thanks for Travis CI working! I think I got everything corrected on my side, and Travis seems to agree! Should be good to review now. |
Hey guys, sorry for the silence. Been out of action for the last couple of weeks. 👋
Yes, that's fine. A grammar's scope-name is mainly important to Atom (and other TextMate-derived text editors) for styling and syntax-level command scoping; e.g., an author might use However, all of this is moot as far as Linguist is concerned, because a scope only has to be unique (in the sense of acting as a global identifier). I recommend using |
@Alhadis Thanks for that info! That is really neat. I did end up doing the |
@lildude Is there anything else I can do to help this PR move along? |
@lildude I see the changes have been approved. Yay! Just curious, is there a known update date when this might be merged by? |
There's never a known date for merging as it's not really important. I merge whenever I get around to reviewing, if I approve, but it won't take effect on GitHub.com until I make a release, which once against doesn't have a known date beyond "I aim for approximately once a month, based on my own load and the GitHub.com deploy queue and locks etc" 😄 |
Any idea when this will be included in GitHub and/or GitHub Enterprise? |
I'm aiming to do a release this week. If I succeed, this will make it into GitHub Enterprise Server 2.17.1. If I can't get this on GitHub.com this week, it'll be in 2.17.2. |
Description
Adding the TSQL language as identifiable through linguist.
Checklist:
I am associating a language with a new file extension.
I am adding a new language.
I am fixing a misclassified language
I am changing the source of a syntax highlighting grammar
I am updating a grammar submodule
I am adding new or changing current functionality