Version 2 (modified by 3 years ago) ( diff ) | ,
---|
Clangd
clangd is language server designed to provide features like autocomplete, go to definition, and refactoring to a wide range of editors.
Setting up clangd
Generate compile_command.json
macOS
clangd relies on compile_commands.json file to work, which can be generated on macOS by running
make r EXPORT_COMPILE_COMMANDS=YES generate-compile-commands WebKitBuild/Release
I would recommend running this command each time you pull the latest code.
If you add or remove files during development, just compile with make and run the generate-compile-commands
.
Linux and Windows
For other platforms using cmake, generating compile_commands.json can be accomplished by running
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1
Configure your editor
Every editor will have slightly different method to setup clangd.
The clangd website provides an excellent setup guide for most popular editors.
Attachments (1)
-
clangd_screenshot.png
(251.2 KB
) - added by 3 years ago.
clangd autocomplete
Download all attachments as: .zip