Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Code completion using LSP and clangd
Pecan:
--- Quote from: AndrewCot on January 07, 2022, 08:26:32 am ---@pecan.
I am not trying to be a PITA, but trying to give feedback and what I have seen when I see it so I do not forget....snipped...
--- End quote ---
I understand. And I really appreciate your doing all this work. I really need to set up some sort of bug tracking.
I'll work on it.
Thanks.
AndrewCot:
@pecan
I have updated to the r8 code and it works better than the r5 as expected. As expected it's working allot better than the r5. It's probably worth putting up on the SF repo the plugin binary/zip file so people can test it with the nightly build. As for bug tracking can you enable the tickets tab in SF?
Below is my updated list of things (queries, potential to do items, work I did ) for the plugin
Queries I have:
1) What is the clangd_client toolbar for? It is greyed out when I enable it and neither drop down is populated/enabled.
Changes that still need to be done that I spotted are:
1) Fix one compiler warning left (when built as a core plugin):
src\plugins\clangd_client\src\LSPclient\lspdiagresultslog.cpp:10:25:
warning: .objs31_64\include/sdk_precomp.h.gch: not used because `EXPORT_LIB' not defined [-Winvalid-pch]
10 | #include "sdk_precomp.h"
2) Add support for building under Linux, Mac and Windows x64 & x86 as a core plugin.
3) Add plugin files to the Debain, Mac and windows installer scripts/process.
4) Test installers works and the plugin works after installing using installer
5) With r8 the setup requires you to specify the C:\msys64\clang64\bin\clangd.exe , not the direxctory it is in.
The wxwidget group text needs to change to match this change.
6) The LSP plugin column widths do not take up the full width of the lopg dialog on my FDH screen (1920 x 1080). The
other logs also have this issue, so it may not be easy to fix.
The changes done to incorporate plug as a core plugin follow that may/will need to be incorporated at some stage:
1. Included the SF src in the src\plugins\clangd_client directory (same level as the codecompletion core plugin)
2. Incorporate the windows cpb into the src\CodeBlocks_wx31_64.cbp with changes
3. Update code for use with PCH as per src\CodeBlocks_wx31_64.cbp (client.cpp and codecompletion.cpp changed)
4. Updated my unofficial NSIS installer to add the plugin
The following is what is needed to get the plugin working with MSYS2:
1) Install MSYS 2 clang packages:
pacman -S mingw-w64-clang-x86_64-toolchain
2) Configure for use:
a) In the Settings->editor select Clangd_Client settings.
b) In the C/C++ parser tab change the "LLVM directory" to specify the clangd.exe you have installed:
C:\msys64\clang64\bin\clangd.exe
AndrewCot:
FYI. The following tickets have a codecompletion tag and are currently open, so when finished hopefully a heck of allot of these will get resolved:
Ticket# Summary
1057 Code completion header search path disrespect build target/platform
1028 Tab Code Completion bug
859 "Implementation of" is searching in all projects instead of current one
820 "Find references of" doesn't always work
793 Code completion stop working with enum defined inside function body
790 Code Completion lacks cstdint typedefs when prefixed with std::
788 Code completion doesn't account for shared_ptr, unique_ptr, etc
716 Code::Blocks 17.12 CodeCompletion slows down the editor dramatically
692 Intellisense not working unless include paths provided plus CB slash auto-conversion in paths
679 Right-click on <header.h>: CB looks in GCC path first regardless of chosen compiler
576 Add case sensitivity for header/source search under case-sensitive systems
518 Source parser error (SVN 11087
498 Parsing of the doxygen comment "see also" command error
474 Autocompletion does not work by using const pointer
388 Code completition doesn't work if used C++11 raw string literal
298 Code completion only works in gcc projects
286 CC crash when closing workspace
283 Bug e Outros 15.xx Brasil C++ Previso Erros
281 Let's CC support Conditional Code :: Blocks. highlighting in the editor
237 CC will not show all members in the namespace std
236 No code completion in array-of-struct
224 Duplication in documentation tooltip
213 ParserThread::GetBaseArgs function need to be refactored
212 space in Tokenizer::ReadParentheses issue
197 thread safty issue of CodeCompletion plugin
193 running cctest is too slow
177 Code completion fails with enum variables defined/declared along with the enum types
172 code completion doesn-t work with auto key word
156 CC failed parsing the char (*varname)[7]; (a pointer to an array of characters) definition
145 Code completion ignores parameters of catch-clauses
127 Code completion fails with complex declarations/definitions
88 Code completion mouse hover tooltip is always active
83 codecompletion's setting not saved correctly
47 Show call tip of the constructor function
43 Code complete - keyword final
31 restrict keyword and auto-completion
159 Code Completion fails for C++ functions marked "override"
158 Code completion fails with the "using Alias = Type" syntax in C++11
33 C++11 Initializer lists fool code completion
211 CCTest for the parser logic
313 CB hangs when loading a project for the first time after new launch
256 CC's Toolbar does not show function correctly inside the namespace scope
312 CC's symbol tree does not show correctly unless collapse and expand again
438 Popup hint for std::vector::end() causes Codeblocks to freeze
311 C::B hangs when exits
Pecan:
--- Quote from: AndrewCot on January 09, 2022, 01:55:05 am ---@pecan
I have updated to the r8 code and it works better than the r5 as expected. As expected it's working allot better than the r5. It's probably worth putting up on the SF repo the plugin binary/zip file so people can test it with the nightly build. As for bug tracking can you enable the tickets tab in SF?
--- End quote ---
--- Quote from: AndrewCot on January 09, 2022, 11:21:31 am ---FYI. The following tickets have a codecompletion tag and are currently open, so when finished hopefully a heck of allot of these will get resolved:
--- End quote ---
@AndrewCot
Damn !! Thanks for all this hard work.
I'll start working on this today.
I'm not sure right now, but I think I have to enable tickets user by user. I seem to remember a lot of ads showing up in the tickets if it's opened for everyone. I could be wrong.
Would you send me a private message with your SourceForge login ID. (not your password). I'll find a way to authorize you for tickets. (i"m still not very adept at "SorceForging".
killerbot:
I would suggest to add it to the opfficial Cb repo at location next to the current cc.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version