Skip to content

Instantly share code, notes, and snippets.

@Uflex
Uflex / clang-format_config.md
Last active November 3, 2019 16:19
Configuration of clang-format for QtCreator

Clang-format in QtCreator

Edit: QtCreator 3.1 introduced a new plugin called Beautifier that supports clang-format. You still have to install the clang tools separately but you don't have to add them as external tools anymore. The plugin can be configured in the options dialog under the beautifier tab > Clang Format. Add a new style and copy the configuration below without the curly braces.

QtCreator doesn't allow using clang-format by default. Watch QTCREATORBUG-10111 for a better integration. As of today, you should use it as an external tool, either replacing your selection or the entire file. If you choose to replace the file, you will have to save it before launching the tool and QtCreator will reload the file, making it impossible to undo/redo afterwards. If you choose to replace your selection, you often have to select the whole function, otherwise you will lose the indentation; clang-format doesn't seem to k

@Fusselwurm
Fusselwurm / gherkin.xml
Created May 16, 2013 08:32
gherkin syntax highlighting for kde/katepart. not of my making, but copied from http://paste.kde.org/184712/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--
Gherkin (English) syntax highlighting definition for Kate.
Copyright (C) 2011 by Torbjörn Klatt (opensource@torbjoern-klatt.de)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public