Skip to content
Snippets Groups Projects
Commit 217500c6 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

clang-format: permit setting the path to clang in vimrc

If g:clang_format_path is set in the vimrc, that path will take precedence over
the hard coded path (which is reliant on the PATH environment variable).  This
provides an easy mechanism for switching the selected clang-format binary during
development.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221108 91177308-0d34-0410-b5e6-96231b3b80d8
parent 4f13f657
No related branches found
No related tags found
No related merge requests found
...@@ -23,8 +23,11 @@ import subprocess ...@@ -23,8 +23,11 @@ import subprocess
import sys import sys
import vim import vim
# set g:clang_format_path to the path to clang-format if it is not on the path
# Change this to the full path if clang-format is not on the path. # Change this to the full path if clang-format is not on the path.
binary = 'clang-format' binary = 'clang-format'
if vim.eval('exists("g:clang_format_path")'):
binary = vim.eval('g:clang_format_path')
# Change this to format according to other formatting styles. See the output of # Change this to format according to other formatting styles. See the output of
# 'clang-format --help' for a list of supported styles. The default looks for # 'clang-format --help' for a list of supported styles. The default looks for
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment