Some completion UI, such as Emacs' completion-at-point and company-lsp,
display completion item label and detail side by side.
This does not look right, when you see things like:
"foo" "int foo()"
"bar" "void bar(int i = 0)"
When this option is enabled, the completion item label is very detailed,
it shows the full signature of the candidate.
The detail just contains the completion item parent context.
Also, in this mode, functions with default arguments,
generates one more item per default argument
so that the right function call can be selected.
That is, you get something like:
"int foo()" "Foo"
"void bar()" "Foo"
"void bar(int i = 0)" "Foo"
Be wary, this is quickly quite verbose,
items can end up truncated by the UIs.
The heuristic may not be perfect, but it is probably good enough.
clang_codeCompleteAt seems to get slower as more and more CXUnsavedFile
instances are uploaded.
- Semantic highlighting no longer disappears when switching between
files.
- Semantic highlighting for a symbol will remain stable as the file is
edited.
- Improved semantic highlighting colors.
Progress indicator also now shows the number of remaining index jobs
(not the total number).
It adds a bit too much latency to code completion. I suspect this can
be removed by running real-time indexing in a separate thread (though
this will require a dedicated CXTranslationUnit instance).
This also changes the API used for reporting diagnostics, which will hopefully be more reliable. This requires reparsing the document, though, so it is much slower. We do this after reporting code completion though, so hopefully the performance delay is not too noticable.
diagnostics.onParse: semi-real time diagnostics that reported when a file is indexed or prepared for code completion
diagnostics.onCodeComplete: real time diagnostics that are reported as you type