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

TabWidth from community plugin is ignored #961

Closed
Janther opened this issue Sep 18, 2019 · 2 comments
Closed

TabWidth from community plugin is ignored #961

Janther opened this issue Sep 18, 2019 · 2 comments
Labels
locked Please open a new issue and fill out the template instead of commenting.
Milestone

Comments

@Janther
Copy link

Janther commented Sep 18, 2019

Summary

I'm contributing to a Prettier plugin for Solidity files.
In Solidity the tabWidth is 4 usually. Therefore it's been exported as the default configuration in our plugin.

prettier-atom respects this, however prettier-vscode is ignoring it and we are forced to use a prettier.config.js file for this.

Github Repository to Reproduce Issue

Here is the example repo
https://github.com/Janther/tabWidth

Steps To Reproduce:

  1. Have prettier-vscode installed and format on save configured.
  2. Install the solidity language
  3. Install the npm dependencies to use the solidity plugin.
  4. Open the contracts/Migrations.sol file.
  5. Save the file.

Expected result

tabWidth should be 4.

Actual result

tabWidth is 2.

Additional information

This is the prettier.config.js file that has the default config for prettier-plugin-solidity.

// https://prettier.io/docs/en/configuration.html
module.exports = {
  // Global configuration
  printWidth: 80,
  tabWidth: 4,
  useTabs: false,
  singleQuote: false,
  // Common configuration
  bracketSpacing: false,
  // Solidity configuration
  explicitTypes: "always"
};

VS Code Version: 1.38.1

Prettier VSCode: 2.2.2

Prettier: 1.18.2

Prettier Plugin Solidity: 1.0.0-alpha.32

OS and version: MacOS 10.14.6

@ntotten ntotten added this to the Version 3.0 milestone Oct 22, 2019
@ntotten
Copy link
Member

ntotten commented Oct 22, 2019

This should be fixed in version 3.0. Still in preview, but you can test it here: https://marketplace.visualstudio.com/items?itemName=prettier.prettier-vscode

@ntotten ntotten closed this as completed Oct 22, 2019
@github-actions
Copy link

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.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Apr 12, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

2 participants