| | 1 | == Configuration |
| | 2 | 1. Create a symlink in the root of your WebKit source directory: |
| | 3 | {{{ |
| | 4 | $ ln -s WebKitBuild/GTK/Release/compile_commands.json compile_commands.json |
| | 5 | }}} |
| | 6 | Replacing `GTK` with `WPE` if you are commonly building the WPE port. |
| | 7 | |
| | 8 | 2. In your IDE set the clangd path to `<WebKitSourceDirectory>/Tools/flatpak/webkit-flatpak`. |
| | 9 | 3. Make sure that the clangd arguments include the `--enable-config` and the `--gtk` or `--wpe` options. |
| | 10 | |
| | 11 | == Vim Example |
| | 12 | |
| | 13 | For instance, when configuring vim's coc via `:CocLocalConfig` you write: |
| | 14 | {{{ |
| | 15 | { |
| | 16 | "clangd.arguments": [ |
| | 17 | "--enable-config", |
| | 18 | "--gtk" |
| | 19 | ], |
| | 20 | "clangd.path": "/home/user/WebKit/Tools/flatpak/webkit-clangd" |
| | 21 | } |
| | 22 | }}} |