diff options
Diffstat (limited to 'docs/cli_commands.md')
| -rw-r--r-- | docs/cli_commands.md | 27 |
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 | |||
| 382 | qmk format-c -b branch_name | 382 | qmk format-c -b branch_name |
| 383 | ``` | 383 | ``` |
| 384 | 384 | ||
| 385 | ## `qmk generate-compilation-database` | ||
| 386 | |||
| 387 | **Usage**: | ||
| 388 | |||
| 389 | ``` | ||
| 390 | qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] | ||
| 391 | ``` | ||
| 392 | |||
| 393 | Creates a `compile_commands.json` file. | ||
| 394 | |||
| 395 | Does 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 | |||
| 397 | This 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 | |||
| 410 | Now open your dev environment and live a squiggly-free life. | ||
| 411 | |||
| 385 | ## `qmk docs` | 412 | ## `qmk docs` |
| 386 | 413 | ||
| 387 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. | 414 | This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. |
