-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update pl branch with textmate/master #2
Conversation
First example is invalid in 2.0 without whitespace removed, octal matching has been corrected. #ignore
Reversing the method here so this doesn't have to be changed again for 10.11, etc.
This commit makes the "Toggle Ruby Hash 1.8/1.9 Syntax" command to works correctly with discontinuous selections.
This commit makes the "Toggle String/Symbol" command to works correctly with discontinuous selections. Now it toggles each selected string/symbol.
E.g. an Opal would probably be called my_file.js.rb inside a Rails application. Previously it generated a class named “MyFile.js”.
Match components of the scope individually rather than as a block. Originally noted by @giucal.
Executes the current script. Defaults to running in Terminal.app but will use iTerm instead if it is already running. Can also be customized using the `TM_TERMINAL` variable set to `iTerm`. Also respects the `TM_RUBY` variable.
This adds new types and improves the scoping to better match the contents, includes several test cases in a new test file. One limitation I am aware of is that `%q foo ` is not recognized as a string when it should be. Allowing whitespace as a delimiter though adds a lot of ambiguity I don't think is worth getting into. Based on patches from @pelargir, @noniq, and @elia, thanks to @elia for testing help. Fixes textmate#41.
This better lines up with the scopes given in other languages to these items.
Only in the ones that allow interpolation of course.
An error in the previous regular expression was preventing the first argument of successive lines of a definition from being matched unless they were at the very beginning of the line. Fixed by strictly matching the beginning of the argument. Fixes textmate#87 as first mentioned in github-linguist/linguist#2692.
puppetfile should be supported as custom type capfile should be uppercase as capistrano auto-generates a file called "Capfile" and not "capfile" which causes mismatches
The spaces are optional (for example, `pp` generates hashes without spaces around `=>`).
Mentioned in atom/language-ruby#23, list taken from [method syntax documentation](http://ruby-doc.org/core-2.3.0/doc/syntax/methods_rdoc.html).
A word boundary at the end of this match was preventing the rule from matching correctly.
This is to better match the scope given to `block_given?` which is synonymous with `iterator?` (although "mildly deprecated" according to Ruby docs). Discussed in atom/language-ruby#136
Discussed in atom/language-ruby#59. Handled in a different manner to only allow `$` as the first character similar to `@` usage.
Cleans up unneeded escaping
A stray standard ending character would exit the literal early in a literal with arbitrary delimiters. Example: ```ruby %Q:The quick #{color} fox\n}jumps over the #{temperment} dog: ```
Allowing `=` to be used as a delimiter conflicts with the `%=` operator. Fixes textmate#95
A comment following the arguments in the function definition would prevent the argument rule from ending. Now matches the parenthesis inside arguments as a pair, doing so removes the need to look-ahead after the ending `)`. ```ruby def foo(_) # ["a", "b"] end ``` Fixes textmate#103, original issue discussed in atom/language-ruby#78
Filetypes for https://fastlane.tools/
This would be for code like the following: some_method(arg1, { :key => value })
Support .jb file [amatsuda/jb: A simple and fast JSON API template engine for Ruby on Rails](https://github.com/amatsuda/jb)
The new command “Reformat Document” formats the current document using the `--auto-correct` option of [RuboCop][]. It also shows information about the formatting status in a floating tooltip. The command displays the information about the formatting status either as black text only, or as colorful text if [aha][] is accessible via `$PATH`. [aha]: https://github.com/theZiz/aha [RuboCop]: https://github.com/bbatsov/rubocop
Currently with help for the new Reformat Document command.
You can now specify additional RuboCop options by setting the environment variable `TM_RUBOCOP_OPTIONS`. For a description of this feature, please take a look at the section “Additional Options” in the Help document (“Bundles” → “Ruby” → “Help”).
Supports both emacs and vim types of modelines.
Ex: #!/usr/bin/env ruby18 -KU
Adds the name of another executable to the grammar's hashbang-recognition pattern. The executables generated by RubyGems use this as their first line: #!/usr/bin/env ruby_executable_hooks Since the files have no extension, there's nothing to activate the grammar.
This allows matching additional methods that are only active in Gemfiles and would be objectionable if matched in standard ruby scripts.
This will provide a link to the Rubocop homepage when not installed.
Hello, is this repository maintained anymore? @aroben ? |
Sorry for the slow response, it was a holiday weekend here and I was busy with family. It looks like this PR is against the This repository has never been particularly well maintained, and even less so now that I no longer work at GitHub. If you'd like to maintain the Ruby highlighting it might make sense for you to create your own fork and open a PR on Linguist to switch to your fork. Or maybe @lildude or someone else from GitHub would like to create a fork? |
Ah, error from me on the base branch. This is fixed (in case this PR goes anywhere). I created my fork mainly to make the merge which couldn't be done automatically. If this repository is not meant to continue, I would suggest linguist would move back to textmate repository, backporting the differences between this repository and its parent if needed, which would remove the need for a separate fork. I am not sure about the next steps on this. Is this something that should be discussed on github/linguist instead? |
Getting the changes upstreamed into textmate/ruby.tmbundle seems ideal. I tried to do that in textmate#73 but it's been stalled for a long time. Pinging that PR and/or opening an issue on github/linguist seem like good ways to go. |
I see three commits in pl that would have to be upstreamed:
Change 2 is addressed in your PR which is indeed stalled (and nothing has been done since), and change 3 has never been upstreamed (I see that it was proposed on #1 but never addressed). For change 1, I have no idea if it is still applicable. I'll open an issue on linguist to at least have their opinion on the matter and maybe track the issue there. Thank you for your replies. |
Since github-linguist/linguist#3782 has been merged, this can be closed. |
This is a simple pull of
textmate/master
into thepl
branch with merge to make it work.Since
aroben/pl
is currently the selected syntax file for GitHub code highlighting, this should pull the last improvements from upstream to here, e.g. the fix for 2.3's<<~HEREDOC
.I don't know if this is the correct course of action or if this repository is even maintained. Please redirect me to the correct procedure if necessary (My first action would have been to make
textmate/master
the selected syntax, but it apparently lacks the fix for GraphQL syntax and it maybe important for GitHub.)I tried the syntax with Lightshow and it works correctly: See here.