Rename ycmd python option
- Rename ycm_path_to_python_interpreter to ycm_ycmd_python_interpreter - Keep ycm_path_to_python_interpreter backward compatible
This commit is contained in:
parent
f44435b88e
commit
9e6645f515
@ -1898,7 +1898,7 @@ Default: `[]`
|
|||||||
let g:ycm_extra_conf_vim_data = []
|
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.
|
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
|
You can use this option to override that behavior and force the use of a
|
||||||
@ -1911,7 +1911,7 @@ Vim.
|
|||||||
Default: `''`
|
Default: `''`
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
let g:ycm_path_to_python_interpreter = ''
|
let g:ycm_server_python_interpreter = ''
|
||||||
```
|
```
|
||||||
|
|
||||||
### The `g:ycm_server_keep_logfiles` option
|
### The `g:ycm_server_keep_logfiles` option
|
||||||
@ -2351,7 +2351,7 @@ If building for Python 3 but loading in Python 2:
|
|||||||
ImportError: dynamic module does not define init function (initycm_core)
|
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
|
specific Python interpreter for `ycmd` is usually the easiest way to solve the
|
||||||
problem. Common values for that option are `/usr/bin/python` and
|
problem. Common values for that option are `/usr/bin/python` and
|
||||||
`/usr/bin/python3`.
|
`/usr/bin/python3`.
|
||||||
|
@ -96,7 +96,7 @@ Contents ~
|
|||||||
19. The |g:ycm_collect_identifiers_from_tags_files| option
|
19. The |g:ycm_collect_identifiers_from_tags_files| option
|
||||||
20. The |g:ycm_seed_identifiers_with_syntax| option
|
20. The |g:ycm_seed_identifiers_with_syntax| option
|
||||||
21. The |g:ycm_extra_conf_vim_data| 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
|
23. The |g:ycm_server_keep_logfiles| option
|
||||||
24. The |g:ycm_server_log_level| option
|
24. The |g:ycm_server_log_level| option
|
||||||
25. The |g:ycm_auto_start_csharp_server| option
|
25. The |g:ycm_auto_start_csharp_server| option
|
||||||
@ -846,8 +846,8 @@ will notify you to recompile it. You should then rerun the install process.
|
|||||||
-g typescript' after successfully installing nodejs and npm [22].
|
-g typescript' after successfully installing nodejs and npm [22].
|
||||||
|
|
||||||
9. JavaScript support: Install nodejs and npm [22]. Then navigate to
|
9. JavaScript support: Install nodejs and npm [22]. Then navigate to
|
||||||
'YouCompleteMe/third_party/ycmd/third_party/tern' and run 'npm install
|
'YouCompleteMe/third_party/ycmd/third_party/tern_runtime' and run 'npm
|
||||||
--production'
|
install --production'
|
||||||
|
|
||||||
10. Rust support: Install rustc and cargo [23]. Navigate to
|
10. Rust support: Install rustc and cargo [23]. Navigate to
|
||||||
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
|
'YouCompleteMe/third_party/ycmd/third_party/racerd' and run 'cargo
|
||||||
@ -2159,7 +2159,7 @@ Default: '[]'
|
|||||||
let g:ycm_extra_conf_vim_data = []
|
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
|
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
|
system. You can use this option to override that behavior and force the use of
|
||||||
@ -2171,7 +2171,7 @@ Vim.
|
|||||||
|
|
||||||
Default: "''"
|
Default: "''"
|
||||||
>
|
>
|
||||||
let g:ycm_path_to_python_interpreter = ''
|
let g:ycm_server_python_interpreter = ''
|
||||||
<
|
<
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
The *g:ycm_server_keep_logfiles* option
|
The *g:ycm_server_keep_logfiles* option
|
||||||
@ -2584,7 +2584,7 @@ If building for Python 3 but loading in Python 2:
|
|||||||
>
|
>
|
||||||
ImportError: dynamic module does not define init function (initycm_core)
|
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
|
specific Python interpreter for 'ycmd' is usually the easiest way to solve the
|
||||||
problem. Common values for that option are '/usr/bin/python' and
|
problem. Common values for that option are '/usr/bin/python' and
|
||||||
'/usr/bin/python3'.
|
'/usr/bin/python3'.
|
||||||
|
@ -126,8 +126,9 @@ let g:ycm_server_keep_logfiles =
|
|||||||
let g:ycm_extra_conf_vim_data =
|
let g:ycm_extra_conf_vim_data =
|
||||||
\ get( g:, 'ycm_extra_conf_vim_data', [] )
|
\ get( g:, 'ycm_extra_conf_vim_data', [] )
|
||||||
|
|
||||||
let g:ycm_path_to_python_interpreter =
|
let g:ycm_server_python_interpreter =
|
||||||
\ get( g:, 'ycm_path_to_python_interpreter', '' )
|
\ get( g:, 'ycm_server_python_interpreter',
|
||||||
|
\ get( g:, 'ycm_path_to_python_interpreter', '' ) )
|
||||||
|
|
||||||
let g:ycm_show_diagnostics_ui =
|
let g:ycm_show_diagnostics_ui =
|
||||||
\ get( g:, 'ycm_show_diagnostics_ui',
|
\ get( g:, 'ycm_show_diagnostics_ui',
|
||||||
|
@ -54,13 +54,13 @@ def Memoize( obj ):
|
|||||||
def PathToPythonInterpreter():
|
def PathToPythonInterpreter():
|
||||||
from ycmd import utils
|
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 python_interpreter:
|
||||||
if IsPythonVersionCorrect( python_interpreter ):
|
if IsPythonVersionCorrect( python_interpreter ):
|
||||||
return 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+." )
|
"does not point to a valid Python 2.6+ or 3.3+." )
|
||||||
|
|
||||||
# On UNIX platforms, we use sys.executable as the Python interpreter path.
|
# On UNIX platforms, we use sys.executable as the Python interpreter path.
|
||||||
@ -86,7 +86,7 @@ def PathToPythonInterpreter():
|
|||||||
return python_interpreter
|
return python_interpreter
|
||||||
|
|
||||||
raise RuntimeError( "Cannot find Python 2.6+ or 3.3+. You can set its path "
|
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." )
|
"option." )
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ def MockGetBufferWindowNumber( buffer_number ):
|
|||||||
def MockVimEval( value ):
|
def MockVimEval( value ):
|
||||||
if value == "g:ycm_min_num_of_chars_for_completion":
|
if value == "g:ycm_min_num_of_chars_for_completion":
|
||||||
return 0
|
return 0
|
||||||
if value == "g:ycm_path_to_python_interpreter":
|
if value == "g:ycm_server_python_interpreter":
|
||||||
return ''
|
return ''
|
||||||
if value == "tempname()":
|
if value == "tempname()":
|
||||||
return '_TEMP_FILE_'
|
return '_TEMP_FILE_'
|
||||||
|
Loading…
Reference in New Issue
Block a user