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

fix(lsp): do not rename in strings and comments #11041

Merged

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jun 18, 2021

Fixes denoland/vscode_deno#450

This functionality is not the default with TypeScript so I believe this is a bug and we shouldn't do it.

true,
true,
false,
false,
false,
));
Copy link
Member Author

@dsherret dsherret Jun 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By looking at this code alone, it's hard to tell what this means. It would be nice if we didn't use tuples here.

These are the arguments for find_in_strings and find_in_comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine using q struct with the more complicated APIs. It gets unwieldy for all of them though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8940d22.

Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but would be glad to have a struct here.

true,
true,
false,
false,
false,
));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine using q struct with the more complicated APIs. It gets unwieldy for all of them though.

@kitsonk
Copy link
Contributor

kitsonk commented Jun 18, 2021

Actually, so you think it warrents a test of some sort?

@dsherret
Copy link
Member Author

@kitsonk Good point! Done in 87a3cd6

Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret merged commit 60071c9 into denoland:main Jun 19, 2021
@dsherret dsherret deleted the lsp-do-not-rename-in-strings-and-comments branch June 19, 2021 15:23
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.

Renaming a variable also renames all instances of the text in a string
2 participants