units
Use physical dimensions at compile-time or run-time.
Variables
.ycm_extra_conf.py File Reference

Configuration for vim's YouCompleteMe plugin. More...

Go to the source code of this file.

Functions

OlderGroup

Functions that seem necessary for older YCM.

def MakeRelativePathsInFlagsAbsolute (flags, working_directory)
 
def FlagsForFile (filename, kwargs)
 This seems to be the entry point for older YCM; this function is called by ycmd to produce flags for a file. More...
 
NewerGroup

Functions that seem necessary for newer YCM.

def IsHeaderFile (filename)
 
def FindCorrespondingSourceFile (filename)
 
def Settings (kwargs)
 This seems to be the entry point for newer YCM. More...
 

Variables

 DIR_OF_THIS_SCRIPT = os.path.abspath( os.path.dirname( __file__ ) )
 
list flags
 Compilation flags that will be used in case there's no compilation database set (by default, one is not set). More...
 
list SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
 Variable that seems necessary for new YCM. More...
 

Detailed Description

Configuration for vim's YouCompleteMe plugin.

License: BSD three-clause; see LICENSE.

Definition in file .ycm_extra_conf.py.

Function Documentation

def FindCorrespondingSourceFile (   filename)

Definition at line 73 of file .ycm_extra_conf.py.

74  if IsHeaderFile( filename ):
75  basename = os.path.splitext( filename )[ 0 ]
76  for extension in SOURCE_EXTENSIONS:
77  replacement_file = basename + extension
78  if os.path.exists( replacement_file ):
79  return replacement_file
80  return filename
81 
def IsHeaderFile(filename)
def FindCorrespondingSourceFile(filename)

Here is the call graph for this function:

Here is the caller graph for this function:

def FlagsForFile (   filename,
  kwargs 
)

This seems to be the entry point for older YCM; this function is called by ycmd to produce flags for a file.

Definition at line 58 of file .ycm_extra_conf.py.

58 def FlagsForFile( filename, **kwargs ):
59  final_flags = MakeRelativePathsInFlagsAbsolute(flags, DIR_OF_THIS_SCRIPT)
60  return {
61  'flags': final_flags,
62  }
def FlagsForFile(filename, kwargs)
This seems to be the entry point for older YCM; this function is called by ycmd to produce flags for ...
def MakeRelativePathsInFlagsAbsolute(flags, working_directory)

Here is the call graph for this function:

def IsHeaderFile (   filename)

Definition at line 69 of file .ycm_extra_conf.py.

69 def IsHeaderFile( filename ):
70  extension = os.path.splitext( filename )[ 1 ]
71  return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
72 
def IsHeaderFile(filename)

Here is the caller graph for this function:

def MakeRelativePathsInFlagsAbsolute (   flags,
  working_directory 
)

Definition at line 32 of file .ycm_extra_conf.py.

32 def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
33  if not working_directory:
34  return list( flags )
35  new_flags = []
36  make_next_absolute = False
37  path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
38  for flag in flags:
39  new_flag = flag
40  if make_next_absolute:
41  make_next_absolute = False
42  if not flag.startswith( '/' ):
43  new_flag = os.path.join( working_directory, flag )
44  for path_flag in path_flags:
45  if flag == path_flag:
46  make_next_absolute = True
47  break
48  if flag.startswith( path_flag ):
49  path = flag[ len( path_flag ): ]
50  new_flag = path_flag + os.path.join( working_directory, path )
51  break
52  if new_flag:
53  new_flags.append( new_flag )
54  return new_flags
55 
def MakeRelativePathsInFlagsAbsolute(flags, working_directory)

Here is the caller graph for this function:

def Settings (   kwargs)

This seems to be the entry point for newer YCM.

Definition at line 83 of file .ycm_extra_conf.py.

83 def Settings( **kwargs ):
84  if kwargs[ 'language' ] == 'cfamily':
85  filename = FindCorrespondingSourceFile( kwargs[ 'filename' ] )
86  return {
87  'flags': flags,
88  'include_paths_relative_to_dir': DIR_OF_THIS_SCRIPT,
89  'override_filename': filename
90  }
91  return {}
def FindCorrespondingSourceFile(filename)
def Settings(kwargs)
This seems to be the entry point for newer YCM.

Here is the call graph for this function:

Variable Documentation

DIR_OF_THIS_SCRIPT = os.path.abspath( os.path.dirname( __file__ ) )

Definition at line 8 of file .ycm_extra_conf.py.

list flags
Initial value:
1 = [
2 '-Wall',
3 '-Wextra',
4 '-Werror',
5 '-std=c++14',
6 '-x', 'c++',
7 '-isystem', '/usr/include/clang/7/include',
8 '-I', '.',
9 ]

Compilation flags that will be used in case there's no compilation database set (by default, one is not set).

CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR.

Definition at line 14 of file .ycm_extra_conf.py.

list SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]

Variable that seems necessary for new YCM.

SOURCE_EXTENSIONS is used by FindCorrespondingSourceFile.

Definition at line 26 of file .ycm_extra_conf.py.