aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/cli_commands.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/cli_commands.md b/docs/cli_commands.md
index 06568afb4..1427b592f 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -320,6 +320,33 @@ qmk format-c
320qmk format-c -b branch_name 320qmk format-c -b branch_name
321``` 321```
322 322
323## `qmk generate-compilation-database`
324
325**Usage**:
326
327```
328qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
329```
330
331Creates a `compile_commands.json` file.
332
333Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you.
334
335This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files.
336
337**Example:**
338
339```
340$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
341$ qmk generate-compilation-database
342Ψ Making clean
343Ψ Gathering build instructions from make -n gh60/satan:colemak
344Ψ Found 50 compile commands
345Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
346```
347
348Now open your dev environment and live a squiggly-free life.
349
323## `qmk docs` 350## `qmk docs`
324 351
325This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. 352This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.