Support for multile filetypes in clang_completer
clang_completer would check if the raw value of '&ft' was one of supported filetypes for the completer. Vim allows for multiple filetypes with a '.' separator. A file with ft=qt.cpp, for example, would not be supported by clang_completer even though it was a cpp file. This patch changes that behaviour.
This commit is contained in:
parent
5d97e709f5
commit
1acd3e84c7
@ -246,5 +246,9 @@ def DiagnosticsToDiagStructure( diagnostics ):
|
||||
|
||||
|
||||
def ClangAvailableForBuffer( buffer_object ):
|
||||
filetype = vim.eval( 'getbufvar({0}, "&ft")'.format( buffer_object.number ) )
|
||||
return filetype in CLANG_FILETYPES
|
||||
filetypes = vim.eval( 'getbufvar({0}, "&ft")'.format( buffer_object.number ) )
|
||||
supported_fts = [ft for ft in filetypes.split('.') if ft in CLANG_FILETYPES]
|
||||
if supported_fts:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user