From af88f20b6f2a2aa37d124a82385da75ce9bcb4d5 Mon Sep 17 00:00:00 2001 From: The Motherfucking Bearodactyl Date: Sun, 19 May 2024 17:34:14 -0500 Subject: [PATCH] add compiler_commands generator --- scripts/gen_compile_commands_for_nvim.ps1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/gen_compile_commands_for_nvim.ps1 diff --git a/scripts/gen_compile_commands_for_nvim.ps1 b/scripts/gen_compile_commands_for_nvim.ps1 new file mode 100644 index 0000000..3dac919 --- /dev/null +++ b/scripts/gen_compile_commands_for_nvim.ps1 @@ -0,0 +1,23 @@ +geode.exe build -p android64 | Out-Null + +if (Test-Path -Path .\build-android64) { + Write-Host "Generated android64 build files" +} + +cmake -A win32 -B build | Out-Null + +if (Test-Path -Path .\build) { + Write-Host "Generated win32 build files" +} + +if (Test-Path -Path .\build-android64\compile_commands.json && Test-Path -Path .\build\ && Test-Path -Path .\build\compile_commands.json -ErrorAction Stop) { + Copy-Item -Path .\build-android64\compile_commands.json -Destination .\build\ -Force +} + +Remove-Item -Recurse -Force -Path .\build-android64\ + +if (Test-Path -Path .\build\compile_commands.json) { + Write-Host " Successfuly generated compile_commands.json" + Write-Host "-----------------------------------------------" + Write-Host "NeoVim should now be 100% compatible with Geode" +}