Anyone made CodeLite completion work for MacOS

General questions regarding the usage of CodeLite
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Anyone made CodeLite completion work for MacOS

Post 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!

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Anyone made CodeLite completion work for MacOS

Post 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)

Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Anyone made CodeLite completion work for MacOS

Post 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

CodeLite 15.x
CodeLite is awesome, I just Love it!

Post Reply