-
-
Notifications
You must be signed in to change notification settings - Fork 960
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
Multiple formatters on same filetype don't applied alltogether on a single 'coc-format' call #2269
Comments
Some problem. I have conflict with coc-stylelintplus and coc-diagnostic.
then coc-diagnostic autoformatting on saving stops working for js files when i use this config for eslint: let g:coc_global_extensions = [
\ 'coc-css',
\ 'coc-stylelintplus',
\ 'coc-diagnostic',
\ ] coc-settings.json {
"diagnostic.signOffset": 9999999,
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"wxss.validate": false,
"stylelintplus.cssInJs": true,
"stylelintplus.autoFixOnSave": true,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"javascript.tsx",
"javascriptreact",
"typescript",
"typescript.tsx",
"typescriptreact"
],
"diagnostic-languageserver.linters": {
"eslint_d": {
"command": "eslint_d",
"rootPatterns": [".git"],
"debounce": 100,
"args": [
"--stdin",
"--stdin-filename",
"%filepath",
"--format",
"json",
"--cache"
],
"sourceName": "eslint",
"parseJson": {
"errorsRoot": "[0].messages",
"line": "line",
"column": "column",
"endLine": "endLine",
"endColumn": "endColumn",
"message": "${message} [${ruleId}]",
"security": "severity"
},
"securities": {
"2": "error",
"1": "warning"
}
}
},
"diagnostic-languageserver.formatters": {
"eslint_d": {
"command": "eslint_d",
"rootPatterns": [".git"],
"args": [
"--stdin",
"--stdin-filename",
"%filepath",
"--fix",
"--fix-to-stdout"
],
"isStderr": false,
"isStdout": true
}
},
"diagnostic-languageserver.filetypes": {
"javascript": "eslint_d",
"javascript.tsx": "eslint_d",
"javascriptreact": "eslint_d",
"typescript": "eslint_d",
"typescript.tsx": "eslint_d",
"typescriptreact": "eslint_d"
},
"diagnostic-languageserver.formatFiletypes": {
"javascript": "eslint_d",
"javascript.tsx": "eslint_d",
"javascriptreact": "eslint_d",
"typescript": "eslint_d",
"typescript.tsx": "eslint_d",
"typescriptreact": "eslint_d"
}
} |
I came to this issue by way of trying to conclude whether In my understanding, the issue of multiple formatters goes away when I extend What is confusing and what had me find this issue, is that given the eslint-integration I just described, why then do I need to consider integrating Is the answer that to use Thank you for clarifying! -E |
Only one formatter is allowed to work on save, checkout #2704. To run eslint autofix with format on save, use |
Result from CocInfo
Describe the bug
When i run coc-format (or save buffer with formatOnSave settings) and having 2 formatters to apply ( f.e. eslint + prettier ) they are not running together on a single coc-format call, i need to call coc-format twice, to format buffer with two different formatters
Reproduce the bug
vimrc chunk
coc-settings.json
Screenshots (optional)
Video - https://share.getcloudapp.com/OAuqqdXZ
Note - I've created a ticket in coc-prettier here neoclide/coc-prettier#85 first, and @chemzqm said that could be potentially coc.nvim bug, so i'm posting it here too.
The text was updated successfully, but these errors were encountered: