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.

Specify jsbeautify settings via the Visual Studio Code settings

See original GitHub issue
  • Operating System (+Version): OSX 10.11.6
  • VS Code Version: 1.9.1
  • beautify Version: 0.8.0

Provide the settings you use: (VS Code workspace and user settings, .jsbeautifyrc, .editorconfig) eg.: VS Code:

// Place your settings in this file to overwrite the default settings
{
    "vsicons.projectDetection.disableDetect": true,
    "editor.scrollBeyondLastLine": false,
    "editor.rulers": [
        100
    ],
    "files.insertFinalNewline": true,
    "npm-intellisense.scanDevDependencies": true,
    "npm-intellisense.importLinebreak": "",
    "auto-close-tag.activationOnLanguage": [
        "html",
        "xml",
        "php",
        "javascriptreact",
        "vue"
    ]
}

.jsbeautifyrc

  • None

Is it possible to specify actual jsbeautify settings (as they would be within .jsbeautifyrc) but actually in the Visual Studio Code settings.json for this extension? If it is I can’t seem to get it to work. If this option doesn’t exist would it be possible to add that? I almost feel like beautify.config setting could be either a string for a path or an object for actual config settings, so for example:

{
  "js": {
    "indent_size": 5
  },
  "css": {
    "indent_size": 4
  },
  "html": {
    "indent_size": 3
  },
  "eol": "\r\n",
  "indent_with_tabs": false,
  "indent_size": 2
}

I am not sure but from quickly looking at the code it seems like it may not be too much work. Just adding additional check for config detection and then probably refactoring some of the setup code once we have config settings?

Any thoughts? I can try and do a PR if this is acceptable for the design / vision of the extension.

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
IgorNovozhilovcommented, Feb 16, 2017

Do you like it #104 😄

0reactions
HookyQRcommented, Feb 17, 2017

PR applied and version 0.8.1 published.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Beautify - Visual Studio Marketplace
Beautify javascript , JSON , CSS , Sass , and HTML in Visual Studio Code. VS Code uses js-beautify internally, but it lacks...
Read more >
How to Beautify a JavaScript File in Visual Studio Code
To do this, go to File->Preferences->Settings: Under Text Editor, select Format On Save. Now when saving a file, it will be beautified. THANKS ......
Read more >
json - is There any way to change default setting of beautify ...
1 Answer 1 · Enable Beautify for all workspaces/projects ie globally (this is done by default) · You need to add the beautify...
Read more >
VS Code - You don't need a formatting ... - Rob O'Leary
VS Code has builtin formatters for HTML, JavaScript, TypeScript, ... You configure how the formatting is done with the following settings:.
Read more >
Formatting In Visual Studio Code: EditorConfig And js-beautify
Visual Studio Code has built in formatters for TypeScript, C# and Go, ... Search for format in Settings Search Pane; Select HookyQR.beautify from...
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