Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[question] does this plugin have auto formatting and indent size to 2?

See original GitHub issue

im in a cpp file:

#include <cmath>
#include <iostream>

using namespace std;

int main() {

  cout << "hello wordl!" << endl;

  return 0;

i have installed coc-prettier and i have set "prettier.tabWidth": 4 in coc-settings.json and i still get indent size of 2 spaces when i save the cpp file.

it seems that the plugin(coc-clangd) automatically indents the c and cpp file.

any ideas? thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

alexzanderrcommented, Sep 1, 2021

i guess my .clang-format file should look this if i want indent size to be 4:

IndentWidth: 4


alexzanderrcommented, Oct 8, 2021

we were talking about global config file for clang formatter

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I Change VSCode To Indent 4 Spaces Instead Of ...
choose Convert Indentation to Tabs on the dialog popup. Now it says Tab size 2; click on the status bar again where it...
Read more >
Tabs and Indents are 2 spaces despite setting at 4 spaces
Tabs come out at 2 spaces when I hit TAB or Enter, not 4 spaces. I cannot find anywhere in the Settings where...
Read more >
How can I configure Black the python code formatter to indent ...
I can't get the Black plugin to indent 2 spaces instead of 4, I have tried making an .editorconfig file with indent_size =...
Read more >
Is there an HTML auto-indentation feature or plugin for ...
The reindent doesn't always work for snippets. You can use the Tag plugin(install from package control). Then just press ctrl + shift +...
Read more >
Ubuntu 18.04 how Gedit does Auto Indent / Auto Format my ...
I have been looking for how to auto indent / auto format my HTML document ... (more than 15 plugins), but usually they...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found