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

refactor: rename workspace configs #2620

Merged
merged 1 commit into from Apr 18, 2023
Merged

refactor: rename workspace configs #2620

merged 1 commit into from Apr 18, 2023

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Apr 18, 2023

Rename and change the default values of some configs.

For the principle of not disturbing users as much as possible, missing props hint and event argument hint are now disabled by default.

updateImportsOnFileMove is now disabled by default, taking into account that based on past experience, it is not often useful for users and sometimes degrades UX instead.

Added codeActions.enable setting and disabled by default as we've been getting many complaints from the past on github/marketplace/twitter/discord...that Volar is slow to save when used with ESLint, even though it's not an issue with Volar itself . Some versions of VSCode will have problems, some versions will not, this problem seems to be periodic, even if VSCode fixes the problem again in recent versions, it is difficult to guarantee that it will not happen again in future versions. We don't have the energy to explain to every user that the problem is not from Volar, disabling it by default and giving users the option to enable it at their own risk is a decision of frustration.

close #2598, close #2615, close #2607

old name new name old default new default
volar.vueserver.disableFileWatcher -- -- --
volar.codeLens.references vue.features.codeLens.enable -- --
volar.inlayHints.missingRequiredProps vue.features.inlayHints.missingProps true false
volar.inlayHints.eventArgumentInInlineHandlers vue.features.inlayHints.inlineHandlerLeading true false
volar.autoWrapParentheses vue.features.autoInsert.parentheses -- --
volar.autoCompleteRefs vue.features.autoInsert.dotValue -- --
volar.addSpaceBetweenDoubleCurlyBrackets vue.features.autoInsert.bracketSpacing
volar.completion.preferredTagNameCase vue.features.complete.tagNameCasing auto-pascal autoPascal
volar.completion.preferredAttrNameCase vue.features.complete.propNameCasing auto-kebab autoKebab
volar.completion.normalizeComponentImportName vue.features.complete.normalizeComponentImportName -- --
volar.diagnostics.delay -- 200 250
volar.updateImportsOnFileMove.enabled vue.features.updateImportsOnFileMove.enable true false
-- vue.features.codeActions.enable true false

@johnsoncodehk johnsoncodehk merged commit 467d2b6 into master Apr 18, 2023
6 checks passed
@johnsoncodehk johnsoncodehk deleted the refactor-configs branch April 18, 2023 02:04
@noook
Copy link

noook commented Apr 21, 2023

Question: Volar seems to take precedence over Eslint, for example on imports order. We defined the rule for imports order on eslint, eslint fixes it, and volar breaks it again in the same save cycle. Do you recommend disabling Volar's formatting when formatting with ESLint or is there additional configuration to do ?

@johnsoncodehk
Copy link
Member Author

Thanks for the information. The following settings might avoid this, but I'm not using ESLint so can't be sure.

{
	"editor.codeActionsOnSave": {
		"source.fixAll.eslint": true
	},
	"[vue]": {
		"editor.defaultFormatter": "dbaeumer.vscode-eslint"
	},
}

@noook
Copy link

noook commented Apr 24, 2023

If you set the default formatter to eslint for vue files, that implicitly disables Volar for formatting, right ? It has the same effect as "vue.features.codeActions.enable": false ?

@johnsoncodehk
Copy link
Member Author

"vue.features.codeActions.enable": false will not disable formatter, but we can add an option to disable it if needed.

@johnsoncodehk
Copy link
Member Author

I'm still not sure about the reasoning behind it, if you have some discoveries, glad you share it in #2740, now the "Saving time too long" dialog box has a button that will take the user there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants