Giter Club home page Giter Club logo

vim-ruby's People

Contributors

jlcrochet avatar phongnh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rjkaes phongnh

vim-ruby's Issues

This plugin breaks vim-haml

First of all, thank you for vim-ruby!

It seems that this plugins breaks Haml highlighting through vim-haml (distributed with Vim itself) under some circumstances.

I originally thought this was a bug in vim-haml and opened a PR for it, but in the end that turned out not to be the case, and instead disabling your plugin fixed the issue for me.

The issue itself has to do with curly brace ({}) attributes in Haml, which contain Ruby. When using that syntax along with a nested hash, the result is that vim-ruby continues to syntax-highlight the rest of the file, never returning back to Haml.

Here's an example Haml snippet that breaks highlighting:

.example{ data: { foo: 'bar' } }
  %p
    The lines after the first should be highlighted as Haml, but instead
    they get highlighted as Ruby when using vim-ruby.
    This only happens when there's a nested hash in attributes as above

  class ThisShould_NOT_BeHighlightedAsRuby
  end

I'd still like to use your plugin, but since I work with a lot of Haml files I'm unable to. I understand this may not be a bug that affects you though, so if you decide not to look into it that's perfectly OK, but I thought I'd bring it to your attention at least.

This works great for me, thanks!

I had problems with default ruby plugin, and your version seems to fix it all!
The reason i make this issue, is that other people may be able to find your repo with a search engine when they search for the error message.
I am guessing a lot of people are having these errors:

E363: pattern uses more memory than 'maxmempattern'

'redrawtime' exceeded, syntax highlighting disabled

These are gone now!
Thanks!

Haml highlighter doesn't highlight Ruby for interpolated strings at beginning of line

Hey again ๐Ÿ‘‹ ,

I found a small bug in the new Haml highlighter.

In Haml you can use #{} for interpolating Ruby into a line of text, e.g.:

%p Hey there, my name is #{@name}

The new Haml syntax highlighter knows about this, but fails to detect it when the interpolation is at the beginning of its own line, e.g.:

%p
  Hey there, my name is
  #{@name}.

Screenshot:

Screenshot 2023-06-23 at 4 13 28 PM

Incorrect method argument alignment

First, thank you very much for writing this!

I get the following code indentation:

  redirect_to @foo,
    notice: 'Something'

The Ruby Style guide here method argument alignment says that arguments should be aligned with the end of the method name, so I would expect this:

  redirect_to @foo,
              notice: 'Something'

It works this way when using parentheses:

  redirect_to(@foo,
              notice: 'Something')

but the style guide recommends not using parentheses for dsl method calls , so using parentheses is not an option in these cases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.