Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/smridge/vscode-ruby-syntax

Ruby Syntax Highlighting for Visual Studio Code
https://github.com/smridge/vscode-ruby-syntax

ruby syntax-highlighting vscode vscode-extension

Last synced: 2 months ago
JSON representation

Ruby Syntax Highlighting for Visual Studio Code

Awesome Lists containing this project

README

        

# Ruby Syntax Highlighting for Visual Studio Code
[![Published Version to VS Code](https://img.shields.io/visual-studio-marketplace/v/SarahRidge.vscode-ruby-syntax)](https://marketplace.visualstudio.com/items?itemName=SarahRidge.vscode-ruby-syntax)
[![VS Code Downloads](https://img.shields.io/visual-studio-marketplace/d/SarahRidge.vscode-ruby-syntax)](https://marketplace.visualstudio.com/items?itemName=SarahRidge.vscode-ruby-syntax)
[![VS Code Installs](https://img.shields.io/visual-studio-marketplace/i/SarahRidge.vscode-ruby-syntax)](https://marketplace.visualstudio.com/items?itemName=SarahRidge.vscode-ruby-syntax)
[![GitHub License](https://img.shields.io/github/license/smridge/vscode-ruby-syntax.svg)](https://github.com/smridge/vscode-ruby-syntax/blob/master/LICENSE)

Ruby, ERB and Gemfile Syntax Support.

This Extension allows for Ruby Syntax Support without needing to install language server, debugger etc.

Original Ruby and ERB Syntax Grammar extracted from [vscode-ruby](https://github.com/rubyide/vscode-ruby).

## Install
- Run: `code --install-extension SarahRidge.vscode-ruby-syntax`
- Alternatively, extension can be installed via [marketplace](https://marketplace.visualstudio.com/items?itemName=SarahRidge.vscode-ruby-syntax).
- Reload VSCode.

### Changes Differing from extracted syntaxes:
- Added Grammar for `Gemfile` following [bundler docs](https://bundler.io/man/gemfile.5.html).
- Added [Ternary](https://docs.ruby-lang.org/en/2.7.0/syntax/control_expressions_rdoc.html#label-Ternary+if) `:`.
- Added [Ruby Range](https://ruby-doc.org/core-2.7.1/Range.html).
- Fixed Comment Blocks for `.erb` files to allow for html block commenting `"` (still respects single line comments `<%# %>`).
- Fixed variable recognition ending with `?` or `!`

** Pull Requests submitted to [forked repository](https://github.com/rubyide/vscode-ruby/pulls) for `ruby` and `erb` grammar changes addressed in this repo. **

## References
[Syntax Highlight Guide](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide)

[Language Grammar Rules](https://macromates.com/manual/en/language_grammars)

## Related Extension

[Rails Syntax Highlighting](https://github.com/smridge/vscode_rails_syntax)


Ruby Logo © 2006, Yukihiro Matsumoto: https://www.ruby-lang.org/en/about/logo/