crystal-lang-tools / vscode-crystal-lang

Yet another VSCode extension for Crystal Programming Language
https://marketplace.visualstudio.com/items?itemName=crystal-lang-tools.crystal-lang
MIT License
276 stars 58 forks source link

Add "in" to keywords and decrement indentation as "when" #135

Closed RespiteSage closed 3 years ago

RespiteSage commented 3 years ago

I see that "when" is in the increment indent pattern; I'm not sure why, but maybe "in" will need to be added there, too?

RespiteSage commented 3 years ago

Is there a good way to test this on my local machine so I can verify that it fixes the disparity between when and in?

max-bertinetti commented 3 years ago

Thanks for your contribution @RespiteSage

Is there a good way to test this on my local machine so I can verify that it fixes the disparity between when and in?

A way is to clone locally, build the plugin (see here) and install the .vsix file.

image

or with code --install-extension myextension.vsix

RespiteSage commented 3 years ago

I was able to test this PR like you described, and I found that I also needed to add "in" to the indentation increment list to get it to behave like "when". I also incremented the revision number, but I can undo that change if that's wrong.