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
277 stars 58 forks source link

Add unused variable highlighting #155

Closed grkek closed 1 year ago

grkek commented 1 year ago

I think having a highlighting feature for unused variables would be a great addition for better user experience

nobodywasishere commented 1 year ago

Thank you for your contribution! It appears you have a regex \\b_([\\w]+[?!]?) for matching unused variables, would \\b_\\w* work or is there an edge case I'm missing?

https://crystal-lang.org/reference/1.8/syntax_and_semantics/assignment.html#underscore