Skip to content

Add jsx linked editing - #176279

Merged
Matt Bierner (mjbvz) merged 4 commits into
microsoft:mainfrom
mjbvz:grateful-fish
Apr 10, 2023
Merged

Matt Bierner (mjbvz) merged 4 commits into
microsoft:mainfrom
mjbvz:grateful-fish

Conversation

@mjbvz

@mjbvz Matt Bierner (mjbvz) commented Mar 6, 2023 •

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor 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