Steve Kondik | 961b4cc | 2017-06-22 18:10:50 -0700 | [diff] [blame] | 1 | # Vim YouCompleteMe completion configuration. |
| 2 | # |
| 3 | # See doc/topics/ycm.md for details. |
| 4 | |
| 5 | import os |
| 6 | |
| 7 | repo_root = os.path.dirname(os.path.abspath(__file__)) |
| 8 | |
| 9 | # Paths in the compilation flags must be absolute to allow ycm to find them from |
| 10 | # any working directory. |
| 11 | def AbsolutePath(path): |
| 12 | return os.path.join(repo_root, path) |
| 13 | |
| 14 | flags = [ |
| 15 | '-I', AbsolutePath('src'), |
| 16 | '-I', AbsolutePath('../tigervnc/common'), |
| 17 | '-I', AbsolutePath('../libvncserver'), |
| 18 | '-I', AbsolutePath('../../system/core/include'), |
| 19 | '-I', AbsolutePath('../../frameworks/native/include'), |
| 20 | '-Wall', |
| 21 | '-Werror', |
| 22 | '-Wextra', |
| 23 | '-pedantic', |
| 24 | '-Wno-newline-eof', |
| 25 | '-Wwrite-strings', |
| 26 | '-std=c++11', |
| 27 | '-x', 'c++' |
| 28 | ] |
| 29 | |
| 30 | def FlagsForFile(filename, **kwargs): |
| 31 | return { |
| 32 | 'flags': flags, |
| 33 | 'do_cache': True |
| 34 | } |
| 35 | |