Shopify / vscode-shopify-ruby

An opinionated and auto-configured set of extensions for Ruby development
MIT License
176 stars 13 forks source link

Remove ? and ! from editor.wordSeparators #422

Closed louim closed 3 months ago

louim commented 1 year ago

Hey!

VSCode default setting for splitting selection and doing word related navigations or operations (editor.wordSeparators) is: "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"

Since in ruby ? and ! are often used as method suffixes, what do you think of adding a ruby specific setting removing ? and ! from the default editor.wordSeparators? This would allow easier selection (think double-click and arrow selection) of method and symbols ending with those 2 chars.

vinistock commented 1 year ago

Hello!

That sounds like an improvement indeed. I'm trying to think, could there be any cases where we don't want to include the ? and !?

andyw8 commented 1 year ago

One possible downside is that any text within a comment or string in a Ruby file would also be treated this way, even if it's not code. But overall I think it makes sense.

andyw8 commented 5 months ago

I've been using @louim's suggestion in my personal config since this issue was created, and haven't noticed any problems, so I think we should we should go ahead and add it after https://github.com/Shopify/ruby-lsp/pull/1958