-
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 new entry for Sublime Text config files #3268
Conversation
I'd be interested in knowing how many of these files actually have comments in them. I still suggest using the JSON 5 syntax highlighter instead of the JSON highlighter just because the former supports comment and the latter does not. |
As well, if my math follows about 1.5% of files identified as JavaScript on GitHub are these Sublime config files. |
Ah, THAT would be the reason these files were categorised as JavaScript in the first place. Right, TMTOWTDI. @arfon, if it's alright, I'm going to define a new entry just for these Sublime config files... I'm sure many users would complain about the sudden lack of comment highlighting, and I don't want these things continuing to skew stats. |
Alright, it's done. Only one grammar can be assigned per language, which is why a new entry is necessary. To play it safe, I decided to keep using the JavaScript grammar, rather than JSON5's grammar. It feels more future-proof. |
👍 looks good. Did we (I mean you @Alhadis 😁) update the |
We/I did! =) It was done by hand though... let me know if there was something else I should've done. Sorry, I would've answered this 10 hours earlier had the entire region not been without electricity yesterday. ⚡️ |
@Alhadis - because of this PR I think we'll need to bump this now.
There's |
Shouldn't be a problem once we start using hash ids ;) |
😆 yes. |
@arfon Any feedback on this? This is arguably skewing statistics much worse than the Sublime config files were. |
Follow-up of #3267 and #2662, both of which concern the misclassification of Sublime Text's configuration files as "JavaScript". These files are most certainly not JavaScript... the only thing distinguishing them from JSON is support for JS comments.
Because many of them do contain comments, using the JSON grammar to provide highlighting will produce a lot of incorrect, messy highlighting. I've added a separate entry to group them under JSON, but use the JavaScript grammar for highlighting.
Linguist's submodules have a healthy abundance of Sublime configs already, so the samples I added were simply copied from
vendor/grammars
.With @keplersj's help, I was able to collate a list of normative references for each documented format. Some were undocumented altogether; presumably deprecated filenames supported in older versions.
EDIT: Relevant PR for CSON that still needs reviewing
.sublime-build
.sublime-commands
.sublime-completions
.sublime-keymap
.sublime-macro
.sublime-menu
.sublime-mousemap
.sublime-project
.sublime-settings
.sublime-theme
.sublime-workspace
.sublime_metrics
.sublime_session