Mercurial > vim-crosoft
annotate autoload/vimcrosoft/youcompleteme.vim @ 10:f444739dd8af
Improvements to YCM dynamic flags.
- Fallback to a "companion" item (e.g. header/source) or a nearby item
when no flags are found for an item.
- Finding a "companion" is also exposed as a standalone script.
- Ability to pass extra clang flags, including some from a special
file found in the .vimcrosoft directory.
- Add support for PCH and other forced-include files.
- Add options for short/long args, or forcing forward slashes.
- Debugging/troubleshooting options, including dumping a batch file and
response file to run clang directly, and the ability to auto-load a
solution's last known environment when running in command line.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 24 Sep 2020 23:02:16 -0700 |
parents | 5d2c0db51914 |
children |
rev | line source |
---|---|
10
f444739dd8af
Improvements to YCM dynamic flags.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
1 |
f444739dd8af
Improvements to YCM dynamic flags.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
2 let g:vimcrosoft_extra_clang_args = get(g:, 'vimcrosoft_extra_clang_args', []) |
0 | 3 |
4 function! vimcrosoft#youcompleteme#init() abort | |
5 endfunction | |
6 | |
7 function! vimcrosoft#youcompleteme#on_sln_changed(slnpath) abort | |
8 let g:ycm_global_ycm_extra_conf = vimcrosoft#get_script_path('ycm_extra_conf.py') | |
9 let g:ycm_extra_conf_vim_data = [ | |
10 \'g:vimcrosoft_current_sln', | |
11 \'g:vimcrosoft_current_sln_cache', | |
12 \'g:vimcrosoft_current_config', | |
10
f444739dd8af
Improvements to YCM dynamic flags.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
13 \'g:vimcrosoft_current_platform', |
f444739dd8af
Improvements to YCM dynamic flags.
Ludovic Chabant <ludovic@chabant.com>
parents:
0
diff
changeset
|
14 \'g:vimcrosoft_extra_clang_args' |
0 | 15 \] |
16 endfunction | |
17 | |
18 function! vimcrosoft#youcompleteme#on_sln_cleared() abort | |
19 let g:ycm_global_ycm_extra_conf = '' | |
20 let g:ycm_extra_conf_vim_data = [] | |
21 endfunction | |
22 | |
23 function! vimcrosoft#youcompleteme#on_config_platform_changed(config, platform) abort | |
24 if exists(":YcmCompleter") | |
25 YcmCompleter ClearCompilationFlagCache | |
26 endif | |
27 endfunction |