Source Code Formatter
From KDevelop
[edit] Source Code Formatter
This is a list of ideas for source code formatting handling.
- increase the number of options for formatters from the existing (astyle)
- idea is to expand the way formatters are implemented, so that other language formatters can be supported.
- initial offering - astyle, uncrustify, other
- use commandline or config file options as input to source code formatters, so we can support an unknown source code formatter. The only requirement is that we can read a the commandline options or configuration file of options for the formatter.
- for astyle and uncrustify, display interactive formatting options.
- project and global formatting options
- right mouse button(?) context menu for non standard formating
- option to format whole project, or selection of files at once
- create a code-formatting plugin similar to the documents and language parser, i.e. a plugin for the interface would be loaded on a per mime-type basis. So we can have a code-formatter for C++, one for Python and a 3rd one for HTML in the same project. If we have a common interface for this we can even let scripts run that format each document in a project automatically.
- try and keep the formatter and editor formatting in sync. I think this can be done with kate and modelines.
- per file formatting options. (Working on kdevelop - different modules from different developers have different formatting. Can have format specific to the file that is being worked on.)
- enable sharing of formatting configurations at global, project and file levels