Page 1 of 1

Anyone made CodeLite completion work for MacOS

Posted: Mon Jul 22, 2024 8:58 pm
by evstevemd

I have configured LSP but I have never got it working.
I use CMake to include libraries.
I work under MacOS, latest CodeLite 17.x.x

Since moving to LSP I have never gotten CL to work reliably.

I hope someone have it working and can shed light!


Re: Anyone made CodeLite completion work for MacOS

Posted: Mon Jul 22, 2024 10:27 pm
by eranif

Most of my daily work is done using macOS with CodeLite and LSP (rust-analyzer, gopls & clangd).
Never failed me.

  • If it does not work for you than you probably don't have the compile_commands.json setup properly
  • Using latest clangd (usually you should install it from brew install llvm)

My guess is that you are missing the first configuration file (compile_commands.json required by clangd to work properly)


Re: Anyone made CodeLite completion work for MacOS

Posted: Tue Jul 23, 2024 12:45 am
by evstevemd
eranif wrote: Mon Jul 22, 2024 10:27 pm

Most of my daily work is done using macOS with CodeLite and LSP (rust-analyzer, gopls & clangd).
Never failed me.

  • If it does not work for you than you probably don't have the compile_commands.json setup properly
  • Using latest clangd (usually you should install it from brew install llvm)

My guess is that you are missing the first configuration file (compile_commands.json required by clangd to work properly)

The file is there. I can confirm full of list of JSON object like below

Code: Select all

{
  "file": "/path/file.cpp",
  "directory": "/path/xdebug_plugin",
  "command": "/usr/bin/clang++ -c /path/file.cpp -o /path/file.cpp.o -target x86_64-apple-darwin22.6.0 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks -DPLUGIN_CREATING_DLL -DAPI_USING_DLL -I. -I. -Isrc -I../sdk/include  -g"
 }

Clang version

Code: Select all

clang --version                                                                                            130 ↵  ✹master
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: x86_64-apple-darwin22.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Am not sure where I do wrong. I have checked whatever I can