Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code completion using LSP and clangd
ollydbg:
--- Quote from: Pecan on October 23, 2023, 06:34:24 pm ---
@ ollydbg
Would you place the following "return;" mod in JumpTracker.cpp and see if it solves this problem for you.
--- Code: ---Index: JumpTracker.cpp
===================================================================
--- JumpTracker.cpp (revision 13374)
+++ JumpTracker.cpp (working copy)
@@ -458,6 +458,11 @@
void JumpTracker::OnEditorActivated(CodeBlocksEvent& event)
// ----------------------------------------------------------------------------
{
+ // This is causing the new activated editor to enter it's current line location //(ph 2023/10/22)
+ // before entering the clangd_client target of "Find declaration" causing the next
+ // jump back to jump to an out of sequence location.
+ return; //(ph 2023/10/23)
+
// Record this activation event and place activation in history
// NB: Editor Activated is not called on project loading.
// So we miss the first activated editor
--- End code ---
The point of this test is to stop OnEditorActivated() from entering the current location of the activated editor before BrowseTracker gets to enters the location of the Clangd_client response.
--- End quote ---
Thanks, I just tested your patch, and it solved my reported jump issue, that's great!
Pecan:
--- Quote from: ollydbg on October 24, 2023, 02:18:32 am ---Thanks, I just tested your patch, and it solved my reported jump issue, that's great!
--- End quote ---
Fix applied 2023/10/24 for BrowseTracker head rev 13378
ollydbg:
--- Quote from: Pecan on October 24, 2023, 06:19:59 pm ---
--- Quote from: ollydbg on October 24, 2023, 02:18:32 am ---Thanks, I just tested your patch, and it solved my reported jump issue, that's great!
--- End quote ---
Fix applied 2023/10/24 for BrowseTracker head rev 13378
--- End quote ---
Good work! Thanks!
gd_on:
@pecan
--- Quote ---The images are in the .zip file. I just don't use them.
We've been using clangd_client for a year or more without icons.
I'd rather not use them if we don't have to.
--- End quote ---
Neverthess, it could be nice if you could reintroduce those icons as it was in legacy codecompletion). For me, looking at the icons, quickly indicates if it's a variable or a method, also with the color, quickly indicates if it's public, private, protected... I have the feeling that some code are still there (in your codecompletion* or parsemanager*) but not activated by AddToImageList and GetImage(...) or code in comments.
May be, for those who don't like those icons, you could set a checkbox in the clangd plugin configuration.
Pecan:
--- Quote from: gd_on on October 26, 2023, 05:42:13 pm ---<snipped>
Neverthess, it could be nice if you could reintroduce those icons as it was in legacy codecompletion). For me, looking at the icons, quickly indicates if it's a variable or a method, also with the color, quickly indicates if it's public, private, protected... I have the feeling that some code are still there (in your codecompletion* or parsemanager*) but not activated by AddToImageList and GetImage(...) or code in comments.
May be, for those who don't like those icons, you could set a checkbox in the clangd plugin configuration.
--- End quote ---
I'll have a look at it.
It'll take some time. Clangd reports types (kinds) entirely differently from legacy CodeCompletion. I don't yet know how to map Clangd kinds to the legacy icons.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version