Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Code completion using LSP and clangd

<< < (73/91) > >>

gd_on:

--- Quote ---Please tell me the version of gcc and clangd you're using so I can exactly mirror your evnvironment.
--- End quote ---
It's the last versions from msys2 distribution, updated last week. gcc, clang ... in the same mingw64 directory.

garwin:
I have tried this new plugin which seems quite interesting and much better replacement for code completion plugin but I am struggling to set up everything correctly.
Win11 Codeblocks svn 13485, compiler MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders) 13.1.0

There are several interesting things I will try to describe.

1. run Codeblock through CbLauncher.exe vs. directly codeblocks.exe
note: I am using directly codeblocks.exe through a problem to setup color schemes using CbLauncher

In this case, after enable plugin, the plugin is inactive (using directly codeblocks.exe) with information that CB need to be restarted and compiler set. After restart plugin is inactive and there is no access to setting for plugin.
note: In case using CBLauncher, it does work.

2. LSP messages (using through CBLauncher)
I got really big bunch of errors, it seems that there is no recognition of templates, std namespace, includes headers etc.
Point2.hpp|126|error:Unknown type name 'T'
TestPoint2.hpp|14|error:Use of undeclared identifier 'std'
TestPoint2.hpp|3|error:In included file: 'concepts' file not found 
- this is linked to #include <concepts>

This is probably problem with settings but what can be done?
I have installed the 4 files specified in wiki manually in Clangd folder under Codeblocks and set the path in C/C++ parser tab.

Pecan:
@garwin

For my clarity, and some things I don't understand.

--- Quote ---note: I am using directly codeblocks.exe through a problem to setup color schemes using CbLauncher

--- End quote ---
I don't understand what "problem to setup color schemes" means.


--- Quote ---I have installed the 4 files specified in wiki manually in Clangd folder under Codeblocks and set the path in C/C++ parser tab.

--- End quote ---

What four files did you install and where did you install them?

Have you disabled CodeCompletion plugin first, then enabled Clangd_Clinet plugin second. from MainMenu/plugins/ManagePlugin. CodeCompletion plugin and Clangd_client plungin cannot run together.

After doing the above enable/disable of plugin, you must then restart CodeBlocks.

Again, very important that CodeCompletion be disabled and Clangd_client be enabled and CodeBlocks restarted. See the image below. CodeCompletion must show as greyed out.

Then, using MainMenu/Settings/Editor/Clangd_client/C++Parser (tab) set the full path location of clangd.exe.

garwin:
@Pecan

I did it exactly as you describe except last step (see bellow)
I think I was able to dig into the problem, but do not know the solution.

I use codeblock.exe directly which saves settings in Windows in AppData\Roaming.
I did not change these settings after I updated to the last nightly build (previously using the last official version of codeblocks).

But using this old setting means that I can disable this old CodeCompletion plugin and enable Clangd_clinet plugin however cannot setup Clangd_client because I have no options to do so in Settings/Editor. There are all different settings (General setting, Folding ....) but no Clangd. So after restarting codeblocks, Clangd_client is disabled.



Pecan:
@garwin

Please provide the following information so that I can setup my environment the same as yours and try to detect the error.

Within code tags (the # icon above the reply box) provide the appdata\roaming\codeblocks\ "personality" causing the problem. In the example below the "personality" is "default" at the bottom right of the codeblocks window (yours may be different). It will reside at \users\<your pc users name>\appdata\roaming\codeblocks\<personality name>.conf .

Also provide the codeblocks log (within code tags). The title of the tab is "Code::Blocks". It may look empty, but just use the mouse wheel up or down to see the data.
Right click on the tab title and select copy to clipboard.
Then paste it between code tags so we can analyze it.

Tell me exactly how to start codeblocks.exe the same way you do to cause the error.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version