Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code completion using LSP and clangd
ollydbg:
--- Quote from: Pecan on December 24, 2022, 08:39:19 pm ---
--- Quote from: ollydbg on November 06, 2022, 11:30:05 am ---I have some situation that there are many information messages showing: LSP: File not yet parsed.
The step is:
1, double click on a file in the source navigation tree, and a new editor is opened.
2, mouse hover on some symbols in the editor.
3, the information massage happens.
Sometimes, I got this information messages showing many times, I think there is a logic error.
... quote modified by pecan ...
--- End quote ---
Finally !! Caught and fixed in Head rev 13134
It seems clangd server started (at some point) sending an empty textDocument/publishDiagnostics
response (with a missing "version" entry) to a didClose() request, which really confused clangd_client.
Thanks ollydbg :>)
--- End quote ---
Hi, thanks, I will rebuild my C::B and test it.
EDIT:
It looks there is a typo in this commit.
--- Code: ----#define VERSION wxT("1.2.60 22/12/22")
+#define VERSION wxT("1.2.611 22/12/24")
--- End code ---
ollydbg:
Hi, I see one issue today.
In the latest clangd_client (0.61), I see that "find declaration" and "find implementation" context menu item just do the same thing.
Here, I can see when I click on either item, it just jump between the function declaration and implementation.
Pecan:
--- Quote from: ollydbg on December 28, 2022, 09:43:03 am ---Hi, I see one issue today.
In the latest clangd_client (0.61), I see that "find declaration" and "find implementation" context menu item just do the same thing.
Here, I can see when I click on either item, it just jump between the function declaration and implementation.
--- End quote ---
That's how clangd works.
Clangd doesn't seem to distinguish between the declaration and definition. It only has a "GoToDefinition" request.
If there's a missing .h or .cpp file, Find Declaration and Find Implementation mean the same thing to clangd.
I've tried adding code to determine which to display.
Given the request came from an .h file I try to display the .cpp file entry and vise versa.
Could you give me some example code that is causing the problem.
Maybe I can be more precise in showing the declaration vs the definition.
killerbot:
I see that the plug-in sometimes put a read square on the left hand side of the editor (because it spots something which is not ok), but where can I see the "message/diagnostic", so I know what it is telling me ?
BlueHazzard:
--- Quote ---I see that the plug-in sometimes put a read square on the left hand side of the editor (because it spots something which is not ok), but where can I see the "message/diagnostic", so I know what it is telling me ?
--- End quote ---
In the LSP messages tab in the log pane
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version