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

Add jsx linked editing #176279

Merged
merged 4 commits into from
Apr 10, 2023
Merged

Add jsx linked editing #176279

merged 4 commits into from
Apr 10, 2023

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Mar 6, 2023

@mjbvz mjbvz self-assigned this Mar 6, 2023
@mjbvz mjbvz added this to the March 2023 milestone Mar 6, 2023
@mjbvz mjbvz changed the title Add stubs jsx linked editing Add stubs for jsx linked editing Mar 6, 2023
@mjbvz mjbvz modified the milestones: March 2023, April 2023 Mar 20, 2023
@mjbvz mjbvz force-pushed the grateful-fish branch 2 times, most recently from 47f9bcc to cb90205 Compare April 3, 2023 18:23
@mjbvz mjbvz marked this pull request as ready for review April 10, 2023 17:15
@mjbvz mjbvz enabled auto-merge (squash) April 10, 2023 17:18
lramos15
lramos15 previously approved these changes Apr 10, 2023
@mjbvz mjbvz changed the title Add stubs for jsx linked editing Add jsx linked editing Apr 10, 2023
Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

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

Probably fine as is, but I think I caught a minor issue using the semantic selector instead of the syntactic one.

requireMinVersion(client, JsxLinkedEditingSupport.minVersion),
requireSomeCapability(client, ClientCapability.Syntax),
], () => {
return vscode.languages.registerLinkedEditingRangeProvider(selector.semantic,
Copy link
Member

Choose a reason for hiding this comment

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

Should this be selector.syntax?

import { ClientCapability, ITypeScriptServiceClient } from '../typescriptService';
import { conditionalRegistration, requireMinVersion, requireSomeCapability } from './util/dependentRegistration';

class JsxLinkedEditingSupport implements vscode.LinkedEditingRangeProvider {
Copy link
Member

Choose a reason for hiding this comment

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

Nit - you currently don't limit this to any JSX-specific file, so maybe we rename this to LinkedEditingSupport and just leave a comment about the main use-case being JSX tags?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. Will follow up with these changes in a new PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants