-
Notifications
You must be signed in to change notification settings - Fork 10
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
Google C++ style #15
Comments
Thanks for letting me know. I'm not yet sure how to best fix this issue. I created a new branch with a modified heuristic which works better with the Google C++ style, though it still tails with the example you provided (it is too short). |
I don't know much lua or nvim plugin writing or ident detect, can we maybe just ignore access modifiers? Let say if a C++ line matches regex "^\s*(private|public|protected)\s*:\s*$", then skip this line. |
Hey @zhongsanming, a fellow C++ Google Style Guide user here. I arrived here because of a different problem (in just add an # EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
[*.{h,cpp}]
indent_style = space
indent_size = 4 AND in case you are under guess-indent.nvim/lua/guess-indent/init.lua Line 272 in b8ae749
After that, the |
@agronskiy Thank you for this nice solution, I'll give it a try. |
Google C++ style place class member access specifier in 3 spaces indent, which make guess-indent set indent to 1 space. In practice this should be 4 spaces.
A simple example:
can we support this as a special case?
The text was updated successfully, but these errors were encountered: