From 009ca60f3382d99af9ae31d4ef2311a773c3c185 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Sat, 4 Mar 2023 07:25:34 -0500 Subject: [PATCH] Document compiledb generation. The compiledb=yes flag is only documented in the vscode and clion sections, but is relevant to any LSP-based editor. In addition, nothing mentioned the ability to generate a compilation database without compiling, referenced here: https://github.com/godotengine/godot/issues/39883#issuecomment-924423857 --- .../development/configuring_an_ide/index.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/contributing/development/configuring_an_ide/index.rst b/contributing/development/configuring_an_ide/index.rst index 4c03e6d77..32bb8bb9b 100644 --- a/contributing/development/configuring_an_ide/index.rst +++ b/contributing/development/configuring_an_ide/index.rst @@ -24,3 +24,15 @@ Development Environment), here are setup instructions for some popular ones: xcode It is possible to use other IDEs, but their setup is not documented yet. + +If your editor supports the `language server protocol `__, +you can use `clangd `__ for completion, diagnostics, and more. +You can generate a compilation database for use with clangd one of two ways: + +.. code-block:: shell + + # Generate compile_commands.json while compiling + scons compiledb=yes + + # Generate compile_commands.json without compiling + scons compiledb=yes compile_commands.json