From dedb6857a35dda29da6458a6b91c8d141079d3d3 Mon Sep 17 00:00:00 2001 From: Nick Hahn Date: Tue, 29 Dec 2020 14:15:27 +0100 Subject: [PATCH] Fix compile_commands generation for vim --- compile_commands_env.py | 4 ++++ platformio.ini | 1 + 2 files changed, 5 insertions(+) create mode 100644 compile_commands_env.py diff --git a/compile_commands_env.py b/compile_commands_env.py new file mode 100644 index 0000000..d96093d --- /dev/null +++ b/compile_commands_env.py @@ -0,0 +1,4 @@ +import os +Import("env") + +env.Replace(COMPILATIONDB_PATH=os.path.join("$PROJECT_DIR", "compile_commands.json")) diff --git a/platformio.ini b/platformio.ini index 2417fe0..a8cbe11 100644 --- a/platformio.ini +++ b/platformio.ini @@ -12,6 +12,7 @@ platform = atmelavr board = nanoatmega328 framework = arduino +extra_scripts = post:compile_commands_env.py ;lib_deps = ; stevemarple/AsyncDelay @ ^1.1.2 ; stevemarple/SoftWire @ ^2.0.4