You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found solution to this issue.
My error message was a little bit different(number_error_message) so, I am not sure if this will help.
Reason:
I found that clang_format.vim(plugin) search for .clang-format in your system, So it give error when there is no .clang-format file
Or
In my case .clang-format file had error which lead to this error.
Solution:
Firstly clang-format needs a config file called .clang-format .
Which i recommend you to create in home directory.
---
# We'll use defaults from the LLVM style, but with 4 columns indentation.
BasedOnStyle: LLVM
IndentWidth: 4
---
Language: Cpp
# Force pointers to the type for C++.
DerivePointerAlignment: false
PointerAlignment: Left
---
Language: JavaScript
# Use 100 columns for JS.
ColumnLimit: 100
---
Language: Proto
# Don't format .proto files.
DisableFormat: true
---
Language: CSharp
# Use 100 columns for C#.
ColumnLimit: 100
...
I recommend configuring things yourself but you can just use example config.
After that check for any error in .clang-format file by typing given command in terminal. clang-format -dump-config
If there are no errors in output you are good to go, however if there are errors you will have resolve them in .clang-format,
I recommend using official documentation on style options as a reference.
Edit: Also you should keep .clang-format in home directory so that its globally accessable.
this is .vimrc file
let g:clang_format#command = 'clang-format'
autocmd FileType c,cpp ClangFormatAutoEnable
I edit and format the .cc file first,Then edit the proto file and send an error when saving it。
Error detected while processing function clang_format#replace[6]..105_error_message:
line 1:
The text was updated successfully, but these errors were encountered: