Giter VIP home page Giter VIP logo

clang-format-configurator's Introduction

clang-format-configurator

Interactively create a clang-format configuration while watching how the changes affect your code. See it in action at http://zed0.co.uk/clang-format-configurator

Requirements

All requirements should be available through your package manager:

Installation

The setup script will install the various npm and bower dependencies and then download the clang-format binaries and documentation from the official releases. If you want to disable some versions, or add new ones, alter the clang_versions variable at the top of setup.sh

chmod u+x setup.sh
./setup.sh

Usage

With Node.js:

npm start

With firejail:

server/launch.sh

History

Version 0.0.3

Credits

Author: Ben Falconer

License

MIT

clang-format-configurator's People

Contributors

joshkel avatar poiru avatar skim-x-cat avatar zed0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clang-format-configurator's Issues

Clang 5.0 & 6.0

Thank you very much for the project, this is awesome!

Can you please add support for clang 5.0 and 6.0?

Show defaults

Show the default for the currently selected BasedOnStyle in the dropdown.
This should not get saved to a configuration file, just indicate what the default is.
This should auto-update when the BasedOnStyle is changed.

Livedemo appears to be nonfunctional

Javascript console upon upload shows:

configurator.js:131 Uncaught TypeError: Cannot read property 'undefined' of undefined
    at configurator.js:131
    at lodash.min.js:26
    at _t (lodash.min.js:14)
    at lodash.min.js:25
    at Function.<anonymous> (lodash.min.js:30)
    at FileReader.reader.onload (configurator.js:130)
(anonymous) @ configurator.js:131
(anonymous) @ lodash.min.js:26
_t @ lodash.min.js:14
(anonymous) @ lodash.min.js:25
(anonymous) @ lodash.min.js:30
reader.onload @ configurator.js:130
FileReader (async)
(anonymous) @ configurator.js:142
(anonymous) @ lodash.min.js:25
(anonymous) @ lodash.min.js:30
load_config @ configurator.js:119
dispatch @ jquery-1.11.3.min.js:4
r.handle @ jquery-1.11.3.min.js:4

Non-scalar settings don't work

Trying to load these settings triggers an "Error: Bad Request" alert (including when loading settings you just saved):

  • BraceWrapping
  • ForEachMacros
  • IncludeCategories

Add old versions of clang-format

Several distributions are still using clang 3.4 and earlier, older versions of clang-format could be added.
The main annoyance here is that they aren't automatically fetched by the setup script because of a change in the url format prior to 3.5.

Ability to upload clang-format

This may seem like an odd request, but it would actually be tremendously useful. For instance, if you want to share an existing clang-format file with coworkers, and they do not yet have it integrated into their workflow, this would be a very easy way to show them what style you are proposing and to allow them to iterate on it. But currently it would be necessary to manually set the fields one at a time to match the text file.

Preview for Objective-C

Add some objective C in the preview pane, because currently it doesn't change anything if you modify the obj-c settings

Service Unavailable

All requests to the server are failing with error 503. Is this project dead?

Parameters description displays incorrectly

Parameters description displays incorrectly

Hi,

While I was configuring my clang-format file, I discovered that description of options are broken,
For exemple, in BraceWrapping (but not only for that one), some parameters exemples are not in code block and displays incorrectly...
I've attached an image to show the issue.

Image that illustrate the issue

error_1

`BraceWrapping` doesn't seem to be working

For clang-format 6.0.1, I'm setting BasedOnStyle to WebKit and BreakBeforeBraces to Custom. When I change individually items in BraceWrapping they don't affect the code, and if I download the clang-format file, BraceWrapping is not there!

BraceWrapping checkboxes are not written

This is not new. But the previous issue has been unattended to since 2018, so I'm filing it again.

When you chose Custom, it should fall back to BraceWrapping. But those values are not being saved in the file.

Install Fails on Windows

As the example website for the clang configurator does not allow you to select your own sample file with which to test your clang format file on. I attempted to build it from source - however I only have a WIndows box. When I tried to do npm install on it, it got as far as the userid package which will not install on windows. I don't know how easy it would be to user another package that will also work on Windows.

The other alternative is if the website can have its code altered to allow you to load a sample file, and not just the clang-format settings.

Site down

GET http://uwcs.co.uk:7038/doc net::ERR_CONNECTION_REFUSED

Load existing clang-format YML ?

It would be very useful to be able to load an existing clang-format YML file.
Otherwise one has to start every time from scratch when trying to tweak an existing configuration.

BraceWrapping is uneditable

BraceWrapping is set as "Default" and is uneditable. The frontend should be able to handle the nested configuration options.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.