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

Format buffer using clang format file #8

Closed
TheAifam5 opened this issue Dec 17, 2016 · 2 comments
Closed

Format buffer using clang format file #8

TheAifam5 opened this issue Dec 17, 2016 · 2 comments

Comments

@TheAifam5
Copy link

Its possible to add support for clang format using a file?
I tried:

let g:neoformat_c_clangformat = {
            \ 'exe': 'clang-format',
            \ 'args': '-style=file',
            \ }

But doesn't work.

@sbdchd
Copy link
Owner

sbdchd commented Dec 17, 2016

I think neoformat expects args to be an array.

Try the following:

let g:neoformat_c_clangformat = {
            \ 'exe': 'clang-format',
            \ 'args': ['-style=file'],
            \ }

@sbdchd
Copy link
Owner

sbdchd commented Dec 17, 2016

Also, clang format is enabled by default for c files, but it does not have any args.

function! neoformat#formatters#c#clangformat() abort

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