-
Notifications
You must be signed in to change notification settings - Fork 185
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
Code formating does not respect editor.tabSize #343
Comments
Formatting is currently done by PHP CodeSniffer. You can configure it with an XML file. |
My mistake, I just realized the VC let you choose if you want to use de default, configured or a custom tab size in the status bar. But I don't know how mine changed to force 4 spaces (not the default settings), maybe some shorcut that I don't know? |
See also [FEATURE] Respect identation settings when doing Format Document #93. It's a WON'T FIX. |
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway. BREAKING CHANGE: removes formatting support closes #501 closes #474 closes #473 closes #468 closes #450 closes #445 closes #443 closes #423 closes #343 closes #296 closes #293 closes #499 closes #471
At this point there are countless issues about the formatting done by CodeSniffer. It plain out doesn't work in many cases, overrides format options that are contributed by other extensions in VS Code and does not reuse any of our AST parsing. For that reason, I am starting to think there is no reason to keep it in here until we have proper pretty-printing support from https://github.com/Microsoft/tolerant-php-parser that actually reuses our ASTs and can work while editing. For people who want to use CodeSniffer to format their code, there could be a standalone CodeSniffer language server (like there is a TSLint language server and ESLint language server). As said, we don't reuse our state anyway. BREAKING CHANGE: removes formatting support closes felixfbecker#501 closes felixfbecker#474 closes felixfbecker#473 closes felixfbecker#468 closes felixfbecker#450 closes felixfbecker#445 closes felixfbecker#443 closes felixfbecker#423 closes felixfbecker#343 closes felixfbecker#296 closes felixfbecker#293 closes felixfbecker#499 closes felixfbecker#471
Hello, lately I'm using tab as 3 spaces but when the code is formatted the extension is using the default 4 spaces tab.
Btw, excellent extension!
The text was updated successfully, but these errors were encountered: