1,663 questions
4 votes
1 answer
150 views
How to configure .clang-format to indent access modifiers in a class definition?
I want my C++ class definitions to have access modifiers indented like below: class Foo { public: Foo(Bar bar); Foo(Bar *bar); }; Foo::Foo(Bar bar) { if () { while () { } }...
-1 votes
1 answer
129 views
How do I configure the VS Code C_Cpp extension's auto insertion of linebreaks before braces?
VS Code is auto inserting linebreaks before my curly braces. I have always used K&R style braces, and would like to use that style for C++ inside of VS Code. Does anyone know how I can configure ...
2 votes
1 answer
131 views
How can I get CLion not to indent the case lines within a switch statement?
I'm using CLion to work on some C++ project. When I write case statements, CLion always indents my case lines, like so: switch(foo) { case bar_1: do_stuff(); break; case bar_2: ...
0 votes
0 answers
69 views
How to make "align wrapped arguments" a default formatting behavior in Visual Studio 2022
I want this kind of long parameters list to wrap automatically on saving or running formatter ctrl + k + d. And not the wrapping from Options => Text Editor => C# => General Not this: I know ...
1 vote
0 answers
151 views
.editorconfig Support in Windsurf IDE for C# Formatting
I've been trying to get automatic code formatting working with my .editorconfig settings in Windsurf IDE for my C# codebase. I tried the Prettier extension, but found it doesn't support C#. I also ...
2 votes
1 answer
162 views
How to use Prettier as beautifier of user's code? [closed]
In my project Prettier is already connected for the project code formatting. I'm trying to use Prettier for user's code formatting in Ace Editor: import * as prettier from 'prettier'; import * as ...
1 vote
1 answer
163 views
How to break construct into multiple lines?
I'm new to COBOL, and I'd like to understand continuation if a line is too long. I know that there is a free form, but originally (in strict mode), the line length is limited. I'd like to split the ...
1 vote
0 answers
57 views
clang-format causing unnecessary line breaks after disallowing single line lambda
Code: auto transs = transitions | stdv::filter([alph](const auto trns) { return trns.first == alph; }) | stdv::values | stdv::transform([](auto x) { return x; }) | stdv::as_rvalue; ...
0 votes
0 answers
54 views
How to control formatting of attributes with explicit expressions in Razor components using Rider with editor config setup
I can't for the life of me figure out how to do this, if possible. When using explicit expressions as values for EventHandlers or actions on components, is there a way to define how you want them ...
0 votes
0 answers
32 views
editorConfig file not considered by Visual Studio 2022 / C++
I code in C++ in Visual Studio 2022. My sources and solution/project files are in two different directories. Neither is included in the other. They're strictly separated. I put and .editorconfig file ...
1 vote
2 answers
246 views
How to easily and quickly apply custom indentation format rule to selected Pascal/Delphi code?
I am working with Pascal/Delphi code and need to format a selection of code with custom indentation rules (e.g. 4 spaces for indentation). I want to apply these formatting rules to the selected code ...
-1 votes
1 answer
134 views
How to revert auto formatting changed lines and save the file
Actions on save -> checked, Reformat changed lines -> checked Optimize imports -> checked. This works excellently most of the time, but sometimes I want my own formatting to remain. I seem ...
0 votes
2 answers
969 views
VSCode adds unwanted extra spaces on enter
I am using VSCode since a couple years and have recently changed computers. After installing VSCode, I came upon this issue: lets say I have a list like this: int_list = [ 1, 2, 3, 4, ] and now I ...
0 votes
0 answers
57 views
How to prevent Vue extension from "fixing" my code?
I'm experiencing an issue where "unreachable code" in a Vue/TypeScript file is automatically deleted on save. (A pretty shocking behaviour, often I'm temporarily adding a "return false&...
2 votes
0 answers
49 views
Eclipse indenting of nested HTML tags in Javadoc comments
Suppose I have Javadoc comment with: /** * <ul> * <li>stuff</li> * <li>stuff</li> * </ul> */ When I run any of the eclipse formatting methods on ...