Skip to content
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

ruby 1.9 style hash does not highlight { in matchparen.vim #452

Open
yamam opened this issue Aug 15, 2022 · 1 comment
Open

ruby 1.9 style hash does not highlight { in matchparen.vim #452

yamam opened this issue Aug 15, 2022 · 1 comment

Comments

@yamam
Copy link

yamam commented Aug 15, 2022

Steps to reproduce

vim -u vimrc min.rb
nvim --clean min.rb

vimrc

se nocp
syntax on
filetype plugin indent on

min.rb

{a: 0}

Moving the cursor to the } position does not highlight {.

If you comment out the following line in line 471 of ruby.vim, the problem will no longer occur.

$VIMRUNTIME/syntax/ruby.vim

syn match rubySymbol "[[:space:],{(]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:[[:space:],;]\@="hs=s+1,he=e-1

Environment

NVIM v0.8.0-dev-845-gf38c05bec
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Aug 9 2022 21:41:53)

@tpope
Copy link
Member

tpope commented Aug 15, 2022

Confirmed broken after 1aa8f0c and before 1507e68 (the former being a fix for an issue introduced in the latter).

tpope added a commit to tpope/vim-rails that referenced this issue Aug 15, 2022
The primary purpose of this change is to avoid false positives in hash
keywords, which vim-ruby currently handles, but at great cost.  View
helpers are a good place to try out this change as they're
autogenerated, and this change has the added bonus of simplifying the
handling of the "?" helpers.

References: vim-ruby/vim-ruby#452
tpope added a commit to tpope/vim-rails that referenced this issue Aug 24, 2022
tpope added a commit to tpope/vim-rails that referenced this issue Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants