Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
4 votes
1 answer
142 views

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 () { } }...
Artyom Fedosov's user avatar
-1 votes
1 answer
125 views

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 ...
Akshay Kumar's user avatar
2 votes
1 answer
119 views

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: ...
einpoklum's user avatar
  • 137k
0 votes
0 answers
68 views

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 ...
NoName's user avatar
  • 245
1 vote
0 answers
150 views

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 ...
Martina's user avatar
  • 829
2 votes
1 answer
160 views

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 ...
user3033810's user avatar
1 vote
1 answer
157 views

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 ...
FERcsI's user avatar
  • 500
1 vote
0 answers
57 views

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; ...
Sourav Kannantha B's user avatar
0 votes
0 answers
49 views

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 ...
Casper Thamdrup's user avatar
0 votes
0 answers
32 views

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 ...
Oodini's user avatar
  • 1,463
1 vote
2 answers
242 views

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 ...
user5005768-hd's user avatar
-1 votes
1 answer
131 views

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 ...
Bogdan Pop's user avatar
0 votes
2 answers
932 views

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 ...
Nicolas Bechstedt's user avatar
0 votes
0 answers
55 views

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&...
Steve Bennett's user avatar
2 votes
0 answers
45 views

Suppose I have Javadoc comment with: /** * <ul> * <li>stuff</li> * <li>stuff</li> * </ul> */ When I run any of the eclipse formatting methods on ...
Harald's user avatar
  • 5,267
1 vote
1 answer
997 views

Even when I use the shortcut Ctrl+K Ctrl+D (Or Edit>Advanced>Format Document) in VS 2022, this C# code won't format properly: Why won't the Visual Studio 2022 formatter fix these issues? How ...
Mehdiway's user avatar
  • 10.7k
7 votes
2 answers
275 views

I would like to be able to keep Delphi from formatting a specific block of text because it is much easier to read when formatted in a specific way, but pressing Ctrl+D will make it much harder to read....
Normand P.'s user avatar
2 votes
0 answers
79 views

I’m using SQLFluff for formatting SQL files and trying to replicate the behavior of JetBrains IDEs where types are perfectly aligned under each other, and constraints (e.g., NOT NULL) dynamically ...
Andrew's user avatar
  • 21
0 votes
1 answer
120 views

I use DataGrip 2022.2.1. When I use code formatting AND condition in new line set before JOIN select pfv.value from pay.PaymentFields pf inner join pay.PaymentFieldValues pfv on pfv.id = ...
e1s's user avatar
  • 375
0 votes
1 answer
61 views

I have the following code enum MyFlag SOME_EMPTY_MACRO( ARG ) { MyEnumValue = 1 << 1 //!< ... }; In my clang-format, I have BraceWrapping.AfterEnum: true This always get transformed to (...
Denis Rouzaud's user avatar
0 votes
0 answers
62 views

I'm looking for a Clang configuration that will convert code A into code B (see below). My preference is to "explode" functions with 3 or more arguments for personal readability, and I haven'...
okaycoolneat's user avatar
0 votes
0 answers
75 views

Related to this. But instead of putting all arguments on single line, I want to put them onto multiple lines in condensed form. Basically I want to transform: def f(arg1: typ1, arg2: typ2, ..., ...) -&...
Sourav Kannantha B's user avatar
0 votes
1 answer
17 views

In VS Code in Python I have my autoformatter set to indent function parameters in-line if I make a line break between them, like so: However something else is making that shading on line 84 and I can'...
BBrooklyn's user avatar
  • 439
0 votes
0 answers
66 views

I want to use the command Reindent Selected Lines or Reindent Lines with a shortcut. I tried setting keybindings to each of them but when I press them in notebooks or scripts (using Python), nothing ...
João Bravo's user avatar
2 votes
1 answer
135 views

I’m trying to configure clang-format to break after each function parameter and place ) and } on separate lines for (member) function declarations and calls, like this: void draw( const geometry::...
Rodrigo's user avatar
  • 1,019
1 vote
1 answer
1k views

I rely on clean-up profile with the "run on save" checked to ensure my code is formatted on save: 'Format code' and 'sort using' on save in Visual Studio 2022 While that ...
Cfun's user avatar
  • 9,871
1 vote
0 answers
97 views

I'm encountering an issue where Prettier automatically reformats my C++ macros into a single line, even though I've tried using the // prettier-ignore directive. Here's an example of my code: `// ...
Ritul Patel's user avatar
2 votes
1 answer
96 views

Is there an option to set the penalty for breaking preprocessor directives into multiple lines? For example, if I have the following snippet: #define my_constant 1 // Lorem ipsum dolor sit amet, ...
skillz21's user avatar
  • 196
-4 votes
1 answer
139 views

I'm trying to understand how code formatting and documentation impacts the performance of a program Spacing between statements: having more or fewer blank lines between code statements. Indentation: ...
DS.user25115648's user avatar
1 vote
1 answer
122 views

Below is the clang-format of ".h" header file with variable size of strings. string a[x] = { "masfasdno", "iasdst", "xafdsfayz", "pqssssr&...
thirdeye's user avatar
  • 302
0 votes
1 answer
55 views

In Microsoft driver code (even the driver templates included in VS), they frequently format the function signature like this: VOID EvtIoStop( _In_ WDFQUEUE Queue, _In_ WDFREQUEST Request, ...
Alex Env's user avatar
0 votes
0 answers
54 views

How can I modify the IntelliJ SQL-Formatter to insert an indent before the SET (after an UPDATE)? Current code: UPDATE role SET is_available = 0 , is_updated = 1 WHERE name = 'Admin'; Desired ...
Simon's user avatar
  • 1,473
2 votes
0 answers
44 views

I'm having an issue with the HTML pre tag. If I do a very simple test it preserves spacing the way that I want it to. For instance, notice that there are two spaces in a row in certain parts of the ...
kenneyher's user avatar
0 votes
1 answer
761 views

I am using Code Cleanup in Visual Studio and noticed when file is on save. The unused variable will be removed like: I tried editing the .editorConfig file but it didn't seem to work with any of the ...
Sophie cai's user avatar
5 votes
2 answers
533 views

I know this is probably not the right place to ask this, but I doubt I'd find an answer somewhere else. Visual Studio 17.9.5 will, by default, format the following snippet as such int[] arr = [1, 2]; ...
Cristi's user avatar
  • 1,357
5 votes
2 answers
3k views

I've been enjoying the convenience of the Black Formatter extension in Visual Studio Code, especially its "Format on Save" feature for Python files. Being able to automatically format my ...
Ellie Su's user avatar
1 vote
0 answers
135 views

Here is my example code where i am having error while using phpfmt [code formatter]. function ( int | float...$numbers ): int | float { return array_sum( $numbers ); }; Here as we can see in the ...
Lord_Shiva_Mahadev's user avatar
0 votes
1 answer
593 views

If the info.plist file changes, the PR changes and it's very cumbersome to modify. Is there a way to modify it through github action or CI build? Or I'm looking for a way to keep it consistent through ...
DONGNYEONG's user avatar
0 votes
2 answers
186 views

(defun heapify-down (heap-id index) (if (is-leaf heap-id index) nil (let ((left (left-child index)) (right (right-child index)) ...
Matias Bonoli's user avatar
0 votes
2 answers
859 views

Before I state any of my problems this is my .prettierrc file so far { "semi": true, "useTabs": true, "tabWidth": 4 } Problem 1: I would like my prettier to ...
MrGod1y's user avatar
  • 17
0 votes
1 answer
103 views

Why does this if: if (value == null || value.trim().isEmpty || !value.contains('@')) breaks into multiple lines upon save?: if (value == null || value.trim().isEmpty || !value.contains('@')) { ...
niko craft's user avatar
  • 3,027
1 vote
1 answer
1k views

I have the Microsoft Black Formatter extension in VSCode (in WSL, inside Windows 11). I can format opened python files with no problem, one-by-one, either using keyboard shortcut or right click on the ...
Andras Vanyolos's user avatar
2 votes
1 answer
279 views

In Xcode, let's say I have an arbitrary section of code in a Swift file such as: static func getDocumentsDirectory() -> URL { let paths = FileManager.default.urls(for: .documentDirectory, in: ....
Nerdy Bunz's user avatar
  • 7,733
4 votes
0 answers
144 views

Is there any way I can setup clang-format to nicely* format an expression like this? foo({ [](int) { bar(); baz(); }, [](float) {} }); With my current config this gets ...
chrysante's user avatar
  • 2,846
4 votes
0 answers
404 views

I'm currently trying to set up a .clang-format file for a project, and was wondering if there's a combination of settings to auto-indent not just preprocessor directives but also code enclosed by them....
Grzzlwmpf's user avatar
-1 votes
1 answer
45 views

I want all the code in our repository to always use blocks enclosed with brackets for the clauses of if statements, loops and even for inline functions. The following code is banned: const func = () =&...
kaan_atakan's user avatar
  • 4,107
3 votes
2 answers
105 views

I am a relatively new programmer in J-Lang and recently discovered its efficacy in Code Golfing, where it excels in scoring. I am currently working on a coding problem that involves printing all prime ...
user21524036's user avatar
1 vote
1 answer
1k views

I'm using Visual Studio Code for a JavaScript project and facing a formatting challenge with Prettier, which I'm using in conjunction with ESLint. My preference is to maintain a space between the ...
Mark Antonie's user avatar
0 votes
2 answers
209 views

I am having issues with not being able to get any item and move it into my inventory on this text-based game, I have tried a couple of things but none of it has helped and I am genuinely stuck. I am ...
TEsco's user avatar
  • 3
1 vote
2 answers
200 views

I am currently working on a project in Visual Studio Code that has poorly formatted code. Due to project constraints, I am not allowed to reformat the existing code and commit those changes. This ...
Mikhail Yevchenko's user avatar

1
2 3 4 5
34