When the cursor is immediately to the right of a token, the cursor's
column will be token.end.column + 1, so take this into account when
choosing which token to autocomplete.
Previously, the client would decide when to ask the server for
completions, and it would only do so for identifiers that had spans
(determined via the highlighter!).
Swap this around and make the server decide if it wants to complete
something.
This commit also adds a CompletionKind (which only has one value:
Identifier), to work with other kinds of completions as well.
The language server keeps track of the content of currently edited
files by receiving updates about edit actions.
Also, C++ autocompletion is no longer tied to HackStudio itself and
moved to be part of the language server.
2020-09-30 21:46:59 +02:00
Renamed from DevTools/HackStudio/CppAutoComplete.cpp (Browse further)