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

Fixed unused variable code action #628

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Fixed unused variable code action #628

merged 1 commit into from
Feb 29, 2024

Conversation

scohen
Copy link
Collaborator

@scohen scohen commented Feb 29, 2024

The quote character around the variable name was changed, this broke the code action for replace unused variables.

@scohen scohen force-pushed the fix-code-actions branch 4 times, most recently from 56eafbf to 5a86dec Compare February 29, 2024 00:47
The quote character around the variable name was changed, this broke
the code action for replace unused variables.
@scottming
Copy link
Collaborator

The initial reason for making this change was that I thought using backticks for the token aligns better with markdown syntax, indicating it's part of the code. This will be advantageous for editors supporting treesitter.

More importantly, I find that compared to ", backticks are easier on the eyes to recognize, as " can be disruptive to identify. You can see the comparison in the following few images:

editor " backtick
nvim image 4 image
vscode image 3 image 2

@scohen
Copy link
Collaborator Author

scohen commented Feb 29, 2024

How is it advantageous for a treesitter based editor? Diagnostics aren't part of the code, and aren't displayed via markdown.

@scohen scohen merged commit a06bb03 into main Feb 29, 2024
9 checks passed
@scohen scohen deleted the fix-code-actions branch February 29, 2024 03:45
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

Successfully merging this pull request may close these issues.

2 participants