Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Autocomplete with LSP #156

Open
ouuan opened this issue Feb 1, 2020 · 9 comments
Open

Add Autocomplete with LSP #156

ouuan opened this issue Feb 1, 2020 · 9 comments
Assignees
Labels
enhancement New feature or request medium_priority Medium Priority Issues qcodeeditor Issue related to QCodeEditor

Comments

@ouuan
Copy link
Member

ouuan commented Feb 1, 2020

Is your feature request related to a problem? Please describe.

QCodeEditor lacks of features like auto-completion, jump to ref and so on.

Describe the solution you'd like

Support language server.

Describe alternatives you've considered

Use scintilla for these features, but scintilla has many limitations, too.

Additional context

N/A

@ouuan ouuan added enhancement New feature or request high_priority High Priority Issues are marked with this label. labels Feb 1, 2020
@ouuan ouuan self-assigned this Feb 1, 2020
@caretaker-claire
Copy link

Hi ouuan
Thanks for Opening a new Issue here. I will also thank you for strictly following the Issue Templates.
I will add an appropriate tag to your Issue.

Have Patience, One of our Cool Contributors will help you soon.

@coder3101
Copy link
Member

MasRay's ccls will be best. Its fast and works on very nicely and have everything for C/C++

@coder3101
Copy link
Member

Also put these codes in a separate folder like include/lsp/CppLsp.h and similarly for source files.

@ouuan ouuan removed their assignment Feb 2, 2020
@ouuan ouuan added medium_priority Medium Priority Issues and removed high_priority High Priority Issues are marked with this label. labels Feb 2, 2020
@coder3101
Copy link
Member

I will be making https://github.com/coder3101/lsp-cpp compatible to work with the editor. This would add Simple LSP for Editor. We don't need complex LSP like that of VSCODE because our editor works on single file mode and that is enough.

@ouuan ouuan added this to the v7.0 milestone Feb 21, 2020
@ouuan ouuan added high_priority High Priority Issues are marked with this label. and removed medium_priority Medium Priority Issues labels Feb 25, 2020
@ouuan ouuan removed this from the v7.0 milestone Mar 16, 2020
@ouuan ouuan added the work in progress The work has been started and is in progress. label Apr 19, 2020
@coder3101 coder3101 changed the title Support language server Add Autocomplete with LSP Apr 24, 2020
@coder3101 coder3101 added medium_priority Medium Priority Issues and removed high_priority High Priority Issues are marked with this label. work in progress The work has been started and is in progress. labels May 13, 2020
@coder3101 coder3101 self-assigned this Jun 16, 2020
@coder3101
Copy link
Member

QCodeEditor must modify its auto complete insertion text, because for auto completion of functions the LSP responds with text as below:

void foo(int bar);

int main(){
   fo|
}

| Is the cursor.

The LSP responds with following completion text

foo(${bar:int})

Insertion of this line is not valid rather, contents inside {} are for us to know what variable and types are expected, we should rather only complete functional name and braces and place cursor inside of the brace. Something like foo(|)

This preprocessing can be done from LSP client side as well but more preferred place is within insertCompletion() within QCodeEditor.

@coder3101 coder3101 added the qcodeeditor Issue related to QCodeEditor label Jun 26, 2020
@madhur4127
Copy link

The reason that stops me from using this is clangd.

Clangd being more than a LSP that tightly integrates with the compiler makes programming easy.

@coder3101
Copy link
Member

@madhur4127 Could you elaborate your comment?

@coder3101
Copy link
Member

There is already LSP support. Even the Client we use currently support everything that LSP offers. It is just that we don't have UI/Code Editor that can show these things.

@coder3101 coder3101 mentioned this issue Mar 13, 2021
@h2110100
Copy link

Is the auto-completion still under works? I can use linting ok with clangd but I can't see the suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium_priority Medium Priority Issues qcodeeditor Issue related to QCodeEditor
Projects
None yet
Development

No branches or pull requests

4 participants