Mercurial > vim-crosoft
annotate compiler/vimcrosoftsln.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 | 096e80c13781 |
rev | line source |
---|---|
0 | 1 " Compiler file for Visual Studio |
2 " Compiler: Visual Studio | |
3 " Maintainer: Ludovic Chabant <https://ludovic.chabant.com> | |
4 | |
5 if exists("current_compiler") | |
6 finish | |
7 endif | |
8 let current_compiler = "vimcrosoftsln" | |
9 | |
10 let s:keepcpo = &cpo | |
11 | |
12 let s:prgargs = '' | |
13 if !empty(g:vimcrosoft_temp_compiler_args__) | |
14 let s:tmpargs = map( | |
15 \copy(g:vimcrosoft_temp_compiler_args__), | |
16 \{idx, val -> escape(val, ' \"')}) | |
17 let s:prgargs = '\ '.join(s:tmpargs, '\ ') | |
18 endif | |
19 | |
20 let s:prgcmdline = fnameescape('"'.g:vimcrosoft_msbuild_path.'"').s:prgargs | |
21 call vimcrosoft#trace("Setting makeprg to: ".s:prgcmdline) | |
22 execute "CompilerSet makeprg=".s:prgcmdline | |
23 | |
24 CompilerSet errorformat& | |
25 | |
26 let &cpo = s:keepcpo | |
27 unlet s:keepcpo | |
28 |