question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

useTabs workspace setting does not override useTabs user setting

See original GitHub issue

Summary

I wanted to set a useTabs value specifically for a Workspace. I wanted the Workspace to use spaces instead of tabs, while leaving the User settings using tabs.

The problem is that Prettier keeps on formatting the code using tabs.

Steps To Reproduce:

  1. In User settings, set useTabs to true
  2. In Workspace settings, set useTabs to false
  3. Format your code

Expected result

The code should be formatted using spaces.

Actual result

The code is formatted using tabs.

VS Code Version: Version: 1.54.3 Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T11:57:12.728Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 18.7.0

Prettier Extension Version:

OS and version: macOS 10.14.6 (18G7016)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
monteizcommented, Mar 21, 2021

If this is the case, it’s a VSCode bug. We simply read config VS Code resolves. Can you provide a GitHub repo to use to reproduce?

Why do you need a repo to reproduce the issue, if you say that it is a VSCode bug?

0reactions
github-actions[bot]commented, Jun 20, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to set tab width to 4 in prettier - Stack Overflow
Because it overrides user settings and uses the default values. Second, set Prettier: Tab Width to 4. Third, Unchecked Prettier: Use Tabs.
Read more >
User and Workspace Settings - Visual Studio Code
Language-specific editor settings always override non-language-specific editor settings, even if the non-language-specific setting has a narrower scope. For ...
Read more >
VisualStudio: Automatically turn tabs into spaces - Super User
I notice that next to this settings we can find the remark: This setting is overridden based on the file contents when "Editor:...
Read more >
Formatting | Vetur - GitHub Pages
Vetur only has a "whole document formatter" and cannot format arbitrary ranges. ... Use the below config and do NOT include a .prettierrc...
Read more >
Use Tabs: /Documentation - LabKey Support
Hiding a tab does not delete or change any content. You could use this feature to ... Delete: Tabs you have added will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found