Recent Posts

Pages: 1 2 3 4 5 [6] 7 8 9 10
51
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on January 15, 2022, 02:15:44 pm »
Hi, I try to debug this plugin, but I have always have this line hit:

Code
// ----------------------------------------------------------------------------
void CodeCompletion::OnAttach()
// ----------------------------------------------------------------------------
{
    AppVersion appVersion;
    appVersion.m_AppName = "clangd_client";
    // Set current plugin version
PluginInfo* pInfo = (PluginInfo*)(Manager::Get()->GetPluginManager()->GetPluginInfo(this));
pInfo->version = appVersion.GetVersion();

    // ccmanager's config obtained from Menu=>Settings=>Editor=>Code Completion (sub panel)
    // Get the CB config item that enables CodeCompletion
    ConfigManager* ccmcfg = Manager::Get()->GetConfigManager(_T("ccmanager"));
    m_CodeCompletionEnabled = ccmcfg->ReadBool(_T("/code_completion"), false);
    if (not m_CodeCompletionEnabled)
    {
        pInfo->version = pInfo->version.BeforeFirst(' ') + " Inactive";
        return;
    }


I have always get the m_CodeCompletionEnabled is false, and I have no idea how to enable it.

What I did is like below:

1, I have build a normal cbp:

Code
D:\code\cb\cb_sf_git\cccrash2019\src\CodeBlocks_wx31_64.cbp

I just build it.

2, I just open the downloaded clangd_client project, and I changed some build options:

In the build option custom variables, I set the variable:  TARGET_DEVEL_DIR
as the value: D:\code\cb\cb_sf_git\cccrash2019, which is the root folder of my local C::B git/svn

3, I changed the output filename as:
Code
$(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\plugins\clangd_client.dll

which means the build target(clangd_client.dll) will be put in the same folder as the other core plugins.

4,  I set the Execution working dir as:

Code
$(TARGET_DEVEL_DIR)\src\devel31_64

Which is the folder where codeblocks.exe locates.

5,  I change the post build script as:

Code
cmd /c if not exist $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks mkdir $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks
zip -jq9 $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/manifest.xml src/resources/*.xrc
zip -r9  $(TARGET_DEVEL_DIR)\src\devel31_64\share\CodeBlocks\clangd_client.zip src/resources/images > nul

This means I make a clangd_client.zip, and put it in the destination devel31_64 folder.




52
Development / Re: event sequence question?
« Last post by Miguel Gimenez on January 15, 2022, 11:39:59 am »
I have just added the plugin.

It is isolated from the workspaces and autotools, so it must be compiled explicitly if wanted (and should be disabled when not needed).
53
Help / Re: Linux C::B Nightly r12639 variable expansion query/help
« Last post by AndrewCot on January 15, 2022, 09:51:32 am »
It was my setup. To fix it I had to do the following:
    curl -O http://archive.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxgtk3.0-gtk3-dev_3.0.5.1+dfsg-2_amd64.deb
    dpkg -i libwxgtk3.0-gtk3-dev_3.0.5.1+dfsg-2_amd64.deb

Once I have got C::B building on LM 20.3 I will need to supply a new WIKI page for setting it up for development.
54
Help / Linux C::B Nightly r12639 variable expansion query/help
« Last post by AndrewCot on January 15, 2022, 08:20:33 am »
On my Linux Mint 20.3 and Xubuntu 20.04 virtual box guests I cannot get the <Add option="`$(WX_CONFIG) --cflags`" /> to work with the Nightly r12639, it does not expand to anything (aka empty string) in the build log and therefore I cannot use the CodeBlocks_wx30-unix.cbp to build C::B without hacking the project file to manually change the $(WX_CONFIG) to wx_config. Hopefully it's just a config issues somewhere, but I cannot find it.

Do other linux devs using r12639 have any issues with <Add option="`$(WX_CONFIG) --cflags`" />  ? If you have a different C::B version do you have an issue or not? Please post you result and which SVN version so I can go back to a working version and then start bisecting until I find the issue, unless it's my setup.....

Below are details of the issue debugging output are below:

BUILD LOG SNIPPET:
Code
	-D__START__1__
        wx-config --toolkit=gtk3 --cflags
-D__START__2__
-D__START__3__
        -I/usr/lib/x86_64-linux-gnu/wx/include/base-unicode-3.0 -I/usr/include/wx-3.0  -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -pthread pkg-config gdk-wx-config --toolkit=gtk3 --cflags
    -D__START__4__
        pkg-config gdk-3.0 --cflags
    -D__START__5__
        -pthread -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/fribidi -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-D__START__6__
-D__WX__

UNIX PROJECT FILE SNIPPET:
Code
    <Target title="scintilla">
        <Option output="devel30/wxscintilla_cb" prefix_auto="1" extension_auto="1" />
        <Option working_dir="" />
        <Option object_output=".objs30" />
        <Option type="2" />
        <Option compiler="gcc" />
        <Compiler>
            <Add option="-D__START__1__" />
            <Add option="$(WX_CONFIG) --cflags" />
            <Add option="-D__START__2__" />
            <Add option="`$(WX_CONFIG) --cflags`" />
            <Add option="-D__START__3__" />
            <Add option="`wx-config --cflags`" />
            <Add option="pkg-config gdk-$(WX_CONFIG) --cflags" />
            <Add option="-D__START__4__" />
            <Add option="pkg-config gdk-$(PKG_CONFIG_GTK_VERSION) --cflags" />
            <Add option="-D__START__5__" />
            <Add option="`pkg-config gdk-$(PKG_CONFIG_GTK_VERSION) --cflags`" />
            <Add option="-D__START__6__" />
            <Add option="-D__WX__" />
            <Add option="-DGTK" />
            <Add option="-DLINK_LEXERS" />
            <Add option="-DSCI_LEXER" />
            <Add option="-DWXMAKINGDLL_SCI" />
            <Add directory="sdk/wxscintilla/src/scintilla/include" />
            <Add directory="sdk/wxscintilla/src/scintilla/src" />
            <Add directory="sdk/wxscintilla/src/scintilla/lexlib" />
        </Compiler>
        <ResourceCompiler>
            <Add directory="sdk/wxscintilla/include" />
        </ResourceCompiler>
    </Target>

........

    <Environment>
        <Variable name="PKG_CONFIG_GTK_VERSION" value="3.0" />
        <Variable name="WX_CFG" value="" />
        <Variable name="WX_CONFIG" value="wx-config --toolkit=gtk3" />
        <Variable name="WX_SUFFIX" value="u" />
        <Variable name="WX_VERSION" value="30" />
    </Environment>
</Build>
       

C:B Details
Name                   : Code::Blocks
Version                : svn-r12639
SDK Version            : 2.16.0
Scintilla Version      : 3.7.5
Author                 : The Code::Blocks Team
E-mail                 : info@codeblocks.org
Website                : http://www.codeblocks.org
OS                     : Linux 5.4.0-94-generic x86_64
Scaling factor         : 1.000000
Detected scaling factor: 1.000000
Display PPI            : 96x96
Display count          : 1
Display 0              : XY=[0,0]; Size=[1920,969]; Primary

wxWidgets Library (wxGTK port)
Version 3.0.5 (Unicode: wchar_t, debug level: 1),
Runtime version of toolkit used is 3.24.
Compile-time GTK+ version is 3.24.20.


C::B source : Downloaded from https://wxstuff.xaviou.fr/article/debian-repository.html .
Note: Info on https://forums.codeblocks.org/index.php/topic,24798.msg169113.html#msg169113 could be relevant.
55
Plugins development / Re: Code completion using LSP and clangd
« Last post by AndrewCot on January 15, 2022, 07:29:43 am »
The plugin download does not have the fix in it.
56
Plugins development / Re: Code completion using LSP and clangd
« Last post by Pecan on January 15, 2022, 06:53:26 am »
I see your latest commit here in rev 27

* clangd_client - Code to remove invalid utf8 chars from clangd responses; cf., client.cpp/h DoValidateUTF8data()

I will test it, thanks!

EDIT updated:

The illegal utf8 problem still exits in rev 27.   :(

Can you give me some guidance as to how you created the problem. I can't make it happen here.

What source are you using that got a utf8 invalid char?

What symbol were you trying to code complete.

What indication are you getting that there was an invalid utf8 char. A wxMessageBox or an error shown in the cb debug log?

If a message was in the CB debug log, what did it say?

Did you use the repo source or the download file ?
In plugin management, what is the version you see for clangd_client?

I don't think the download files have been updated yet.

Thanks for testing.
57
@Xaviou
I have installed a new virtualbox guest LM 20.3 from the linuxmint-20.3-xfce-64bit.iso and have found the following after narrowing the C::B install problem that I have been having with this new LM 20.03 install as follows:

1) If I try to install the Xaviou's Debian bullseye nightly 20.03svn12639 release I cannot due to dependency issues. Attahed is the install log showing the dependency issues.
2) If I install the following two deb's before trying to install Xaviou's debian bullseye then the install works and I can start C::B (have not tested it as this has taken a while to get to this stage):
     http://ftp.de.debian.org/debian/pool/main/w/wxwidgets3.0/libwxbase3.0-0v5_3.0.5.1+dfsg-2_amd64.deb
     http://archive.ubuntu.com/ubuntu/pool/universe/w/wxwidgets3.0/libwxgtk3.0-gtk3-0v5_3.0.5.1+dfsg-2_amd64.deb

Sorry, but I have no idea what the real problem is as I am not a hard core Linux developer and do not have the skills to figure out what is going on.

I have attached is the script I used to install codeblocks (appended .txt to be able to add it). It does not install the debs above. For Linux I try to create install scripts so the base install can be re-created and this script is a snippet taken from a larger script that installs a number of utilities (Meld, Git, PeaZip & & &....).

Let me know if you want me to try anything or if you need more info.
58
Plugins development / Re: Code completion using LSP and clangd
« Last post by ollydbg on January 15, 2022, 04:08:33 am »
I see your latest commit here in rev 27

* clangd_client - Code to remove invalid utf8 chars from clangd responses; cf., client.cpp/h DoValidateUTF8data()

I will test it, thanks!

EDIT updated:

The illegal utf8 problem still exits in rev 27.   :(
59
Development / Re: event sequence question?
« Last post by ollydbg on January 15, 2022, 03:10:49 am »
I think it should be a core plugin.

But this plugin should be excluded from the normal C::B user.  It's mainly for developers.
60
Development / Re: event sequence question?
« Last post by AndrewCot on January 14, 2022, 09:36:57 pm »
It would be very useful. IMHO Worst case add it as a contrib plugin, but I agree is would be better as a core plugin.
Pages: 1 2 3 4 5 [6] 7 8 9 10