From 002500347e910962ea984c1791dba9471da87afd Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 23 Apr 2018 11:21:09 +0200 Subject: [PATCH 1/8] Update ycmd Include the following changes: - add Unicode support to the filter and sort algorithm; - replace Boost.Python with pybind11; - expand environment variables in extra conf options; - make GoTo and GoToImprecise subcommands jump to declaration if cursor on definition; - reset prefix when setting the start column; - send the full query to the language server completer when forced; - improve caching behavior; - add OrganizeImports command to Java completer; - add Scheme identifier regex; - update jdt.ls to 0.15.0; - fix TypeScript diagnostics; - optimize lines splitting for current file; - improve TypeScript completion data; - add GoTo and GoToDeclaration commands to TypeScript completer; - add TSServer version to debug info; - replace re module with regex; - add smart diacritic matching; - add FixIt command to TypeScript completer; - add Format command to TypeScript completer; - add OrganizeImports command to TypeScript completer; - improve Java project detection heuristics; - allow the user to manually specify a Java project path; - improve TeX identifier regex; - always return detailed completions in TypeScript completer; - support FixIts in TypeScript completions; - improve message when regex module installation fails; - update Boost to 1.67.0; - update godef; - add Ctags filetype mapping for PuppetManifest. --- third_party/ycmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/ycmd b/third_party/ycmd index b8ccbbfa..d37cd9b9 160000 --- a/third_party/ycmd +++ b/third_party/ycmd @@ -1 +1 @@ -Subproject commit b8ccbbfa9c68298692c05e73c2e44ca8e1ddc5d5 +Subproject commit d37cd9b983562bf575dea9453c31f799aa772202 From d4cddbcc7f478bd8c8b8df5c403c5ef30810076c Mon Sep 17 00:00:00 2001 From: micbou Date: Sun, 24 Sep 2017 13:02:08 +0200 Subject: [PATCH 2/8] Update Omnifunc completer Unicode tests --- python/ycm/tests/omni_completer_test.py | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/python/ycm/tests/omni_completer_test.py b/python/ycm/tests/omni_completer_test.py index 4ae2b859..71893a03 100644 --- a/python/ycm/tests/omni_completer_test.py +++ b/python/ycm/tests/omni_completer_test.py @@ -24,10 +24,10 @@ from __future__ import absolute_import # Not installing aliases from python-future; it's unreliable and slow. from builtins import * # noqa -from hamcrest import assert_that, contains, contains_string, empty, has_entries +from hamcrest import assert_that, contains, empty, has_entries -from ycm.tests.test_utils import ( ExpectedFailure, MockVimBuffers, - MockVimModule, ToBytesOnPY2, VimBuffer ) +from ycm.tests.test_utils import ( MockVimBuffers, MockVimModule, ToBytesOnPY2, + VimBuffer ) MockVimModule() from ycm import vimsupport @@ -398,8 +398,6 @@ def OmniCompleter_GetCompletions_NoCache_ObjectListObject_test( ycm ): ) -@ExpectedFailure( 'Filtering on unicode is not supported by the server', - contains_string( "value for 'completions' was <[]>" ) ) @YouCompleteMeInstance( { 'cache_omnifunc': 1, 'semantic_triggers': TRIGGERS } ) def OmniCompleter_GetCompletions_Cache_List_Unicode_test( ycm ): def Omnifunc( findstart, base ): @@ -417,9 +415,9 @@ def OmniCompleter_GetCompletions_Cache_List_Unicode_test( ycm ): assert_that( ycm.GetCompletionResponse(), has_entries( { - 'completions': ToBytesOnPY2( [ '†est', - 'å_unicode_identifier', - 'πππππππ yummy πie' ] ), + 'completions': [ 'å_unicode_identifier', + 'πππππππ yummy πie', + '†est' ], 'completion_start_column': 13 } ) ) @@ -450,8 +448,6 @@ def OmniCompleter_GetCompletions_NoCache_List_Unicode_test( ycm ): ) -@ExpectedFailure( 'Filtering on unicode is not supported by the server', - contains_string( "value for 'completions' was <[]>" ) ) @YouCompleteMeInstance( { 'cache_omnifunc': 1, 'semantic_triggers': TRIGGERS } ) def OmniCompleter_GetCompletions_Cache_List_Filter_Unicode_test( ycm ): def Omnifunc( findstart, base ): @@ -469,7 +465,7 @@ def OmniCompleter_GetCompletions_Cache_List_Filter_Unicode_test( ycm ): assert_that( ycm.GetCompletionResponse(), has_entries( { - 'completions': ToBytesOnPY2( [ 'πππππππ yummy πie' ] ), + 'completions': [ 'πππππππ yummy πie' ], 'completion_start_column': 13 } ) ) @@ -498,8 +494,6 @@ def OmniCompleter_GetCompletions_NoCache_List_Filter_Unicode_test( ycm ): ) -@ExpectedFailure( 'Filtering on unicode is not supported by the server', - contains_string( "value for 'completions' was <[]>" ) ) @YouCompleteMeInstance( { 'cache_omnifunc': 1, 'semantic_triggers': TRIGGERS } ) def OmniCompleter_GetCompletions_Cache_ObjectList_Unicode_test( ycm ): def Omnifunc( findstart, base ): @@ -532,13 +526,13 @@ def OmniCompleter_GetCompletions_Cache_ObjectList_Unicode_test( ycm ): assert_that( ycm.GetCompletionResponse(), has_entries( { - 'completions': ToBytesOnPY2( [ { + 'completions': [ { 'word': 'π†´ß†π', 'abbr': 'ÅııÂʉÍÊ', 'menu': '˜‰ˆËʉÍÊ', 'info': 'ȈÏØʉÍÊ', 'kind': 'Ê' - } ] ), + } ], 'completion_start_column': 13 } ) ) @@ -591,6 +585,12 @@ def OmniCompleter_GetCompletions_Cache_ObjectListObject_Unicode_test( ycm ): 'menu': '˜‰ˆËʉÍÊ', 'info': 'ȈÏØʉÍÊ', 'kind': 'Ê' + }, { + 'word': 'ålpha∫et', + 'abbr': 'å∫∫®', + 'menu': 'µ´~¨á', + 'info': '^~fo', + 'kind': '˚' } ), 'completion_start_column': 13 } ) From 1df76bbb396109d27f675992050d412700314a1a Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 12 Mar 2018 00:56:20 +0100 Subject: [PATCH 3/8] Fix debug info test when ycmd is compiled with C-family support --- python/ycm/tests/youcompleteme_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ycm/tests/youcompleteme_test.py b/python/ycm/tests/youcompleteme_test.py index 8d8d9690..a939a006 100644 --- a/python/ycm/tests/youcompleteme_test.py +++ b/python/ycm/tests/youcompleteme_test.py @@ -207,7 +207,8 @@ def YouCompleteMe_DebugInfo_ServerRunning_test( ycm ): 'Extra configuration path: .*testdata[/\\\\]\\.ycm_extra_conf\\.py\n' '(?(CLANG)C-family completer debug information:\n' ' Compilation database path: None\n' - ' Flags: \\[\'_TEMP_FILE_\'.*\\]\n)' + ' Flags: \\[\'_TEMP_FILE_\'.*\\]\n' + ' Translation unit: .+\n)' 'Server running at: .+\n' 'Server process ID: \d+\n' 'Server logfiles:\n' From 5981809681a5fff2db242ada0bd056409ad6183d Mon Sep 17 00:00:00 2001 From: micbou Date: Tue, 27 Mar 2018 01:20:53 +0200 Subject: [PATCH 4/8] Support FixIts in TypeScript completions --- python/ycm/client/completion_request.py | 5 ++-- python/ycm/tests/postcomplete_test.py | 38 +++++++++++++++---------- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/python/ycm/client/completion_request.py b/python/ycm/client/completion_request.py index 00d29420..18469ade 100644 --- a/python/ycm/client/completion_request.py +++ b/python/ycm/client/completion_request.py @@ -39,7 +39,8 @@ class CompletionRequest( BaseRequest ): self._response_future = None self._complete_done_hooks = { 'cs': self._OnCompleteDone_Csharp, - 'java': self._OnCompleteDone_Java, + 'java': self._OnCompleteDone_FixIt, + 'typescript': self._OnCompleteDone_FixIt, } @@ -134,7 +135,7 @@ class CompletionRequest( BaseRequest ): vimsupport.InsertNamespace( namespace ) - def _OnCompleteDone_Java( self ): + def _OnCompleteDone_FixIt( self ): completions = self._GetCompletionsUserMayHaveCompleted() fixit_completions = [ _GetFixItCompletion( c ) for c in completions ] fixit_completions = [ f for f in fixit_completions if f ] diff --git a/python/ycm/tests/postcomplete_test.py b/python/ycm/tests/postcomplete_test.py index 813dc39b..d026781d 100644 --- a/python/ycm/tests/postcomplete_test.py +++ b/python/ycm/tests/postcomplete_test.py @@ -140,7 +140,14 @@ def GetCompleteDoneHooks_ResultOnCsharp_test( *args ): def GetCompleteDoneHooks_ResultOnJava_test( *args ): request = CompletionRequest( None ) result = list( request._GetCompleteDoneHooks() ) - eq_( result, [ request._OnCompleteDone_Java ] ) + eq_( result, [ request._OnCompleteDone_FixIt ] ) + + +@patch( 'ycm.vimsupport.CurrentFiletypes', return_value = [ 'typescript' ] ) +def GetCompleteDoneHooks_ResultOnTypeScript_test( *args ): + request = CompletionRequest( None ) + result = list( request._GetCompleteDoneHooks() ) + eq_( result, [ request._OnCompleteDone_FixIt ] ) @patch( 'ycm.vimsupport.CurrentFiletypes', return_value = [ 'ycmtest' ] ) @@ -165,10 +172,10 @@ def OnCompleteDone_NoActionNoError_test( *args ): request = CompletionRequest( None ) request.Done = MagicMock( return_value = True ) request._OnCompleteDone_Csharp = MagicMock() - request._OnCompleteDone_Java = MagicMock() + request._OnCompleteDone_FixIt = MagicMock() request.OnCompleteDone() request._OnCompleteDone_Csharp.assert_not_called() - request._OnCompleteDone_Java.assert_not_called() + request._OnCompleteDone_FixIt.assert_not_called() @patch( 'ycm.vimsupport.CurrentFiletypes', return_value = [ 'ycmtest' ] ) @@ -356,73 +363,74 @@ def PostCompleteCsharp_InsertSecondNamespaceIfSelected_test( *args ): @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_NoFixIts_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_NoFixIts_test( replace_chunks, *args ): completions = [ BuildCompletionFixIt( [] ) ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_not_called() @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_EmptyFixIt_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_EmptyFixIt_test( replace_chunks, *args ): completions = [ BuildCompletionFixIt( [ { 'chunks': [] } ] ) ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_called_once_with( [], silent = True ) @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_NoFixIt_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_NoFixIt_test( replace_chunks, *args ): completions = [ BuildCompletion( ) ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_not_called() @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_PickFirst_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_PickFirst_test( replace_chunks, *args ): completions = [ BuildCompletionFixIt( [ { 'chunks': 'one' } ] ), BuildCompletionFixIt( [ { 'chunks': 'two' } ] ), ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_called_once_with( 'one', silent = True ) @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test', user_data='0' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_PickFirstUserData_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_PickFirstUserData_test( replace_chunks, + *args ): completions = [ BuildCompletionFixIt( [ { 'chunks': 'one' } ] ), BuildCompletionFixIt( [ { 'chunks': 'two' } ] ), ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_called_once_with( 'one', silent = True ) @patch( 'ycm.vimsupport.GetVariableValue', GetVariableValue_CompleteItemIs( 'Test', user_data='1' ) ) @patch( 'ycm.vimsupport.ReplaceChunks' ) -def PostCompleteJava_ApplyFixIt_PickSecond_test( replace_chunks, *args ): +def PostCompleteFixIt_ApplyFixIt_PickSecond_test( replace_chunks, *args ): completions = [ BuildCompletionFixIt( [ { 'chunks': 'one' } ] ), BuildCompletionFixIt( [ { 'chunks': 'two' } ] ), ] with _SetUpCompleteDone( completions ) as request: - request._OnCompleteDone_Java() + request._OnCompleteDone_FixIt() replace_chunks.assert_called_once_with( 'two', silent = True ) From d01c8ac83bb2d6b95a3d70cd2f880109f7659130 Mon Sep 17 00:00:00 2001 From: micbou Date: Sat, 7 Apr 2018 03:55:24 +0200 Subject: [PATCH 5/8] Update Java and TypeScript features in docs --- README.md | 357 +++++++++++++++------------- doc/youcompleteme.txt | 542 +++++++++++++++++++++++------------------- 2 files changed, 489 insertions(+), 410 deletions(-) diff --git a/README.md b/README.md index 4c911221..45f9584e 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,11 @@ Contents - [Completion String Ranking](#completion-string-ranking) - [General Semantic Completion](#general-semantic-completion) - [C-family Semantic Completion](#c-family-semantic-completion) - - [JavaScript Semantic Completion](#javascript-semantic-completion) - - [Rust Semantic Completion](#rust-semantic-completion) - - [Python Semantic Completion](#python-semantic-completion) - [Java Semantic Completion](#java-semantic-completion) + - [JavaScript Semantic Completion](#javascript-semantic-completion) + - [Python Semantic Completion](#python-semantic-completion) + - [Rust Semantic Completion](#rust-semantic-completion) + - [TypeScript Semantic Completion](#typescript-semantic-completion) - [Semantic Completion for Other Languages](#semantic-completion-for-other-languages) - [Writing New Semantic Completers](#writing-new-semantic-completers) - [Diagnostic Display](#diagnostic-display) @@ -149,7 +150,9 @@ number of languages, including: - displaying type information for classes, variables, functions etc., - displaying documentation for methods, members, etc. in the preview window, - fixing common coding errors, like missing semi-colons, typos, etc., -- semantic renaming of variables across files (JavaScript only). +- semantic renaming of variables across files, +- formatting code, +- removing unused imports, sorting imports, etc. Features vary by file type, so make sure to check out the [file type feature summary](#quick-feature-summary) and the @@ -795,12 +798,19 @@ Quick Feature Summary ### TypeScript -* Semantic auto-completion +* Semantic auto-completion with automatic import insertion +* Go to definition (`GoTo`, `GoToDefinition`, and `GoToDeclaration` are + identical) +* Go to type definition (`GoToType`) +* Reference finding (`GoToReferences`) * Real-time diagnostic display * Renaming symbols (`RefactorRename `) -* Go to definition, find references (`GoToDefinition`, `GoToReferences`) -* Semantic type information for identifiers (`GetType`) * View documentation comments for identifiers (`GetDoc`) +* Type information for identifiers (`GetType`) +* Automatically fix certain errors (`FixIt`) +* Code formatting (`Format`) +* Organize imports (`OrganizeImports`) +* Management of `TSServer` server instance ### JavaScript @@ -834,6 +844,7 @@ Quick Feature Summary * Type information for identifiers (`GetType`) * Automatically fix certain errors including code generation (`FixIt`) * Code formatting (`Format`) +* Organize imports (`OrganizeImports`) * Detection of java projects * Management of `jdt.ls` server instance @@ -1030,145 +1041,6 @@ getting fast completions. Call the `:YcmDiags` command to see if any errors or warnings were detected in your file. -### JavaScript Semantic Completion - -#### JavaScript quick start - -1. Ensure that you have enabled the JavaScript completer. See the - [installation guide](#installation) for details. - -2. Create a `.tern-project` file in the root directory of your JavaScript - project, by following the [instructions][tern-project] in the [Tern][] - documentation. - -3. Edit a file from your project. - -#### Explanation - -JavaScript completion is based on [Tern][]. This completion engine requires a -file named [`.tern-project`][tern-project] to exist in the current working -directory or a directory which is an ancestor of the current working directory -when the Tern server is started. YCM starts the Tern server the first time a -JavaScript file is edited and uses its directory as the working directory, so -the directory of that file at that time needs to be a descendent of the -directory containing the `.tern-project` file (or that directory itself). - -Alternatively, as described in the [Tern documentation][tern-docs], a global -`.tern-config` file may be used. - -Multiple Tern servers are not supported. To switch to a different JavaScript -project, you need to restart the Tern server using [the `RestartServer` -subcommand](#the-restartserver-subcommand) while editing a file of that -project: - -```vim -:YcmCompleter RestartServer -``` - -#### Tips and tricks - -This section contains some advice for configuring `.tern-project` and working -with JavaScript files. The canonical reference for correctly configuring Tern is -the [Tern documentation][tern-docs]. Any issues, improvements, advice, etc. -should be sought from the [Tern][] project. For example, see the [list of tern -plugins](http://ternjs.net/doc/manual.html#plugins) for the list of plugins -which can be enabled in the `plugins` section of the `.tern-project` file. - -##### Configuring Tern for node support - -The following simple example `.tern-project` file enables nodejs support: - -```json -{ - "plugins": { - "node": {} - } -} - -``` - -##### Configuring Tern for requirejs support - -The Tern requirejs plugin requires that all included "libraries" are rooted -under the same base directory. If that's not the case for your projects, then it -is possible to make it work with appropriate symbolic links. For example, create -a directory `ext_lib` within your project and populate it with symlinks to your -libraries. Then set up the `.tern-project` something like this: - -```json - -{ - "plugins": { - "requirejs": { - "baseURL": "./ext_lib", - } - } -} -``` - -Then, given the following structure: - -``` -./ext_lib/mylib (symlink) -./ext_lib/anotherlib (symlink) -``` - -Can be used as follows: - -```javascript -define( [ 'mylib/file1', 'anotherlib/anotherfile' ], function( f1, f2 ) { - // etc. -} ); -``` - -### Rust Semantic Completion - -Completions and GoTo commands within the current crate and its dependencies -should work out of the box with no additional configuration (provided that you -built YCM with the `--rust-completer` flag; see the [*Installation* -section](#installation) for details). For semantic analysis inclusive of the -standard library, you must have a local copy of [the Rust source -code][rust-src]. If using [rustup][], run the following command to download the -code: -``` -rustup component add rust-src -``` -YCM will find its location automatically. Otherwise, download the archive, -extract it somewhere, and set the following option so YCM can locate it: -```viml -" In this example, the Rust source code archive has been extracted to -" /usr/local/rust/rustc-1.20.0 -let g:ycm_rust_src_path = '/usr/local/rust/rustc-1.20.0/src' -``` - -### Python Semantic Completion - -Completion and GoTo commands work out of the box with no additional -configuration. Those features are provided by the [jedi][] library which -supports a variety of Python versions (2.6, 2.7, 3.2+) as long as it -runs in the corresponding Python interpreter. By default YCM runs [jedi][] with -the same Python interpreter used by the [ycmd server][ycmd], so if you would like to -use a different interpreter, use the following option specifying the Python -binary to use. For example, to provide Python 3 completion in your project, set: - -```viml -let g:ycm_python_binary_path = '/usr/bin/python3' -``` - -If the value of `g:ycm_python_binary_path` is an absolute path like above it -will be used as-is, but if it's an executable name it will be searched through -the PATH. So for example if you set: - -```viml -let g:ycm_python_binary_path = 'python' -``` - -YCM will use the first `python` executable it finds in the PATH to run -[jedi][]. This means that if you are in a virtual environment and you start vim -in that directory, the first `python` that YCM will find will be the one in the -virtual environment, so [jedi][] will be able to provide completions for every -package you have in the virtual environment. - ### Java Semantic Completion **NOTE**: Java support is currently experimental. Please let us know your @@ -1305,6 +1177,161 @@ For anything else, [contact us](#contact). Java support is experimental at present so we'd love to hear your feedback! Please do remember to check [CONTRIBUTING.md][contributing-md] for the list of diagnostics we'll need. +### JavaScript Semantic Completion + +#### JavaScript quick start + +1. Ensure that you have enabled the JavaScript completer. See the + [installation guide](#installation) for details. + +2. Create a `.tern-project` file in the root directory of your JavaScript + project, by following the [instructions][tern-project] in the [Tern][] + documentation. + +3. Edit a file from your project. + +#### Explanation + +JavaScript completion is based on [Tern][]. This completion engine requires a +file named [`.tern-project`][tern-project] to exist in the current working +directory or a directory which is an ancestor of the current working directory +when the Tern server is started. YCM starts the Tern server the first time a +JavaScript file is edited and uses its directory as the working directory, so +the directory of that file at that time needs to be a descendent of the +directory containing the `.tern-project` file (or that directory itself). + +Alternatively, as described in the [Tern documentation][tern-docs], a global +`.tern-config` file may be used. + +Multiple Tern servers are not supported. To switch to a different JavaScript +project, you need to restart the Tern server using [the `RestartServer` +subcommand](#the-restartserver-subcommand) while editing a file of that +project: + +```vim +:YcmCompleter RestartServer +``` + +#### Tips and tricks + +This section contains some advice for configuring `.tern-project` and working +with JavaScript files. The canonical reference for correctly configuring Tern is +the [Tern documentation][tern-docs]. Any issues, improvements, advice, etc. +should be sought from the [Tern][] project. For example, see the [list of tern +plugins](http://ternjs.net/doc/manual.html#plugins) for the list of plugins +which can be enabled in the `plugins` section of the `.tern-project` file. + +##### Configuring Tern for node support + +The following simple example `.tern-project` file enables nodejs support: + +```json +{ + "plugins": { + "node": {} + } +} + +``` + +##### Configuring Tern for requirejs support + +The Tern requirejs plugin requires that all included "libraries" are rooted +under the same base directory. If that's not the case for your projects, then it +is possible to make it work with appropriate symbolic links. For example, create +a directory `ext_lib` within your project and populate it with symlinks to your +libraries. Then set up the `.tern-project` something like this: + +```json + +{ + "plugins": { + "requirejs": { + "baseURL": "./ext_lib", + } + } +} +``` + +Then, given the following structure: + +``` +./ext_lib/mylib (symlink) +./ext_lib/anotherlib (symlink) +``` + +Can be used as follows: + +```javascript +define( [ 'mylib/file1', 'anotherlib/anotherfile' ], function( f1, f2 ) { + // etc. +} ); +``` + +### Python Semantic Completion + +Completion and GoTo commands work out of the box with no additional +configuration. Those features are provided by the [jedi][] library which +supports a variety of Python versions (2.6, 2.7, 3.2+) as long as it +runs in the corresponding Python interpreter. By default YCM runs [jedi][] with +the same Python interpreter used by the [ycmd server][ycmd], so if you would like to +use a different interpreter, use the following option specifying the Python +binary to use. For example, to provide Python 3 completion in your project, set: + +```viml +let g:ycm_python_binary_path = '/usr/bin/python3' +``` + +If the value of `g:ycm_python_binary_path` is an absolute path like above it +will be used as-is, but if it's an executable name it will be searched through +the PATH. So for example if you set: + +```viml +let g:ycm_python_binary_path = 'python' +``` + +YCM will use the first `python` executable it finds in the PATH to run +[jedi][]. This means that if you are in a virtual environment and you start vim +in that directory, the first `python` that YCM will find will be the one in the +virtual environment, so [jedi][] will be able to provide completions for every +package you have in the virtual environment. + +### Rust Semantic Completion + +Completions and GoTo commands within the current crate and its dependencies +should work out of the box with no additional configuration (provided that you +built YCM with the `--rust-completer` flag; see the [*Installation* +section](#installation) for details). For semantic analysis inclusive of the +standard library, you must have a local copy of [the Rust source +code][rust-src]. If using [rustup][], run the following command to download the +code: +``` +rustup component add rust-src +``` +YCM will find its location automatically. Otherwise, download the archive, +extract it somewhere, and set the following option so YCM can locate it: +```viml +" In this example, the Rust source code archive has been extracted to +" /usr/local/rust/rustc-1.20.0 +let g:ycm_rust_src_path = '/usr/local/rust/rustc-1.20.0/src' +``` + +### TypeScript Semantic Completion + +All TypeScript features are provided by the [TSServer][] engine, which is +included in the TypeScript SDK. To get the SDK, install [Node.js and +npm][npm-install] and run the command: +``` +npm install -g typescript +``` +[TSServer][] relies on [the `tsconfig.json` file][tsconfig.json] to analyze your +project. Ensure the file exists at the root of your project. + +TypeScript 2.8.1 or later is recommended. Some features will be missing on older +versions. You can check which version you are currently using by looking at the +output of [`:YcmDebugInfo` ](#the-ycmdebuginfo-command). If the version is +`None`, your TypeScript is too old and should be updated. + ### Semantic Completion for Other Languages C-family, C#, Go, Java, JavaScript, Python, Rust, and TypeScript languages are @@ -1551,7 +1578,8 @@ Supported in filetypes: `c, cpp, objc, objcpp` Looks up the symbol under the cursor and jumps to its declaration. -Supported in filetypes: `c, cpp, objc, objcpp, cs, go, python, rust, java` +Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, python, rust, +typescript` #### The `GoToDefinition` subcommand @@ -1562,8 +1590,8 @@ namely when the definition of the symbol is in the current translation unit. A translation unit consists of the file you are editing and all the files you are including with `#include` directives (directly or indirectly) in that file. -Supported in filetypes: `c, cpp, objc, objcpp, cs, go, javascript, python, -rust, typescript, java` +Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python, +rust, typescript` #### The `GoTo` subcommand @@ -1574,8 +1602,8 @@ the current translation unit, jumps to the symbol's declaration. For C/C++/Objective-C, it first tries to look up the current line for a header and jump to it. For C#, implementations are also considered and preferred. -Supported in filetypes: `c, cpp, objc, objcpp, cs, go, javascript, python, rust, -java` +Supported in filetypes: `c, cpp, objc, objcpp, cs, go, java, javascript, python, +rust, typescript` #### The `GoToImprecise` subcommand @@ -1596,7 +1624,7 @@ This command attempts to find all of the references within the project to the identifier under the cursor and populates the quickfix list with those locations. -Supported in filetypes: `javascript, python, typescript, java` +Supported in filetypes: `java, javascript, python, typescript` #### The `GoToImplementation` subcommand @@ -1641,7 +1669,7 @@ Invoking this command on `s` returns `std::string => std::basic_string` **NOTE:** Causes re-parsing of the current translation unit. -Supported in filetypes: `c, cpp, objc, objcpp, javascript, typescript, java` +Supported in filetypes: `c, cpp, objc, objcpp, java, javascript, typescript` #### The `GetTypeImprecise` subcommand @@ -1697,8 +1725,8 @@ under the cursor. Depending on the file type, this includes things like: * Python docstrings, * etc. -Supported in filetypes: `c, cpp, objc, objcpp, cs, python, typescript, -javascript, rust, java` +Supported in filetypes: `c, cpp, objc, objcpp, cs, java, javascript, python, +typescript, rust` #### The `GetDocImprecise` subcommand @@ -1746,7 +1774,7 @@ indication). **NOTE:** Causes re-parsing of the current translation unit. -Supported in filetypes: `c, cpp, objc, objcpp, cs, java` +Supported in filetypes: `c, cpp, objc, objcpp, cs, java, typescript` #### The `RefactorRename ` subcommand @@ -1760,7 +1788,7 @@ files. Rename operations may involve changes to multiple files, which may or may not be open in Vim buffers at the time. YouCompleteMe handles all of this for you. The behavior is described in [the following section](#multi-file-refactor). -Supported in filetypes: `javascript` (variables only), `typescript, java` +Supported in filetypes: `java, javascript (variables only), typescript` #### Multi-file Refactor @@ -1794,14 +1822,22 @@ to see the buffers that were opened by the command. #### The `Format` subcommand -This commands formats the whole buffer or some part of it according to the value +This command formats the whole buffer or some part of it according to the value of the Vim options `shiftwidth` and `expandtab` (see `:h 'sw'` and `:h et` respectively). To format a specific part of your document, you can either select it in one of Vim's visual modes (see `:h visual-use`) and run the command or directly enter the range on the command line, e.g. `:2,5YcmCompleter Format` to format it from line 2 to line 5. -Supported in filetypes: `java` +Supported in filetypes: `java, typescript` + +#### The `OrganizeImports` subcommand + +This command removes unused imports and sorts imports in the current file. It +can also group imports from the same module in TypeScript and resolves imports +in Java. + +Supported in filetypes: `java, typescript` ### Miscellaneous Commands @@ -1824,7 +1860,7 @@ python binary to use to restart the Python semantic engine. :YcmCompleter RestartServer /usr/bin/python3.4 ``` -Supported in filetypes: `cs, go, javascript, python, rust, typescript, java` +Supported in filetypes: `cs, go, java, javascript, python, rust, typescript` #### The `ClearCompilationFlagCache` subcommand @@ -3368,6 +3404,7 @@ This software is licensed under the [GPL v3 license][gpl]. [Gocode]: https://github.com/nsf/gocode [Godef]: https://github.com/Manishearth/godef [TSServer]: https://github.com/Microsoft/TypeScript/tree/master/src/server +[tsconfig.json]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html [vim-win-download]: https://bintray.com/micbou/generic/vim [python-win-download]: https://www.python.org/downloads/windows/ [visual-studio-download]: https://www.visualstudio.com/downloads/ diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 6172835c..4391c406 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -33,15 +33,7 @@ Contents ~ 1. Option 1: Use a compilation database [48] |youcompleteme-option-1-use-compilation-database-48| 2. Option 2: Provide the flags manually |youcompleteme-option-2-provide-flags-manually| 3. Errors during compilation |youcompleteme-errors-during-compilation| - 6. JavaScript Semantic Completion |youcompleteme-javascript-semantic-completion| - 1. JavaScript quick start |youcompleteme-javascript-quick-start| - 2. Explanation |youcompleteme-explanation| - 3. Tips and tricks |youcompleteme-tips-tricks| - 1. Configuring Tern for node support |youcompleteme-configuring-tern-for-node-support| - 2. Configuring Tern for requirejs support |youcompleteme-configuring-tern-for-requirejs-support| - 7. Rust Semantic Completion |youcompleteme-rust-semantic-completion| - 8. Python Semantic Completion |youcompleteme-python-semantic-completion| - 9. Java Semantic Completion |youcompleteme-java-semantic-completion| + 6. Java Semantic Completion |youcompleteme-java-semantic-completion| 1. Java quick Start |youcompleteme-java-quick-start| 2. Java Project Files |youcompleteme-java-project-files| 3. Diagnostic display - Syntastic |youcompleteme-diagnostic-display-syntastic| @@ -50,9 +42,18 @@ Contents ~ 6. Maven Projects |youcompleteme-maven-projects| 7. Gradle Projecs |youcompleteme-gradle-projecs| 8. Troubleshooting |youcompleteme-troubleshooting| - 10. Semantic Completion for Other Languages |youcompleteme-semantic-completion-for-other-languages| - 11. Writing New Semantic Completers |youcompleteme-writing-new-semantic-completers| - 12. Diagnostic Display |youcompleteme-diagnostic-display| + 7. JavaScript Semantic Completion |youcompleteme-javascript-semantic-completion| + 1. JavaScript quick start |youcompleteme-javascript-quick-start| + 2. Explanation |youcompleteme-explanation| + 3. Tips and tricks |youcompleteme-tips-tricks| + 1. Configuring Tern for node support |youcompleteme-configuring-tern-for-node-support| + 2. Configuring Tern for requirejs support |youcompleteme-configuring-tern-for-requirejs-support| + 8. Python Semantic Completion |youcompleteme-python-semantic-completion| + 9. Rust Semantic Completion |youcompleteme-rust-semantic-completion| + 10. TypeScript Semantic Completion |youcompleteme-typescript-semantic-completion| + 11. Semantic Completion for Other Languages |youcompleteme-semantic-completion-for-other-languages| + 12. Writing New Semantic Completers |youcompleteme-writing-new-semantic-completers| + 13. Diagnostic Display |youcompleteme-diagnostic-display| 1. Diagnostic Highlighting Groups |youcompleteme-diagnostic-highlighting-groups| 8. Commands |youcompleteme-commands| 1. The |:YcmRestartServer| command @@ -84,6 +85,7 @@ Contents ~ 2. The 'RefactorRename ' subcommand |RefactorRename-new-name| 3. Multi-file Refactor |youcompleteme-multi-file-refactor| 4. The |Format| subcommand + 5. The |OrganizeImports| subcommand 4. Miscellaneous Commands |youcompleteme-miscellaneous-commands| 1. The |RestartServer| subcommand 2. The |ClearCompilationFlagCache| subcommand @@ -239,10 +241,11 @@ Contents ~ - Completion String Ranking - General Semantic Completion - C-family Semantic Completion - - JavaScript Semantic Completion - - Rust Semantic Completion - - Python Semantic Completion - Java Semantic Completion + - JavaScript Semantic Completion + - Python Semantic Completion + - Rust Semantic Completion + - TypeScript Semantic Completion - Semantic Completion for Other Languages - Writing New Semantic Completers - Diagnostic Display @@ -349,7 +352,9 @@ including: - displaying type information for classes, variables, functions etc., - displaying documentation for methods, members, etc. in the preview window, - fixing common coding errors, like missing semi-colons, typos, etc., -- semantic renaming of variables across files (JavaScript only). +- semantic renaming of variables across files, +- formatting code, +- removing unused imports, sorting imports, etc. Features vary by file type, so make sure to check out the file type feature summary and the full list of completer subcommands to find out what's available @@ -1039,12 +1044,19 @@ Go ~ *youcompleteme-typescript* TypeScript ~ -- Semantic auto-completion +- Semantic auto-completion with automatic import insertion +- Go to definition (|GoTo|, |GoToDefinition|, and |GoToDeclaration| are + identical) +- Go to type definition (|GoToType|) +- Reference finding (|GoToReferences|) - Real-time diagnostic display - Renaming symbols ('RefactorRename ') -- Go to definition, find references (|GoToDefinition|, |GoToReferences|) -- Semantic type information for identifiers (|GetType|) - View documentation comments for identifiers (|GetDoc|) +- Type information for identifiers (|GetType|) +- Automatically fix certain errors (|FixIt|) +- Code formatting (|Format|) +- Organize imports (|OrganizeImports|) +- Management of 'TSServer' server instance ------------------------------------------------------------------------------- *youcompleteme-javascript* @@ -1084,6 +1096,7 @@ feedback. - Type information for identifiers (|GetType|) - Automatically fix certain errors including code generation (|FixIt|) - Code formatting (|Format|) +- Organize imports (|OrganizeImports|) - Detection of java projects - Management of 'jdt.ls' server instance @@ -1295,6 +1308,148 @@ to getting fast completions. Call the |:YcmDiags| command to see if any errors or warnings were detected in your file. +------------------------------------------------------------------------------- + *youcompleteme-java-semantic-completion* +Java Semantic Completion ~ + +**NOTE**: Java support is currently experimental. Please let us know your +feedback. + +------------------------------------------------------------------------------- + *youcompleteme-java-quick-start* +Java quick Start ~ + +1. Ensure that you have enabled the Java completer. See the installation + guide for details. + +2. Create a project file (gradle or maven) file in the root directory of + your Java project, by following the instructions below. + +3. If you previously used Eclim or Syntastic for Java, disable them for + Java. + +4. Edit a Java file from your project. + +For the best experience, we highly recommend at least Vim 8.0.1493 when using +Java support with YouCompleteMe. + +------------------------------------------------------------------------------- + *youcompleteme-java-project-files* +Java Project Files ~ + +In order to provide semantic analysis, the Java completion engine requires +knowledge of your project structure. In particular it needs to know the class +path to use, when compiling your code. Fortunately jdt.ls [20] supports eclipse +project files [53], maven projects [54] and gradle projects [55]. + +**NOTE:** Our recommendation is to use either maven or gradle projects. + +------------------------------------------------------------------------------- + *youcompleteme-diagnostic-display-syntastic* +Diagnostic display - Syntastic ~ + +The native support for Java includes YCM's native realtime diagnostics display. +This can conflict with other dianostics plugins like Syntastic, so when +enabling Java support, please **manually disable Syntastic Java diagnostics**. + +Add the following to your 'vimrc': +> + let g:syntastic_java_checkers = [] +< +------------------------------------------------------------------------------- + *youcompleteme-diagnostic-display-eclim* +Diagnostic display - Eclim ~ + +The native support for Java includes YCM's native realtime diagnostics display. +This can conflict with other dianostics plugins like Eclim, so when enabling +Java support, please **manually disable Eclim Java diagnostics**. + +Add the following to your 'vimrc': +> + let g:EclimFileTypeValidate = 0 +< +**NOTE**: We recommend disabling Eclim entirely when editing Java with YCM's +native Java support. This can be done temporarily with ':EclimDisable'. + +------------------------------------------------------------------------------- + *youcompleteme-eclipse-projects* +Eclipse Projects ~ + +Eclipse style projects require two files: .project [53] and .classpath [56]. + +If your project already has these files due to previously being set up within +eclipse, then no setup is required. jdt.ls [20] should load the project just +fine (it's basically eclipse after all). + +However, if not, it is possible (easy in fact) to craft them manually, though +it is not recommended. You're better off using gradle or maven (see below). + +A simple eclipse style project example [57] can be found in the ycmd test dir. +Normally all that is required is to copy these files to the root of your +project and to edit the '.classpath' to add additional libraries, such as: +> + + +< +It may also be necessary to change the directory in which your source files are +located (paths are relative to the .project file itself): +> + +< +**NOTE**: The eclipse project and classpath files are not a public interface +and it is highly recommended to use Maven or Gradle project definitions if you +don't already use eclipse to manage your projects. + +------------------------------------------------------------------------------- + *youcompleteme-maven-projects* +Maven Projects ~ + +Maven needs a file named pom.xml [54] in the root of the project. Once again a +simple pom.xml [58] can be found in ycmd source. + +The format of pom.xml [54] files is way beyond the scope of this document, but +we do recommend using the various tools that can generate them for you, if +you're not familiar with them already. + +------------------------------------------------------------------------------- + *youcompleteme-gradle-projecs* +Gradle Projecs ~ + +Gradle projects require a build.gradle [55]. Again, there is a trivial example +in ycmd's tests [59]. + +The format of build.gradle [55] files is way beyond the scope of this document, +but we do recommend using the various tools that can generate them for you, if +you're not familiar with them already. + +------------------------------------------------------------------------------- + *youcompleteme-troubleshooting* +Troubleshooting ~ + +If you're not getting completions or diagnostics, check the server health: + +- The Java completion engine takes a while to start up and parse your + project. You should be able to see its progress in the command line, and + |:YcmDebugInfo|. Ensure that the following lines are present: +> + -- jdt.ls Java Language Server running + -- jdt.ls Java Language Server Startup Status: Ready +< +- If the above lines don't appear after a few minutes, check the jdt.ls and + ycmd log files using |:YcmToggleLogs|. The jdt.ls log file is called '.log' + (for some reason). + +If you get a message about "classpath is incomplete", then make sure you have +correctly configured the project files. + +If you get messages about unresolved imports, then make sure you have correctly +configured the project files, in particular check that the classpath is set +correctly. + +For anything else, contact us. Java support is experimental at present so we'd +love to hear your feedback! Please do remember to check CONTRIBUTING.md [60] +for the list of diagnostics we'll need. + ------------------------------------------------------------------------------- *youcompleteme-javascript-semantic-completion* JavaScript Semantic Completion ~ @@ -1307,7 +1462,7 @@ JavaScript quick start ~ installation guide for details. 2. Create a '.tern-project' file in the root directory of your JavaScript - project, by following the instructions [53] in the Tern [18] + project, by following the instructions [61] in the Tern [18] documentation. 3. Edit a file from your project. @@ -1317,14 +1472,14 @@ JavaScript quick start ~ Explanation ~ JavaScript completion is based on Tern [18]. This completion engine requires a -file named '.tern-project' [53] to exist in the current working directory or a +file named '.tern-project' [61] to exist in the current working directory or a directory which is an ancestor of the current working directory when the Tern server is started. YCM starts the Tern server the first time a JavaScript file is edited and uses its directory as the working directory, so the directory of that file at that time needs to be a descendent of the directory containing the '.tern-project' file (or that directory itself). -Alternatively, as described in the Tern documentation [54], a global '.tern- +Alternatively, as described in the Tern documentation [62], a global '.tern- config' file may be used. Multiple Tern servers are not supported. To switch to a different JavaScript @@ -1339,9 +1494,9 @@ Tips and tricks ~ This section contains some advice for configuring '.tern-project' and working with JavaScript files. The canonical reference for correctly configuring Tern -is the Tern documentation [54]. Any issues, improvements, advice, etc. should +is the Tern documentation [62]. Any issues, improvements, advice, etc. should be sought from the Tern [18] project. For example, see the list of tern plugins -[55] for the list of plugins which can be enabled in the 'plugins' section of +[63] for the list of plugins which can be enabled in the 'plugins' section of the '.tern-project' file. ------------------------------------------------------------------------------- @@ -1385,26 +1540,6 @@ Can be used as follows: // etc. } ); < -------------------------------------------------------------------------------- - *youcompleteme-rust-semantic-completion* -Rust Semantic Completion ~ - -Completions and GoTo commands within the current crate and its dependencies -should work out of the box with no additional configuration (provided that you -built YCM with the '--rust-completer' flag; see the _Installation_ section for -details). For semantic analysis inclusive of the standard library, you must -have a local copy of the Rust source code [56]. If using rustup [57], run the -following command to download the code: -> - rustup component add rust-src -< -YCM will find its location automatically. Otherwise, download the archive, -extract it somewhere, and set the following option so YCM can locate it: -> - " In this example, the Rust source code archive has been extracted to - " /usr/local/rust/rustc-1.20.0 - let g:ycm_rust_src_path = '/usr/local/rust/rustc-1.20.0/src' -< ------------------------------------------------------------------------------- *youcompleteme-python-semantic-completion* Python Semantic Completion ~ @@ -1433,146 +1568,42 @@ virtual environment, so jedi [12] will be able to provide completions for every package you have in the virtual environment. ------------------------------------------------------------------------------- - *youcompleteme-java-semantic-completion* -Java Semantic Completion ~ + *youcompleteme-rust-semantic-completion* +Rust Semantic Completion ~ -**NOTE**: Java support is currently experimental. Please let us know your -feedback. - -------------------------------------------------------------------------------- - *youcompleteme-java-quick-start* -Java quick Start ~ - -1. Ensure that you have enabled the Java completer. See the installation - guide for details. - -2. Create a project file (gradle or maven) file in the root directory of - your Java project, by following the instructions below. - -3. If you previously used Eclim or Syntastic for Java, disable them for - Java. - -4. Edit a Java file from your project. - -For the best experience, we highly recommend at least Vim 8.0.1493 when using -Java support with YouCompleteMe. - -------------------------------------------------------------------------------- - *youcompleteme-java-project-files* -Java Project Files ~ - -In order to provide semantic analysis, the Java completion engine requires -knowledge of your project structure. In particular it needs to know the class -path to use, when compiling your code. Fortunately jdt.ls [20] supports eclipse -project files [58], maven projects [59] and gradle projects [60]. - -**NOTE:** Our recommendation is to use either maven or gradle projects. - -------------------------------------------------------------------------------- - *youcompleteme-diagnostic-display-syntastic* -Diagnostic display - Syntastic ~ - -The native support for Java includes YCM's native realtime diagnostics display. -This can conflict with other dianostics plugins like Syntastic, so when -enabling Java support, please **manually disable Syntastic Java diagnostics**. - -Add the following to your 'vimrc': +Completions and GoTo commands within the current crate and its dependencies +should work out of the box with no additional configuration (provided that you +built YCM with the '--rust-completer' flag; see the _Installation_ section for +details). For semantic analysis inclusive of the standard library, you must +have a local copy of the Rust source code [64]. If using rustup [65], run the +following command to download the code: > - let g:syntastic_java_checkers = [] + rustup component add rust-src +< +YCM will find its location automatically. Otherwise, download the archive, +extract it somewhere, and set the following option so YCM can locate it: +> + " In this example, the Rust source code archive has been extracted to + " /usr/local/rust/rustc-1.20.0 + let g:ycm_rust_src_path = '/usr/local/rust/rustc-1.20.0/src' < ------------------------------------------------------------------------------- - *youcompleteme-diagnostic-display-eclim* -Diagnostic display - Eclim ~ + *youcompleteme-typescript-semantic-completion* +TypeScript Semantic Completion ~ -The native support for Java includes YCM's native realtime diagnostics display. -This can conflict with other dianostics plugins like Eclim, so when enabling -Java support, please **manually disable Eclim Java diagnostics**. - -Add the following to your 'vimrc': +All TypeScript features are provided by the TSServer [17] engine, which is +included in the TypeScript SDK. To get the SDK, install Node.js and npm [31] +and run the command: > - let g:EclimFileTypeValidate = 0 + npm install -g typescript < -**NOTE**: We recommend disabling Eclim entirely when editing Java with YCM's -native Java support. This can be done temporarily with ':EclimDisable'. +TSServer [17] relies on the 'tsconfig.json' file [66] to analyze your project. +Ensure the file exists at the root of your project. -------------------------------------------------------------------------------- - *youcompleteme-eclipse-projects* -Eclipse Projects ~ - -Eclipse style projects require two files: .project [58] and .classpath [61]. - -If your project already has these files due to previously being set up within -eclipse, then no setup is required. jdt.ls [20] should load the project just -fine (it's basically eclipse after all). - -However, if not, it is possible (easy in fact) to craft them manually, though -it is not recommended. You're better off using gradle or maven (see below). - -A simple eclipse style project example [62] can be found in the ycmd test dir. -Normally all that is required is to copy these files to the root of your -project and to edit the '.classpath' to add additional libraries, such as: -> - - -< -It may also be necessary to change the directory in which your source files are -located (paths are relative to the .project file itself): -> - -< -**NOTE**: The eclipse project and classpath files are not a public interface -and it is highly recommended to use Maven or Gradle project definitions if you -don't already use eclipse to manage your projects. - -------------------------------------------------------------------------------- - *youcompleteme-maven-projects* -Maven Projects ~ - -Maven needs a file named pom.xml [59] in the root of the project. Once again a -simple pom.xml [63] can be found in ycmd source. - -The format of pom.xml [59] files is way beyond the scope of this document, but -we do recommend using the various tools that can generate them for you, if -you're not familiar with them already. - -------------------------------------------------------------------------------- - *youcompleteme-gradle-projecs* -Gradle Projecs ~ - -Gradle projects require a build.gradle [60]. Again, there is a trivial example -in ycmd's tests [64]. - -The format of build.gradle [60] files is way beyond the scope of this document, -but we do recommend using the various tools that can generate them for you, if -you're not familiar with them already. - -------------------------------------------------------------------------------- - *youcompleteme-troubleshooting* -Troubleshooting ~ - -If you're not getting completions or diagnostics, check the server health: - -- The Java completion engine takes a while to start up and parse your - project. You should be able to see its progress in the command line, and - |:YcmDebugInfo|. Ensure that the following lines are present: -> - -- jdt.ls Java Language Server running - -- jdt.ls Java Language Server Startup Status: Ready -< -- If the above lines don't appear after a few minutes, check the jdt.ls and - ycmd log files using |:YcmToggleLogs|. The jdt.ls log file is called '.log' - (for some reason). - -If you get a message about "classpath is incomplete", then make sure you have -correctly configured the project files. - -If you get messages about unresolved imports, then make sure you have correctly -configured the project files, in particular check that the classpath is set -correctly. - -For anything else, contact us. Java support is experimental at present so we'd -love to hear your feedback! Please do remember to check CONTRIBUTING.md [65] -for the list of diagnostics we'll need. +TypeScript 2.8.1 or later is recommended. Some features will be missing on +older versions. You can check which version you are currently using by looking +at the output of |:YcmDebugInfo|. If the version is 'None', your TypeScript is +too old and should be updated. ------------------------------------------------------------------------------- *youcompleteme-semantic-completion-for-other-languages* @@ -1589,7 +1620,7 @@ semantic completions if it does not have a native semantic completion engine for your file's filetype. Vim comes with okayish omnifuncs for various languages like Ruby, PHP, etc. It depends on the language. -You can get a stellar omnifunc for Ruby with Eclim [66]. Just make sure you +You can get a stellar omnifunc for Ruby with Eclim [67]. Just make sure you have the _latest_ Eclim installed and configured (this means Eclim '>= 2.2.*' and Eclipse '>= 4.2.*'). @@ -1606,7 +1637,7 @@ Writing New Semantic Completers ~ You have two options here: writing an 'omnifunc' for Vim's omnicomplete system that YCM will then use through its omni-completer, or a custom completer for -YCM using the Completer API [67]. +YCM using the Completer API [68]. Here are the differences between the two approaches: @@ -1625,7 +1656,7 @@ Here are the differences between the two approaches: than VimScript. If you want to use the 'omnifunc' system, see the relevant Vim docs with ':h -complete-functions'. For the Completer API, see the API docs [67]. +complete-functions'. For the Completer API, see the API docs [68]. If you want to upstream your completer into YCM's source, you should use the Completer API. @@ -1677,7 +1708,7 @@ current file in Vim's 'locationlist', which can be opened with the ':lopen' and ':lclose' commands (make sure you have set 'let g:ycm_always_populate_location_list = 1' in your vimrc). A good way to toggle the display of the 'locationlist' with a single key mapping is provided by -another (very small) Vim plugin called ListToggle [68] (which also makes it +another (very small) Vim plugin called ListToggle [69] (which also makes it possible to change the height of the 'locationlist' window), also written by yours truly. @@ -1840,7 +1871,8 @@ The *GoToDeclaration* subcommand Looks up the symbol under the cursor and jumps to its declaration. -Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, python, rust, java' +Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, python, rust, +typescript' ------------------------------------------------------------------------------- The *GoToDefinition* subcommand @@ -1852,8 +1884,8 @@ namely when the definition of the symbol is in the current translation unit. A translation unit consists of the file you are editing and all the files you are including with '#include' directives (directly or indirectly) in that file. -Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, javascript, python, -rust, typescript, java' +Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript, +python, rust, typescript' ------------------------------------------------------------------------------- The *GoTo* subcommand @@ -1865,8 +1897,8 @@ the current translation unit, jumps to the symbol's declaration. For C/C++/Objective-C, it first tries to look up the current line for a header and jump to it. For C#, implementations are also considered and preferred. -Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, javascript, python, -rust, java' +Supported in filetypes: 'c, cpp, objc, objcpp, cs, go, java, javascript, +python, rust, typescript' ------------------------------------------------------------------------------- The *GoToImprecise* subcommand @@ -1889,7 +1921,7 @@ This command attempts to find all of the references within the project to the identifier under the cursor and populates the quickfix list with those locations. -Supported in filetypes: 'javascript, python, typescript, java' +Supported in filetypes: 'java, javascript, python, typescript' ------------------------------------------------------------------------------- The *GoToImplementation* subcommand @@ -1938,7 +1970,7 @@ Invoking this command on 's' returns 'std::string => std::basic_string' **NOTE:** Causes re-parsing of the current translation unit. -Supported in filetypes: 'c, cpp, objc, objcpp, javascript, typescript, java' +Supported in filetypes: 'c, cpp, objc, objcpp, java, javascript, typescript' ------------------------------------------------------------------------------- The *GetTypeImprecise* subcommand @@ -1995,8 +2027,8 @@ under the cursor. Depending on the file type, this includes things like: - Python docstrings, - etc. -Supported in filetypes: 'c, cpp, objc, objcpp, cs, python, typescript, -javascript, rust, java' +Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, javascript, python, +typescript, rust' ------------------------------------------------------------------------------- The *GetDocImprecise* subcommand @@ -2048,7 +2080,7 @@ indication). **NOTE:** Causes re-parsing of the current translation unit. -Supported in filetypes: 'c, cpp, objc, objcpp, cs, java' +Supported in filetypes: 'c, cpp, objc, objcpp, cs, java, typescript' ------------------------------------------------------------------------------- *RefactorRename-new-name* @@ -2064,7 +2096,7 @@ files. Rename operations may involve changes to multiple files, which may or may not be open in Vim buffers at the time. YouCompleteMe handles all of this for you. The behavior is described in the following section. -Supported in filetypes: 'javascript' (variables only), 'typescript, java' +Supported in filetypes: 'java, javascript (variables only), typescript' ------------------------------------------------------------------------------- *youcompleteme-multi-file-refactor* @@ -2101,14 +2133,23 @@ buffers') to see the buffers that were opened by the command. ------------------------------------------------------------------------------- The *Format* subcommand -This commands formats the whole buffer or some part of it according to the -value of the Vim options 'shiftwidth' and 'expandtab' (see ":h 'sw'" and ':h -et' respectively). To format a specific part of your document, you can either +This command formats the whole buffer or some part of it according to the value +of the Vim options 'shiftwidth' and 'expandtab' (see ":h 'sw'" and ':h et' +respectively). To format a specific part of your document, you can either select it in one of Vim's visual modes (see ':h visual-use') and run the command or directly enter the range on the command line, e.g. ':2,5YcmCompleter Format' to format it from line 2 to line 5. -Supported in filetypes: 'java' +Supported in filetypes: 'java, typescript' + +------------------------------------------------------------------------------- +The *OrganizeImports* subcommand + +This command removes unused imports and sorts imports in the current file. It +can also group imports from the same module in TypeScript and resolves imports +in Java. + +Supported in filetypes: 'java, typescript' ------------------------------------------------------------------------------- *youcompleteme-miscellaneous-commands* @@ -2132,7 +2173,7 @@ python binary to use to restart the Python semantic engine. > :YcmCompleter RestartServer /usr/bin/python3.4 < -Supported in filetypes: 'cs, go, javascript, python, rust, typescript, java' +Supported in filetypes: 'cs, go, java, javascript, python, rust, typescript' ------------------------------------------------------------------------------- The *ClearCompilationFlagCache* subcommand @@ -2172,7 +2213,7 @@ For example: call youcompleteme#GetErrorCount() < Both this function and |youcompleteme#GetWarningCount| can be useful when -integrating YCM with other Vim plugins. For example, a lightline [69] user +integrating YCM with other Vim plugins. For example, a lightline [70] user could add a diagnostics section to their statusline which would display the number of errors and warnings. @@ -2515,13 +2556,13 @@ YCM will not render it. The following filter types are supported: -- "regex": Accepts a string regular expression [70]. This type matches when +- "regex": Accepts a string regular expression [71]. This type matches when the regex (treated as case-insensitive) is found in the diagnostic text. - "level": Accepts a string level, either "warning" or "error." This type matches when the diagnostic has the same level. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [70]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [71]. Default: '{}' > @@ -2610,7 +2651,7 @@ from the 'tagfiles()' Vim function which examines the 'tags' Vim option. See YCM will re-index your tags files if it detects that they have been modified. -The only supported tag format is the Exuberant Ctags format [71]. The format +The only supported tag format is the Exuberant Ctags format [72]. The format from "plain" ctags is NOT supported. Ctags needs to be called with the '-- fields=+l' option (that's a lowercase 'L', not a one) because YCM needs the 'language:' field in the tags output. @@ -2990,7 +3031,7 @@ It's also possible to use a regular expression as a trigger. You have to prefix your trigger with 're!' to signify it's a regex trigger. For instance, 're!\w+\.' would only trigger after the '\w+\.' regex matches. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [70]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [71]. Default: '[see next line]' > @@ -3218,7 +3259,7 @@ I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting ~ You should probably run 'brew rm python; brew install python' to get the latest fixes that should make YCM work with such a configuration. Also rebuild Macvim -then. If you still get problems with this, see issue #18 [72] for suggestions. +then. If you still get problems with this, see issue #18 [73] for suggestions. ------------------------------------------------------------------------------- *youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling* @@ -3317,15 +3358,15 @@ YCM does not read identifiers from my tags files ~ First, put 'let g:ycm_collect_identifiers_from_tags_files = 1' in your vimrc. -Make sure you are using Exuberant Ctags [73] to produce your tags files since -the only supported tag format is the Exuberant Ctags format [71]. The format +Make sure you are using Exuberant Ctags [74] to produce your tags files since +the only supported tag format is the Exuberant Ctags format [72]. The format from "plain" ctags is NOT supported. The output of 'ctags --version' should -list "Exuberant Ctags". See Universal Ctags [74] for a maintained version. +list "Exuberant Ctags". See Universal Ctags [75] for a maintained version. Ctags needs to be called with the '--fields=+l' (that's a lowercase 'L', not a one) option because YCM needs the 'language:' field in the tags output. -**NOTE:** Exuberant Ctags [73] by default sets language tag for '*.h' files as +**NOTE:** Exuberant Ctags [74] by default sets language tag for '*.h' files as 'C++'. If you have C (not C++) project, consider giving parameter '-- langmap=c:.c.h' to ctags to see tags from '*.h' files. @@ -3404,7 +3445,7 @@ asynchronicity. This feature is available since Vim 7.4.1578. *youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed* Nasty bugs happen if I have the 'vim-autoclose' plugin installed ~ -Use the delimitMate [75] plugin instead. It does the same thing without +Use the delimitMate [76] plugin instead. It does the same thing without conflicting with YCM. ------------------------------------------------------------------------------- @@ -3412,7 +3453,7 @@ conflicting with YCM. Is there some sort of YCM mailing list? I have questions ~ If you have questions about the plugin or need help, please use the ycm-users -[76] mailing list, _don't_ create issues on the tracker. The tracker is for bug +[77] mailing list, _don't_ create issues on the tracker. The tracker is for bug reports and feature requests. ------------------------------------------------------------------------------- @@ -3466,7 +3507,7 @@ mismatch in assumptions causes performance problems since Syntastic code isn't optimized for this use case of constant diagnostic refreshing. Poor support for this use case also led to crash bugs in Vim caused by -Syntastic-Vim interactions (issue #593 [77]) and other problems, like random +Syntastic-Vim interactions (issue #593 [78]) and other problems, like random Vim flickering. Attempts were made to resolve these issues in Syntastic, but ultimately some of them failed (for various reasons). @@ -3502,7 +3543,7 @@ paths, prepend '-isystem' to each individual path and append them all to the list of flags you return from your 'FlagsForFile' function in your '.ycm_extra_conf.py' file. -See issue #303 [78] for details. +See issue #303 [79] for details. ------------------------------------------------------------------------------- *youcompleteme-when-i-open-javascript-file-i-get-an-annoying-warning-about-.tern-project-file* @@ -3521,7 +3562,7 @@ When I start vim I get a runtime error saying 'R6034 An application has made ~ an attempt to load the C runtime library incorrectly.' ~ CMake and other things seem to screw up the PATH with their own msvcrXX.dll -versions. [79] Add the following to the very top of your vimrc to remove these +versions. [80] Add the following to the very top of your vimrc to remove these entries from the path. > python << EOF @@ -3557,7 +3598,7 @@ On Windows I get "E887: Sorry, this command is disabled, the Python's site ~ module could not be loaded" ~ If you are running vim on Windows with Python 2.7.11, this is likely caused by -a bug [80]. Follow this workaround [81] or use a different version (Python +a bug [81]. Follow this workaround [82] or use a different version (Python 2.7.12 does not suffer from the bug). ------------------------------------------------------------------------------- @@ -3592,7 +3633,7 @@ YCM does not shut down when I quit Vim ~ YCM relies on the 'VimLeave' event to shut down the ycmd server [47]. Some plugins prevent this event from triggering by exiting Vim through an autocommand without using the 'nested' keyword (see ':h autocmd-nested'). One -of these plugins is vim-nerdtree-tabs [82]. You should identify which plugin is +of these plugins is vim-nerdtree-tabs [83]. You should identify which plugin is responsible for the issue and report it to the plugin author. Note that when this happens, ycmd [47] will automatically shut itself down after 30 minutes. @@ -3601,17 +3642,17 @@ this happens, ycmd [47] will automatically shut itself down after 30 minutes. Contributor Code of Conduct ~ Please note that this project is released with a Contributor Code of Conduct -[83]. By participating in this project you agree to abide by its terms. +[84]. By participating in this project you agree to abide by its terms. =============================================================================== *youcompleteme-contact* Contact ~ If you have questions about the plugin or need help, please join the Gitter -room [1] or use the ycm-users [76] mailing list. +room [1] or use the ycm-users [77] mailing list. If you have bug reports or feature suggestions, please use the issue tracker -[84]. Before you do, please carefully read CONTRIBUTING.md [65] as this asks +[85]. Before you do, please carefully read CONTRIBUTING.md [60] as this asks for important diagnostics which the team will use to help get you going. The latest version of the plugin is available at @@ -3626,7 +3667,7 @@ YouCompleteMe maintainers directly using the contact details below. *youcompleteme-license* License ~ -This software is licensed under the GPL v3 license [85]. © 2015-2017 +This software is licensed under the GPL v3 license [86]. © 2015-2017 YouCompleteMe contributors =============================================================================== @@ -3685,38 +3726,39 @@ References ~ [50] https://github.com/rizsotto/Bear [51] https://raw.githubusercontent.com/Valloric/ycmd/3ad0300e94edc13799e8bf7b831de8b57153c5aa/cpp/ycm/.ycm_extra_conf.py [52] https://github.com/rdnetto/YCM-Generator -[53] http://ternjs.net/doc/manual.html#configuration -[54] http://ternjs.net/doc/manual.html#server -[55] http://ternjs.net/doc/manual.html#plugins -[56] https://www.rust-lang.org/downloads.html -[57] https://www.rustup.rs/ -[58] https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html -[59] https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html -[60] https://docs.gradle.org/current/userguide/tutorial_java_projects.html -[61] https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FIClasspathEntry.html -[62] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_eclipse_project -[63] https://github.com/Valloric/ycmd/blob/java-language-server/ycmd/tests/java/testdata/simple_maven_project/pom.xml -[64] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_gradle_project -[65] https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md -[66] http://eclim.org/ -[67] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py -[68] https://github.com/Valloric/ListToggle -[69] https://github.com/itchyny/lightline.vim -[70] https://docs.python.org/2/library/re.html#regular-expression-syntax -[71] http://ctags.sourceforge.net/FORMAT -[72] https://github.com/Valloric/YouCompleteMe/issues/18 -[73] http://ctags.sourceforge.net/ -[74] https://github.com/universal-ctags/ctags -[75] https://github.com/Raimondi/delimitMate -[76] https://groups.google.com/forum/?hl=en#!forum/ycm-users -[77] https://github.com/Valloric/YouCompleteMe/issues/593 -[78] https://github.com/Valloric/YouCompleteMe/issues/303 -[79] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 -[80] https://github.com/vim/vim/issues/717 -[81] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 -[82] https://github.com/jistr/vim-nerdtree-tabs -[83] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md -[84] https://github.com/Valloric/YouCompleteMe/issues?state=open -[85] http://www.gnu.org/copyleft/gpl.html +[53] https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html +[54] https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html +[55] https://docs.gradle.org/current/userguide/tutorial_java_projects.html +[56] https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FIClasspathEntry.html +[57] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_eclipse_project +[58] https://github.com/Valloric/ycmd/blob/java-language-server/ycmd/tests/java/testdata/simple_maven_project/pom.xml +[59] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_gradle_project +[60] https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md +[61] http://ternjs.net/doc/manual.html#configuration +[62] http://ternjs.net/doc/manual.html#server +[63] http://ternjs.net/doc/manual.html#plugins +[64] https://www.rust-lang.org/downloads.html +[65] https://www.rustup.rs/ +[66] https://www.typescriptlang.org/docs/handbook/tsconfig-json.html +[67] http://eclim.org/ +[68] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py +[69] https://github.com/Valloric/ListToggle +[70] https://github.com/itchyny/lightline.vim +[71] https://docs.python.org/2/library/re.html#regular-expression-syntax +[72] http://ctags.sourceforge.net/FORMAT +[73] https://github.com/Valloric/YouCompleteMe/issues/18 +[74] http://ctags.sourceforge.net/ +[75] https://github.com/universal-ctags/ctags +[76] https://github.com/Raimondi/delimitMate +[77] https://groups.google.com/forum/?hl=en#!forum/ycm-users +[78] https://github.com/Valloric/YouCompleteMe/issues/593 +[79] https://github.com/Valloric/YouCompleteMe/issues/303 +[80] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 +[81] https://github.com/vim/vim/issues/717 +[82] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 +[83] https://github.com/jistr/vim-nerdtree-tabs +[84] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md +[85] https://github.com/Valloric/YouCompleteMe/issues?state=open +[86] http://www.gnu.org/copyleft/gpl.html vim: ft=help From ee3226e1a768bb9f6cc2441f8be54b2847bdcd49 Mon Sep 17 00:00:00 2001 From: micbou Date: Sat, 7 Apr 2018 05:41:49 +0200 Subject: [PATCH 6/8] Mention smart-diacritic sensitive matching in docs --- README.md | 19 +++- doc/youcompleteme.txt | 224 ++++++++++++++++++++++-------------------- 2 files changed, 129 insertions(+), 114 deletions(-) diff --git a/README.md b/README.md index 45f9584e..6871f79f 100644 --- a/README.md +++ b/README.md @@ -856,11 +856,19 @@ User Guide If the offered completions are too broad, keep typing characters; YCM will continue refining the offered completions based on your input. -Filtering is "smart-case" sensitive; if you are typing only lowercase letters, -then it's case-insensitive. If your input contains uppercase letters, then the -uppercase letters in your query must match uppercase letters in the completion -strings (the lowercase letters still match both). So, "foo" matches "Foo" and -"foo", "Foo" matches "Foo" and "FOO" but not "foo". +Filtering is "smart-case" and "smart-[diacritic][]" sensitive; if you are +typing only lowercase letters, then it's case-insensitive. If your input +contains uppercase letters, then the uppercase letters in your query must +match uppercase letters in the completion strings (the lowercase letters still +match both). On top of that, a letter with no diacritic marks will match that +letter with or without marks: + +| matches | foo | føo | fOo | fØo | +|---------|-----|-----|-----|-----| +| **foo** | ✔️ | ✔️ | ✔️ | ✔️ | +| **føo** | ❌ | ✔️ | ❌ | ✔️ | +| **fOo** | ❌ | ❌ | ✔️ | ✔️ | +| **fØo** | ❌ | ❌ | ❌ | ✔️ | Use the TAB key to accept a completion and continue pressing TAB to cycle through the completions. Use Shift-TAB to cycle backwards. Note that if you're @@ -3444,3 +3452,4 @@ This software is licensed under the [GPL v3 license][gpl]. [ycmd-mvn-pom-xml]: https://github.com/Valloric/ycmd/blob/java-language-server/ycmd/tests/java/testdata/simple_maven_project/pom.xml [ycmd-gradle-project]: https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_gradle_project [jdtls-release]: http://download.eclipse.org/jdtls/milestones +[diacritic]: https://www.unicode.org/glossary/#diacritic diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 4391c406..8dcd49d1 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -30,7 +30,7 @@ Contents ~ 3. Completion String Ranking |youcompleteme-completion-string-ranking| 4. General Semantic Completion |youcompleteme-general-semantic-completion| 5. C-family Semantic Completion |youcompleteme-c-family-semantic-completion| - 1. Option 1: Use a compilation database [48] |youcompleteme-option-1-use-compilation-database-48| + 1. Option 1: Use a compilation database [49] |youcompleteme-option-1-use-compilation-database-49| 2. Option 2: Provide the flags manually |youcompleteme-option-2-provide-flags-manually| 3. Errors during compilation |youcompleteme-errors-during-compilation| 6. Java Semantic Completion |youcompleteme-java-semantic-completion| @@ -1111,11 +1111,16 @@ General Usage ~ If the offered completions are too broad, keep typing characters; YCM will continue refining the offered completions based on your input. -Filtering is "smart-case" sensitive; if you are typing only lowercase letters, -then it's case-insensitive. If your input contains uppercase letters, then the -uppercase letters in your query must match uppercase letters in the completion -strings (the lowercase letters still match both). So, "foo" matches "Foo" and -"foo", "Foo" matches "Foo" and "FOO" but not "foo". +Filtering is "smart-case" and "smart-diacritic [47]" sensitive; if you are +typing only lowercase letters, then it's case-insensitive. If your input +contains uppercase letters, then the uppercase letters in your query must match +uppercase letters in the completion strings (the lowercase letters still match +both). On top of that, a letter with no diacritic marks will match that letter +with or without marks: + +| matches | foo | føo | fOo | fØo | |---------|-----|-----|-----|-----| | +**foo** | ✔️ | ✔️ | ✔️ | ✔️ | | **føo** | ❌ | ✔️ | ❌ | ✔️ | | **fOo** | ❌ | ❌ | +✔️ | ✔️ | | **fØo** | ❌ | ❌ | ❌ | ✔️ | Use the TAB key to accept a completion and continue pressing TAB to cycle through the completions. Use Shift-TAB to cycle backwards. Note that if you're @@ -1148,7 +1153,7 @@ and presents the results to you. Client-Server Architecture ~ YCM has a client-server architecture; the Vim part of YCM is only a thin client -that talks to the ycmd HTTP+JSON server [47] that has the vast majority of YCM +that talks to the ycmd HTTP+JSON server [48] that has the vast majority of YCM logic and functionality. The server is started and stopped automatically as you start and stop Vim. @@ -1188,8 +1193,8 @@ analysis. There are 2 methods which can be used to provide compile flags to 'libclang': ------------------------------------------------------------------------------- - *youcompleteme-option-1-use-compilation-database-48* -Option 1: Use a compilation database [48] ~ + *youcompleteme-option-1-use-compilation-database-49* +Option 1: Use a compilation database [49] ~ The easiest way to get YCM to compile your code is to use a compilation database. A compilation database is usually generated by your build system @@ -1197,13 +1202,13 @@ database. A compilation database is usually generated by your build system in your project. For information on how to generate a compilation database, see the clang -documentation [48]. In short: +documentation [49]. In short: - If using CMake, add '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON' when configuring (or add 'set( CMAKE_EXPORT_COMPILE_COMMANDS ON )' to 'CMakeLists.txt') and copy or symlink the generated database to the root of your project. -- If using Ninja, check out the 'compdb' tool ('-t compdb') in its docs [49]. -- If using GNU make, check out Bear [50]. +- If using Ninja, check out the 'compdb' tool ('-t compdb') in its docs [50]. +- If using GNU make, check out Bear [51]. - For other build systems, check out '.ycm_extra_conf.py' below. If no '.ycm_extra_conf.py' is found, and no 'ycm_global_ycm_extra_conf' is @@ -1283,14 +1288,14 @@ libclang for the file 'filename'. That's it! This is actually enough for most projects, but for complex projects it is not uncommon to integrate directly with an existing build system using the full power of the Python language. -For a more elaborate example, see YCM's own '.ycm_extra_conf.py' [51]. You +For a more elaborate example, see YCM's own '.ycm_extra_conf.py' [52]. You should be able to use it _as a starting point_. **Don't** just copy/paste that file somewhere and expect things to magically work; **your project needs different flags**. Hint: just replace the strings in the 'flags' variable with compilation flags necessary for your project. That should be enough for 99% of projects. -You could also consider using YCM-Generator [52] to generate the +You could also consider using YCM-Generator [53] to generate the 'ycm_extra_conf.py' file. ------------------------------------------------------------------------------- @@ -1340,7 +1345,7 @@ Java Project Files ~ In order to provide semantic analysis, the Java completion engine requires knowledge of your project structure. In particular it needs to know the class path to use, when compiling your code. Fortunately jdt.ls [20] supports eclipse -project files [53], maven projects [54] and gradle projects [55]. +project files [54], maven projects [55] and gradle projects [56]. **NOTE:** Our recommendation is to use either maven or gradle projects. @@ -1375,7 +1380,7 @@ native Java support. This can be done temporarily with ':EclimDisable'. *youcompleteme-eclipse-projects* Eclipse Projects ~ -Eclipse style projects require two files: .project [53] and .classpath [56]. +Eclipse style projects require two files: .project [54] and .classpath [57]. If your project already has these files due to previously being set up within eclipse, then no setup is required. jdt.ls [20] should load the project just @@ -1384,7 +1389,7 @@ fine (it's basically eclipse after all). However, if not, it is possible (easy in fact) to craft them manually, though it is not recommended. You're better off using gradle or maven (see below). -A simple eclipse style project example [57] can be found in the ycmd test dir. +A simple eclipse style project example [58] can be found in the ycmd test dir. Normally all that is required is to copy these files to the root of your project and to edit the '.classpath' to add additional libraries, such as: > @@ -1404,10 +1409,10 @@ don't already use eclipse to manage your projects. *youcompleteme-maven-projects* Maven Projects ~ -Maven needs a file named pom.xml [54] in the root of the project. Once again a -simple pom.xml [58] can be found in ycmd source. +Maven needs a file named pom.xml [55] in the root of the project. Once again a +simple pom.xml [59] can be found in ycmd source. -The format of pom.xml [54] files is way beyond the scope of this document, but +The format of pom.xml [55] files is way beyond the scope of this document, but we do recommend using the various tools that can generate them for you, if you're not familiar with them already. @@ -1415,10 +1420,10 @@ you're not familiar with them already. *youcompleteme-gradle-projecs* Gradle Projecs ~ -Gradle projects require a build.gradle [55]. Again, there is a trivial example -in ycmd's tests [59]. +Gradle projects require a build.gradle [56]. Again, there is a trivial example +in ycmd's tests [60]. -The format of build.gradle [55] files is way beyond the scope of this document, +The format of build.gradle [56] files is way beyond the scope of this document, but we do recommend using the various tools that can generate them for you, if you're not familiar with them already. @@ -1447,7 +1452,7 @@ configured the project files, in particular check that the classpath is set correctly. For anything else, contact us. Java support is experimental at present so we'd -love to hear your feedback! Please do remember to check CONTRIBUTING.md [60] +love to hear your feedback! Please do remember to check CONTRIBUTING.md [61] for the list of diagnostics we'll need. ------------------------------------------------------------------------------- @@ -1462,7 +1467,7 @@ JavaScript quick start ~ installation guide for details. 2. Create a '.tern-project' file in the root directory of your JavaScript - project, by following the instructions [61] in the Tern [18] + project, by following the instructions [62] in the Tern [18] documentation. 3. Edit a file from your project. @@ -1472,14 +1477,14 @@ JavaScript quick start ~ Explanation ~ JavaScript completion is based on Tern [18]. This completion engine requires a -file named '.tern-project' [61] to exist in the current working directory or a +file named '.tern-project' [62] to exist in the current working directory or a directory which is an ancestor of the current working directory when the Tern server is started. YCM starts the Tern server the first time a JavaScript file is edited and uses its directory as the working directory, so the directory of that file at that time needs to be a descendent of the directory containing the '.tern-project' file (or that directory itself). -Alternatively, as described in the Tern documentation [62], a global '.tern- +Alternatively, as described in the Tern documentation [63], a global '.tern- config' file may be used. Multiple Tern servers are not supported. To switch to a different JavaScript @@ -1494,9 +1499,9 @@ Tips and tricks ~ This section contains some advice for configuring '.tern-project' and working with JavaScript files. The canonical reference for correctly configuring Tern -is the Tern documentation [62]. Any issues, improvements, advice, etc. should +is the Tern documentation [63]. Any issues, improvements, advice, etc. should be sought from the Tern [18] project. For example, see the list of tern plugins -[63] for the list of plugins which can be enabled in the 'plugins' section of +[64] for the list of plugins which can be enabled in the 'plugins' section of the '.tern-project' file. ------------------------------------------------------------------------------- @@ -1548,7 +1553,7 @@ Completion and GoTo commands work out of the box with no additional configuration. Those features are provided by the jedi [12] library which supports a variety of Python versions (2.6, 2.7, 3.2+) as long as it runs in the corresponding Python interpreter. By default YCM runs jedi [12] with the -same Python interpreter used by the ycmd server [47], so if you would like to +same Python interpreter used by the ycmd server [48], so if you would like to use a different interpreter, use the following option specifying the Python binary to use. For example, to provide Python 3 completion in your project, set: @@ -1575,7 +1580,7 @@ Completions and GoTo commands within the current crate and its dependencies should work out of the box with no additional configuration (provided that you built YCM with the '--rust-completer' flag; see the _Installation_ section for details). For semantic analysis inclusive of the standard library, you must -have a local copy of the Rust source code [64]. If using rustup [65], run the +have a local copy of the Rust source code [65]. If using rustup [66], run the following command to download the code: > rustup component add rust-src @@ -1597,7 +1602,7 @@ and run the command: > npm install -g typescript < -TSServer [17] relies on the 'tsconfig.json' file [66] to analyze your project. +TSServer [17] relies on the 'tsconfig.json' file [67] to analyze your project. Ensure the file exists at the root of your project. TypeScript 2.8.1 or later is recommended. Some features will be missing on @@ -1620,7 +1625,7 @@ semantic completions if it does not have a native semantic completion engine for your file's filetype. Vim comes with okayish omnifuncs for various languages like Ruby, PHP, etc. It depends on the language. -You can get a stellar omnifunc for Ruby with Eclim [67]. Just make sure you +You can get a stellar omnifunc for Ruby with Eclim [68]. Just make sure you have the _latest_ Eclim installed and configured (this means Eclim '>= 2.2.*' and Eclipse '>= 4.2.*'). @@ -1637,7 +1642,7 @@ Writing New Semantic Completers ~ You have two options here: writing an 'omnifunc' for Vim's omnicomplete system that YCM will then use through its omni-completer, or a custom completer for -YCM using the Completer API [68]. +YCM using the Completer API [69]. Here are the differences between the two approaches: @@ -1656,7 +1661,7 @@ Here are the differences between the two approaches: than VimScript. If you want to use the 'omnifunc' system, see the relevant Vim docs with ':h -complete-functions'. For the Completer API, see the API docs [68]. +complete-functions'. For the Completer API, see the API docs [69]. If you want to upstream your completer into YCM's source, you should use the Completer API. @@ -1708,7 +1713,7 @@ current file in Vim's 'locationlist', which can be opened with the ':lopen' and ':lclose' commands (make sure you have set 'let g:ycm_always_populate_location_list = 1' in your vimrc). A good way to toggle the display of the 'locationlist' with a single key mapping is provided by -another (very small) Vim plugin called ListToggle [69] (which also makes it +another (very small) Vim plugin called ListToggle [70] (which also makes it possible to change the height of the 'locationlist' window), also written by yours truly. @@ -1750,7 +1755,7 @@ Commands ~ ------------------------------------------------------------------------------- The *:YcmRestartServer* command -If the ycmd completion server [47] suddenly stops for some reason, you can +If the ycmd completion server [48] suddenly stops for some reason, you can restart it with this command. ------------------------------------------------------------------------------- @@ -1798,7 +1803,7 @@ semantic completion engine. The *:YcmToggleLogs* command This command presents the list of logfiles created by YCM, the ycmd server -[47], and the semantic engine server for the current filetype, if any. One of +[48], and the semantic engine server for the current filetype, if any. One of these logfiles can be opened in the editor (or closed if already open) by entering the corresponding number or by clicking on it with the mouse. Additionally, this command can take the logfile names as arguments. Use the @@ -2213,7 +2218,7 @@ For example: call youcompleteme#GetErrorCount() < Both this function and |youcompleteme#GetWarningCount| can be useful when -integrating YCM with other Vim plugins. For example, a lightline [70] user +integrating YCM with other Vim plugins. For example, a lightline [71] user could add a diagnostics section to their statusline which would display the number of errors and warnings. @@ -2556,13 +2561,13 @@ YCM will not render it. The following filter types are supported: -- "regex": Accepts a string regular expression [71]. This type matches when +- "regex": Accepts a string regular expression [72]. This type matches when the regex (treated as case-insensitive) is found in the diagnostic text. - "level": Accepts a string level, either "warning" or "error." This type matches when the diagnostic has the same level. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [71]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [72]. Default: '{}' > @@ -2651,7 +2656,7 @@ from the 'tagfiles()' Vim function which examines the 'tags' Vim option. See YCM will re-index your tags files if it detects that they have been modified. -The only supported tag format is the Exuberant Ctags format [72]. The format +The only supported tag format is the Exuberant Ctags format [73]. The format from "plain" ctags is NOT supported. Ctags needs to be called with the '-- fields=+l' option (that's a lowercase 'L', not a one) because YCM needs the 'language:' field in the tags output. @@ -2688,7 +2693,7 @@ handy; it's a way of sending data from Vim to your 'FlagsForFile' function in your '.ycm_extra_conf.py' file. This option is supposed to be a list of VimScript expression strings that are -evaluated for every request to the ycmd server [47] and then passed to your +evaluated for every request to the ycmd server [48] and then passed to your 'FlagsForFile' function as a 'client_data' keyword argument. For instance, if you set this option to "['v:version']", your 'FlagsForFile' @@ -2717,7 +2722,7 @@ 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 specific interpreter of your choosing. -**NOTE:** This interpreter is only used for the ycmd server [47]. The YCM +**NOTE:** This interpreter is only used for the ycmd server [48]. The YCM client running inside Vim always uses the Python interpreter that's embedded inside Vim. @@ -2728,7 +2733,7 @@ Default: "''" ------------------------------------------------------------------------------- The *g:ycm_keep_logfiles* option -When this option is set to '1', YCM and the ycmd completion server [47] will +When this option is set to '1', YCM and the ycmd completion server [48] will keep the logfiles around after shutting down (they are deleted on shutdown by default). @@ -2741,7 +2746,7 @@ Default: '0' ------------------------------------------------------------------------------- The *g:ycm_log_level* option -The logging level that YCM and the ycmd completion server [47] use. Valid +The logging level that YCM and the ycmd completion server [48] use. Valid values are the following, from most verbose to least verbose: - 'debug' - 'info' - 'warning' - 'error' - 'critical' @@ -3031,7 +3036,7 @@ It's also possible to use a regular expression as a trigger. You have to prefix your trigger with 're!' to signify it's a regex trigger. For instance, 're!\w+\.' would only trigger after the '\w+\.' regex matches. -**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [71]. +**NOTE:** The regex syntax is **NOT** Vim's, it's Python's [72]. Default: '[see next line]' > @@ -3101,7 +3106,7 @@ The *g:ycm_python_binary_path* option This option specifies the Python interpreter to use to run the jedi [12] completion library. Specify the Python interpreter to use to get completions. -By default the Python under which ycmd [47] runs is used (ycmd [47] runs on +By default the Python under which ycmd [48] runs is used (ycmd [48] runs on Python 2.7.1+ or 3.4+). Default: "''" @@ -3120,7 +3125,7 @@ FAQ ~ I used to be able to 'import vim' in '.ycm_extra_conf.py', but now can't ~ YCM was rewritten to use a client-server architecture where most of the logic -is in the ycmd server [47]. So the magic 'vim' module you could have previously +is in the ycmd server [48]. So the magic 'vim' module you could have previously imported in your '.ycm_extra_conf.py' files doesn't exist anymore. To be fair, importing the magic 'vim' module in extra conf files was never @@ -3191,7 +3196,7 @@ to the message log if it encounters problems. It's likely you misconfigured something and YCM is complaining about it. Also, you may want to run the |:YcmDebugInfo| command; it will make YCM spew -out various debugging information, including the YCM and ycmd [47] logfile +out various debugging information, including the YCM and ycmd [48] logfile paths and the compile flags for the current file if the file is a C-family language file and you have compiled in Clang support. Logfiles can be opened in the editor using the |:YcmToggleLogs| command. @@ -3259,7 +3264,7 @@ I have a Homebrew Python and/or MacVim; can't compile/SIGABRT when starting ~ You should probably run 'brew rm python; brew install python' to get the latest fixes that should make YCM work with such a configuration. Also rebuild Macvim -then. If you still get problems with this, see issue #18 [73] for suggestions. +then. If you still get problems with this, see issue #18 [74] for suggestions. ------------------------------------------------------------------------------- *youcompleteme-i-get-long_bit-definition-appears-wrong-for-platform-when-compiling* @@ -3358,15 +3363,15 @@ YCM does not read identifiers from my tags files ~ First, put 'let g:ycm_collect_identifiers_from_tags_files = 1' in your vimrc. -Make sure you are using Exuberant Ctags [74] to produce your tags files since -the only supported tag format is the Exuberant Ctags format [72]. The format +Make sure you are using Exuberant Ctags [75] to produce your tags files since +the only supported tag format is the Exuberant Ctags format [73]. The format from "plain" ctags is NOT supported. The output of 'ctags --version' should -list "Exuberant Ctags". See Universal Ctags [75] for a maintained version. +list "Exuberant Ctags". See Universal Ctags [76] for a maintained version. Ctags needs to be called with the '--fields=+l' (that's a lowercase 'L', not a one) option because YCM needs the 'language:' field in the tags output. -**NOTE:** Exuberant Ctags [74] by default sets language tag for '*.h' files as +**NOTE:** Exuberant Ctags [75] by default sets language tag for '*.h' files as 'C++'. If you have C (not C++) project, consider giving parameter '-- langmap=c:.c.h' to ctags to see tags from '*.h' files. @@ -3445,7 +3450,7 @@ asynchronicity. This feature is available since Vim 7.4.1578. *youcompleteme-nasty-bugs-happen-if-i-have-vim-autoclose-plugin-installed* Nasty bugs happen if I have the 'vim-autoclose' plugin installed ~ -Use the delimitMate [76] plugin instead. It does the same thing without +Use the delimitMate [77] plugin instead. It does the same thing without conflicting with YCM. ------------------------------------------------------------------------------- @@ -3453,7 +3458,7 @@ conflicting with YCM. Is there some sort of YCM mailing list? I have questions ~ If you have questions about the plugin or need help, please use the ycm-users -[77] mailing list, _don't_ create issues on the tracker. The tracker is for bug +[78] mailing list, _don't_ create issues on the tracker. The tracker is for bug reports and feature requests. ------------------------------------------------------------------------------- @@ -3507,7 +3512,7 @@ mismatch in assumptions causes performance problems since Syntastic code isn't optimized for this use case of constant diagnostic refreshing. Poor support for this use case also led to crash bugs in Vim caused by -Syntastic-Vim interactions (issue #593 [78]) and other problems, like random +Syntastic-Vim interactions (issue #593 [79]) and other problems, like random Vim flickering. Attempts were made to resolve these issues in Syntastic, but ultimately some of them failed (for various reasons). @@ -3543,7 +3548,7 @@ paths, prepend '-isystem' to each individual path and append them all to the list of flags you return from your 'FlagsForFile' function in your '.ycm_extra_conf.py' file. -See issue #303 [79] for details. +See issue #303 [80] for details. ------------------------------------------------------------------------------- *youcompleteme-when-i-open-javascript-file-i-get-an-annoying-warning-about-.tern-project-file* @@ -3562,7 +3567,7 @@ When I start vim I get a runtime error saying 'R6034 An application has made ~ an attempt to load the C runtime library incorrectly.' ~ CMake and other things seem to screw up the PATH with their own msvcrXX.dll -versions. [80] Add the following to the very top of your vimrc to remove these +versions. [81] Add the following to the very top of your vimrc to remove these entries from the path. > python << EOF @@ -3587,7 +3592,7 @@ entries from the path. *youcompleteme-i-hear-that-ycm-only-supports-python-2-is-that-true* I hear that YCM only supports Python 2, is that true? ~ -**No.** Both the Vim client and the ycmd server [47] run on Python 2 or 3. If +**No.** Both the Vim client and the ycmd server [48] run on Python 2 or 3. If you work on a Python 3 project, you may need to set |g:ycm_python_binary_path| to the Python interpreter you use for your project to get completions for that version of Python. @@ -3598,7 +3603,7 @@ On Windows I get "E887: Sorry, this command is disabled, the Python's site ~ module could not be loaded" ~ If you are running vim on Windows with Python 2.7.11, this is likely caused by -a bug [81]. Follow this workaround [82] or use a different version (Python +a bug [82]. Follow this workaround [83] or use a different version (Python 2.7.12 does not suffer from the bug). ------------------------------------------------------------------------------- @@ -3630,29 +3635,29 @@ In recent versions of Vim, you can install YCM in a folder under *youcompleteme-ycm-does-not-shut-down-when-i-quit-vim* YCM does not shut down when I quit Vim ~ -YCM relies on the 'VimLeave' event to shut down the ycmd server [47]. Some +YCM relies on the 'VimLeave' event to shut down the ycmd server [48]. Some plugins prevent this event from triggering by exiting Vim through an autocommand without using the 'nested' keyword (see ':h autocmd-nested'). One -of these plugins is vim-nerdtree-tabs [83]. You should identify which plugin is +of these plugins is vim-nerdtree-tabs [84]. You should identify which plugin is responsible for the issue and report it to the plugin author. Note that when -this happens, ycmd [47] will automatically shut itself down after 30 minutes. +this happens, ycmd [48] will automatically shut itself down after 30 minutes. =============================================================================== *youcompleteme-contributor-code-of-conduct* Contributor Code of Conduct ~ Please note that this project is released with a Contributor Code of Conduct -[84]. By participating in this project you agree to abide by its terms. +[85]. By participating in this project you agree to abide by its terms. =============================================================================== *youcompleteme-contact* Contact ~ If you have questions about the plugin or need help, please join the Gitter -room [1] or use the ycm-users [77] mailing list. +room [1] or use the ycm-users [78] mailing list. If you have bug reports or feature suggestions, please use the issue tracker -[85]. Before you do, please carefully read CONTRIBUTING.md [60] as this asks +[86]. Before you do, please carefully read CONTRIBUTING.md [61] as this asks for important diagnostics which the team will use to help get you going. The latest version of the plugin is available at @@ -3667,7 +3672,7 @@ YouCompleteMe maintainers directly using the contact details below. *youcompleteme-license* License ~ -This software is licensed under the GPL v3 license [86]. © 2015-2017 +This software is licensed under the GPL v3 license [87]. © 2015-2017 YouCompleteMe contributors =============================================================================== @@ -3720,45 +3725,46 @@ References ~ [44] http://www.7-zip.org/download.html [45] http://www.mono-project.com/docs/getting-started/install/ [46] http://download.eclipse.org/jdtls/milestones -[47] https://github.com/Valloric/ycmd -[48] http://clang.llvm.org/docs/JSONCompilationDatabase.html -[49] https://ninja-build.org/manual.html -[50] https://github.com/rizsotto/Bear -[51] https://raw.githubusercontent.com/Valloric/ycmd/3ad0300e94edc13799e8bf7b831de8b57153c5aa/cpp/ycm/.ycm_extra_conf.py -[52] https://github.com/rdnetto/YCM-Generator -[53] https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html -[54] https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html -[55] https://docs.gradle.org/current/userguide/tutorial_java_projects.html -[56] https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FIClasspathEntry.html -[57] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_eclipse_project -[58] https://github.com/Valloric/ycmd/blob/java-language-server/ycmd/tests/java/testdata/simple_maven_project/pom.xml -[59] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_gradle_project -[60] https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md -[61] http://ternjs.net/doc/manual.html#configuration -[62] http://ternjs.net/doc/manual.html#server -[63] http://ternjs.net/doc/manual.html#plugins -[64] https://www.rust-lang.org/downloads.html -[65] https://www.rustup.rs/ -[66] https://www.typescriptlang.org/docs/handbook/tsconfig-json.html -[67] http://eclim.org/ -[68] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py -[69] https://github.com/Valloric/ListToggle -[70] https://github.com/itchyny/lightline.vim -[71] https://docs.python.org/2/library/re.html#regular-expression-syntax -[72] http://ctags.sourceforge.net/FORMAT -[73] https://github.com/Valloric/YouCompleteMe/issues/18 -[74] http://ctags.sourceforge.net/ -[75] https://github.com/universal-ctags/ctags -[76] https://github.com/Raimondi/delimitMate -[77] https://groups.google.com/forum/?hl=en#!forum/ycm-users -[78] https://github.com/Valloric/YouCompleteMe/issues/593 -[79] https://github.com/Valloric/YouCompleteMe/issues/303 -[80] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 -[81] https://github.com/vim/vim/issues/717 -[82] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 -[83] https://github.com/jistr/vim-nerdtree-tabs -[84] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md -[85] https://github.com/Valloric/YouCompleteMe/issues?state=open -[86] http://www.gnu.org/copyleft/gpl.html +[47] https://www.unicode.org/glossary/#diacritic +[48] https://github.com/Valloric/ycmd +[49] http://clang.llvm.org/docs/JSONCompilationDatabase.html +[50] https://ninja-build.org/manual.html +[51] https://github.com/rizsotto/Bear +[52] https://raw.githubusercontent.com/Valloric/ycmd/3ad0300e94edc13799e8bf7b831de8b57153c5aa/cpp/ycm/.ycm_extra_conf.py +[53] https://github.com/rdnetto/YCM-Generator +[54] https://help.eclipse.org/oxygen/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html +[55] https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html +[56] https://docs.gradle.org/current/userguide/tutorial_java_projects.html +[57] https://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FIClasspathEntry.html +[58] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_eclipse_project +[59] https://github.com/Valloric/ycmd/blob/java-language-server/ycmd/tests/java/testdata/simple_maven_project/pom.xml +[60] https://github.com/Valloric/ycmd/tree/master/ycmd/tests/java/testdata/simple_gradle_project +[61] https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md +[62] http://ternjs.net/doc/manual.html#configuration +[63] http://ternjs.net/doc/manual.html#server +[64] http://ternjs.net/doc/manual.html#plugins +[65] https://www.rust-lang.org/downloads.html +[66] https://www.rustup.rs/ +[67] https://www.typescriptlang.org/docs/handbook/tsconfig-json.html +[68] http://eclim.org/ +[69] https://github.com/Valloric/ycmd/blob/master/ycmd/completers/completer.py +[70] https://github.com/Valloric/ListToggle +[71] https://github.com/itchyny/lightline.vim +[72] https://docs.python.org/2/library/re.html#regular-expression-syntax +[73] http://ctags.sourceforge.net/FORMAT +[74] https://github.com/Valloric/YouCompleteMe/issues/18 +[75] http://ctags.sourceforge.net/ +[76] https://github.com/universal-ctags/ctags +[77] https://github.com/Raimondi/delimitMate +[78] https://groups.google.com/forum/?hl=en#!forum/ycm-users +[79] https://github.com/Valloric/YouCompleteMe/issues/593 +[80] https://github.com/Valloric/YouCompleteMe/issues/303 +[81] http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application/34696022 +[82] https://github.com/vim/vim/issues/717 +[83] https://github.com/vim/vim-win32-installer/blob/a27bbdba9bb87fa0e44c8a00d33d46be936822dd/appveyor.bat#L86-L88 +[84] https://github.com/jistr/vim-nerdtree-tabs +[85] https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md +[86] https://github.com/Valloric/YouCompleteMe/issues?state=open +[87] http://www.gnu.org/copyleft/gpl.html vim: ft=help From 9392f7fd6143344b4c2e1d3bbc2dc0257e3b4e87 Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 16 Apr 2018 20:18:55 +0200 Subject: [PATCH 7/8] Remove MSVC 12 from the supported compilers in docs --- README.md | 6 ++---- doc/youcompleteme.txt | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 6871f79f..a407ede3 100644 --- a/README.md +++ b/README.md @@ -469,8 +469,7 @@ install with all language features, ensure `msbuild`, `go`, `tsserver`, `node`, python install.py --all You can specify the Microsoft Visual C++ (MSVC) version using the `--msvc` -option. YCM officially supports MSVC 12 (Visual Studio 2013), 14 (2015), and 15 -(2017). +option. YCM officially supports MSVC 14 (Visual Studio 2015) and 15 (2017). That's it. You're done. Refer to the _User Guide_ section on how to use YCM. Don't forget that if you want the C-family semantic completion engine to work, @@ -632,8 +631,7 @@ process. Python 3][python-win-download]. Pick the version corresponding to your Vim architecture. You will also need Microsoft Visual C++ (MSVC) to build YCM. You can obtain it by installing [Visual Studio][visual-studio-download]. - MSVC 12 (Visual Studio 2013), 14 (2015), and 15 (2017) are officially - supported. + MSVC 14 (Visual Studio 2015) and 15 (2017) are officially supported. Here we'll assume you installed YCM with Vundle. That means that the top-level YCM directory is in `~/.vim/bundle/YouCompleteMe`. diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 8dcd49d1..29fb5694 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -692,8 +692,7 @@ install with all language features, ensure 'msbuild', 'go', 'tsserver', 'node', python install.py --all < You can specify the Microsoft Visual C++ (MSVC) version using the '--msvc' -option. YCM officially supports MSVC 12 (Visual Studio 2013), 14 (2015), and 15 -(2017). +option. YCM officially supports MSVC 14 (Visual Studio 2015) and 15 (2017). That's it. You're done. Refer to the _User Guide_ section on how to use YCM. Don't forget that if you want the C-family semantic completion engine to work, @@ -861,8 +860,8 @@ will notify you to recompile it. You should then rerun the install process. On Windows, you need to download and install Python 2 or Python 3 [39]. Pick the version corresponding to your Vim architecture. You will also need Microsoft Visual C++ (MSVC) to build YCM. You can obtain it by - installing Visual Studio [40]. MSVC 12 (Visual Studio 2013), 14 (2015), - and 15 (2017) are officially supported. + installing Visual Studio [40]. MSVC 14 (Visual Studio 2015) and 15 (2017) + are officially supported. Here we'll assume you installed YCM with Vundle. That means that the top- level YCM directory is in '~/.vim/bundle/YouCompleteMe'. From 310242e9f1a0b5c6f6810398fb8ef0b960b833b7 Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 16 Apr 2018 20:20:02 +0200 Subject: [PATCH 8/8] Update copyright years in docs --- README.md | 2 +- doc/youcompleteme.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a407ede3..df067299 100644 --- a/README.md +++ b/README.md @@ -3367,7 +3367,7 @@ License ------- This software is licensed under the [GPL v3 license][gpl]. -© 2015-2017 YouCompleteMe contributors +© 2015-2018 YouCompleteMe contributors [ycmd]: https://github.com/Valloric/ycmd [Clang]: http://clang.llvm.org/ diff --git a/doc/youcompleteme.txt b/doc/youcompleteme.txt index 29fb5694..49737205 100644 --- a/doc/youcompleteme.txt +++ b/doc/youcompleteme.txt @@ -3671,7 +3671,7 @@ YouCompleteMe maintainers directly using the contact details below. *youcompleteme-license* License ~ -This software is licensed under the GPL v3 license [87]. © 2015-2017 +This software is licensed under the GPL v3 license [87]. © 2015-2018 YouCompleteMe contributors ===============================================================================