aboutsummaryrefslogtreecommitdiff
path: root/docs/cli_commands.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/cli_commands.md')
-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 8f5117633..520da06c4 100644
--- a/docs/cli_commands.md
+++ b/docs/cli_commands.md
@@ -382,6 +382,33 @@ qmk format-c
382qmk format-c -b branch_name 382qmk format-c -b branch_name
383``` 383```
384 384
385## `qmk generate-compilation-database`
386
387**Usage**:
388
389```
390qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
391```
392
393Creates a `compile_commands.json` file.
394
395Does 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.
396
397This 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.
398
399**Example:**
400
401```
402$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
403$ qmk generate-compilation-database
404Ψ Making clean
405Ψ Gathering build instructions from make -n gh60/satan:colemak
406Ψ Found 50 compile commands
407Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
408```
409
410Now open your dev environment and live a squiggly-free life.
411
385## `qmk docs` 412## `qmk docs`
386 413
387This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. 414This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.