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

feat(vue-options-api): Add a setting to remove local component definitions #117

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

Ilanaya
Copy link
Collaborator

@Ilanaya Ilanaya commented Mar 15, 2023

Before:

before.mp4

After (if `Vetur Extended is installed):

after.mp4

I would be grateful if you decide to accept this change. This extra definiton is extremely annoying.

Hope volar will eventually support goToSource command, but for now I think this is a good replacement. Considered making it enabled by default but it actually depends on Vetur Extended for correct work (I don't think that doing nothing is the behaviour is expected as it would be if Vetur Ext. isn't installed),

@Ilanaya Ilanaya requested a review from zardoy March 15, 2023 20:11
Copy link
Owner

@zardoy zardoy left a comment

Choose a reason for hiding this comment

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

A few notes:

  • it is not a case for composition API. I mean there is no breakage for componentions API
  • we cannot enable it by default, becuase, as you mentioned user might not have vetur extended, so we don't know wether we should fallback to local component definition if there are no definitions from other extension

Also, @maIIady the problem you mentioned is quite common, so I can suggest a general solution to it (setting):

"editor.gotoLocation.multipleDefinitions": "goto"

@zardoy
Copy link
Owner

zardoy commented Mar 15, 2023

so I can suggest a general solution to it (setting):
"editor.gotoLocation.multipleDefinitions": "goto"

I just realized you're getting first definition from the same file, nevermind

@zardoy zardoy changed the title feat: remove vue components option from component definitions feat(vue-options-api): Add a setting to remove local component definitions Mar 15, 2023
@zardoy zardoy merged commit 5697844 into develop Mar 15, 2023
@zardoy zardoy deleted the vue-components-definiton branch March 15, 2023 20:31
@zardoy
Copy link
Owner

zardoy commented Mar 15, 2023

Will probably release tomorrow

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.

None yet

2 participants