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.

Plugin does not respect user tab settings

See original GitHub issue

Not to start a tabbing war, but I have explicitly set these settings, and they are ignored when formatting.

{
  "editor.insertSpaces": false,
  "editor.tabSize": 4
}

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
xXACCEXxcommented, Jun 15, 2020

Marvellous, Thank you for these suggestions and the link to the docs. They are super informative.

I’ve fixed my issues using the default formatter value vscode.typescript-language-features like you suggested, but only for javascript and typescript.

1reaction
jsejcksncommented, Jun 12, 2020

I decided to dig into this just now. You have control over which formatter is used for different filetypes in VS Code. There is information about how to customize this behavior and other language-specific behaviors at the VS Code docs > Get Started > Settings > Language specific editor settings.

When editing your settings.json file, intellisense will help you find the valid keys and values, but these are likely the settings that you want:

{
  "[javascript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
}

If you use those settings, VS Code will use the built-in formatter instead of the one provided by the Deno extension, when editing .js, .jsx, .ts, .tsx files.

If you are uncomfortable editing your settings.json file, you can use the command palette to change the default formatter while editing a document of that type. Here is an example while I was editing a TypeScript document:

vscode-default-formatter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Difficulty getting rust files to respect tab/indent settings : r/neovim
When ever I try to insert an indent by pressing tab, it still shows up as 4 spaces ( ---- ) instead of...
Read more >
Conflict With Theme & Popup Plugin (Cookies?) | WordPress.org
While I really like this WP Cloudflare Super Page Cache Plugin, it is not respecting the behavior rules for my theme and the...
Read more >
Visual Studio Code: format is not using indent settings
Open your settings, search for "format" and look through relevant plugin settings that may be overwriting the global tab format.
Read more >
Set Chrome policies for users or browsers - Google Support
Enrolled browsers to enforce policies when users open Chrome browser on managed Microsoft Windows, Apple Mac, or Linux computers. Signing in is not...
Read more >
Installing Relevanssi and adjusting the settings
All options on this tab affect the indexing and won't have any effect until you build ... Some plugins, especially those that don't...
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