-
Notifications
You must be signed in to change notification settings - Fork 78
Autocompletion for C++ preprocessor directives doesn't delete existing text properly #220
Comments
Seeing what appears to be the same issue with Hack, when completing variable names:
If not setting |
I have the same problem here using ide-cquery for autocompletion. Does anyone have a solution? |
Seems to be related to the fact that those completions have an empty The following modification seems to do the trick, but not sure if this is the best thing to do: --- a/lib/adapters/autocomplete-adapter.ts
+++ b/lib/adapters/autocomplete-adapter.ts
@@ -393,7 +393,7 @@ export default class AutocompleteAdapter {
item: CompletionItem,
suggestion: TextSuggestion,
) {
- suggestion.text = item.insertText || item.label;
+ suggestion.text = item.insertText || "";
suggestion.filterText = item.filterText || item.label;
suggestion.displayText = item.label;
suggestion.type = AutocompleteAdapter.completionKindToSuggestionType(item.kind); |
Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉 If this is still an issue please consider opening an issue on that repo. |
Hi, I'm using ide-cquery package for C++ autocompletion.
When I type
#include <stdi
, the completion returns#include <stdio.h>
.However, if I press enter to trigger the completion the resulting string will be
#include <#include <stdio.h>
. It doesn't seem to delete the text before the<
.Another example: Type
#def
, autocomplete will suggest#define
but##define
(double hashtag) is inserted upon pressing enter, it doesn't delete the first#
.The text was updated successfully, but these errors were encountered: