mirror of
				https://github.com/amix/vimrc
				synced 2025-10-31 14:43:35 +08:00 
			
		
		
		
	Updated plugins
This commit is contained in:
		| @ -14,10 +14,10 @@ function! ale_linters#cpp#clang#GetCommand(buffer, output) abort | ||||
|     " -iquote with the directory the file is in makes #include work for | ||||
|     "  headers in the same directory. | ||||
|     return ale#Escape(ale_linters#cpp#clang#GetExecutable(a:buffer)) | ||||
|     \   . ' -S -x c++ -fsyntax-only ' | ||||
|     \   . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' ' | ||||
|     \   . l:cflags | ||||
|     \   . ale#Var(a:buffer, 'cpp_clang_options') . ' -' | ||||
|     \   . ' -S -x c++ -fsyntax-only' | ||||
|     \   . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) | ||||
|     \   . ale#Pad(l:cflags) | ||||
|     \   . ale#Pad(ale#Var(a:buffer, 'cpp_clang_options')) . ' -' | ||||
| endfunction | ||||
|  | ||||
| call ale#linter#Define('cpp', { | ||||
| @ -28,5 +28,5 @@ call ale#linter#Define('cpp', { | ||||
| \       {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'}, | ||||
| \       {'callback': 'ale_linters#cpp#clang#GetCommand'}, | ||||
| \   ], | ||||
| \   'callback': 'ale#handlers#gcc#HandleGCCFormat', | ||||
| \   'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', | ||||
| \}) | ||||
|  | ||||
| @ -16,7 +16,7 @@ function! ale_linters#cpp#clangcheck#GetCommand(buffer) abort | ||||
|     let l:build_dir = ale#Var(a:buffer, 'c_build_dir') | ||||
|  | ||||
|     if empty(l:build_dir) | ||||
|         let l:build_dir = ale#c#FindCompileCommands(a:buffer) | ||||
|         let l:build_dir = ale#path#Dirname(ale#c#FindCompileCommands(a:buffer)) | ||||
|     endif | ||||
|  | ||||
|     " The extra arguments in the command are used to prevent .plist files from | ||||
|  | ||||
| @ -29,7 +29,7 @@ function! s:GetBuildDirectory(buffer) abort | ||||
|         return l:build_dir | ||||
|     endif | ||||
|  | ||||
|     return ale#c#FindCompileCommands(a:buffer) | ||||
|     return ale#path#Dirname(ale#c#FindCompileCommands(a:buffer)) | ||||
| endfunction | ||||
|  | ||||
| function! ale_linters#cpp#clangtidy#GetCommand(buffer) abort | ||||
|  | ||||
| @ -14,10 +14,10 @@ function! ale_linters#cpp#gcc#GetCommand(buffer, output) abort | ||||
|     " -iquote with the directory the file is in makes #include work for | ||||
|     "  headers in the same directory. | ||||
|     return ale#Escape(ale_linters#cpp#gcc#GetExecutable(a:buffer)) | ||||
|     \   . ' -S -x c++ -fsyntax-only ' | ||||
|     \   . '-iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) . ' ' | ||||
|     \   . l:cflags | ||||
|     \   . ale#Var(a:buffer, 'cpp_gcc_options') . ' -' | ||||
|     \   . ' -S -x c++ -fsyntax-only' | ||||
|     \   . ' -iquote ' . ale#Escape(fnamemodify(bufname(a:buffer), ':p:h')) | ||||
|     \   . ale#Pad(l:cflags) | ||||
|     \   . ale#Pad(ale#Var(a:buffer, 'cpp_gcc_options')) . ' -' | ||||
| endfunction | ||||
|  | ||||
| call ale#linter#Define('cpp', { | ||||
| @ -29,5 +29,5 @@ call ale#linter#Define('cpp', { | ||||
| \       {'callback': 'ale#c#GetMakeCommand', 'output_stream': 'stdout'}, | ||||
| \       {'callback': 'ale_linters#cpp#gcc#GetCommand'}, | ||||
| \   ], | ||||
| \   'callback': 'ale#handlers#gcc#HandleGCCFormat', | ||||
| \   'callback': 'ale#handlers#gcc#HandleGCCFormatWithIncludes', | ||||
| \}) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Amir Salihefendic
					Amir Salihefendic