Skip to content

*.h files recognized as C++ filetype but I am working on a C project. #3932

Discussion options

You must be logged in to vote

ALE does not recognizes filetypes, it follows whatever vim sets as filetype.
You will have to configure vim to set filetype=c for header files if you want ALE to treat them as c files.

Simplest way is to create an auto command in you config:

augroup filetypedetect
    au! BufRead,BufNewFile *.h         setfiletype c
augroup END

Check :h filetype-overrule for more in deep details.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shayaniox
Comment options

@Jorenar
Comment options

Answer selected by ubaldot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants