Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatting instructions ignored #3

Closed
kendfss opened this issue Dec 19, 2022 · 3 comments
Closed

formatting instructions ignored #3

kendfss opened this issue Dec 19, 2022 · 3 comments

Comments

@kendfss
Copy link

kendfss commented Dec 19, 2022

I'm writing wrt the guide at:

instructions saved in .clang-format were ignored.
Then I tried the settings file. first:

        "clangd.fallback-style": "{IndentWidth: 4}", // as per command line style (I received type warnings when trying to enter in regular object notation)

then:

"command": [
        "/usr/bin/clangd",
        "-i",
        "-style='{IndentWidth: 4}'"
    ]

To no avail.
The following (at the command-line) works fine though:

clangd -i -style='{IndentWidth: 4}' main.c

What am I doing wrong?
What else should I try?

@kendfss
Copy link
Author

kendfss commented Dec 20, 2022

I think this is worth closing because the issue seems to be with clangd itself
clangd/clangd#362
Gavin's post gives a viable workaround for linux.

@kendfss kendfss closed this as completed Dec 20, 2022
@rchl
Copy link
Member

rchl commented Dec 20, 2022

.clang-format should probably still work though? The issue you've linked doesn't seem to say anything about that.

The output of LSP: Troubleshoot server might help to analyze that (assuming that .clang-format should work).

@kendfss
Copy link
Author

kendfss commented Dec 20, 2022

It didn't work until I put it under /. This is fine for me because I don't use this server for anything other than small personal projects, but I assume it won't be ideal for people looking to alternate between/contribute to larger ones. I never checked the output (assuming it isn't automatically printed into the sublime terminal). I'll check it out later this week though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants