Auto completion is strange
X-Ryl669 opened this issue · 1 comments
For example, in C++
#include <iostream>
int main()
{
std::cou <HERE>
Try to complete std::cout
. The proposed choice removes the typed 'u'. You can't iterate on the completions either, if you press Ctrl + Space, the line is indented instead.
I don't think Ctrl+Space should ever trigger a "tab" command.
Yet, this works:
#include <iostream>
struct T
{
void onSomething() {}
void onReturn() {}
}
int main()
{
T t;
t.on <HERE>
Here, you can iterate the 2 choices... But if you validate the completion by pressing right key, sometimes (not everytime), a additional space is added after the completion. Pressing "tab" only indent the line
Finally, if autoCompleteDetails
is true, it opens a pane with only the function return type or a lot of empty lines like this:
1 #include <iostream>
2
3 class Test{
4 public:
5 void test(){
6 std::cout<<"Test"<<std::endl;
7 }
8 void test2() {}
9 };
10
>>11 int main(){
12 Test test;
13 test.test2 (test)// After pressing Ctrl+Space here completion event should be triggered but nothing happens
>>14 return 0;
15 }
>>16
a.cpp + (13,17) | ft:c++ | unix | utf-8 Alt-g: bindings, Ctrl-Backspace: help
1 Test 2 3 int 4 5 6 7 8 9 10
11
12
13 size_t
14
15
16
17
18
19
20
21
22
23 void
24 void
25
26
27
28 bool
29
30
31
32
33
34 bool
35 std::nullptr_t
36
37
38
39
40 size_t
For me, when I press Ctrl+Spacebar, the text which I typed disappears.
Following is my setup
- lsp - 0,6.2
- micro - 2.0.13
- os - Ubuntu 22.04
- lsp.server - clangd
Say for example, I type std::cou and press Ctrl+Spacebar then I am only left with std::