Commit 5b45e3dd authored by David Kalnischkies's avatar David Kalnischkies

New upstream version 0+20190211+gitcbaf813

parent 61a25ec7
......@@ -18,7 +18,7 @@
url = https://github.com/urllib3/urllib3
[submodule "third_party/requests_deps/requests"]
path = third_party/requests_deps/requests
url = https://github.com/kennethreitz/requests
url = https://github.com/requests/requests
[submodule "third_party/python-future"]
path = third_party/python-future
url = https://github.com/PythonCharmers/python-future
......@@ -699,26 +699,27 @@ Quick Feature Summary
* Semantic auto-completion with automatic fixes
* Real-time diagnostic display
* Go to include/declaration/definition (`GoTo`, etc.)
* Semantic type information for identifiers (`GetType`)
* Automatically fix certain errors (`FixIt`)
* View documentation comments for identifiers (`GetDoc`)
* Type information for identifiers (`GetType`)
* Automatically fix certain errors (`FixIt`)
### C♯
* Semantic auto-completion
* Real-time diagnostic display
* Go to declaration/definition (`GoTo`, etc.)
* Semantic type information for identifiers (`GetType`)
* View documentation comments for identifiers (`GetDoc`)
* Type information for identifiers (`GetType`)
* Automatically fix certain errors (`FixIt`)
* Management of OmniSharp server instance
* View documentation comments for identifiers (`GetDoc`)
### Python
* Intelligent auto-completion
* Semantic auto-completion
* Go to definition (`GoTo`)
* Reference finding (`GoToReferences`)
* View documentation comments for identifiers (`GetDoc`)
* Type information for identifiers (`GetType`)
### Go
......@@ -729,15 +730,15 @@ Quick Feature Summary
### JavaScript and TypeScript
* Semantic auto-completion with automatic import insertion
* Real-time diagnostic display
* Go to definition (`GoTo`, `GoToDefinition`, and `GoToDeclaration` are
identical)
* Go to type definition (`GoToType`)
* Reference finding (`GoToReferences`)
* Real-time diagnostic display
* Renaming symbols (`RefactorRename <new name>`)
* View documentation comments for identifiers (`GetDoc`)
* Type information for identifiers (`GetType`)
* Automatically fix certain errors (`FixIt`)
* Renaming symbols (`RefactorRename <new name>`)
* Code formatting (`Format`)
* Organize imports (`OrganizeImports`)
* Management of `TSServer` server instance
......@@ -747,8 +748,8 @@ Quick Feature Summary
* Semantic auto-completion
* Go to definition (`GoTo`, `GoToDefinition`, and `GoToDeclaration` are
identical)
* Management of `racer` server instance
* View documentation comments for identifiers (`GetDoc`)
* Management of `racer` server instance
### Java
......@@ -756,14 +757,14 @@ Quick Feature Summary
[feedback](#contact).
* Semantic auto-completion with automatic import insertion
* Real-time diagnostic display
* Go to definition (`GoTo`, `GoToDefinition`, and `GoToDeclaration` are
identical)
* Reference finding (`GoToReferences`)
* Real-time diagnostic display
* Renaming symbols (`RefactorRename <new name>`)
* View documentation comments for identifiers (`GetDoc`)
* Type information for identifiers (`GetType`)
* Automatically fix certain errors including code generation (`FixIt`)
* Automatically fix certain errors including code generation (`FixIt`)
* Renaming symbols (`RefactorRename <new name>`)
* Code formatting (`Format`)
* Organize imports (`OrganizeImports`)
* Detection of java projects
......@@ -1420,8 +1421,15 @@ You can also style the line that has the warning/error with these groups:
- `YcmWarningLine`, which falls back to group `SyntasticWarningLine` if it
exists
Note that the line highlighting groups only work when gutter signs are turned
on.
Note that the line highlighting groups only work when the
[`g:ycm_enable_diagnostic_signs`](#the-gycm_enable_diagnostic_signs-option)
option is set. If you want highlighted lines but no signs in the Vim gutter,
ensure that your Vim version is 7.4.2201 or later and set the `signcolumn`
option to `off` in your vimrc:
```viml
set signcolumn=off
```
The syntax groups used to highlight regions of text with errors/warnings:
- `YcmErrorSection`, which falls back to group `SyntasticError` if it exists and
......@@ -1640,7 +1648,7 @@ Invoking this command on `s` returns `std::string => std::basic_string<char>`
**NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: `c, cpp, objc, objcpp, cuda, java, javascript,
typescript`
python, typescript`
#### The `GetTypeImprecise` subcommand
......@@ -2560,8 +2568,10 @@ let g:ycm_autoclose_preview_window_after_insertion = 0
### The `g:ycm_max_diagnostics_to_display` option
This option controls the maximum number of diagnostics shown to the user when
errors or warnings are detected in the file. This option is only relevant if you
are using the C-family semantic completion engine.
errors or warnings are detected in the file. This option is only relevant for
the C-family, C#, Java, JavaScript, and TypeScript languages.
A special value of `0` means there is no limit.
Default: `30`
......
......@@ -188,12 +188,33 @@ from __future__ import division
from __future__ import absolute_import
import os.path as p
import re
import sys
import traceback
import vim
root_folder = p.normpath( p.join( vim.eval( 's:script_folder_path' ), '..' ) )
third_party_folder = p.join( root_folder, 'third_party' )
python_stdlib_zip_regex = re.compile( 'python[23][0-9]\\.zip' )
def IsStandardLibraryFolder( path ):
return ( ( p.isfile( path )
and python_stdlib_zip_regex.match( p.basename( path ) ) )
or p.isfile( p.join( path, 'os.py' ) ) )
def IsVirtualEnvLibraryFolder( path ):
return p.isfile( p.join( path, 'orig-prefix.txt' ) )
def GetStandardLibraryIndexInSysPath():
for index, path in enumerate( sys.path ):
if ( IsStandardLibraryFolder( path ) and
not IsVirtualEnvLibraryFolder( path ) ):
return index
raise RuntimeError( 'Could not find standard library path in Python path.' )
# Add dependencies to Python path.
dependencies = [ p.join( root_folder, 'python' ),
......@@ -216,12 +237,6 @@ sys.path[ 0:0 ] = dependencies
# We enclose this code in a try/except block to avoid backtraces in Vim.
try:
def GetStandardLibraryIndexInSysPath():
for index, path in enumerate( sys.path ):
if p.isfile( p.join( path, 'os.py' ) ):
return index
raise RuntimeError( 'Could not find standard library path in Python path.' )
# The python-future module must be inserted after the standard library path.
sys.path.insert( GetStandardLibraryIndexInSysPath() + 1,
p.join( third_party_folder, 'python-future', 'src' ) )
......@@ -494,11 +509,20 @@ endfunction
function! s:OnVimLeave()
" Workaround a NeoVim issue - not shutting down timers correctly
" https://github.com/neovim/neovim/issues/6840
for poller in values( s:pollers )
call timer_stop( poller.id )
endfor
exec s:python_command "ycm_state.OnVimLeave()"
endfunction
function! s:OnCompleteDone()
if !s:AllowedToCompleteInCurrentBuffer()
return
endif
exec s:python_command "ycm_state.OnCompleteDone()"
endfunction
......
......@@ -923,9 +923,9 @@ C-family languages (C, C++, Objective C, Objective C++, CUDA) ~
- Semantic auto-completion with automatic fixes
- Real-time diagnostic display
- Go to include/declaration/definition (|GoTo|, etc.)
- Semantic type information for identifiers (|GetType|)
- Automatically fix certain errors (|FixIt|)
- View documentation comments for identifiers (|GetDoc|)
- Type information for identifiers (|GetType|)
- Automatically fix certain errors (|FixIt|)
-------------------------------------------------------------------------------
*youcompleteme-c*
......@@ -934,19 +934,20 @@ C♯ ~
- Semantic auto-completion
- Real-time diagnostic display
- Go to declaration/definition (|GoTo|, etc.)
- Semantic type information for identifiers (|GetType|)
- View documentation comments for identifiers (|GetDoc|)
- Type information for identifiers (|GetType|)
- Automatically fix certain errors (|FixIt|)
- Management of OmniSharp server instance
- View documentation comments for identifiers (|GetDoc|)
-------------------------------------------------------------------------------
*youcompleteme-python*
Python ~
- Intelligent auto-completion
- Semantic auto-completion
- Go to definition (|GoTo|)
- Reference finding (|GoToReferences|)
- View documentation comments for identifiers (|GetDoc|)
- Type information for identifiers (|GetType|)
-------------------------------------------------------------------------------
*youcompleteme-go*
......@@ -961,15 +962,15 @@ Go ~
JavaScript and TypeScript ~
- Semantic auto-completion with automatic import insertion
- Real-time diagnostic display
- Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are
identical)
- Go to type definition (|GoToType|)
- Reference finding (|GoToReferences|)
- Real-time diagnostic display
- Renaming symbols ('RefactorRename <new name>')
- View documentation comments for identifiers (|GetDoc|)
- Type information for identifiers (|GetType|)
- Automatically fix certain errors (|FixIt|)
- Renaming symbols ('RefactorRename <new name>')
- Code formatting (|Format|)
- Organize imports (|OrganizeImports|)
- Management of 'TSServer' server instance
......@@ -981,8 +982,8 @@ Rust ~
- Semantic auto-completion
- Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are
identical)
- Management of 'racer' server instance
- View documentation comments for identifiers (|GetDoc|)
- Management of 'racer' server instance
-------------------------------------------------------------------------------
*youcompleteme-java*
......@@ -992,14 +993,14 @@ Java ~
feedback.
- Semantic auto-completion with automatic import insertion
- Real-time diagnostic display
- Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are
identical)
- Reference finding (|GoToReferences|)
- Real-time diagnostic display
- Renaming symbols ('RefactorRename <new name>')
- View documentation comments for identifiers (|GetDoc|)
- Type information for identifiers (|GetType|)
- Automatically fix certain errors including code generation (|FixIt|)
- Renaming symbols ('RefactorRename <new name>')
- Code formatting (|Format|)
- Organize imports (|OrganizeImports|)
- Detection of java projects
......@@ -1656,9 +1657,13 @@ You can also style the line that has the warning/error with these groups:
- 'YcmWarningLine', which falls back to group 'SyntasticWarningLine' if it
exists
Note that the line highlighting groups only work when gutter signs are turned
on.
Note that the line highlighting groups only work when the
|g:ycm_enable_diagnostic_signs| option is set. If you want highlighted lines
but no signs in the Vim gutter, ensure that your Vim version is 7.4.2201 or
later and set the 'signcolumn' option to 'off' in your vimrc:
>
set signcolumn=off
<
The syntax groups used to highlight regions of text with errors/warnings: -
'YcmErrorSection', which falls back to group 'SyntasticError' if it exists and
then 'SpellBad' - 'YcmWarningSection', which falls back to group
......@@ -1890,7 +1895,7 @@ Invoking this command on 's' returns 'std::string => std::basic_string<char>'
**NOTE:** Causes re-parsing of the current translation unit.
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript,
Supported in filetypes: 'c, cpp, objc, objcpp, cuda, java, javascript, python,
typescript'
-------------------------------------------------------------------------------
......@@ -2787,8 +2792,10 @@ Default: '0'
The *g:ycm_max_diagnostics_to_display* option
This option controls the maximum number of diagnostics shown to the user when
errors or warnings are detected in the file. This option is only relevant if
you are using the C-family semantic completion engine.
errors or warnings are detected in the file. This option is only relevant for
the C-family, C#, Java, JavaScript, and TypeScript languages.
A special value of '0' means there is no limit.
Default: '30'
>
......
......@@ -54,13 +54,23 @@ elseif !has( 'timers' )
\ echohl None
call s:restore_cpo()
finish
elseif !has( 'python' ) && !has( 'python3' )
elseif ( v:version > 800 || ( v:version == 800 && has( 'patch1436' ) ) ) &&
\ !has( 'python_compiled' ) && !has( 'python3_compiled' )
echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: requires Vim compiled with " .
\ "Python (2.7.1+ or 3.4+) support." |
\ echohl None
call s:restore_cpo()
finish
" These calls try to load the Python 2 and Python 3 libraries when Vim is
" compiled dynamically against them. Since only one can be loaded at a time on
" some platforms, we first check if Python 3 is available.
elseif !has( 'python3' ) && !has( 'python' )
echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: unable to load Python." |
\ echohl None
call s:restore_cpo()
finish
elseif &encoding !~? 'utf-\?8'
echohl WarningMsg |
\ echomsg "YouCompleteMe unavailable: requires UTF-8 encoding. " .
......
......@@ -214,15 +214,11 @@ def YouCompleteMe_DebugInfo_ServerRunning_test( ycm ):
'Client logfile: .+\n'
'Server Python interpreter: .+\n'
'Server Python version: .+\n'
'Server has Clang support compiled in: '
'(?P<CLANG>True)?(?(CLANG)|False)\n'
'Server has Clang support compiled in: (False|True)\n'
'Clang version: .+\n'
'Extra configuration file found and loaded\n'
'Extra configuration path: .*testdata[/\\\\]\\.ycm_extra_conf\\.py\n'
'(?(CLANG)C-family completer debug information:\n'
' Compilation database path: None\n'
' Flags: \\[u?\'_TEMP_FILE_\'.*\\]\n'
' Translation unit: .+\n)'
'[\\w\\W]*'
'Server running at: .+\n'
'Server process ID: \\d+\n'
'Server logfiles:\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment