ycmd icon indicating copy to clipboard operation
ycmd copied to clipboard

[RFC] Allow clients to send incremental file updates

Open bstaletic opened this issue 5 years ago • 2 comments

As discussed in #1480, this time ycmd keeps the state of all files, on a per-completer bases. It definitely needs more testing and, like I mentioned in gitter, this doesn't really take care of "what's the filetype of current buffer" - that's still fetched from request_data[ 'file_data' ].


This change is Reviewable

bstaletic avatar Nov 23 '20 15:11 bstaletic

I figured out what's wrong with this. Here's the diff.

diff --git a/ycmd/completers/language_server/language_server_completer.py b/ycmd/completers/language_server/language_server_completer.py
index c87ca7e1b..2ffef7094 100644
--- a/ycmd/completers/language_server/language_server_completer.py
+++ b/ycmd/completers/language_server/language_server_completer.py
@@ -1981,7 +1981,8 @@ class LanguageServerCompleter( Completer ):
         'text': fix_it_chunk[ 'replacement_text' ],
         'range': lsp_range
       }
-    if self._sync_type == 'Incremental' and changes is not None:
+    # TODO: Figure out what's wrong with this.
+    if False and self._sync_type == 'Incremental' and changes is not None:
       diff = [ FixItChunkToContentChangeEvent( change )
                for change in changes ]
     else:

So why does it not work?

bstaletic avatar Mar 21 '21 14:03 bstaletic

Rebased. Let's see what the tests will say.

bstaletic avatar Apr 28 '21 15:04 bstaletic

Seems abandoned. We can always re-open this in future.

puremourning avatar Sep 29 '22 19:09 puremourning