diff --git a/README.md b/README.md index 32aaf608..0a84fccf 100644 --- a/README.md +++ b/README.md @@ -1906,7 +1906,7 @@ Default: `[]` let g:ycm_extra_conf_vim_data = [] ``` -### The `g:ycm_path_to_python_interpreter` option +### The `g:ycm_server_python_interpreter` option YCM will by default search for an appropriate Python interpreter on your system. You can use this option to override that behavior and force the use of a @@ -1919,7 +1919,7 @@ Vim. Default: `''` ```viml -let g:ycm_path_to_python_interpreter = '' +let g:ycm_server_python_interpreter = '' ``` ### The `g:ycm_server_keep_logfiles` option @@ -2359,7 +2359,7 @@ If building for Python 3 but loading in Python 2: ImportError: dynamic module does not define init function (initycm_core) ``` -Setting the `g:ycm_path_to_python_interpreter` option to force the use of a +Setting the `g:ycm_server_python_interpreter` option to force the use of a specific Python interpreter for `ycmd` is usually the easiest way to solve the problem. Common values for that option are `/usr/bin/python` and `/usr/bin/python3`. diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index b6775ed2..a8740dd0 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -96,7 +96,7 @@ Contents ~ 19. The |g:ycm_collect_identifiers_from_tags_files| option 20. The |g:ycm_seed_identifiers_with_syntax| option 21. The |g:ycm_extra_conf_vim_data| option - 22. The |g:ycm_path_to_python_interpreter| option + 22. The |g:ycm_server_python_interpreter| option 23. The |g:ycm_server_keep_logfiles| option 24. The |g:ycm_server_log_level| option 25. The |g:ycm_auto_start_csharp_server| option @@ -2166,7 +2166,7 @@ Default: '[]' let g:ycm_extra_conf_vim_data = [] < ------------------------------------------------------------------------------- -The *g:ycm_path_to_python_interpreter* option +The *g:ycm_server_python_interpreter* option YCM will by default search for an appropriate Python interpreter on your system. You can use this option to override that behavior and force the use of @@ -2178,7 +2178,7 @@ Vim. Default: "''" > - let g:ycm_path_to_python_interpreter = '' + let g:ycm_server_python_interpreter = '' < ------------------------------------------------------------------------------- The *g:ycm_server_keep_logfiles* option @@ -2591,7 +2591,7 @@ If building for Python 3 but loading in Python 2: > ImportError: dynamic module does not define init function (initycm_core) < -Setting the |g:ycm_path_to_python_interpreter| option to force the use of a +Setting the |g:ycm_server_python_interpreter| option to force the use of a specific Python interpreter for 'ycmd' is usually the easiest way to solve the problem. Common values for that option are '/usr/bin/python' and '/usr/bin/python3'. diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 8e5ebc25..dbfbd065 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -126,8 +126,9 @@ let g:ycm_server_keep_logfiles = let g:ycm_extra_conf_vim_data = \ get( g:, 'ycm_extra_conf_vim_data', [] ) -let g:ycm_path_to_python_interpreter = - \ get( g:, 'ycm_path_to_python_interpreter', '' ) +let g:ycm_server_python_interpreter = + \ get( g:, 'ycm_server_python_interpreter', + \ get( g:, 'ycm_path_to_python_interpreter', '' ) ) let g:ycm_show_diagnostics_ui = \ get( g:, 'ycm_show_diagnostics_ui', diff --git a/python/ycm/paths.py b/python/ycm/paths.py index 6fd98c9a..a5d19061 100644 --- a/python/ycm/paths.py +++ b/python/ycm/paths.py @@ -54,13 +54,13 @@ def Memoize( obj ): def PathToPythonInterpreter(): from ycmd import utils - python_interpreter = vim.eval( 'g:ycm_path_to_python_interpreter' ) + python_interpreter = vim.eval( 'g:ycm_server_python_interpreter' ) if python_interpreter: if IsPythonVersionCorrect( python_interpreter ): return python_interpreter - raise RuntimeError( "Path in 'g:ycm_path_to_python_interpreter' option " + raise RuntimeError( "Path in 'g:ycm_server_python_interpreter' option " "does not point to a valid Python 2.6+ or 3.3+." ) # On UNIX platforms, we use sys.executable as the Python interpreter path. @@ -86,7 +86,7 @@ def PathToPythonInterpreter(): return python_interpreter raise RuntimeError( "Cannot find Python 2.6+ or 3.3+. You can set its path " - "using the 'g:ycm_path_to_python_interpreter' " + "using the 'g:ycm_server_python_interpreter' " "option." ) diff --git a/python/ycm/test_utils.py b/python/ycm/test_utils.py index 1bb5cd9c..5787ee38 100644 --- a/python/ycm/test_utils.py +++ b/python/ycm/test_utils.py @@ -61,7 +61,7 @@ def MockGetBufferWindowNumber( buffer_number ): def MockVimEval( value ): if value == "g:ycm_min_num_of_chars_for_completion": return 0 - if value == "g:ycm_path_to_python_interpreter": + if value == "g:ycm_server_python_interpreter": return '' if value == "tempname()": return '_TEMP_FILE_'